Fix oc crash and the impossibility to give anymore money

This commit is contained in:
YOMAN1792
2025-02-25 15:45:27 -05:00
parent 3dae29d7dc
commit d9fe2d8051
@@ -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", {