account type for qb format to esx

This commit is contained in:
MrNewb committed 2025-05-05 10:45:00 -04:00
1 parent 9863393775
commit 3e6bc0dd81
1 file changed
+4 -3
+4 -3
View File
@@ -243,6 +243,7 @@ end
Framework.AddAccountBalance = function(src, _type, amount)
local xPlayer = ESX.GetPlayerFromId(src)
if not xPlayer then return end
if _type == 'cash' then _type = 'money' end
return xPlayer.addAccountMoney(_type, amount)
end
@@ -251,6 +252,7 @@ end
Framework.RemoveAccountBalance = function(src, _type, amount)
local xPlayer = ESX.GetPlayerFromId(src)
if not xPlayer then return end
if _type == 'cash' then _type = 'money' end
xPlayer.removeAccountMoney(_type, amount)
return true
end
@@ -260,6 +262,7 @@ end
Framework.GetAccountBalance = function(src, _type)
local xPlayer = ESX.GetPlayerFromId(src)
if not xPlayer then return end
if _type == 'cash' then _type = 'money' end
return xPlayer.getAccount(_type).money
end
@@ -330,6 +333,4 @@ Framework.Commands.Add = function(name, help, arguments, argsrequired, callback,
help = help,
arguments = arguments
})
end
-- test
end