CreatorsServer exports
GetMoney
Last updated on
A player's balance of one money type, or every balance.
local res = exports.opx_infinity:GetMoney(source, moneyType)Scope read · sync.
Parameters
- source:
number - moneyType?:
string— e.g.'EDDIES','BANK'
Returns
integer— the balance, or{ [type] = amount }whenmoneyTypeis nil
Errors
export.badArgument,error.notLoggedIn,money.badType
local res = exports.opx_infinity:GetMoney(source, 'BANK')
if res.ok and res.value >= 500 then print('can afford') end