Exports & Events
Taken from the shipped source for version 1.0.0.
🖥️ Server exports
| Export | Arguments | Description |
|---|---|---|
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):
| Key | Signature | Notes |
|---|---|---|
getIdentifier | (src) -> string | Stable per character. Falls back to the license. |
getName | (src) -> string | Character name. If it returns a table, getNameField is read. |
getCash | (src, account) -> number | account is Config.Framework.cashAccount. |
addCash | (src, account, amount, reason) -> boolean | - |
removeCash | (src, account, amount, reason) -> boolean | All or nothing. Return false if the player has too little. |
notify | (src, message, type, duration, title) | Optional. |
isAdmin | (src) -> boolean | Optional. 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
| Event | Side | Description |
|---|---|---|
nomad-banking:server:open | server | Open a bank or ATM session. |
nomad-banking:server:close | server | Close the session. |
nomad-banking:server:request | server | UI request channel. |
nomad-banking:server:requestLocations | server | Client asks for bank and ATM locations. |
nomad-banking:client:open | client | Open the UI. |
nomad-banking:client:openCreator | client | Open the creator. |
nomad-banking:client:locations | client | Receive locations. |
nomad-banking:client:response | client | Response to a UI request. |
nomad-banking:client:push | client | Server pushed update. |
nomad-banking:client:notify | client | Notification. |
nomad-banking:client:teleport | client | Creator teleport. |
Last updated on