Discord Store
Urban Supply v2

Installation

Follow these steps in order. Do not skip the SQL step — the script will not function without the database tables.

Requirements

ResourceRequiredNotes
ESX Legacyif using ESXAuto-detected
QB-Coreif using QBAuto-detected
QBXif using QBXAuto-detected
ox_inventoryrequired
oxmysqlrequired
wasabi_notifyoptionalSet Config.Notify = 'wasabi'
wasabi_policeoptionalEnables live cop count for dynamic pricing
ak4y-dispatch / cd_dispatch / rcore_dispatch / aty_dispatchoptionalSet Config.Dispatch to match

Steps

1
Copy the resource
Place the EclipSys_UrbanSupply folder into your server's resources directory.
2
Run the SQL
Creates two tables the script needs. Safe to run on an existing server — uses IF NOT EXISTS.
3
Import items SQL
Run the included eclipsys_items.sql to insert all supply items. Uses INSERT IGNORE — won't overwrite existing entries.
4
Add items to ox_inventory
Open ox_inventory/data/items.lua and paste the contents of eclipsys_ox_items.lua anywhere inside the items table.
5
Add to server.cfg
Must load after your framework and ox_inventory. See example below.
6
Full server restart
A full restart is required — not just ensure. New files need a full restart to register correctly.
Do not rename the resource folder. The script validates its own resource name on startup and will block all functionality if it does not match EclipSys_UrbanSupply.

SQL

database.sql
CREATE TABLE IF NOT EXISTS `drug_progression` (
  `identifier`  varchar(60)  NOT NULL,
  `xp`          int(11)      NOT NULL DEFAULT 0,
  `level`       int(11)      NOT NULL DEFAULT 1,
  `last_active` timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`identifier`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE IF NOT EXISTS `drug_market` (
  `drug`        varchar(60)  NOT NULL,
  `multiplier`  decimal(5,2) NOT NULL DEFAULT 1.00,
  `updated_at`  timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`drug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

server.cfg

server.cfg — without dispatch
ensure oxmysql

# Include only the line matching your framework:
# ensure es_extended   (ESX)
# ensure qb-core       (QB-Core)
# ensure qbx_core      (QBX)

ensure ox_inventory
ensure EclipSys_UrbanSupply
server.cfg — with dispatch
ensure oxmysql

# Include only the line matching your framework:
# ensure es_extended   (ESX)
# ensure qb-core       (QB-Core)
# ensure qbx_core      (QBX)

ensure ox_inventory
ensure ak4y-dispatch    # replace with your dispatch resource
ensure EclipSys_UrbanSupply

Verifying it works

After a full restart, check your server console for:

console
[UrbanSupply] Market loaded

Then in-game:

  • Type /trap — NPC buyers should begin spawning around you
  • Wait for a buyer to walk up and press E to attempt a sale
  • Type /checkmarket to open the market prices UI
  • Type /rep to open your street reputation panel

Common issues

/trap does nothing — Check that Config.CopRequired is 0 if you have no cops online. Make sure your job is not listed in Config.Cops or Config.Ems.
Items not found / "undefined" warnings — Make sure you ran the SQL and added items to ox_inventory/data/items.lua. Run ensure ox_inventory after editing.
Dirty money not paying out — Check Config.DirtyMoneyAccount matches your exact item/account name and the item exists in ox_inventory with stack = true.
"Resource name invalid" on startup — The folder name does not match. Rename it to EclipSys_UrbanSupply exactly.
Market prices reset every restart — Make sure the drug_market table was created successfully and your database connection is working.
Players kicked from trap randomly — This is the distance monitor. The player may be on uneven terrain causing position drift.