Skip to main content

Exports

Series of exports that are available within Complete Banking (wasabi_banking). These are good for implementing radial menus and usage of 3rd party scripts.

Client Exports​


isUIOpen​

isUIOpen

Export Name: isUIOpen

Description: Returns a boolean value if the banking UI is open or not.

Returns: boolean - true if UI open, false if not.

Example:

local uiOpen = exports.wasabi_banking:isUIOpen()

Server Exports​


Transaction​

Transaction
exports.wasabi_banking:Transaction(identifier, reason, amount, type, account)

Adds new transaction to specific records. Good for 3rd party paycheck scripts, etc.


identifier: player identifier (or citizen ID for QB) / STRING

reason: transaction description / STRING

amount: the amount of the transaction / NUMBER

type: "deposit" or "sent" / STRING | ENUM

account: "personal", "savings", or "society" / STRING | ENUM

AddMoney​

AddMoney

Export Name: AddMoney

Description: Adds money to the specific account type.

Parameters:

  • type (string): Type of account ('bank'| 'cash' | 'savings' | 'society' | 'shared').
  • accountID (string): Account ID (e.g., society name, player ID for personal account, citizen ID/identifier for savings, etc.)
  • amount (number): Amount to be added.
  • source (number, optional): Applicable only for personal accounts.

Returns: boolean - true if successful, false if not.

Example:

-- Example Usage
exports['wasabi_banking']:AddMoney('bank', '5', 200)
exports['wasabi_banking']:AddMoney('shared', 'sharedAccountID', 150)

RemoveMoney​

RemoveMoney

Export Name: RemoveMoney

Description: Removes money from the specified account.

Parameters:

  • type (string): Type of account ('bank'| 'cash' | 'savings' | 'society' | 'shared').
  • accountID (string): Account ID (e.g., society name, player ID for personal account, citizen ID/identifier for savings, etc.)
  • amount (number): Amount to be removed.
  • source (number, optional): Applicable only for personal accounts.

Returns: boolean - true if successful, false if not.

Example:

-- Example Usage
exports['wasabi_banking']:RemoveMoney('cash', '5', 200)
exports['wasabi_banking']:RemoveMoney('shared', 'sharedAccountID', 150)

CreateJobAccount​

CreateJobAccount

Export Name: CreateJobAccount

Description: Creates a job(society) account with an initial balance.

Parameters:

  • jobName (string): The name of the job/society (e.g., 'police').
  • balance (number): The starting balance for the account.

Returns: boolean - true if successful, false if not.

Example:

-- Example Usage
exports['wasabi_banking']:CreateJobAccount('police', 5000)

GetAccountBalance​

GetAccountBalance

Export Name: GetAccountBalance

Description: Retrieves the balance of a specified account.

Parameters:

  • accountID (string): Account ID, playerID, or society name.
  • type (string): Type of account ('bank'|'savings'| 'society'| 'shared').

Returns: number - Account balance or false if not found.

Example:

-- Example Usage
local balance = exports['wasabi_banking']:GetAccountBalance('playerID', 'bank')
print('Player bank balance:', balance)

GetPlayerAccounts​

GetPlayerAccounts

Export Name: GetPlayerAccounts

Description: Retrieves all accounts associated with a player.

Parameters:

  • source (string | number): Player ID or citizenID.

Returns: table - List of accounts { id = accountID, type = 'savings' | 'shared' }.

Example:

-- Example Usage
local accounts = exports['wasabi_banking']:GetPlayerAccounts('player_citizenID')
for _, account in ipairs(accounts) do
print(account.id, account.type)
end

createSavingsAccount​

createSavingsAccount

Export Name: createSavingsAccount

Description: Creates a savings account for a player.

Parameters:

  • source (string | number): Player ID or citizenID.
  • amount (number): Initial deposit

Returns: boolean - true if successful, false if not.

Example:

-- Example Usage
exports['wasabi_banking']:createSavingsAccount('player_citizenID', 500)

createSharedAccount​

createSharedAccount

Export Name: createSharedAccount

Description: Creates a shared account with a specified name.

Parameters:

  • source (string | number): Player ID or citizenID.
  • accountName (string): Name of the shared account

Returns: boolean - true if successful, false if not.

Example:

-- Example Usage
exports['wasabi_banking']:createSharedAccount(source, 'Family Account')

removeUserFromSharedAccount​

removeUserFromSharedAccount

Export Name: removeUserFromSharedAccount

Description: Removes a user from a shared account.

Parameters:

  • source (string | number): Player ID or citizenID.
  • accountId (number): ID of shared account. (ID can be obtained via GetPlayerAccounts export)

Returns: boolean - true if successful, false if not.

Example:

-- Example Usage
exports['wasabi_banking']:removeUserFromSharedAccount('user_citizenID', 1)

hireUserToSharedAccount​

hireUserToSharedAccount

Export Name: hireUserToSharedAccount

Description: Adds a user to a shared account with their name.

Parameters:

  • targetSource (string | number): Player ID or citizenID.
  • targetName (string): Name of the target user.
  • accountId (number): ID of shared account. (ID can be obtained via GetPlayerAccounts export)

Returns: boolean - true if successful, false if not.

Example:

-- Example Usage
exports['wasabi_banking']:hireUserToSharedAccount('target_citizenID', 'John Doe', 1)