Multi-Language support

Added multi-language support
This commit is contained in:
Don
2017-08-14 15:06:48 -07:00
parent cc43d95ca6
commit f175149adf
6 changed files with 38 additions and 18 deletions
+4 -4
View File
@@ -7,11 +7,11 @@ AddEventHandler('esx_atm:deposit', function(amount)
local xPlayer = ESX.GetPlayerFromId(_source)
amount = tonumber(amount)
if amount == nil or amount <= 0 or amount > xPlayer.getMoney() then
TriggerClientEvent('esx:showNotification', _source, '~r~Montant invalide')
TriggerClientEvent('esx:showNotification', _source, _U('invalid_amount'))
else
xPlayer.removeMoney(amount)
xPlayer.addAccountMoney('bank', amount)
TriggerClientEvent('esx:showNotification', _source, 'Vous avez déposé ~g~' .. amount .. '$~s~.')
TriggerClientEvent('esx:showNotification', _source, _U('deposit_money') .. amount .. '~s~.')
TriggerClientEvent('esx_atm:closeATM', _source)
end
end)
@@ -25,11 +25,11 @@ AddEventHandler('esx_atm:withdraw', function(amount)
local accountMoney = 0
accountMoney = xPlayer.getAccount('bank').money
if amount == nil or amount <= 0 or amount > accountMoney then
TriggerClientEvent('esx:showNotification', _source, '~r~Montant invalide')
TriggerClientEvent('esx:showNotification', _source, _U('invalid_amount'))
else
xPlayer.removeAccountMoney('bank', amount)
xPlayer.addMoney(amount)
TriggerClientEvent('esx:showNotification', _source, 'Vous avez retiré ~g~' .. amount .. '$~s~.')
TriggerClientEvent('esx:showNotification', _source, _U('withdraw_money') .. amount .. '~s~.')
TriggerClientEvent('esx_atm:closeATM', _source)
end
end)