Merge pull request #28 from 123B3n/patch-1

Duplication fix
This commit is contained in:
Samuel
2018-06-05 20:36:47 +02:00
committed by GitHub
+2 -2
View File
@@ -347,7 +347,7 @@ AddEventHandler('esx_property:putItem', function(owner, type, item, count)
local playerItemCount = xPlayer.getInventoryItem(item).count
if playerItemCount >= count then
if playerItemCount >= count and count > 0 then
TriggerEvent('esx_addoninventory:getInventory', 'property', xPlayerOwner.identifier, function(inventory)
xPlayer.removeInventoryItem(item, count)
@@ -365,7 +365,7 @@ AddEventHandler('esx_property:putItem', function(owner, type, item, count)
local playerAccountMoney = xPlayer.getAccount(item).money
if playerAccountMoney >= count then
if playerAccountMoney >= count and count > 0 then
xPlayer.removeAccountMoney(item, count)