(Feature): Commented out dupe function and added new modifier.

This commit is contained in:
RockySouthpaw committed 2020-09-15 20:57:45 -04:00
1 parent c8fd806d57
commit 7d867252b0
4 files changed
+74 -7

No files matched your search

+19
View File
@@ -40,4 +40,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)