From 4cc96465120a3318555369676df3d1f7cf3a45ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Eskildsen?= Date: Mon, 20 Jan 2020 06:33:17 +0100 Subject: [PATCH] Added Cash support to /giveaccountmoney Just to have a easy way to give cash to a person i have added a check to see if account == cash, just to avoide having more commands. --- server/commands.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/commands.lua b/server/commands.lua index cbee7f24..b2f7b34d 100644 --- a/server/commands.lua +++ b/server/commands.lua @@ -74,7 +74,9 @@ TriggerEvent('es:addGroupCommand', 'giveaccountmoney', 'admin', function(source, local amount = tonumber(args[3]) if amount then - if xPlayer.getAccount(account) then + if account == 'cash' then + xPlayer.addMoney(amount) + else if xPlayer.getAccount(account) then xPlayer.addAccountMoney(account, amount) else TriggerClientEvent('esx:showNotification', source, _U('invalid_account'))