mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-02 11:18:53 +00:00
Fixed #66, cleanup code
This commit is contained in:
+2
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user