Admin Guide

The /drugselling admin commands (settings, corners, drops, kit, heat), the /corner and /trapphone player commands, and how admin permissions work in Oxide Drugselling.

Commands for setting up and testing oxide-drugselling.

The admin commands all run through one command, /drugselling, followed by a subcommand. Typing /drugselling on its own shows Usage: /drugselling <settings|corners|drops|kit|heat>. In the server console it also lists what each one does.

Commands Overview

CommandWhat it doesWho can use it
/drugselling settingsOpens the in-game settings menuAdmins
/drugselling cornersOpens the settings menu on the Corners sectionAdmins
/drugselling dropsOpens the settings menu on the Dead Drops sectionAdmins
/drugselling kit [id]Gives a trap phone, SIM, battery pack and sting phoneAdmins, and the server console
/drugselling heatShows the heat where you standAdmins
/cornerStarts or stops working a corner where you standEveryone
/trapphoneOpens the first trap phone you carryEveryone

Command Details

/drugselling settings

Opens the settings editor. Changes apply live and are saved to your database straight away, with no restart and no file editing. See Configuration → The in-game settings menu for how the menu works and what every setting does.

/drugselling settings

Output:

  • Success: the settings menu opens.
  • Failure: "You do not have permission to use this command".

Only admins can open the menu, and every save is checked again on the server, so a non-admin can't change settings even by faking the request. Right after the resource starts, the menu also shows the permission message until the settings have finished loading from the database; wait a moment and try again.


/drugselling corners

Opens the same menu straight on Core → Corners: the corner radius, spacing, waits and the Demand list. Players start corners themselves with /corner; there is nothing to place.

/drugselling corners

/drugselling drops

Opens the same menu straight on Phone → Dead Drops, to place drop spots with Place in world.

/drugselling drops

/drugselling kit

Gives one of each item this resource adds, for testing:

  • a Trap Phone, already set up with its own number
  • a Prepaid SIM
  • a Battery Pack
  • a Sting Phone
/drugselling kit [id]

Parameters:

ParameterTypeRequiredDescription
idnumberNoThe server ID of the player who gets the kit. Leave it out to give it to yourself

Examples:

/drugselling kit        -- give the kit to yourself
/drugselling kit 12     -- give the kit to player 12

Output:

  • Success: "Drug selling kit given".
  • Some items couldn't be given: "N of M kit items could not be given". Usually the item doesn't exist in your inventory yet (see Installation → Adding the items) or the player's inventory is full.

From the server console, type it without the slash and give an ID (drugselling kit 12); without an ID it tells you to run it in game.

The item names come from the live settings, so if you renamed the phone items in the menu, the kit gives the renamed items.


/drugselling heat

Shows the heat of the map area you're standing in, and your own character's heat. Useful for tuning.

/drugselling heat

Output:

  • "Heat here: area 12.5, you 4.0"

See Features → Heat for what heat does.

Player Commands

/corner

Starts working a corner where the player stands, or stops the one they're working. The same thing is in the radial menu as Work corner / Stop corner (while Corners → Radial menu item is on). The command name is Corners → Command; a rename takes effect after a restart. See Features → Corners.

/trapphone

Opens the first trap phone the player carries, the same as using the item. Any player can use it.

It's meant to be bound to a key: players set it in Settings → Key Bindings → FiveM → Open trap phone. It's unbound by default. Without a phone, the player sees "You don't have a trap phone".

Permissions

The /drugselling subcommands check whether you're a server admin through o-link. The check uses FiveM's built-in permission system (called ACE), so there's nothing drug-selling-specific to set up.

A player counts as an admin if any of these is true:

  • They have the command permission. Stock QBCore and QBX server.cfg files already give this to group.admin (add_ace group.admin command allow), so your existing framework admins can use the commands with no changes.
  • They're an admin in ESX (an ESX admin group).
  • They have the admin permission.

If you need to make someone an admin, two lines in server.cfg do it: one to put the player in the admin group, and one to give that group the admin permission.

server.cfg
add_principal identifier.license:YOUR_LICENSE_HERE group.admin
add_ace group.admin admin allow

Replace YOUR_LICENSE_HERE with the player's license identifier, then restart the server.

A player without permission who runs an admin subcommand sees "You do not have permission to use this command".

The live server console can run drugselling kit with a player ID. The other subcommands work on the admin's own screen or position, so they only work in game.

Police access to seized phones and the sting phone isn't an admin permission. It comes from the player's job (and being on duty, while Only on-duty police is on): see Evidence → Jobs and Stings → Jobs in Configuration → Evidence.

Next Steps