np_vending
Vending machines as a player business. Buy the machines that already stand in the city or place your own, within the distances your staff set. Then stock them, set prices, drive restock routes and collect the cash before someone else pries the box open.
- Version
- 1.0.0
- Frameworks
- ESX, qbx, qb, standalone
- Dependencies
- oxmysql, np_prophandler 1.1.0+
- Database
- Tables created on start
- Inventory
- np_inventory, ox_inventory, qb-inventory or none
- Payment
- np_payments for card and phone tap, or the framework's cash and bank
- Optional
- np_admin, np_hud, np_phone, np_identification, np_gangs, np_menu, np_shops, np_character, np_discord, np_drugs
- Languages
- English, German
- Build
- Node to build the NUI once

Taken from the NUI in the browser at 1920×1080. The spacing rings are from the placement mockup.
What's in it
The client only draws. Buying, placing, moving and every sale are checked again on the server.
A machine to buy from
- A slot grid per model. Click a slot or type its code (
A2) and press Enter. - Cash, card or phone tap. Items drop into the tray, then into the inventory.
- Drink now, same again with G, offers, a stamp card, jams and a mystery capsule slot.
Buy city machines
- Every vending prop on the map is a city-owned machine you can buy at the machine.
- The card shows the price, weekly spot rent, foot traffic and average sales of the last 7 days.
- Ownership is a deed item: trade it, use it as collateral, or have it seized.
Place your own
- From a crate item. A ghost prop that snaps to walls, with live spacing rings on the ground.
- A checklist of every rule, the distance to the nearest machine of each kind and the nearest free spot.
- Pick it up and place it somewhere else. The permit is due again.
Spacing rules
- Separate minimum distances for the same operator and for different operators, per zone and per model.
- No-vend zones, staff-only zones and limits per player, company and zone.
- A live ring preview. Changes apply without a restart.
Operator dashboard
- Every machine with stock, cash box, sales and status. Prices per slot, offers and happy hours.
- Finance, staff and keys, and wholesale orders delivered to a depot.
- Machines can belong to a player, a company or a gang.
Routes and jobs
- A restock route sorted by lost sales, with GPS stops and what to load at the depot.
- Drive it yourself or post it as a paid job other players take from the board.
Market and auctions
- List a machine with or without its stock, at a fixed price or as an auction.
- Unpaid rent closes a machine. After a grace period it returns to the city, and hot spots go to a timed auction.
Crime
- Pry the cash box with a crowbar. A noise bar fills, and at 100 % the alarm tells the owner and the police.
- Vandalism and optional card skimmers.
- Upgrades against it: a reinforced lock, an alarm, a camera and insurance.
A closer look
The machine
E opens a machine, G repeats the last purchase, Esc closes. The keypad works from the keyboard.
- Pick a slot: one tile per product with a coil bar. Low stock, sold out with "notify me", an offer with an end time, or locked by age, licence or job.
- Pay: cash goes into the machine's cash box, card and phone tap through np_payments. The owner switches each one per machine.
- Take it: items drop into the tray and go into the inventory. If they don't fit, they wait in the tray for two minutes.
- Come back: every tenth item at one operator is free on the stamp card. Sometimes an item gets stuck: hold E to shake, or ask for a refund.
Soda (Sprunk, eCola), snacks (Candybox), coffee (Bean Machine), a water cooler, cigarettes (the owner needs a licence, configurable) and a gumball or capsule machine, each with its own slots, price and items. Frosted glass by default, Liquid Glass as a player setting.
Buying a machine that already stands there
The vending props of the map are city machines, stocked by the city until a player buys them.

- Price by foot traffic: busy spots cost more and pay more rent.
- The card shows the average sales of the last seven days before you buy.
- You get a deed. Whoever uses a valid deed registers the machine, and every new owner voids the older deeds.
- Pay from your bank or a company account. Player listings and auctions use the same card.
Placement mode
Use a vending_crate, type /vending place or press "Place new machine" on the dashboard. The client runs the same spacing engine as the server.

- Rings on the ground around every machine nearby, green for yours and red for the rules you break.
- A checklist with the distance to each kind of machine, the zone, the surface and your limit.
- The nearest free spot is marked when a rule fails.
- Foot traffic, estimated sales, rivals within 150 m and what is due now: machine, permit and the first week of rent.
Spacing rules for staff
/vendingadmin or the np_admin tools. Distances are in metres, 0 switches a rule off, and a pair of machines uses the stricter of their two rules.
| Rule | Minimum distance between | Default |
|---|---|---|
| Same operator | Two machines of one owner, company or gang | 25 m |
| Different operators | Machines of rivals | 60 m |
| Same type | Two soda machines of different operators | 90 m |
| City machines | A new machine and a map machine nobody has bought | 15 m |
| Shops | A new machine and a store entrance (np_shops) | 40 m |
| Limits | Machines per player and per company, and the placement permit | 10, 25, $1,200 |
- Zones override the distances, the machine limit, the rent and the foot traffic. The boardwalk allows tighter spacing than Blaine County.
- Models have their own spacing: a water cooler needs less room than a soda machine.
- No-vend zones such as police stations and hospitals, where nobody or only staff may place.
- "Same operator" can include a company or gang, so its members share the short distance.
- A stricter rule keeps existing machines and marks them in the preview. Export everything as a
config.luasnippet.
Running the business
/vending, the vending_tablet item or the phone app open the dashboard for every operator you work for.

