QQQQ Engineering
Documentation

QQ Market

A player-driven order-book marketplace for QBCore, Qbox & ESX. This guide covers installation, configuration and the admin tools. Stuck? Our Discord is the fastest way to get help.

Join our Discord

Overview

QQ Market turns trading into a real economy: a live order book where players post buy and sell orders that match on supply and demand. It supports multiple market locations (global, isolated and hybrid), a per-player warehouse and wallet, and player-owned markets. Code is escrow-encrypted; config.lua, locales/*.lua and the entire web/ UI stay open.

Requirements

  • A framework — QBCore, Qbox (qbx_core) or ESX (auto-detected on start)
  • ox_lib, oxmysql, ox_inventory — all free
  • Optional: MugShotBase64 for character photos

Installation

1. Place the qq_market folder in your resources, e.g. resources/[qq]/qq_market.

2. Add to server.cfg — your framework must start before qq_market:

ensure ox_lib
ensure oxmysql
ensure ox_inventory
ensure qq_market

3. Start the server. Database tables are created automatically on first start.

Database

Tables auto-create on first resource start — nothing to run. To provision them manually, import install.sql:

mysql -u YOUR_USER -p YOUR_DATABASE < install.sql

Configure items

Edit config.lua and list the items players can trade, grouped by category:

Config.sellableItems = {
    ["weapons"] = {
        ["weapon_pistol"] = "Pistol",
        ["weapon_ak47"]   = "AK-47",
    },
    ["drugs"] = {
        ["weed"] = "Marijuana",
        ["coke"] = "Cocaine",
    },
    ["food"] = {
        ["sandwich"] = "Sandwich",
        ["water"]    = "Water",
    },
}

Markets & modes

Set Config.separateMarkets = true to run multiple market locations, then define them in Config.markets (each with an id, mode and active flag):

Config.separateMarkets = true

Config.markets = {
    [1] = {
        id     = "market_docks",
        mode   = "global",
        active = true,
        -- coords, blip, model, ...
    },
}
ModeBehaviourUse case
globalOrders shared across all global marketsMain trading hubs
isolatedOrders visible only at this marketBlack markets, private exchanges
hybridSees own market + all global marketsSecondary markets with global access

Player-owned markets

Players can run their own market via a license item. Grant one with the admin command below; the player then places the market in-world (choose categories, mode and a prop/NPC model) and earns the configured fees.

/givemarket [player_id]

Admin commands

market_status                                   # list all markets
market_setmode <market_id> <global|isolated|hybrid>
market_toggle  <market_id> <on|off>
givemarket     <player_id>                       # grant a market license
removemarket   <market_name | market_id>

Run from the server console, or grant ACE permissions to use them in-game:

add_ace group.admin command.market_status  allow
add_ace group.admin command.market_setmode allow
add_ace group.admin command.market_toggle  allow
add_ace group.admin command.givemarket     allow
add_ace group.admin command.removemarket   allow

Localization

QQ Market ships in 7 languages — EN, DE, ES, FR, PL, RU, UK — across both the server messages and the web UI. Set your default in config.lua and edit the strings in locales/*.lua. No hardcoded English remains.

Troubleshooting

  • Orders not showing? Run market_status and make sure the market is active and in the expected mode.
  • Commands not working? Run them from the server console, or add the ACE permissions above.
  • UI won't open? The UI libraries are bundled (no CDN), so it works on offline / firewalled / strict-CSP servers. Make sure ox_lib, oxmysql and ox_inventory start before qq_market.

Support

Licensed buyers get support via Tebex ticket and our community. The fastest channel is our Discord.