Skip to Content

Exports & Events

Taken from the shipped source for version 1.0.0.

🖥️ Server exports

ExportArgumentsDescription
GetAccount(idOrNumber)Account by numeric id or account number string.
GetPlayerAccount(srcOrIdentifier)A player’s account.
GetBalance(account)Account balance.
GetPlayerBalance(srcOrIdentifier)A player’s balance.
Credit(account, amount, reason, actor)Add to an account.
Debit(account, amount, reason, actor)Remove from an account.
CreditPlayer(srcOrIdentifier, amount, reason, actor)Add to a player’s account.
DebitPlayer(srcOrIdentifier, amount, reason, actor)Remove from a player’s account.
Transfer(from, to, amount, reason, actor)Move money between accounts.
CreateAccount(ownerId, ownerName, kind, name)Create an account.
CreateInvoice(creditAccount, targetAccount, amount, reason, senderName)Create an invoice.
GetStatement(account, limit)Recent ledger entries.
local result = exports['nomad-banking']:GetAccount(...)

Amounts are whole currency units. Accounts are referenced by numeric id or by account number string.

🔌 Framework adapter contract

Server side (Config.Framework.exports):

KeySignatureNotes
getIdentifier(src) -> stringStable per character. Falls back to the license.
getName(src) -> stringCharacter name. If it returns a table, getNameField is read.
getCash(src, account) -> numberaccount is Config.Framework.cashAccount.
addCash(src, account, amount, reason) -> boolean-
removeCash(src, account, amount, reason) -> booleanAll or nothing. Return false if the player has too little.
notify(src, message, type, duration, title)Optional.
isAdmin(src) -> booleanOptional. The ACE check always applies as well.

Client contract (Config.Framework.client), all optional with native fallbacks: notify(message, type, duration, title), addZone(name, data), removeZone(name), showText(text), hideText().

📡 Events

EventSideDescription
nomad-banking:server:openserverOpen a bank or ATM session.
nomad-banking:server:closeserverClose the session.
nomad-banking:server:requestserverUI request channel.
nomad-banking:server:requestLocationsserverClient asks for bank and ATM locations.
nomad-banking:client:openclientOpen the UI.
nomad-banking:client:openCreatorclientOpen the creator.
nomad-banking:client:locationsclientReceive locations.
nomad-banking:client:responseclientResponse to a UI request.
nomad-banking:client:pushclientServer pushed update.
nomad-banking:client:notifyclientNotification.
nomad-banking:client:teleportclientCreator teleport.
Last updated on