- Stock from the inventory: carry crates to the machine and fill slots through the service door. Wholesale orders go to a depot.
- Cash box: cash sales stay in the machine until someone collects them. A full box stops cash sales. Card sales go to the bank every hour.
- Restock route sorted by lost sales. Drive it, or post it as a paid job for other players.
- Staff and keys: a key item for one machine or all of them, with rights to restock, collect and set prices.
- Spot rent by zone or foot traffic, paid weekly and automatically from the operator's account.
Break-ins and upgrades
The server times the pry and fires the alarm. The owner and the police get the location.
| What | How it works |
|---|---|
| Break-in | Hold E with a crowbar to pry the cash box. A noise bar fills, at 100 % the alarm goes off and the loot is a share of the box |
| Vandalism | Hold G with a crowbar. The machine is out of order until the owner pays for the repair or uses a repair kit |
| Skimming | Off by default. A device on the card reader takes a small share of card sales until the owner finds it during service |
| Upgrades | A reinforced lock makes the pry longer, an alarm goes off sooner, a camera names the thief in the owner's log, and insurance pays part of the loss and the repair |
| Dispatch | Config.Crime.dispatch, np_drugs' dispatch, or toasts and a GPS mark for police on duty |
np_phone Vending app
With np_phone running, np_vending adds a Vending app.

- Machines: what needs you first, sales and cash, switch a machine on or off.
- Route: the stops with GPS, and the job board to take a restock run.
- Market: machines for sale, free spots and auctions with bids.
- Alerts: low stock, a full cash box, a break-in, unpaid rent and a sold listing, as texts when the owner is offline.
Without np_phone the alerts are toasts, and an inbox shows what happened at the next login.
Set it up
Compatibility
Every bridge is detected at start. np_prophandler 1.1.0+ is required. Every other NP DEV sibling is optional and has a built-in fallback. No ACE is used anywhere.
| Kind | Supported |
|---|---|
| Framework | es_extended first, then qbx_core, qb-core or standalone |
| Inventory | np_inventory first (items registered on start, drink now through its use flow), then ox_inventory, qb-inventory or no carried stock |
| Payment | np_payments for card (quick pay) and phone tap, or the framework's bank account |
| Company money | esx_addonaccount, qb-management, qb-banking or Renewed-Banking society accounts, or np_vending's own company balance |
| Age and licences | np_identification, or np_character and the framework's date of birth |
| UI | np_hud for toasts, prompts and progress, np_phone for the Vending app, np_menu (or ox_target, qb-target) for options on the props |
| Staff | np_admin permission nodes, settings, audit log and the server theme, or identifiers, the framework's admin groups and np_discord roles |
| Others | np_gangs for gang-run machines, np_shops for the shop distance rule, np_drugs for police dispatch |
Installation
oxmysql and np_prophandler 1.1.0+ are the hard dependencies. The tables are created on start.
- Put the resource in
resources/asnp_vending. - Build the NUI once (
web/distis not in the repository):cd web && npm install && npm run build - Start it after oxmysql, your framework, your inventory and the np_* resources you run:
ensure oxmysql ensure es_extended # or qbx_core / qb-core (optional) ensure np_inventory # or ox_inventory / qb-inventory (optional) ensure np_admin # optional: permissions, settings, theme ensure np_prophandler # required, 1.1.0+ ensure np_vending - Items: nothing to do with np_inventory. On ox_inventory or qb-inventory, add the crate, deed, key, tablet and drink items from the docs.
- Staff: with np_admin, grant
vending.admin,vending.admin.rules,vending.admin.zonesandvending.admin.machines. Without it, list identifiers or admin groups in the config. - On start the console prints one line per sibling:
active,fallbackormissing export, then a ready line.
For your own scripts
Server exports to read machines and rules, add machines for an MLO or a business, and hooks that can veto a sale, a placement or a break-in.
-- the same spacing check placement mode runs
local ok, err, checks = exports.np_vending:CanPlaceAt(source, 'sprunk', coords)
-- err e.g. 'too_close:otherOwner', 'zone_off', 'limit_reached'
-- a machine that comes with your MLO, owned by a company
exports.np_vending:AddMachine({
model = 'coffee', coords = vector3(-627.1, 239.4, 81.9), heading = 90.0,
operator = 'job:beanmachine', operatorName = 'Bean Machine',
})
-- no sales while the player is cuffed
exports.np_vending:registerHook('canBuy', function(data)
if isCuffed(data.source) then return false, 'vetoed' end
end)Questions
Do the machines on the map work?
Yes. Every vending prop is a city machine, registered the first time someone uses it and stocked by the city. Players can buy it at the machine, and the price follows the foot traffic of the spot.
Can players stack machines next to each other?
Only as close as your rules allow. Staff set separate distances for the same operator, rivals, the same machine type, city machines and shops, with overrides per zone and per model. The server checks them again on every placement.
What happens to existing machines when a rule gets stricter?
They stay. The admin preview marks them, and they can't be moved into another breach.
Do I need np_inventory?
No, but it is the first choice: it registers the items itself and drink now uses its own use flow. ox_inventory and qb-inventory work with the items from the docs. Without an inventory, stock isn't carried.
Does it need np_admin?
No. With np_admin you get permission nodes, the settings in its panel, the audit log and the server theme. Without it, staff come from identifiers, the framework's admin groups or np_discord roles.
Is it in German?
English and German, with currency formatting per locale, set with Config.Locale.
Works well with

Ensure it, set your rules, open the city's machines.
Installation, every config key and every export are in the docs.