mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +00:00
Merge pull request #868 from esx-framework/npwd-fix
fix(es_extended/client/modules/npwd.lua): phoneItem count check
This commit is contained in:
@@ -5,7 +5,8 @@ local function checkPhone()
|
||||
return
|
||||
end
|
||||
|
||||
npwd:setPhoneDisabled((ESX.SearchInventory('phone').count or 0) <= 0)
|
||||
local phoneItem <const> = ESX.SearchInventory('phone')
|
||||
npwd:setPhoneDisabled((phoneItem and phoneItem.count or 0) <= 0)
|
||||
end
|
||||
RegisterNetEvent('esx:playerLoaded', checkPhone)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user