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

ResourcePurpose
oxmysqlDatabase operations
ox_libShared library

QBCore Dependencies

ResourcePurpose
qb-coreCore framework
qb-targetMachine interaction
qb-inventoryItem management
qb-radialmenuQuick access menu
qb-inputInput dialogs

QBx (Qbox) Dependencies

ResourcePurpose
qbx_coreCore framework
ox_targetMachine interaction
ox_inventoryItem management

ESX Dependencies

ResourcePurpose
es_extendedCore framework
ox_targetMachine interaction
ox_inventoryItem management (auto-detected if running)

Standalone Dependencies

ResourcePurpose
ox_inventoryItem management
ox_targetMachine interaction

Optional Dependencies (All Frameworks)

ResourcePurposeFallback
oxide-bankingSeparate business accountsRevenue goes directly to owner's bank
qb-weathersyncIn-game time for NPC salesFalls back to real time
oxide-menuPrimary menu systemFalls 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:

TablePurpose
vending_businessesBusiness registration
vending_employeesEmployee roster with JSON permissions
vending_machinesPlaced machines with coords/rotation, durability
vending_stockCurrent inventory per machine slot
vending_revenueCash balance and sales totals per machine
vending_transactionsFull transaction log
vending_owned_machinesPurchased but not-yet-placed machines
vending_progressionBusiness level, XP, lifetime revenue
vending_milestonesClaimed one-time milestone bonuses
vending_business_inventoryWarehouse storage
vending_warehousesPhysical warehouse ownership
vending_pickup_boxesWholesale pickup boxes
vending_pending_deliveriesPending wholesale orders

3. Configure the Resource

Review and modify configuration files in config/:

  1. config/config.lua - Bridge settings, general settings, placement, pricing
  2. config/machines.lua - Machine types, models, prices
  3. config/items.lua - Item whitelists and base prices
  4. config/wholesale.lua - Bulk ordering catalog
  5. config/npc_sales.lua - NPC simulation settings
  6. config/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, Remove functions for your money system
  • Config.StandaloneInventory - GetItemList, AddItem, RemoveItem, GetItem, GetInventoryItems, CanCarryItem functions

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
  • /vendingbusiness command 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 /vdb or /vendingdashboard

Troubleshooting

If you encounter issues during installation, see Troubleshooting.


Updating

When updating oxide-vending:

  1. Back up your database tables
  2. Replace resource files
  3. Check for new SQL migrations in sql/ directory
  4. Review changelog for configuration changes
  5. Restart the resource

Next Steps