mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 06:01:25 +00:00
Fix ox crash
This commit is contained in:
@@ -204,9 +204,13 @@ ESX.RegisterCommand(
|
||||
"setaccountmoney",
|
||||
"admin",
|
||||
function(xPlayer, args, showError)
|
||||
local MAX_AMOUNT = 1.79769e+308
|
||||
if not args.playerId.getAccount(args.account) then
|
||||
return showError(TranslateCap("command_giveaccountmoney_invalid"))
|
||||
end
|
||||
if args.amount > MAX_AMOUNT then
|
||||
return showError(("Amount must be between 1 and %s"):format(MAX_AMOUNT))
|
||||
end
|
||||
args.playerId.setAccountMoney(args.account, args.amount, "Government Grant")
|
||||
if Config.AdminLogging then
|
||||
ESX.DiscordLogFields("UserActions", "Set Account Money /setaccountmoney Triggered!", "pink", {
|
||||
@@ -234,9 +238,13 @@ ESX.RegisterCommand(
|
||||
"giveaccountmoney",
|
||||
"admin",
|
||||
function(xPlayer, args, showError)
|
||||
local MAX_AMOUNT = 1.79769e+308
|
||||
if not args.playerId.getAccount(args.account) then
|
||||
return showError(TranslateCap("command_giveaccountmoney_invalid"))
|
||||
end
|
||||
if args.amount > MAX_AMOUNT then
|
||||
return showError(("Amount must be between 1 and %s"):format(MAX_AMOUNT))
|
||||
end
|
||||
args.playerId.addAccountMoney(args.account, args.amount, "Government Grant")
|
||||
if Config.AdminLogging then
|
||||
ESX.DiscordLogFields("UserActions", "Give Account Money /giveaccountmoney Triggered!", "pink", {
|
||||
|
||||
Reference in New Issue
Block a user