Oxide StudiosOxide Studios

Admin Commands

Complete guide to administrative commands for oxide-blackmarket.

Complete guide to administrative commands for oxide-blackmarket.


Command Overview

CommandDescriptionPermission
/relocatedealerForce dealer to relocateadmin
/dealerstatusCheck dealer statusadmin
/godealerTeleport to dealeradmin
/setblackmarketrepSet player reputationadmin
/checkblackmarketrepCheck player reputationadmin

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.Locations array

/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:

ParameterTypeRequiredDescription
playerIDnumberYesTarget player's server ID
amountnumberYesReputation 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 /checkblackmarketrep to verify change

Quick Reference - Tier Thresholds:

Rep ValueTierName
0-990Unknown
100-2991Street
300-5992Connected
600-9993Trusted
1000+4Inner Circle

/checkblackmarketrep

Check a player's current black market reputation.

Usage:

/checkblackmarketrep [playerID]

Parameters:

ParameterTypeRequiredDescription
playerIDnumberNoTarget 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 admin permission group
  • Configured in qb-core/config.lua under QBConfig.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

  1. Use /relocatedealer after config changes to spawn fresh dealer
  2. Use /dealerstatus to verify dealer is active
  3. Use /godealer to quickly reach dealer for testing

Managing Player Reputation

  1. Use /checkblackmarketrep [id] to verify current state
  2. Use /setblackmarketrep [id] [amount] to adjust
  3. Consider tier thresholds when setting values

Debugging Issues

  1. Enable Config.Debug = true in config
  2. Check console for [oxide-blackmarket] messages
  3. Use /dealerstatus to check entity state