Repository navigation
hype-vendingmachine
Player-owned vending machines with restock deliveries, staff and an admin panel
Hype Vending Machine adds player-owned vending machines to FiveM. Owners buy machines, set prices, hire staff and earn from every sale, while stock is ordered from a supplier and delivered by hand with a cart. Admins place and manage every machine from an in-game panel.
Features · Screenshots · Installation · Configuration · Usage · Admin panel · Credits
Features
For customers
- Shop menu with product images, categories, search and a cart.
- Cash or bank payment, with both balances shown. Owners choose which methods a machine accepts.
- Glass machines (optional, see Glass machines) show the shop on their own touchscreen, and a robotic arm carries each item to the tray.
For owners
- Buy machines that are for sale, up to a per-player limit.
- Dashboard with today's and weekly revenue, a 7-day chart, top products and recent sales.
- Products: set the price of every product, see stock, units sold and every purchase.
- Restock from the supplier with the machine balance: wholesale prices, "fill to capacity" and order tracking from preparing to completed.
- Deliveries by hand: pick the order up with a cart, move the boxes into any vehicle's trunk and put them into the machine.
- Auto restock when a product hits the low stock threshold, plus low stock and sale notifications.
- Cash: withdraw and deposit money, with a full history.
- Opening hours by in-game time, or a simple open / closed switch.
- Transfer the machine to another player or sell it back for a refund.
Staff
- Hire nearby players as Employee, Supervisor, Manager or with custom permissions.
- 13 permissions, from viewing stats to ordering stock, withdrawing money and managing staff.
- Staff can never sell or transfer a machine.
For admins
- Overview: revenue, items sold, owners, top machines and machines that need attention.
- Machine list with a map: teleport, enable / disable, reset the balance, delete.
- Placement tool to create and move machines in game (move, rotate, snap to ground).
- Export / import machines as JSON to move them to another server.
- Global settings from the panel: wholesale multiplier, sales tax, machines per player, delivery time and defaults.
- Discord webhook logs for machine purchases and admin actions.
Security
- Prices, stock, capacity, balances, distances and permissions are all checked on the server.
- Items that don't fit in the inventory are refunded.
- 10 locales: English, Turkish, German, Spanish, French, Portuguese, Arabic, Chinese, Hindi and Bengali.
Screenshots
![]() |
![]() |
| Shop menu with cart | Touchscreen on a glass machine |
![]() |
![]() |
| Owner dashboard | Ordering stock from the supplier |
![]() |
![]() |
| Admin machine list with map | Staff and permissions |
More screenshots
![]() |
![]() |
| Checkout, cash or bank | Buying a machine |
![]() |
![]() |
| Products, prices and stock | Cash, withdraw and deposit |
![]() |
![]() |
| Machine settings | Admin overview |
![]() |
![]() |
| Creating a machine | Admin settings |
Requirements
| Resource | Link / notes |
|---|---|
| ox_lib | https://github.com/overextended/ox_lib/releases/latest |
| oxmysql | https://github.com/overextended/oxmysql/releases/latest |
| Framework | qbx_core, qb-core or es_extended |
| Target | ox_target or qb-target (optional, falls back to a key prompt) |
| Glass machines | olentrix_vending (optional) |
| Database | MySQL 5.7+ or MariaDB 10.2+ (JSON columns) |
Installation
-
Put the folder in
resources. It has to be namedhype-vendingmachine. -
Start it after its dependencies in
server.cfg:ensure ox_lib ensure oxmysql ensure qbx_core # or qb-core / es_extended ensure ox_target # optional: ox_target or qb-target ensure olentrix_vending # optional, glass machines ensure hype-vendingmachine setr ox:locale "en"
-
Database. With
AutoRunSQL = true(default) the tables are created on start. If that fails, or you turned it off, runINSTALL/insert-me.sqlonce. It is safe to run again. It creates:Table Contents hype_vending_machinesPlaced machines: position, model, owner, price, capacity, status, balance and owner settings hype_vending_productsEach machine's products with the owner's price, stock and units sold hype_vending_transactionsEvery purchase. Revenue and sales charts are built from it hype_vending_cashDeposits, withdrawals and stock order payments hype_vending_orders/hype_vending_order_itemsSupplier orders and their lines hype_vending_staffEmployees and their permissions hype_vending_settingsValues saved in the admin panel's Settings page -
Items. Every product in
Config.Productsmust exist as an inventory item with the same name (id). Ready-made snippets for ox_inventory and qb-inventory are inINSTALL/items.md. CopyINSTALL/item-imagesinto your inventory's image folder. -
Props. Everything in
stream/is streamed automatically, including thehype_cargo_boxcart (its.ytypis loaded byfxmanifest.lua). -
Set products, machine models and pickup points in
config/config.lua, restart, then create your machines in game with/vendingmenu.
Configuration
All options are in config/config.lua and commented in place. The most important ones:
| Key | Default | What it does |
|---|---|---|
AutoRunSQL |
true |
Runs INSTALL/insert-me.sql on start |
Currency / NumberAndDateFormat |
USD / en-US |
How money and dates are shown in the UI, e.g. EUR with de-DE shows 1.250 € |
Commands.AdminMenu |
vendingmenu, group.admin |
Admin panel command and its permission |
Interaction.target |
true |
Use ox_target / qb-target when one is running, TextUI otherwise |
Interaction.distance / maxDistance / spawnDistance |
1.5 / 3.0 / 75.0 |
Open range, max range the server accepts, prop spawn range |
Interaction.keys |
E / G |
TextUI keys: shop and owner menu |
PurchaseAccount / CashAccount |
bank / cash |
Account a machine is bought from, and the account owner deposits / withdrawals use |
DefaultSettings |
Fallback for the admin panel's Settings page. Values saved in the panel win | |
DefaultOwnerSettings |
Opening hours, low stock threshold, auto restock, notifications and accepted payments for new machines | |
Limits |
Name lengths, max capacity and prices, machine spacing, order and transfer limits, history length | |
SellRefund |
50 |
Percentage of the machine price paid back when an owner sells it |
Cargo |
Cart and box models, pickup points, cancel distance, attach offsets and animations | |
StaffPermissions |
13 permissions | The permissions an owner can give to staff |
Machines |
4 GTA models + 11 glass models | Models offered in the admin panel. arm = true marks glass machines |
Screen |
Glass machine touchscreen: texture, size, camera and corner offsets | |
Products |
9 products | id (item name), name, category, starting price, supplier wholesale price, image and shelf model |
Default settings
These are the fallbacks for the admin panel's Settings page:
| Key | Default | What it does |
|---|---|---|
wholesaleMultiplier |
1 |
Multiplies every supplier price |
salesTax |
8 |
Percentage taken from every sale |
maxMachinesPerPlayer |
3 |
How many machines one player can own |
deliveryMinutes |
5 |
How long an order is preparing before it can be picked up |
defaultCapacity / defaultPrice |
50 / 20000 |
Pre-filled when creating a machine |
allowPlayerPurchase |
true |
Players can buy machines that are for sale |
logPurchases / logAdminActions |
true / true |
What is sent to the webhook (the URL is set in server/config.lua) |
How a delivery works
- The owner orders stock from the Restock page. The wholesale price is paid from the machine balance.
- The order is
preparingfordeliveryMinutes, thenprepared. - At one of the
Cargo.spawnspoints a cart appears with one box per product. - The player grabs the cart, loads the boxes into any vehicle's trunk and drives to the machine.
- Each box put into the machine adds its stock. Going further than
Cargo.cancelDistancefrom the pickup before every box is loaded cancels the order.
Usage
| Action | Who | What it does |
|---|---|---|
Use a machine (target, or E) |
Everyone | Opens the shop |
Manage a machine (target, or G) |
Owner and staff | Opens the owner panel |
| Look at a machine for sale | Everyone | Buy it |
/vendingmenu |
Admins | Opens the admin panel |
ESC |
Back or close |
The command is registered with ox_lib as restricted = "group.admin" and every admin action is checked again on the server against the command ace. The default server.cfg admin setup is enough:
add_ace group.admin command allow
add_principal identifier.fivem:123456 group.adminOwner panel
| Page | What you can do |
|---|---|
| Dashboard | Today's and weekly revenue, a 7-day chart, top products and recent sales |
| Products | Prices, stock and units sold for every product |
| Restock | Order stock from the supplier, fill to capacity, track orders |
| Transactions | Every purchase made at the machine |
| Cash | Machine balance, withdraw, deposit and the full history |
| Staff | Hire nearby players, pick a role or custom permissions, fire staff |
| Settings | Name, description, open / closed, opening hours, low stock alerts, auto restock, accepted payments, transfer and sell |
Staff only see the pages their permissions allow.
Admin panel
Open it with /vendingmenu.
| Page | What you can do |
|---|---|
| Overview | Revenue, items sold, owners, top machines and machines that need attention |
| Machines | Every machine on a map and in a list: teleport, enable / disable, reset the balance, delete, open details |
| New machine | Name, model, price, capacity and position with the placement tool |
| Settings | The default settings above, saved to the database |
Machines can be exported as JSON and imported on another server (up to Limits.maxImport per import).
Glass machines
With olentrix_vending running, the arm = true models in Config.Machines become glass machines. Their stock sits on the shelves behind the glass, the shop opens on the machine's own touchscreen instead of the menu, and a robotic arm carries each unit sold to the tray. The items reach the buyer's inventory once the arm drops them.
All olentrix models share one body, so one set of Config.Screen offsets fits all of them. Without olentrix_vending, just don't place arm models.
Locales
In-game texts come from locales/*.json through ox_lib. Included: en, tr, de, es, fr, pt, ar, zh, hi, bn.
- Choose a language in
server.cfg:setr ox:locale "tr". Missing languages fall back to English. - Add a language: copy
locales/en.jsontolocales/<code>.json, translate the values and keep the keys and placeholders.
Compatibility
The bridges are built in (frameworks/ and modules/), nothing else is needed. Each one is picked automatically, or set it in config/config.lua (Framework, Inventory, Notifications, TextUI):
| Type | Supported |
|---|---|
| Framework | qbx_core, qb-core, es_extended |
| Target | ox_target, qb-target (optional, falls back to a key prompt) |
| Notifications | ox_lib, okokNotify, ps-ui |
| Text UI | ox_lib, okokTextUI, jg-textui, ps-ui, qb-core |
| Inventory | ox_inventory, qb-inventory, ps-inventory, codem-inventory, core_inventory, jpr-inventory, origen_inventory, tgiann-inventory |
Config, locale, shared, server, framework and module files are open and can be edited, the rest is protected with Cfx.re Asset Escrow.
Credits
Custom props
| Profile photo | ![]() |
| Username | turtle8782 |
| Discord server | https://discord.gg/K5CufCxqUU |
License
See LICENSE.














