GetAccountBalance

This commit is contained in:
MrNewb committed 2025-06-11 23:15:15 -04:00
1 parent 02e47991db
commit 4da73dbc48
3 files changed
+34

No files matched your search

+11
View File
@@ -73,6 +73,17 @@ Framework.HideHelpText = function()
return exports['qb-core']:HideText()
end
---This will return the players money by type, I recommend not useing this as its the client and not secure or to be trusted.
---@param _type string
---@return number
Framework.GetAccountBalance = function(_type)
local player = Framework.GetPlayerData()
if not player then return 0 end
local account = player.money
if _type == 'money' then _type = 'cash' end
return account[_type] or 0
end
---This will return the item data for the specified item.
---@param item string
---@return table