Merge pull request #868 from esx-framework/npwd-fix

fix(es_extended/client/modules/npwd.lua): phoneItem count check
This commit is contained in:
TheFantomas
2023-02-04 23:18:10 +01:00
committed by GitHub
+2 -1
View File
@@ -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)