mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-30 01:38:52 +00:00
Changed Variables
Changed Variables for self.removeAccountMoney, did not match same scheme as other functions in same function
This commit is contained in:
@@ -289,18 +289,18 @@ function CreateExtendedPlayer(player, accounts, inventory, job, loadout, name, l
|
||||
TriggerClientEvent('esx:setAccountMoney', self.source, account)
|
||||
end
|
||||
|
||||
self.removeAccountMoney = function(a, m)
|
||||
if m < 0 then
|
||||
self.removeAccountMoney = function(acc, money)
|
||||
if money < 0 then
|
||||
print(('es_extended: %s attempted exploiting! (reason: player tried removing -1 account balance)'):format(self.identifier))
|
||||
return
|
||||
end
|
||||
|
||||
local account = self.getAccount(a)
|
||||
local newMoney = account.money - m
|
||||
local account = self.getAccount(acc)
|
||||
local newMoney = account.money - ESX.Math.Round(money)
|
||||
|
||||
account.money = newMoney
|
||||
|
||||
if a == 'bank' then
|
||||
if acc == 'bank' then
|
||||
self.set('bank', newMoney)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user