np_vending v1.0.0 ​
Vending machines as a business. Every vending prop on the map is a city-owned machine that players can use and buy. Players can also place their own machines, stock them from their inventory, set prices, collect the cash box, drive restock routes and sell machines on a market. Staff decide how close machines may stand to each other.
It uses the Nimbus UI look of np_hud and np_phone: grey glass, glossy squircle tiles, and colour only where it means something. A machine's brand (Sprunk green, eCola red, Candybox rust) is the tint of its tile; green means money or OK, orange low, red sold out, broken or a rule that failed. The staff screen is the one red-tinted surface. It runs on es_extended, qbx_core or qb-core, or standalone, with np_inventory, ox_inventory, qb-inventory or no inventory. es_extended with np_inventory is the first target. Hard dependencies: oxmysql and np_prophandler 1.1.0+ (machine props, the placement ghost, the can in the hand). Staff rights are np_admin permission nodes, with a fallback to framework groups, an identifier list and np_discord roles. No ACE anywhere.

| Service door | Placement mode |
|---|---|
![]() |
![]() |
| Operator dashboard | Staff: spacing rules |
![]() |
![]() |
| A city machine for sale | Prying the cash box |
![]() |
![]() |
| Liquid Glass with a server brand colour | German |
![]() |
![]() |

The screenshots come from the browser mock at 1920 × 1080 (see Development). The UI ships in English and German.
At a glance ​
- A slot grid, not a list. Each model has rows and columns (A1 … C4). Click a slot or type its code on the keypad
and press
Enter. See Buying from a machine. - Three ways to pay: cash (into the machine's cash box), card (np_payments quick pay) and phone tap. The owner switches each one per machine.
- Tray, drink now, same again: what doesn't fit into the pockets waits in the tray for two minutes; Drink now
plays the can animation and applies the effect;
Grepeats the last purchase without opening the screen. - Stamp card per operator (every 10th item free), jams (shake or refund), notify me for sold-out slots, a mystery capsule slot, and slot locks for age, licence or job.
- Buy the city's machines at the machine. The card shows price, weekly rent, foot traffic and the average sales of the last seven days. See Owning machines.
- Place your own from a crate item or the dashboard: a ghost prop, live spacing rings on the ground, a checklist, the nearest free spot and the cost. The server checks everything again. See Placing a machine.
- Run the business from the service door (stock, prices, offers, locks, upgrades, cash box) and from the
dashboard, the
vending_tabletitem or the phone app (all machines, sales, routes, keys, money). See Dashboard, routes & jobs. - Companies and gangs: machines can belong to a job or an np_gangs gang instead of a player. Employees get keys with restock, collect and price rights.
- Market: sell a machine with or without stock, or run an auction. Machines that return to the city on hot spots go to auction by themselves. Weekly spot rent closes machines that aren't paid. See Market, auctions & rent.
- Crime: pry the cash box with a crowbar while a noise bar fills, smash the machine, or (optional) put a skimmer on the card reader. Upgrades against it: reinforced lock, alarm, camera and insurance. See Crime.
- Staff screen
/vendingadmin: minimum distances per rule, zone and model, no-vend zones, limits and fees, every machine, with a live ring preview and Export config.lua. See Staff: spacing rules & zones.
How it works ​
- Operators. A machine belongs to an operator:
city,p:<identifier>(a player),job:<name>(a company) organg:<id>(an np_gangs gang). Owners of an operator do everything; members and key holders get restock, collect and price rights. - Server-authoritative. Positions come from the server, prices, stock and money from the stores and bridges. The client spacing check only draws the rings; placing, moving and buying are checked again on the server with the same rule engine.
- Money. Cash stays in the machine's cash box until someone with collect rights empties it. Card and phone sales are paid to the operator every hour: a player's bank (held until their next login when offline), a company's society account or np_vending's own company balance.
- Deeds. Buying or placing a machine gives a
vending_deed. Whoever uses a valid deed registers the machine to their name, so machines can be traded, used as collateral or seized.
Quick example ​
-- server: refuse cigarettes to anyone on probation, and log every sale
exports.np_vending:registerHook('canBuy', function(p)
if p.item == 'redwood' and Player(p.source).state.probation then
return false, 'vetoed' -- an existing error code, or your own locale text
end
end)
AddEventHandler('np_vending:server:sale', function(e)
print(('%s bought %d x %s at %s for $%d'):format(GetPlayerName(e.source), e.qty, e.item, e.machine.code, e.total))
end)







