Skip to content

Buying from a machine ​

Walk up to any vending machine, a city machine on the map or one a player placed. The prompt shows the keys that apply (np_hud's prompt, or np_vending's own). With np_menu (or ox_target / qb-target) the props also get context options: use, service, buy, pry, smash.

Key At a machine
E Use it: open the slot grid
G Same again: repeat the last purchase at this machine (shows item and price)
H Service door (owner, key holder, restock job) · buy a city machine
Esc Close

Machine screen

The slot grid ​

Each model has a fixed grid (a soda machine 3 × 4, A1 … C4). Every slot is a tile with the item, its price and what it does (Thirst +25), and a coil bar for the stock. Pick a slot by clicking it or by typing its code on the keypad (A 2), set the quantity (up to Config.Purchase.maxQty, 5) and press Enter.

Slot state Shows
In stock Coil bar; orange under Config.Economy.lowStockPercent (25 %) or 2 left
Sold out Greyed out, with Notify me
Offer The old price struck through and the end time (−22 % · 1 h)
Locked 18+ · ID, a licence or a job. The tile says why, and the purchase is refused
Capsule Random item: the owner filled it with a mix, you get one at random

The header shows the operator, the machine code (VM-0142), its status, when it was last restocked, and your cash and thirst. A switched-off, broken or rent-unpaid machine can't be used.

Snacks machine Sold out slot City machine
Snacks Sold out City

Paying ​

Method What happens
Cash Framework cash. The money goes into the machine's cash box. A full box refuses cash ("Pay by card")
Card np_payments quick pay with the player's default method for the category vending (bank or a card; the player confirms). Without np_payments: the framework bank
Phone A tap: np_payments Charge('bank') without a sheet. Without np_payments: the framework bank. With Config.Payments.phone.requirePhone the player must carry a phone item

The owner switches each method per machine, and Config.Payments switches them for the whole server. The money is taken first; if anything fails after that, it is refunded. Card and phone sales reach the owner at the next hourly settlement (Cash box).

Tray ​

Bought items go into your pockets. What doesn't fit drops into the tray at the bottom right and waits there for Config.Tray.seconds (two minutes) for you: click it or press F on the machine screen.

Tray

Drink now ​

Drink now buys one item and uses it right away. With np_inventory the item goes through np_inventory's own use flow, so its consume applies thirst and hunger. Without it np_vending applies Config.Items[*].effect itself (esx_status, qb / qbx metadata, or the np_vending:server:status event standalone) and plays the animation of the item (can, bottle, coffee, bar). Other resources can change the effect with RegisterItemEffect.

Same again ​

G at a machine repeats your last purchase there (same slot, quantity and pay method) without opening the screen. It is remembered for Config.Purchase.againSeconds (10 minutes). The prompt shows what and for how much.

Stamp card ​

Every operator has its own stamp card per player: every 10th item (Config.Stamps.every) bought from one operator is free. The card shows on the machine screen (Stamp card · 7 / 10). It gives players a reason to come back to one operator.

Jams ​

With a chance of Config.Jams.chance (3 %) per purchase one item gets stuck. The screen closes and the prompt offers:

Key Action
hold E Shake the machine (2.5 s). It falls with a chance of 55 % per shake
G Ask for a refund. The money for that item comes back, and the refund lands in the owner's log. It comes out of what the sale paid in (the cash box or the pending card sales, else the operator's balance); city machines refund in full

A jam is forgotten after Config.Jams.seconds (5 minutes).

Notify me ​

On a sold-out slot, Notify me subscribes you. When the slot is filled again you get a phone notification (or a text when you are offline). Click it again to unsubscribe.

Locks ​

Owners can lock a slot (see Service door):

Lock Check
Minimum age The date of birth on a valid np_identification ID card (id_card), else np_character's or the framework's date of birth. When nobody knows the age, Config.Identification.unknownAge decides ('deny')
Licence A valid np_identification document of that type. Without np_identification, Config.Identification.licenses decides ('allow')
Job Only that job may buy

Items with minAge in the config (the cigarettes, 18) are always age-locked. See Bridges & integrations → np_identification.

Machines for sale ​

A machine that is for sale shows a peek card when you walk up: model, price, weekly rent, foot traffic and the average sales of the last seven days. G inspects, E buys. See Owning machines → Buy a city machine.

Peek card For sale Auction
Peek For sale Auction