Installation
Complete setup guide for oxide-blackmarket.
Complete setup guide for oxide-blackmarket.
Prerequisites
Required Resources
Ensure these resources are installed and running:
| Resource | Version | Purpose |
|---|---|---|
| qb-core | Latest | Core framework |
| qb-target | Latest | Interaction system |
| qb-inventory | Latest | Item management |
| oxmysql | Latest | Database connectivity |
Optional Resources
| Resource | Purpose |
|---|---|
| qb-banking | Police society fund deposits on arrests |
| qb-phone | Email notifications for Tier 4 pager users |
Installation Steps
Step 1: Download the Resource
Place the oxide-blackmarket folder in your resources directory:
resources/
└── [nulldev]/
└── oxide-blackmarket/
Or any category folder of your choice.
Step 2: Add to Server Config
Add to your server.cfg:
ensure oxide-blackmarket
Important: Ensure it starts AFTER qb-core, qb-target, and qb-inventory:
ensure qb-core
ensure qb-target
ensure qb-inventory
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'
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 to qb-core/shared/items.lua:
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's image folder:
qb-inventory/html/images/blackmarket_pager.png
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 players table metadata.
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.
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 qb-target to interact
- Verify shop UI opens
- Test buying and selling items
Step 4: Test Police Mechanics (Optional)
- Set job to police:
/setjob police 4 - Approach dealer and aim weapon
- 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...
}
Config.AreaNames = {
"Area Name",
-- Matching area names for pager...
}
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 reputation decay (placeholder - not implemented)
Config.ReputationDecay = false
Support
Need help with installation? Join our Discord server for support.