Skip to content

ATMs ​

Every ATM prop on the map is usable. Press E at one: the player walks up, the camera eases to the screen, and an 800×600 screen (web/dist/atm.html) is drawn on the prop's own display through a DUI. The mouse becomes a 3D cursor on that screen: click buttons, scroll with the wheel, leave with Esc or Backspace.

ATM screens

The ATM is branded by its model (Fleeca props are Fleeca, the rest Maze Bank, Config.Atm.defaultBank) or by a configured location. Players nearby see the same screen on a second DUI, but never the PIN: only how many digits were typed.

Flow ​

Insert PIN Menu Withdraw
Insert PIN Menu Withdraw
  1. Insert a bank_card (or a cloned_card) from the inventory, or tap the phone (needs a phone item, Config.Atm.phone): the checking account, no PIN, up to phone.maxWithdraw ($1,000).
  2. PIN. Config.Cards.maxTries (3) wrong PINs block the card and the ATM keeps it.
  3. Menu: withdraw, deposit, transfer, statement, change PIN, return card. The balance is hidden until the player clicks Show balance.
  4. Withdraw: quick amounts (cash.quick) or Other, in steps of cash.step ($10), at least cash.min, at most cash.maxWithdraw ($5,000) per withdrawal; the card's daily limit applies on top. A card of another bank pays the ATM bank's fees.foreignAtm (shown on the idle screen as Other banks: $5 fee).
  5. Take your card first, then the cash. Cash nobody takes within session.cashTray (30 s) is pulled back in and refunded.
  6. Receipt (optional, default on): a bank_receipt item (or np_payments' receipt) with the reference.

Deposit takes framework cash into the account and fills the ATM's stock. Transfer sends money to an account number (same rules as Transfers). Statement shows the last statementRows (10) rows and can print them as a receipt.

Dispensing Take card Receipt Statement
Dispensing Take card Receipt Statement

Sessions ​

The server keeps one session per ATM: one player at a time, the others get ATM busy.

Timer Default What happens
session.idle 45 s No click for this long ends the session
session.forgottenCard 30 s A card left in the slot: anyone may take it, then the ATM keeps it (back at a branch)
session.cashTray 30 s Untaken cash is pulled back and refunded
maxDistance 3.0 m Walking further away ends the session (the card stays in the slot)

Cash stock ​

Every ATM has its own cash (bank_atms), created the first time someone uses it (cash.start $25,000, up to cash.capacity $60,000). Withdrawals need the notes to be there; deposits fill it up. An ATM below capacity gets cash.restock.amount ($3,000) every restock.everyMinutes (30) from an NPC cash-in-transit van. Set restock.enabled = false to leave restocking to a player job that calls RestockAtm.

Out of cash Out of order Hacked
Out of cash Out of order Hacked

An empty ATM still takes deposits and transfers. An ATM is out of order after a robbery, an explosion or staff action (brokenMinutes, 120 by default) and shows the hacked screen while it is being jackpotted. Any state but ok ends the running session and gives the card back to its owner.

Locations and branding ​

lua
locations = {
  { coords = vector4(147.6, -1035.8, 29.3, 340.0), bank = 'fleeca', label = 'Legion Square' },
  { coords = vector4(-1205.0, -326.3, 37.8, 27.0), bank = 'fleeca', label = 'Burton' },
  { coords = vector4(-56.9, -1752.1, 29.4, 50.0), label = 'Grove Street' },
  -- { id = 'atm_custom', coords = vector4(...), bank = 'pacific', label = 'Vinewood', model = 'prop_fleeca_atm', spawn = true },
},
matchRadius = 2.0,
allowModelAtms = true,

A location within matchRadius of a map ATM re-brands and renames it. With spawn = true (and a model) np_banking registers the prop with np_prophandler where the map has none (a streamed prop np_banking:atm_<index>, spawn distance 80 m). allowModelAtms = false limits the ATMs to the listed locations. ATM ids are atm_<model>_<x>_<y>_<z> (coordinates in decimetres) or the location's id.

Tuning the screen ​

Needs tuning in game

The screen corners in Config.Atm.models are first values that were never checked against the props in game. Tune them on your server before opening it.

lua
models = {
  prop_atm_01 = {
    bank = 'maze', label = 'Maze Bank ATM',
    screen = { tl = { -0.155, -0.050, 1.320 }, tr = { 0.155, -0.050, 1.320 },
               br = { 0.155, -0.112, 1.090 }, bl = { -0.155, -0.112, 1.090 } },
    stand = { 0.0, -0.62, 0.0 },
  },
  -- prop_atm_02, prop_atm_03, prop_fleeca_atm
},

screen holds the four corners of the display as offsets from the prop (metres; top-left, top-right, bottom-right, bottom-left as seen by the player). stand is where the player stands.

  1. Set Config.Debug = true and restart np_banking (the command is registered when the client loads).
  2. Stand at an ATM of the model and run /atmdebug. It draws the configured corners as a red outline and the screen inside it.
  3. Adjust the four offsets until the outline sits on the display, restart, check again. Repeat per model.
  4. Set Config.Debug = false again.

camera.fill (0.78) is how much of the view the screen fills; camera.fov and easeMs set the camera move.

Staff ​

With the node np_banking.atm, staff restock, repair, break and empty ATMs. Scripts use the ATM exports: RestockAtm, GetAtm, SetAtmState.