Sal's Kewl Vending Script

Sal's Kewl Vending Script

$14.95

Add to Basket

Vending machines that actually behave like vending machines

GTA's map is covered in vending machines nobody can use. This turns every one of them into a working shop — and then gives that shop a reason to exist in your economy.

A machine holds real stock. Players buy from it, it empties, and it stays empty until somebody refills it. Somebody with a crowbar can force it open for the cash float, which puts a call out to your police. And refilling machines is a paid job your players can take.

Runs on qb-core, qbx, ESX or standalone. Every integration is optional and detected at runtime — there is nothing to install first and nothing in the manifest to edit.

Version 2.0.0 — a security release. If you are running 1.x, please update. Prices, items and stock are now decided entirely by the server; a client only ever asks. Existing customers: grab the new build from your Tebex downloads.

Stock lives per machine

  • The soda machine at the airport and the one outside Pillbox run dry independently, and stay that way across a restart.
  • Saved to your database. No placing machines by hand — the resource keys off the prop models already in the map, so every machine is live the moment you start it.
  • Idle machines trickle back up on a timer you set, so a quiet server never ends up with a map of empty boxes.
  • “Sold out” shows in the menu, and a partial buy charges only for what the player actually got.

Break-ins

  • Force a machine with a lockpick, screwdriver or crowbar for the cash float and whatever stock is still inside.
  • ox_lib skill check when you have it, a timed progress bar when you do not.
  • Police get the call through sals_kewldispatch or ps-dispatch — or a direct alert with a blip to on-duty officers if you run neither.
  • Per-machine cooldown, a minimum-officers-on-duty requirement, and a configurable chance the alarm never reaches dispatch at all.
  • The alarm fires when the machine is forced, not when it is emptied, so police have a chance to arrive before the thief is finished.

A restock job your players can work

  • Collect crates at the depot, drive the route, refill machines, get paid per unit loaded.
  • /vendingroute marks the machines that are genuinely low — built from real stock data, so a driver is never sent somewhere pointless.
  • Open to everyone, or locked to a job. Crates can be free or charged for.

An economy, not a vending menu

  • Location pricing — the airport and the prison charge what those places charge; Sandy Shores charges less. Zones are yours to define.
  • Society revenue — route a machine's takings to a business account via qb-management, qb-banking, Renewed-Banking or esx_addonaccount.
  • Cash or card, configurable per machine.
  • Buy in bulk, with a weight and slot check before the player is charged.

Snacks that actually feed you

Vended food and drink restore hunger and thirst, and the coffee takes the edge off stress. Only the items you list are registered, so whatever food resource you already run keeps ownership of everything else.

Built to be tamper-resistant

Worth saying plainly, because it is the difference between a vending script and a hole in your economy. Every transaction is decided by the server:

  • the player's real position is checked against the machine they claim to be at;
  • the item is one that machine actually sells;
  • the price is the one in your config, adjusted by your location zones;
  • money is really deducted before goods are handed over — and refunded, stock included, if the inventory refuses the item;
  • stock really depletes, and the whole thing is rate limited per player.

Refused purchases are logged, which is exactly where an automated client trying its luck shows up.

Admin

  • In-game configurator — edit machines, props, items and prices live, with no restart.
  • Gated on an ACE permission you grant in server.cfg.
  • Changes are stored as validated data in a separate file. Your config.lua is never rewritten, so your comments survive and one command puts you back to the shipped defaults.
  • Discord audit logging for break-ins, restocks, config changes and refused purchases.

Requirements

None. It starts and works on a bare server. Everything below is optional, detected at runtime, and degrades cleanly when absent.

OptionalWhat it adds
qb-core / qbx_core / es_extendedMoney, jobs, inventory
ox_inventoryItem handling, item images, weight checks
ox_target / qb-targetThird-eye interaction (a drawn marker is used without either)
ox_libMenus, quantity dialog, skill check, progress bar
qb-menuMenu fallback (a built-in shop is used without either)
oxmysqlStock that survives a restart
qb-management / qb-banking / Renewed-Banking / esx_addonaccountSociety revenue
sals_kewldispatch / ps-dispatchPolice alerts on break-ins
wasabi_ambulanceAccurate downed-player checks

Installation

  1. Drop the folder into resources/.
  2. Add ensure sals_kewlvending to your server.cfg.
  3. Add add_ace group.admin sals_kewlvending.config allow for configurator access.
  4. Open config.lua and set your machines, items and prices.

That is the whole install. There is no SQL to import — the stock table is created for you — and nothing in fxmanifest.lua to edit.

Commands

  • /vendingconfig — open the configurator (admin)
  • /vendingreload — reload configuration from disk
  • /vendingreset — return to the shipped defaults
  • /vendingstock — list tracked machines and fill levels
  • /vendingroute — mark machines that need restocking

Localization

Every user-facing string lives in locales/en.lua. Translate it by copying one file.

Upgrading from 1.x — read this first

Your old config.lua will not carry over. Machine keys are PascalCase now and every machine needs a unique Id (propTypes → PropTypes, items → Items, and so on). Start from the new shipped config and re-enter your prices rather than patching the old one.

Config.AllowedIDs is replaced by an ACE permission. /openvendingconfig is now /vendingconfig. The cigarette machine sells cigarette, not cigar. Break-ins ship enabled — turn them off in the config if you do not want them.

The full list is in CHANGELOG.md inside the download.

What you get

Not affiliated with Rockstar Games, Take-Two Interactive or Cfx.re. Purchases are handled by Tebex, who own the checkout, billing support and refunds.