Pressing enter inside input now posts, further improvements

This commit is contained in:
ElPumpo
2018-06-09 19:00:29 +02:00
parent f4291d1564
commit 4433dbd68d
6 changed files with 38 additions and 6 deletions
+4
View File
@@ -6,6 +6,8 @@ AddEventHandler('esx_atm:deposit', function(amount)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
amount = tonumber(amount)
if not tonumber(amount) then return end
amount = round(amount)
if amount == nil or amount <= 0 or amount > xPlayer.getMoney() then
TriggerClientEvent('esx:showNotification', _source, _U('invalid_amount'))
@@ -21,6 +23,8 @@ AddEventHandler('esx_atm:withdraw', function(amount)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
amount = tonumber(amount)
if not tonumber(amount) then return end
amount = round(amount)
local accountMoney = 0
accountMoney = xPlayer.getAccount('bank').money