Fixed #66, cleanup code

This commit is contained in:
ElPumpo
2019-10-20 09:50:32 +02:00
parent 4efea53b37
commit 549c28ff61
2 changed files with 49 additions and 56 deletions
+2 -2
View File
@@ -61,12 +61,12 @@ AddEventHandler('esx_shops:buyItem', function(itemName, amount, zone)
if xPlayer.canCarryItem(itemName, amount) then
xPlayer.removeMoney(price)
xPlayer.addInventoryItem(itemName, amount)
xPlayer.showNotification(_U('bought', amount, itemLabel, ESX.Math.GroupDigits(price))
xPlayer.showNotification(_U('bought', amount, itemLabel, ESX.Math.GroupDigits(price)))
else
xPlayer.showNotification(_U('player_cannot_hold'))
end
else
local missingMoney = price - xPlayer.getMoney()
xPlayer.showNotification(_U('not_enough', ESX.Math.GroupDigits(missingMoney))
xPlayer.showNotification(_U('not_enough', ESX.Math.GroupDigits(missingMoney)))
end
end)