fix(es_extended/client/modules/npwd.lua): phoneItem count check

This commit is contained in:
Csoki
2023-01-30 21:44:49 +01:00
parent 81bfdea7b4
commit 230087fd3d
+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)