mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 02:01:31 +00:00
refactor(es_extended/imports): implement requested changes
This commit is contained in:
@@ -50,9 +50,9 @@ if not IsDuplicityVersion() then -- Only register this event for the client
|
|||||||
|
|
||||||
if not ESX.GetConfig("CustomInventory") then
|
if not ESX.GetConfig("CustomInventory") then
|
||||||
ESX.SecureNetEvent("esx:addInventoryItem", function(item, count, showNotification)
|
ESX.SecureNetEvent("esx:addInventoryItem", function(item, count, showNotification)
|
||||||
for k, v in ipairs(ESX.PlayerData.inventory) do
|
for i = 1, #ESX.PlayerData.inventory do
|
||||||
if v.name == item then
|
if ESX.PlayerData.inventory[i].name == item then
|
||||||
ESX.PlayerData.inventory[k].count = count
|
ESX.PlayerData.inventory[i].count = count
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user