Configuration
Edit config.lua. The examples below show fields from the supplied resource; edit those fields in the existing Config table rather than replacing the whole file. Apply config changes during your normal resource maintenance window.
Bridge selection
bridge = {
framework = 'auto',
inventory = 'auto',
notify = 'auto',
target = 'auto',
textui = 'auto',
cashItem = 'money',
imagePath = '',
customNotify = { event = 'nuiro-vending:customNotify' },
},| Setting | Accepted IDs |
|---|---|
framework | auto, esx, qb, qbx |
inventory | auto, ox, qb, ps, qs, codem, origen, custom |
notify | auto, ox_lib, esx, qb, okok, mythic, custom |
target | auto, ox_target, qb-target, textui |
textui | auto, ox_lib, qb |
For QBX, the ID is qbx, not qbox. Auto-detection prefers Qbox, then QBCore, then ESX. Inventory detection checks ox, qs, codem, origen, ps, then qb. Target detection prefers ox_target, then qb-target, then TextUI. Start your chosen resources first, or force their IDs explicitly.
The framework and inventory adapters live inside bridge/. See Integrations for custom adapters and item-image paths.
Economy
| Field | Supplied value | Effect |
|---|---|---|
feePercent | 8 | Percentage of gross sales deducted before crediting the cash box |
maxPrice | 250000 | Maximum listing price |
maxQuantity | 25 | Maximum items in one customer purchase |
maxWithdraw | 25000 | Maximum amount in one bank withdrawal |
accounts | { 'money', 'bank' } | Allowed customer payment accounts |
defaultAccount | 'money' | Initial payment selection |
canBuyOwn | false | Whether the owner can buy from their own machine |
With ox_inventory, cash is the inventory item configured by bridge.cashItem, including on QB/QBX. Other inventories use the framework cash account (money maps to cash on QB/QBX). Cash-box withdrawals and rent payments use the bank account.
Catalogue limits
| Field | Supplied value | Meaning |
|---|---|---|
item | 'vending_machine' | Inventory item used to create a machine |
maxMachines | 2 | Maximum owned machines per character |
capacity | 500 | Total stock quantity per machine, not weight |
slotCount | 15 | Available catalogue slots |
columns | 5 | Cabinet grid columns |
maxCategories | 6 | Owner-defined categories |
categoryLabelMax | 14 | Maximum category-label length |
inactivityDays | 14 | Days without opening the service panel before collection; 0 disables collection |
The supplied interface is designed around these grid values. Review the cabinet on the resolutions you support after changing slots, columns, or UI scale.
Allowed items
blacklist always rejects matching item names. If whitelist is populated, the item must also appear there. Use exact inventory IDs.
whitelist = { 'water', 'burger' },
blacklist = { 'money', 'cash', 'black_money', 'markedbills', 'vending_machine' },The supplied whitelist = nil allows any item not rejected by the blacklist or machine style. Both lists and maps such as { water = true } are accepted. An empty whitelist table is treated as no whitelist.
Machine styles
Each Config.styles entry defines the prop, label, and stock policy:
styles = {
{ prop = 'wb_ammo_vending', label = 'Weapons', stock = 'weapons' },
{ prop = 'wb_vendingmachine', label = 'Vending', stock = 'general' },
{ prop = 'wb_rello_vending', label = 'Rello', stock = 'general' },
{ prop = 'prop_vend_snaks_1', label = 'Weapon Vending', stock = 'weapons' },
{ prop = 'prop_vend_snaks_2', label = 'Item Vending', stock = 'any' },
},weapons accepts gear, general excludes it, and any accepts both. Classification uses inventory definition flags (weapon, ammo, component, tint) and item-name prefixes such as weapon_, ammo, and at_. A whitelist does not bypass a style's stock policy.
Supplier
Config.dealer controls the supplier name, price, payment account, ped coordinates/scenario, and map blip. The supplied machine price is 25,000. Setting dealer.enabled = false removes the supplier ped, blip, and shop; players with an existing machine item can still use it.
Supplier payment
The ox_inventory supplier shop takes cash. dealer.account applies to the resource's non-ox supplier flow. Changing it to bank does not change the ox_inventory shop into a bank purchase.
Appearance and distance
Config.ui.scale = 0.82 controls cabinet UI scale. Config.ui.cabinetStyle = 'matte' is the default cabinet finish. Owners can save their own appearance through Setup.
| Field | Supplied value | Effect |
|---|---|---|
placeDistance | 6.0 | Reach for the setup ghost |
interactDistance | 3.0 | Server-side machine interaction distance |
streamDistance | 90.0 | Distance at which cabinet props stream in |
Location rules
Config.placement contains spacing, player/supplier clearance, per-area and global caps, allowed/blocked zones, ground checks, and session limits. The supplied rules include 3 m between machines, 2 m player clearance, 6 m supplier clearance, two machines within a 30 m area, and a rent-area cap of 10. maxGlobal = 0 disables the global cap.
Use placement.allowed = {} for the whole map except blocked zones. Once allowed zones are defined, a position must be inside one. Zone entries accept circles or boxes; examples are included in config.lua. debugZones draws those zones while the setup ghost is active. staffBypass = false means staff follow the same zone and cap checks by default.
Only limits explicitly documented as supporting 0 should use it to disable a check. For example, maxMachines = 0 is a zero ownership cap, not unlimited ownership.
Rent, phone, and staff
Config.rent— prices, areas, billing period, and grace: VendTrack & Rent.Config.phone— app name, description, developer, and default installation: VendTrack.Config.adminGroups— framework group names allowed to open the staff panel: Admin.
