A personal account is your framework’s own bank balance. Reading it and moving money work whether or not that player is connected.
Accounts
GetAccount
Returns an account, ornil when there is no such account.
string
required
A job or gang name, an account number, or a player identifier.
GetAccountBalance
Returns the balance, ornil when there is no such account.
string
required
The account to read.
GetPlayerAccounts
Returns every savings, society and shared account this player may use, each with theirrole and permissions.
A society the player holds through their job or gang only appears while they are connected.
string
required
The player’s identifier.
GetPlayerAccountNumber
Returns a player’s personal account number.string
required
The player’s identifier.
GetIdentifierByAccountNumber
The reverse: the identifier behind a personal account number, ornil.
string
required
A personal account number, with or without spacing.
CreateAccount
Opens a society or shared account. Returns the account, ornil and a reason.
string
required
What the account is called.
string
"society" or "shared". Defaults to "shared".string
Required for a society account: the job or gang name. Shared accounts are given a number.
string
The identifier of the player who owns it.
number
What it opens with. Defaults to
0.DeleteAccount
Closes an account. The balance is not returned to anyone: move it first.string
required
The account to close.
RenameAccount
string
required
The account to rename.
string
required
The new name.
SetAccountFrozen
A frozen account can be seen but not used.string
required
The account to freeze or unfreeze.
boolean
required
true to freeze it.Money
AddAccountMoney
Pays into an account and records the move with your reason.string
required
The account to credit.
number
required
A positive whole amount.
string
What it was for. This is what shows in the history.
RemoveAccountMoney
Takes money out. Returnsfalse when the balance cannot cover it; the balance can never go negative.
string
required
The account to debit.
number
required
A positive whole amount.
string
What it was for.
TransferMoney
Moves money between any two accounts and writes both halves of the transfer. Returnsfalse and a message when it cannot.
string
required
The account paying.
string
required
The account being paid.
number
required
A positive whole amount.
string
What it was for.
Members
AddAccountMember
Gives a player access to a shared account.string
required
The account.
string
required
The player being added.
table
Any of
deposit, withdraw, transfer and manage. Deposit only by default.UpdateAccountMember
Changes what an existing member may do.string
required
The account.
string
required
The member.
table
required
The permissions to set.
RemoveAccountMember
string
required
The account.
string
required
The member to remove.
GetAccountMembers
Returns everyone with access, with their names and permissions.string
required
The account to read.
Transactions
AddTransaction
Writes a line in the history without moving money, for scripts that move it themselves and want it labelled properly. When tracking already caught that move on a personal account, this names that line instead of adding a second one.string
required
The account the line belongs to.
string
required
deposit, withdraw, transfer_in, transfer_out, income or expense.number
required
A positive whole amount.
string
What it was for.
string
Who was on the other side.
GetTransactions
Returns a page of the history with its totals.string
required
The account to read.
number
Which page. Defaults to
1.number
Rows per page, up to
500. Defaults to 25.table
Any of
types, search, dateFrom and dateTo.Bills & loans
CreateBill
Sends a bill to a player. Returns its id, ornil and a reason.
string
required
Who pays: an identifier or an account number.
number
required
A positive whole amount.
string
Where the money lands when it is paid. Leave it out for a fine that leaves the economy.
string
What the bill is for.
string
The name on the bill. Defaults to the account’s name, or your resource.
number
Unix time. Defaults to the days set in
/bankadmin.PayBill
Pays a bill on the player’s behalf. The only export that needs them connected, because paying takes their transaction lock. Returnsfalse and a message when it cannot.
number
required
The bill id.
string
Which of their accounts pays. Defaults to their personal one.
CancelBill
Withdraws an unpaid bill.number
required
The bill id.
GetBills
Returns the bills sent to a player, newest first.string
required
The player.
string
unpaid, paid, declined, cancelled or expired. All of them when left out.GetLoan
Returns the loan a player is paying off, ornil.
string
required
The player.
Other
OpenBank
Opens the bank for a player from the server.number
required
The player.
string
"bank", "atm" or "admin". Defaults to "bank"; "admin" is refused without the ACE permission.GetConfig
Returns the live configuration as/bankadmin last saved it. Logging is not included.
string
One of
general, currency, banks, blip, atm, accounts, transfers, transactions, bills, requests, savings or loans. Every section when left out.Hooks
Server hooks live inserver/utils/hooks.lua, which ships open under escrow. Edit the functions in place to add your own rules and reactions.
Looking for an export we don’t have listed here? Contact us and we’ll do what we can!
