Swarm Black Market
A roaming dealer who sells level- and reputation-locked illegal items for marked bills, plus 12 progression-based criminal contracts with heat, ratings and police dispatch alerts.
New to Swarm scripts? Read Getting started first. It covers Swarm Bridge, install order and the licence.
Requirements
Frameworks: Qbox, QBCore, ESX, standalone.
| Requirement | What it's for | Included |
|---|---|---|
swarm_bridge | Talks to your framework, inventory, target and so on. Included with every Swarm script. | Yes |
ox_lib | Shared library (callbacks, progress bars, text UI). | No |
oxmysql | Saves player progress. Without it progress is kept in memory only. | No |
Install
- Copy the folders
swarm_blackmarket,swarm_bridgeinto your server'sresourcesfolder. Already haveswarm_bridgefrom another Swarm script? Keep just one copy, the newest. - Add them to
server.cfg, dependencies first:ensure ox_lib ensure oxmysql ensure swarm_bridge ensure swarm_blackmarket - Database: import
sql/install.sqlinto your database before starting the script. It isn't created automatically. Upgrading from v0.1 or v0.2? Run the heat-columnALTERthat is commented in the same file (MariaDB and MySQL 8 versions are both there). - Items: add the item definitions for your inventory from
install/items/:ox_inventory.items.luafor ox_inventory (any framework)qbcore.items.luafor QBCore or Qbox with qb-inventoryesx.items.sqlfor legacy ESX
Then copy
install/images/*.pnginto your inventory's image folder (ox_inventory/web/images/orqb-inventory/html/images/). Icons are namedSS_<item>.pngso they never overwrite another resource's images. Every item has an icon included.Items added (1)
encrypted_usbThe shop also sells items your server should already have:
lockpick,armor(ox_inventory calls itarmour),weapon_pistol,weapon_smg, andmarkedbillswithworthmetadata as the shop currency.On ESX, weapons are loadout rather than items and there are no marked bills. Remove the weapons from
Config.Shop.itemsand switchConfig.Currency.shopto an account such asblack_money. - Licensed edition only: put your ServerSecret in
swarm_bridge/licence/private_config.lua. One secret unlocks every Swarm script you own. How to get it. The Source Code edition has no licence check, so skip this. - Start the server and check the console for errors.
Configuration
Open config.lua and check these before going live. Anything marked as a placeholder should be moved to a spot that suits your map.
| Setting | What it does |
|---|---|
Config.Dealer.locations | The four spots (vector4) the dealer moves between. |
Config.Dealer.showBlip / rotateMinutes / interactRadius | Whether the dealer has a blip (off by default), how often he moves (60 minutes) and how close players must be to buy. |
Config.Shop.items | What the dealer sells, with prices and level/reputation locks. Item names must match your inventory. |
Config.Currency.shop | Shop currency. Marked bills by value by default; use a money account such as black_money on ESX. |
Config.Currency.missions | Account contracts pay into ('cash' by default). |
Config.Missions.policeJobs / usePoliceRequirements | Many contracts need 1 to 4 police on duty. Match the job names to your server, or set usePoliceRequirements = false. |
Config.Logging.discordWebhook | Optional Discord log for purchases, contracts and admin actions. Empty by default. |
Config.AdminAce | Admin ACE, 'blackmarket.admin' by default. |
Config.Interaction | 'auto', 'ox_target', 'qb-target' or 'text' (press E). |
Config.Locale | 'auto' follows the language set in Swarm Bridge. Set a code such as 'de' to force this script into another language. See Languages. |
Commands & permissions
| Command | Who | What it does |
|---|---|---|
/blackmarket | Everyone | Opens the market screen. Buying and taking contracts still require being at the dealer. |
/bm_setlevel [id] [level] | Admin | Set a player's level. |
/bm_addxp [id] [amount] | Admin | Add XP. |
/bm_addrep [id] [amount] | Admin | Add reputation. |
/bm_rotate | Admin | Move the dealer to another location. |
/bm_restock | Admin | Restock the shop. |
/bm_reset [id] | Admin | Reset a player's progress. |
Permissions (ACE)
Add to server.cfg, changing group.admin to your staff group if needed:
add_ace group.admin blackmarket.admin allowAdmin commands work from the server console or for players with blackmarket.admin.
Keys
- E: talk to the dealer when no target resource is used
Good to know
- Contracts that need police won't start on an empty server unless you turn police requirements off.
- Contract locations and NPC setups are in
shared/missions.lua, notconfig.lua.
Need help?
Ask in the Swarm Scripts Discord and we'll help you get set up.
Swarm Scripts
Nyxia Development