mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +00:00
fix invalid quantity when depositing items into storage
This commit is contained in:
@@ -104,7 +104,7 @@ AddEventHandler('esx_taxijob:putStockItems', function(itemName, count)
|
|||||||
TriggerEvent('esx_addoninventory:getSharedInventory', 'society_taxi', function(inventory)
|
TriggerEvent('esx_addoninventory:getSharedInventory', 'society_taxi', function(inventory)
|
||||||
local item = inventory.getItem(itemName)
|
local item = inventory.getItem(itemName)
|
||||||
|
|
||||||
if item.count > 0 then
|
if sourceItem.count >= count and count > 0 then
|
||||||
xPlayer.removeInventoryItem(itemName, count)
|
xPlayer.removeInventoryItem(itemName, count)
|
||||||
inventory.addItem(itemName, count)
|
inventory.addItem(itemName, count)
|
||||||
xPlayer.showNotification(TranslateCap('have_deposited', count, item.label))
|
xPlayer.showNotification(TranslateCap('have_deposited', count, item.label))
|
||||||
|
|||||||
Reference in New Issue
Block a user