Exports
Series of exports that will be added as time goes on. These are good for implementing radial menus and usage of 3rd party scripts
Client Exports
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
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
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
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
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
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
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
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
Export Name: removeUserFromSharedAccount
Description: Removes a user from a shared account.
Parameters:
source
(string | number): Player ID or citizenID.
Returns: boolean
- true
if successful, false
if not.
Example:
-- Example Usage
exports['wasabi_banking']:removeUserFromSharedAccount('user_citizenID', 1)
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.
Returns: boolean
- true
if successful, false
if not.
Example:
-- Example Usage
exports['wasabi_banking']:hireUserToSharedAccount('target_citizenID', 'John Doe', 1)
Last updated