Overview
QQ Market turns trading into a real economy: a live order book where players post buy and sell limit orders that match automatically on price and time. 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) orESX(auto-detected on start) oxmysqland an inventory (ox_inventoryorqb-inventory) — all freeox_libis not required — dialogs and callbacks are built in- Optional:
MugShotBase64for character photos in the UI
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 oxmysql
ensure ox_inventory # or qb-inventory
ensure qq_market3. Start the server. Database tables are created automatically on first start.
4. To allow player-owned markets, register the Market License item in your inventory (see that section below).
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.sqlConfigure items
Edit config.lua and list the items players can trade, grouped by category:
Config.sellableItems = {
["materials"] = {
["steel"] = "Steel",
["copper"] = "Copper",
},
["drugs"] = {
["weed"] = "Marijuana",
["coke"] = "Cocaine",
},
["food"] = {
["sandwich"] = "Sandwich",
["water"] = "Water",
},
}The market is a fungible commodity exchange — list only plain, stackable items with no per-instance metadata. Weapons, containers/backpacks, ID cards and degrade/durability items are refused at deposit (a startup notice flags any weapon or durability code left in your config).
Markets & modes
Two markets ship pre-configured (Docks and Sandy Shores, both global). Add or change them in Config.markets — each entry has an id, a mode, an active flag and its NPC/prop and blip settings:
Config.markets = {
[3] = {
id = "market_paleto",
name = "Paleto Bay Market",
mode = "global", -- global | isolated | hybrid
active = true,
npcSettings = { model = "s_m_y_valet_01", coords = vector4(-100.0, 200.0, 30.0, 90.0) },
blipSettings = { id = 570, colour = 5, scale = 0.65, displayName = "QQ Market" },
},
}| Mode | Behaviour | Use case |
|---|---|---|
global | Orders shared across all global markets | Main trading hubs |
isolated | Orders trade only within this market | Regional or black markets |
hybrid | Sees own market + all global markets | Secondary markets with global access |
Player-owned markets
Players can run their own market via a license item. First register the item in ox_inventory/data/items.lua and restart the inventory:
['market_license'] = {
label = 'Market License',
weight = 100,
stack = false,
close = true,
client = { export = 'qq_market.useMarketLicense' },
},Grant one with /givemarket. The player then places the market in-world (choosing categories, a mode and a prop/NPC model) and earns the configured fees. Assign fee-collecting owners with /market_addowner.
Admin commands
/qqmarket # open the market panel in-game (admins get settings)
market_status # list all markets and their state
market_setmode <market_id> <global|isolated|hybrid>
market_toggle <market_id> <on|off>
market_addowner <citizenid> [fee%] # owner who collects fees
market_removeowner <citizenid>
market_listowners
givemarket <player_id> # grant a market license
removemarket <market_id | market_name>/qqmarket and /market_status run in-game and are limited to admins (recognized via Config.admins, an ACE permission, or an admin job/group). The seven state-changing commands run from the server console, or in-game once you grant the matching ACE permission:
add_ace group.admin command.market_setmode allow
add_ace group.admin command.market_toggle allow
add_ace group.admin command.market_addowner allow
add_ace group.admin command.market_removeowner allow
add_ace group.admin command.market_listowners allow
add_ace group.admin command.givemarket allow
add_ace group.admin command.removemarket allowLocalization
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 with Config.language and edit the strings in locales/*.lua (server) and web/js/translations.js (UI). No hardcoded English remains.
Troubleshooting
- Orders not showing? Run
market_statusand make sure the market isactiveand in the expected mode. - Commands not working? The state-changing commands run from the server console or with the ACE permissions above;
/qqmarketand/market_statusare in-game only (admins). - UI won't open? The UI libraries are bundled (no CDN), so it works on offline / firewalled / strict-CSP servers. Make sure
oxmysqland your inventory (ox_inventoryorqb-inventory) start beforeqq_market.
Support
Licensed buyers get support via Tebex ticket and our community. The fastest channel is our Discord.