Installation Guide

Step-by-step setup for Oxide Vending using o-link, ox_lib, and oxmysql.

Prerequisites

Required Resources

ResourcePurpose
ox_libShared library, locale loading, callbacks, and utility helpers
oxmysqlDatabase driver
o-linkFramework and system abstraction used by this resource

Oxide Vending depends on your o-link setup for:

  • Player loaded and unload lifecycle events
  • Player identifier lookup
  • Admin checks
  • Notifications
  • Menu, input, progress bar, and helptext helpers
  • Inventory item lookup, carry checks, and add/remove operations
  • Cash and bank balance access
  • Target interactions on machines, showroom NPCs, and pickup entities

Optional Resource

ResourcePurpose
oxide-weatherSupplies in-game hour data to NPC sales. If not present, Oxide Vending falls back to real system time

Installation Steps

1. Place the Resource

Place oxide-vending inside your server's resources folder.

2. Add Startup Order

Start dependencies before the resource:

ensure ox_lib
ensure oxmysql
ensure o-link
ensure oxide-vending

3. Install the SQL Tables

Run sql/install.sql against your database.

This creates the vending_* tables used for:

  • Business ownership and employee roles
  • Placed machines and unplaced owned machines
  • Machine stock, revenue, and transactions
  • Progression and milestones
  • Warehouse ownership and storage
  • Wholesale pickup boxes and pending deliveries

4. Review Configuration

Adjust the config files under config/:

  • config/config.lua
  • config/machines.lua
  • config/items.lua
  • config/wholesale.lua
  • config/npc_sales.lua
  • config/progression.lua

See Configuration for the full reference.

5. Register the Items Your Server Will Sell

The vending system only works for items that exist in your active inventory system and are recognized by o-link.inventory.GetItemInfo(...).

Review config/items.lua and make sure every item listed in:

  • Config.ItemWhitelists
  • Config.ItemBasePrices
  • Config.WholesaleCatalog

exists in the inventory item registry your server uses.

6. Leave the Packaged UI in Place

The manifest loads the included html/ files directly:

  • html/index.html
  • html/css/*.css
  • html/js/**/*.js
  • html/img/*

There is no web/ build step for the resource in its current form.

Verification

  1. Start the server and confirm ox_lib, oxmysql, o-link, and oxide-vending all load without dependency errors.
  2. Verify the showroom blip appears if Config.Showroom.Blip.enabled = true.
  3. Walk to the showroom NPC and confirm the target interaction appears.
  4. Register a test business and open the contract and dashboard flow.
  5. Purchase a machine, choose a model, and place it in the world.
  6. Stock the machine with a valid configured item and confirm a player can buy from it.
  7. Confirm /vdb and /vendingdashboard open the dashboard for the business owner or employee.
  8. If warehouse and wholesale are enabled, place a test order and verify pickup boxes appear at the configured pallet.

Notes

Item Naming

The default config/items.lua includes a mixed starter list. Review it carefully before going live, especially if your server uses custom item names.

Optional Weather Integration

NPC sales read the hour from exports["oxide-weather"]:GetTime() when available. If oxide-weather is not running, sales timing still works using real time.

Next Steps