mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 02:08:55 +00:00
Fix oc crash and the impossibility to give anymore money
This commit is contained in:
@@ -272,9 +272,13 @@ ESX.RegisterCommand(
|
||||
"removeaccountmoney",
|
||||
"admin",
|
||||
function(xPlayer, args, showError)
|
||||
local MAX_AMOUNT = 1.79769e+308
|
||||
if not args.playerId.getAccount(args.account) then
|
||||
return showError(TranslateCap("command_removeaccountmoney_invalid"))
|
||||
end
|
||||
if args.amount > MAX_AMOUNT then
|
||||
return showError(("Amount must be between 1 and %s"):format(MAX_AMOUNT))
|
||||
end
|
||||
args.playerId.removeAccountMoney(args.account, args.amount, "Government Tax")
|
||||
if Config.AdminLogging then
|
||||
ESX.DiscordLogFields("UserActions", "Remove Account Money /removeaccountmoney Triggered!", "pink", {
|
||||
|
||||
Reference in New Issue
Block a user