RegisterNetEvent('esx:removeInventoryItem')
AddEventHandler('esx:removeInventoryItem', function(itemName, itemCount, item)
if item.name ~= nil and item.label ~= nil then
-- SendNotify('remove', item.name, item.label, count)
loadPlayerInventory()
checkFastSlots(item)
for i=1, #fastItems, 1 do
if Config.ItemWeapons.Enabled then
if fastItems[i].name == item.name then
if fastItems[i].count - count > 0 then
fastItems[i].count = fastItems[i].count - count
else
fastItems[i] = nil
end
if string.match(item.name, 'WEAPON_') then
RemoveWeapon(item.name)
currentWeapon = nil
end
end
else
if fastItems[i].name == item.name then
if fastItems[i].count - count > 0 then
fastItems[i].count = fastItems[i].count - count
else
fastItems[i] = nil
end
end
end
end
end
end)