Exports
Client and server exports available from wasabi_banking. These are useful for radial menus, paychecks, boss menus, and third-party integrations.
The resource folder must be named wasabi_banking for these exports to resolve.
Client exportsβ
isUIOpenβ
Returns whether the banking UI is currently open.
local uiOpen = exports.wasabi_banking:isUIOpen()
if uiOpen then
print('Banking UI is open')
end
OpenUIβ
Opens the main banking UI.
exports.wasabi_banking:OpenUI()
CloseUIβ
Closes the banking UI.
exports.wasabi_banking:CloseUI()
Server exportsβ
Transactionβ
Adds a statement entry to an account. Useful for paycheck scripts and other money flows that log separately.
exports.wasabi_banking:Transaction(identifier, reason, amount, type, account)
| Parameter | Type | Description |
|---|---|---|
identifier | string | Player identifier / citizenid, or society account id when account is 'society'. |
reason | string | Transaction description. |
amount | number | Transaction amount. |
type | string | 'deposit' or 'sent'. |
account | string | 'personal', 'savings', or 'society'. 'personal' is stored as account type bank. |
AddMoneyβ
Adds money to an account. Frozen accounts are rejected (except cash).
exports.wasabi_banking:AddMoney(accountType, accountID, amount, source)
| Parameter | Type | Description |
|---|---|---|
accountType | string | 'bank', 'cash', 'savings', 'society', or 'shared'. |
accountID | string|number | Account id (player server id for bank/cash, owner identifier for savings, society name, or shared account id). |
amount | number | Amount to add. |
source | number? | Optional player source for personal bank/cash when accountID is not the server id. |
Returns true on success, false on failure.
exports.wasabi_banking:AddMoney('bank', source, 200)
exports.wasabi_banking:AddMoney('shared', sharedAccountId, 150)
RemoveMoneyβ
Removes money from an account. Frozen accounts are rejected (except cash).
exports.wasabi_banking:RemoveMoney(accountType, accountID, amount, source)
Parameters match AddMoney. Returns true on success, false on failure.
exports.wasabi_banking:RemoveMoney('cash', source, 50)
exports.wasabi_banking:RemoveMoney('society', 'police', 500)
CreateJobAccountβ
Creates a society/job account with an initial balance.
local ok = exports.wasabi_banking:CreateJobAccount('police', 5000)
GetAccountBalanceβ
Returns the balance for an account, or false if not found.
local balance = exports.wasabi_banking:GetAccountBalance(accountID, accountType)
| Parameter | Type | Description |
|---|---|---|
accountID | string|number | Account id, owner identifier, or society name. |
accountType | string | 'bank', 'savings', 'society', or 'shared'. |
GetPlayerAccountsβ
Returns savings and shared accounts for a player.
local accounts = exports.wasabi_banking:GetPlayerAccounts(sourceOrIdentifier)
for _, account in ipairs(accounts) do
print(account.id, account.type) -- type is 'savings' or 'shared'
end
createSavingsAccountβ
Creates a savings account for a player.
local ok = exports.wasabi_banking:createSavingsAccount(sourceOrIdentifier, 500)
createSharedAccountβ
Creates a shared account owned by the player.
local ok = exports.wasabi_banking:createSharedAccount(source, 'Family Account')
removeUserFromSharedAccountβ
Removes a member from a shared account.
local ok = exports.wasabi_banking:removeUserFromSharedAccount(identifier, accountId)
accountId can be obtained from GetPlayerAccounts.
hireUserToSharedAccountβ
Adds a member to a shared account.
local ok = exports.wasabi_banking:hireUserToSharedAccount(targetSource, 'John Doe', accountId)
IsAccountFrozenβ
Returns whether an account is frozen.
local frozen = exports.wasabi_banking:IsAccountFrozen(accountType, accountId)
FreezeAccountβ
Freezes an account by type and id.
local ok, err = exports.wasabi_banking:FreezeAccount(accountType, accountId, frozenBy)
| Parameter | Type | Description |
|---|---|---|
accountType | string | 'bank', 'savings', 'shared', or 'society'. |
accountId | string|number | Citizenid for bank/savings, shared row id, or society job name. |
frozenBy | string? | Optional actor label stored with the freeze. |
Shared accounts must be frozen by id (or IBAN). Display names are not unique.
UnfreezeAccountβ
Unfreezes an account by type and id.
local ok, err = exports.wasabi_banking:UnfreezeAccount(accountType, accountId)
GetAccountsByPlayerβ
Lists bank, savings, and shared accounts for a player in the same shape as the admin search panel.
local rows = exports.wasabi_banking:GetAccountsByPlayer(sourceOrIdentifier)
GetAccountByIbanβ
Resolves an IBAN to account info, including frozen state.
local account = exports.wasabi_banking:GetAccountByIban('WSB-123456')
if account then
print(account.type, account.id, account.frozen)
end
Returns nil when the IBAN is not found.
FreezeAccountByIbanβ
Freezes an account looked up by IBAN.
local ok, err = exports.wasabi_banking:FreezeAccountByIban('WSB-123456', 'export')
Compatibility exportsβ
When enabled in Config.CompatExports, wasabi_banking also answers export calls aimed at replaced banking/management resources. See Migration for setup rules.
qb-managementβ
| Export | Purpose |
|---|---|
GetAccount / GetGangAccount | Society balance |
AddMoney / AddGangMoney | Add society money |
RemoveMoney / RemoveGangMoney | Remove society money |
The real qb-management resource must be removed. wasabi_banking provides it in fxmanifest.lua.
Renewed-Bankingβ
| Export | Purpose |
|---|---|
getAccountMoney | Society or online player bank balance |
addAccountMoney | Add society or player bank money |
removeAccountMoney | Remove society or player bank money |
handleTransaction | Record a statement entry only |
GetJobAccount | Renewed-shaped society account object |
CreateJobAccount | Create a society account |
Auto-skipped if the real Renewed-Banking resource is started. Used to keep qbx_management boss menus working.
okokBankingβ
| Export | Purpose |
|---|---|
GetAccount | Society balance |
AddMoney | Add society money |
RemoveMoney | Remove society money |
AddTransaction | Record a statement entry |
GetPlayerTransactions | Fetch player transaction history |
The real okokBanking resource must be removed. wasabi_banking provides it in fxmanifest.lua.