mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 06:28:51 +00:00
Merge branch 'master' of github.com:Re-Ignited-Development/new-phone-who-dis into feature/twitter
This commit is contained in:
commit
b180c4c655
18 files changed
+223
-77
No files matched your search
@@ -47,4 +47,23 @@ ESX.RegisterServerCallback('phone:getItemAmount', function(source, cb, item)
|
||||
else
|
||||
cb(items.count)
|
||||
end
|
||||
end)
|
||||
|
||||
----
|
||||
--Destroy Phone
|
||||
--
|
||||
|
||||
ESX.RegisterServerCallback('phone:removephone', function(source, cb, item)
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
local items = xPlayer.getInventoryItem(item)
|
||||
|
||||
if items == nil then
|
||||
cb(0)
|
||||
else
|
||||
cb(items.count)
|
||||
if items.count > 0 then
|
||||
xPlayer.removeInventoryItem('phone', items.count)
|
||||
xPlayer.addInventoryItem('dphone', items.count)
|
||||
end
|
||||
end
|
||||
end)
|
||||
Reference in new issue
Block a user