From 36bc96cdfe9e2214706d48d3fe462184169368a7 Mon Sep 17 00:00:00 2001 From: DanishRP Date: Sat, 11 May 2019 01:18:59 +0200 Subject: [PATCH] Changed Variables Changed Variables for self.removeAccountMoney, did not match same scheme as other functions in same function --- server/classes/player.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/classes/player.lua b/server/classes/player.lua index 256b365c..5642c527 100644 --- a/server/classes/player.lua +++ b/server/classes/player.lua @@ -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