Skip to main content

Exports

Call the exports on exports.road_banking. Unless noted, they are server-side.

Targets

Most exports take a target. It can be: Amounts are whole numbers above zero.

Accounts

GetPersonalAccount

number | string
required
string | nil
The account number of the checking account, or nil.

GetAccount

number | string
required
table | nil

GetBalance

number | string
required
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 | string
required
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 | string
required
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
Paying account, see Targets
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 | string
required
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 | string
required
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.