Admin Commands
Complete guide to administrative commands for oxide-blackmarket.
Complete guide to administrative commands for oxide-blackmarket.
Command Overview
| Command | Description | Permission |
|---|---|---|
/relocatedealer | Force dealer to relocate | admin |
/dealerstatus | Check dealer status | admin |
/godealer | Teleport to dealer | admin |
/setblackmarketrep | Set player reputation | admin |
/checkblackmarketrep | Check player reputation | admin |
Dealer Management
/relocatedealer
Force the dealer to immediately relocate to a new random location.
Usage:
/relocatedealer
Parameters: None
Example:
/relocatedealer
Output:
- Console: Shows old and new location
- Notification: "Dealer is relocating..."
Notes:
- Useful for testing or if dealer is stuck
- Does not affect relocation timer (resets from new spawn time)
/dealerstatus
Check if the dealer is currently active and get location information.
Usage:
/dealerstatus
Parameters: None
Example:
/dealerstatus
Output (Dealer Active):
- Notification: "Dealer active at location [index]"
- Console prints:
- Network ID
- Location index
- Exact coordinates (x, y, z)
Output (No Dealer):
- Notification: "No dealer currently active"
Notes:
- Useful for debugging spawn issues
- Shows location index matching
Config.Locationsarray
/godealer
Teleport to the dealer's current location.
Usage:
/godealer
Parameters: None
Example:
/godealer
Behavior:
- Teleports 3 units in front of the dealer
- Positions you facing the same direction as dealer
- Adds 0.5 to Z coordinate to prevent ground clipping
Output (Success):
- Notification: "Teleported to dealer"
- Console: Shows admin ID and action
Output (No Dealer):
- Notification: "No dealer currently active"
Notes:
- Useful for quickly finding the dealer
- Works regardless of distance
Reputation Management
/setblackmarketrep
Set a player's black market reputation to a specific value.
Usage:
/setblackmarketrep [playerID] [amount]
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| playerID | number | Yes | Target player's server ID |
| amount | number | Yes | Reputation value to set |
Examples:
/setblackmarketrep 1 500 -- Set player 1 to 500 rep (Tier 2)
/setblackmarketrep 5 1000 -- Set player 5 to 1000 rep (Tier 4)
/setblackmarketrep 2 0 -- Reset player 2 to 0 rep (Tier 0)
Output (Success):
- Admin notification: "Set player [ID]'s blackmarket reputation to [amount]"
- Target player notification: "Your black market reputation has been set to [amount] ([tierName])"
- Target receives tier change notification if applicable
Output (Invalid Player):
- Notification: "Player not found"
Notes:
- Can set any value (no upper limit)
- Tier is automatically calculated from new value
- Use
/checkblackmarketrepto verify change
Quick Reference - Tier Thresholds:
| Rep Value | Tier | Name |
|---|---|---|
| 0-99 | 0 | Unknown |
| 100-299 | 1 | Street |
| 300-599 | 2 | Connected |
| 600-999 | 3 | Trusted |
| 1000+ | 4 | Inner Circle |
/checkblackmarketrep
Check a player's current black market reputation.
Usage:
/checkblackmarketrep [playerID]
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| playerID | number | No | Target player's server ID (defaults to self) |
Examples:
/checkblackmarketrep -- Check your own rep
/checkblackmarketrep 1 -- Check player 1's rep
/checkblackmarketrep 5 -- Check player 5's rep
Output:
- Console: "Player [ID] has [rep] reputation (Tier [tier] - [tierName])"
Example Output:
Player 1 has 350 reputation (Tier 2 - Connected)
Notes:
- If no player ID provided, checks command user's reputation
- Useful for verifying reputation changes
- Shows both numeric tier and tier name
Permissions
All commands require the admin permission level as defined in QBCore.
Setting Permissions
Commands are registered with QBCore's permission system:
QBCore.Commands.Add('commandname', 'Description', {}, false, function(source, args)
-- Command logic
end, 'admin')
Checking Permissions
Permissions are checked through QBCore's built-in system:
- Players must have the
adminpermission group - Configured in
qb-core/config.luaunderQBConfig.Server.Permissions
Default Admin Groups
Most QBCore servers define these in qb-core/config.lua:
QBConfig.Server.Permissions = {
'god',
'admin',
'mod',
}
Adding Permission to Players
Use QBCore's permission commands:
/setpermission [playerID] admin
Or through your database by updating the players table.
Best Practices
Testing New Configurations
- Use
/relocatedealerafter config changes to spawn fresh dealer - Use
/dealerstatusto verify dealer is active - Use
/godealerto quickly reach dealer for testing
Managing Player Reputation
- Use
/checkblackmarketrep [id]to verify current state - Use
/setblackmarketrep [id] [amount]to adjust - Consider tier thresholds when setting values
Debugging Issues
- Enable
Config.Debug = truein config - Check console for
[oxide-blackmarket]messages - Use
/dealerstatusto check entity state