Installation Guide
Complete installation instructions for Oxide Vending business system.
Prerequisites
oxide-vending supports multiple frameworks: QBCore, QBx (Qbox), ESX, and Standalone (no framework). The bridge system auto-detects your framework at startup.
Always Required
| Resource | Purpose |
|---|---|
| oxmysql | Database operations |
| ox_lib | Shared library |
QBCore Dependencies
| Resource | Purpose |
|---|---|
| qb-core | Core framework |
| qb-target | Machine interaction |
| qb-inventory | Item management |
| qb-radialmenu | Quick access menu |
| qb-input | Input dialogs |
QBx (Qbox) Dependencies
| Resource | Purpose |
|---|---|
| qbx_core | Core framework |
| ox_target | Machine interaction |
| ox_inventory | Item management |
ESX Dependencies
| Resource | Purpose |
|---|---|
| es_extended | Core framework |
| ox_target | Machine interaction |
| ox_inventory | Item management (auto-detected if running) |
Standalone Dependencies
| Resource | Purpose |
|---|---|
| ox_inventory | Item management |
| ox_target | Machine interaction |
Optional Dependencies (All Frameworks)
| Resource | Purpose | Fallback |
|---|---|---|
| oxide-banking | Separate business accounts | Revenue goes directly to owner's bank |
| qb-weathersync | In-game time for NPC sales | Falls back to real time |
| oxide-menu | Primary menu system | Falls back to framework-appropriate menu |
Installation Steps
1. Download and Place Resource
Place the oxide-vending folder in your resources directory:
resources/
└── [oxide]/
└── oxide-vending/
2. Database Setup
Run the SQL installation script in your database:
-- Run this file in your MySQL database
SOURCE sql/install.sql;
Or manually execute the contents of sql/install.sql in your database management tool.
Tables Created:
| Table | Purpose |
|---|---|
vending_businesses | Business registration |
vending_employees | Employee roster with JSON permissions |
vending_machines | Placed machines with coords/rotation, durability |
vending_stock | Current inventory per machine slot |
vending_revenue | Cash balance and sales totals per machine |
vending_transactions | Full transaction log |
vending_owned_machines | Purchased but not-yet-placed machines |
vending_progression | Business level, XP, lifetime revenue |
vending_milestones | Claimed one-time milestone bonuses |
vending_business_inventory | Warehouse storage |
vending_warehouses | Physical warehouse ownership |
vending_pickup_boxes | Wholesale pickup boxes |
vending_pending_deliveries | Pending wholesale orders |
3. Configure the Resource
Review and modify configuration files in config/:
config/config.lua- Bridge settings, general settings, placement, pricingconfig/machines.lua- Machine types, models, pricesconfig/items.lua- Item whitelists and base pricesconfig/wholesale.lua- Bulk ordering catalogconfig/npc_sales.lua- NPC simulation settingsconfig/progression.lua- Level definitions and rewards
See Configuration for detailed configuration options.
4. Add to Server Config
Add the resource to your server.cfg. The framework is auto-detected, but ensure dependencies start before oxide-vending.
QBCore:
ensure qb-core
ensure oxmysql
ensure ox_lib
ensure qb-target
ensure qb-inventory
ensure qb-radialmenu
ensure qb-input
ensure qb-menu # Or oxide-menu
ensure oxide-banking # Optional
ensure qb-weathersync # Optional
ensure oxide-vending
ESX:
ensure es_extended
ensure oxmysql
ensure ox_lib
ensure ox_target
ensure ox_inventory # Optional, auto-detected
ensure oxide-banking # Optional
ensure oxide-vending
Standalone (no framework):
ensure oxmysql
ensure ox_lib
ensure ox_target
ensure ox_inventory
ensure oxide-banking # Optional
ensure oxide-vending
5. Framework Configuration
The bridge auto-detects your framework at startup. To override detection, set Config.BridgeOverride in config/config.lua:
Config.BridgeOverride = nil -- Auto-detect (default)
Config.BridgeOverride = 'qbcore' -- Force QBCore
Config.BridgeOverride = 'esx' -- Force ESX
Config.BridgeOverride = 'standalone' -- Force standalone
ESX with ox_inventory: ox_inventory is auto-detected when running alongside ESX. No additional configuration is needed.
Standalone setup:
You must implement the money and inventory function tables in config/config.lua:
Config.StandaloneMoney-Get,Add,Removefunctions for your money systemConfig.StandaloneInventory-GetItemList,AddItem,RemoveItem,GetItem,GetInventoryItems,CanCarryItemfunctions
Admin permissions in standalone use ace permissions:
add_ace group.admin oxide.vending.admin allow
6. Add Consumable Items (Optional - QBCore only)
If using food/drink items that players should be able to consume on QBCore, add them to qb-smallresources/config.lua:
-- Food items
Config.Consumables.eat["sandwich"] = math.random(20, 30)
Config.Consumables.eat["tosti"] = math.random(15, 25)
-- Drink items
Config.Consumables.drink["water_bottle"] = math.random(35, 54)
Config.Consumables.drink["coffee"] = math.random(30, 45)
Config.Consumables.drink["kurkakola"] = math.random(35, 50)
Config.Consumables.drink["grapejuice"] = math.random(30, 45)
For ESX or standalone, use your framework's consumable system instead.
Verification Checklist
After installation, verify the following:
- Resource starts without errors in server console
- Framework is correctly detected (check console for bridge detection message)
- Database tables are created
- Showroom blip appears on map (if enabled)
- NPC vendor is present at showroom location
-
/vendingbusinesscommand works for admins - Players can interact with showroom NPC
- Business registration works
- Machine purchase and placement works
- Target interaction works on placed machines
- Dashboard opens with
/vdbor/vendingdashboard
Troubleshooting
If you encounter issues during installation, see Troubleshooting.
Updating
When updating oxide-vending:
- Back up your database tables
- Replace resource files
- Check for new SQL migrations in
sql/directory - Review changelog for configuration changes
- Restart the resource
Next Steps
- Configuration - Customize all settings
- Features - Learn about all capabilities
- NPC Sales - Set up passive income
- Progression - Level system details