Installation
Complete setup guide for oxide-blackmarket.
Complete setup guide for oxide-blackmarket.
Prerequisites
Required Resources
| Resource | Version | Purpose |
|---|---|---|
| community_bridge | Latest | Framework and resource abstraction layer |
| oxmysql | Latest | Database connectivity |
Community Bridge is available for download in our Discord server. Make sure you have the latest version installed before proceeding.
Community Bridge automatically detects and bridges your framework (QBCore, ESX, etc.), target system (qb-target, ox_target, etc.), inventory system, phone system, and dispatch system. No manual configuration is needed for these.
Supported Systems (via Community Bridge)
| System | Supported Options |
|---|---|
| Framework | QBCore, ESX, QBox, and more |
| Target | qb-target, ox_target, and more |
| Inventory | qb-inventory, ox_inventory, qs-inventory, and more |
| Phone | lb-phone, qb-phone, and more |
| Dispatch | ps-dispatch, cd_dispatch, and more |
Installation Steps
Step 1: Download the Resource
Place the oxide-blackmarket folder in your resources directory:
resources/
└── [your-folder]/
└── oxide-blackmarket/
Step 2: Add to Server Config
Add to your server.cfg:
ensure oxide-blackmarket
Important: Ensure it starts AFTER community_bridge and your framework:
ensure community_bridge
ensure oxide-blackmarket
Step 3: Configure Settings
Review and customize shared/config.lua:
-- Key settings to review:
Config.Debug = false -- Set true for testing
Config.RelocationInterval = 45 * 60 * 1000 -- How often dealer moves
Config.HitSquadEnabled = true -- Enable retaliation system
Config.HitSquadDifficulty = 'medium' -- 'easy', 'medium', 'hard'
Config.PoliceJobs = { 'police', 'sheriff', 'bcso', 'sast', 'sasp' } -- Police job names
See Configuration for all options.
Adding the Pager Item
The burner pager is an optional item that lets players locate the dealer.
Step 1: Add Item Definition
Add the pager item to your framework's item registry. The exact location depends on your framework:
- QBCore:
qb-core/shared/items.lua - ESX: Your item management resource
- ox_inventory:
ox_inventory/data/items.lua
Example item definition:
blackmarket_pager = {
name = 'blackmarket_pager',
label = 'Burner Pager',
weight = 100,
type = 'item',
image = 'blackmarket_pager.png',
unique = true,
useable = true,
shouldClose = true,
description = 'A disposable pager for underground contacts'
},
Step 2: Add Item Image
Add a blackmarket_pager.png image to your inventory system's image folder.
Image specifications:
- Size: 100x100 pixels (recommended)
- Format: PNG with transparency
- Style: Pager/beeper device
Step 3: Distribute the Pager
The pager can be:
- Added to the dealer's Tier 2 shop inventory (default)
- Given via admin commands
- Added to other shops or loot tables
Server Configuration
Database
No additional database tables are required. Reputation is stored in the existing player metadata system provided by your framework.
Performance Tuning
For large servers, consider adjusting:
-- shared/config.lua
Config.BlipDetectionRange = 200.0 -- Reduce for less frequent checks
Config.HitSquadCheckInterval = 1000 -- Increase for less AI processing
Config.FleeCheckInterval = 1000 -- Increase for less frequent checks
OneSync Requirements
This resource requires OneSync to be enabled:
set onesync on
Or for OneSync Infinity:
set onesync on
set onesync_population true
Verification
Step 1: Start Server
Start your server and check for errors in the console. Enable debug mode temporarily to see startup messages:
Config.Debug = true -- in shared/config.lua
With debug enabled, successful startup shows:
[oxide-blackmarket] Resource starting...
[oxide-blackmarket] Pager item registered
[oxide-blackmarket] Initializing dealer...
[oxide-blackmarket] Spawned dealer at location X (entity: XXX, netId: XXX)
Step 2: Test Dealer Spawn
- Join the server
- Use
/godealer(admin command) to teleport to the dealer - Verify dealer is visible and interactable
Step 3: Test Shop
- Approach dealer and use the target interaction to select "Trade with Dealer"
- Verify shop UI opens
- Test buying and selling items
Step 4: Test Police Mechanics (Optional)
- Set your job to police
- Approach dealer and aim weapon within 10m
- Verify dealer surrenders
- Test arrest sequence
Optional Setup
Custom Dealer Locations
Add your own locations in shared/config.lua:
Config.Locations = {
vector4(x, y, z, heading),
-- Add more locations...
}
Area names are resolved automatically from coordinates using GTA natives.
Tips for locations:
- Choose open areas where NPCs won't get stuck
- Avoid indoor locations (pathfinding issues)
- Test each location for accessibility
Custom Shop Inventory
Modify shared/items.lua to customize what's sold:
Config.ShopInventory[0] = {
{ item = 'lockpick', label = 'Lockpick', price = 500, stock = 20 },
-- Add more items...
}
See Configuration for the full item format.
Disabling Features
-- Disable hit squad retaliation
Config.HitSquadEnabled = false
-- Disable loot drops
Config.LootDropEnabled = false
-- Disable dispatch alerts
Config.DispatchAlerts.transaction.enabled = false
Config.DispatchAlerts.proximity.enabled = false