(Feature): Added phone as an item

This commit is contained in:
RockySouthpaw committed 2020-09-09 17:22:56 -04:00
1 parent b478f16fec
commit 808315921b
3 files changed
+98 -29

No files matched your search

+11
View File
@@ -29,4 +29,15 @@ RegisterCommand('getnumber', function(source, args)
local xPlayer = ESX.GetPlayerFromId(_source)
local _identifier = xPlayer.getIdentifier()
print(_identifier)
end)
ESX.RegisterServerCallback('phone:getItemAmount', function(source, cb, item)
local xPlayer = ESX.GetPlayerFromId(source)
local items = xPlayer.getInventoryItem(item)
if items == nil then
cb(0)
else
cb(items.count)
end
end)