mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 18:28:52 +00:00
Fixed counting error
This commit is contained in:
+1
-1
@@ -269,7 +269,7 @@ AddEventHandler('esx_property:getItem', function(owner, type, item, count)
|
||||
if count > 0 and inventory.getItem(item).count >= count then
|
||||
|
||||
-- can the player carry the said amount of x item?
|
||||
if sourceItem.limit ~= -1 and (sourceItem.count + item) > sourceItem.limit then
|
||||
if sourceItem.limit ~= -1 and (sourceItem.count + count) > sourceItem.limit then
|
||||
TriggerClientEvent('esx:showNotification', _source, _U('player_cannot_hold'))
|
||||
else
|
||||
inventory.removeItem(item, count)
|
||||
|
||||
Reference in New Issue
Block a user