mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 06:28:51 +00:00
(Feature): Added phone as an item
This commit is contained in:
1 parent
b478f16fec
commit
808315921b
3 files changed
+98
-29
No files matched your search
@@ -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)
|
||||
Reference in new issue
Block a user