Exports
Call the exports onexports.road_banking. Unless noted, they are
server-side.
Targets
Most exports take atarget. It can be:
Amounts are whole numbers above zero.
Accounts
GetPersonalAccount
string | nil
The account number of the checking account, or
nil.GetAccount
table | nil
GetBalance
number
The balance.
0 when the account does not exist or is a checking account
whose owner is offline.Money
AddMoney
Pays money into an account and adds a history line.number
required
Whole amount above zero
string
Shown in the history (up to 120 characters)
boolean
true when the money was booked.RemoveMoney
Takes money from an account and adds a history line. Refuses overdrafts and frozen accounts.number
required
Whole amount above zero
string
Shown in the history (up to 120 characters)
boolean
true when the money was taken.Transfer
Moves money between two accounts, with history lines on both sides. The recipient is notified. No transfer fee is charged.number | string
required
Receiving account
number
required
Whole amount above zero
string
Shown in both histories (up to 120 characters)
boolean, string | nil
true on success, otherwise false and an error code such as
insufficient_funds, account_frozen, owner_offline or
invalid_request.AddTransaction
Adds a history line for money your script moved itself, for example through the framework’s own bank functions. The balance does not change.number
required
Positive for incoming, negative for outgoing money
string
Up to 120 characters
string
Who paid or was paid (up to 64 characters)
boolean
GetTransactions
number
default:"20"
Up to 100
table
Newest first.
Invoices
CreateInvoice
Sends an invoice to an online player, for fines, shops or services. The recipient pays it in the bank.table
required
boolean, number | string
true and the invoice id, or false and an error code.Credit score
GetCreditScore
number | string
required
Player server id or framework identifier
number | nil
The score from 300 to 850, without the points for money held, which are
only counted at the bank.
Client
IsOpen
boolean
true while the bank or ATM screen is open.