Fixed confiscating weapons, and locales for ammo count

This commit is contained in:
ElPumpo
2018-07-15 00:42:30 +02:00
parent eaa07150b8
commit c341cf32d2
10 changed files with 87 additions and 80 deletions
+2 -2
View File
@@ -30,7 +30,7 @@ AddEventHandler('esx_policejob:confiscatePlayerItem', function(target, itemType,
-- can the player carry the said amount of x item?
if sourceItem.limit ~= -1 and (sourceItem.count + amount) > sourceItem.limit then
TriggerClientEvent('esx:showNotification', _source, _U('invalid_quantity'))
TriggerClientEvent('esx:showNotification', _source, _U('quantity_invalid'))
else
targetXPlayer.removeInventoryItem(itemName, amount)
sourceXPlayer.addInventoryItem (itemName, amount)
@@ -38,7 +38,7 @@ AddEventHandler('esx_policejob:confiscatePlayerItem', function(target, itemType,
TriggerClientEvent('esx:showNotification', target, _U('got_confiscated', amount, sourceItem.label, sourceXPlayer.name))
end
else
TriggerClientEvent('esx:showNotification', _source, _U('invalid_quantity'))
TriggerClientEvent('esx:showNotification', _source, _U('quantity_invalid'))
end
elseif itemType == 'item_account' then