Exports
Comprehensive instructions on configuring files and utilizing export functions.
Prior experience as a developer or basic programming skills are recommended to effectively navigate this section of the documentation.
Banking Exports
This module provides a set of exports to interact with the banking system. (server side only)
You can use these exports from other resources with:
exports["crm-banking"]:functionName(args)🔸getSocietyMoney
Returns the current balance of a society account.
local crm_balance = exports["crm-banking"]:getSocietyMoney(crm_owner)Parameters
crm_owner(string) – The society/job name (e.g."police").
Returns
(number| nil) – The current balance, or
nilif the account doesn’t exist.
Example
local crm_balance = exports["crm-banking"]:getSocietyMoney("police")
print("Police Department - Bank Balance: "..tostring(crm_balance))🔸setSocietyMoney
Sets the exact balance of a society account.
Parameters
crm_owner(string) – The society/job name.crm_amount(number) – The new balance to set.
Returns
(boolean) –
trueif updated successfully,falseotherwise.
Example
🔸addSocietyMoney
Adds a specific amount to a society’s balance.
Parameters
crm_owner(string) – The society/job name.crm_amount(number) – The amount to add.
Returns
(boolean) –
trueif successful,falseotherwise.
Example
🔸removeSocietyMoney
Removes a specific amount from a society’s balance.
Parameters
crm_owner(string) – The society/job name.crm_amount(number) – The amount to remove (must be greater than 0).
Returns
(boolean) –
trueif successful,falseotherwise.
Example
🔸createSocietyAccount
Creates a new society account.
Parameters
crm_owner(string) – The society/job name.crm_label(string, optional) – The display label of the account.crm_budget(number, optional) – The starting balance (default = 0).
Example
🔸getSocietyAccount
Returns the full account data of a society account.
Parameters
crm_owner(string) – The society/job name.
Returns
(table | nil) – Account data table or
nilif not found.
Example
🔸getSocietyIban
Returns the IBAN of a society account.
Parameters
crm_owner(string) – The society/job name.
Returns
(string | nil) – The IBAN, or
nilif the account doesn’t exist.
Example
🔸addSocietyTransaction
Creates a transaction entry for a society account.
Parameters
crm_owner(string) – The society/job name.crm_amount(number) – The transaction amount.crm_type(string) – The transaction type (e.g."crm-deposit","crm-withdraw").crm_description(string) – A short reason for the transaction.crm_by(number, optional) – Player server ID (source) who made the transaction. Optional, can be leftnil
Returns
(boolean) –
trueif logged successfully,falseotherwise.
Example
🔸getAccountByIban
Returns the full account table for a given IBAN.
Parameters
crm_iban(string) – The IBAN of the account you want to retrieve.
Returns
(table | nil) – The account table if found, otherwise
nil.
Example
🔸getPlayerAccounts
Returns all banking accounts owned by a specific player.
Parameters
crm_owner(string) – The owner identifier (character identifier).
Returns
(table) – A table (array) of all matching account rows. Will return an empty table if the owner has no accounts.
Example
🔸deletePlayerAccounts
Deletes all accounts belonging to a specific owner.
Parameters
crm_owner(string) – The owner whose accounts should be deleted.crm_source(number | nil) – (Optional) The source/player who triggered the deletion. Used for logging purposes.
Returns
(boolean) –
trueif the process executed,falseifcrm_ownerwas invalid.
Example
Last updated