Agency-Blackmarket V2 Installation
A living black market for FiveM on QBCore, Qbox, ESX or fully standalone.

01Installation
- 1Put Agency-Blackmarket into your resources folder
- 2Add ensure Agency-Blackmarket to server.cfg, after your framework, inventory and target resource
- 3With oxmysql the table agency_blackmarket is created on the first start. install/agency_blackmarket.sql is only needed when your database user may not create tables
- 4Check the items in Config.Items and Config.Sell.items against your inventory. Items your inventory does not know are left out, with one line in the server console
- 5Optional: add_ace group.admin agency.blackmarket allow for the Admin page of /ablackmarket
- 6Updating from V1: replace the old folder and use the new config.lua. Reputation from blackmarket_reputation is taken over on the first start, and qb-menu is no longer needed
02Dependencies
No dependency requiredQBCore, QBox or ESX (optional, runs standalone without one)An inventory (optional: ox_inventory, qb-inventory, qs-inventory, ps, lj or jpr)oxmysql (optional, without it everything is saved in the server's key value store)ox_target or qb-target (optional, otherwise a prompt with a key)A dispatch script (optional: ps-dispatch, cd_dispatch, qs-dispatch, rcore_dispatch, core_dispatch, tk_dispatch, lb-tablet or origen_police)Agency-Banking (optional, money in standalone mode)Agency-Notify (optional)Agency Phone (optional, players pay with Agency Pay)
03SQL File
Optional: the resource creates these tables on its own when it starts. Import this file only if you set up the database by hand:
-- Agency Blackmarket V2
-- The resource creates this table by itself when oxmysql runs. Run this file
-- only if your database user may not create tables.
CREATE TABLE IF NOT EXISTS `agency_blackmarket` (
`scope` VARCHAR(16) NOT NULL,
`id` VARCHAR(96) NOT NULL,
`data` LONGTEXT NOT NULL,
`updated` INT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`scope`, `id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- V1 kept reputation in `blackmarket_reputation`. V2 takes it over once on its
-- first start; the old table can be dropped afterwards:
-- DROP TABLE IF EXISTS `blackmarket_reputation`;
+Good to know
Agency-Blackmarket V2 works right after the ensure line. Four points are worth a look before the first start: the items, the dirty money, the database and, when you update, the step from V1.
- Items
- The market sells what is in Config.Items and the fence buys what is in Config.Sell.items. Items your inventory does not know are left out on start, with one line in the server console naming them. For ox_inventory a different name can be set per item with ox, for example ammo-9 for pistol_ammo.
- Dirty Money
- QBCore uses marked bills, or the item black_money when ox_inventory knows it. Qbox uses the item black_money and ESX the account black_money. Config.Money.dirty forces one way, and Config.Money.buyWith sets what the dealers take: dirty money, cash or bank.
- Database
- With oxmysql, reputation, stock, orders and linked phones are saved in the table agency_blackmarket, which the script creates by itself. Without oxmysql everything goes to the server's key value store. install/agency_blackmarket.sql is only needed when your database user may not create tables.
- Updating from V1
- Replace the old folder with the new one and use the new config.lua, the V1 config does not fit. Reputation is taken over from blackmarket_reputation on the first start. qb-menu and esx_menu_default are no longer needed.
?Frequently asked questions
Where do the item pictures come from?
With Config.Images = 'auto' the menu reads them from the inventory that runs: ox_inventory, qs-inventory, qb-inventory, ps, lj or jpr. A web address of your own works too, and false shows the category icons instead.
Who can open the Admin page?
Players with the ACE agency.blackmarket, group.admin or group.superadmin, or a group from Config.AdminGroups in QBCore and ESX. add_ace group.admin agency.blackmarket allow in server.cfg is enough for most servers.