Admin Guide
The /cocaine command, the in-game settings menu, police alerts, permissions, and the player stats command for oxide-cocaine.
Commands for testing and managing oxide-cocaine.
Everything runs through a single command, /cocaine, followed by a subcommand. Typing /cocaine on its own shows the list of subcommands.
Commands Overview
| Command | What it does | Who can use it |
|---|---|---|
/cocaine stats | Shows the player's own level and XP card | Everyone |
/cocaine settings | Opens the in-game settings menu | Admins (see Permissions) |
/cocaine kit | Gives a full cocaine production starter kit | Admins |
/cocaine setlevel [id] [level] | Sets a player's cocaine level | Admins (also works from the server console) |
Settings Menu
/cocaine settings
Opens an in-game editor for the resource's settings — the same values stored in the oxide_settings database table (see Configuration). Changes apply live and are saved to the database immediately; no restart, and no editing of any file.
- Settings are organized into a sidebar of four categories — Core, Production, World, and Players — each holding related sections (12 sections in total).
- Each section has a Basic view (the common toggles and numbers most servers touch) and an Advanced view (fine-tuning and grouped settings), plus a search box to jump straight to a setting.
- Each changed field is highlighted; Save Changes commits them, and every field has a Reset to default button that restores the value from the
shared/configfiles. - Everything is editable in-game — recipes, timers, XP and levels, purity, minigame difficulty, scene prop positions, effects, and the in-world zones (placement zones and wild-plant spawn zones). The zones are drawn directly in the world: the menu hides, you place the polygon points, then the menu comes back. Each zone row also has a Teleport button to jump to it.
Only admins can open the menu, and every save is re-checked on the server, so a non-admin can't change settings even by forging the request. Drawing zones in-world needs an up-to-date o-link (it provides the drawing tool) — if yours is out of date, the menu will tell you.
The menu won't open during an activity
If you're in the middle of a cook or a bagging session (which take over the screen), /cocaine settings shows "Close the current activity before opening settings." Finish or cancel the activity first, then open the menu.
Admin Commands
/cocaine kit
Gives you a kit to walk the whole production line and skip ahead to later stages for testing:
1xeach of the four stations: Coca Pool, Coca Extractor, Cook Table, Brick Press1xCocaine Manual20xCoca Leaves (to stomp)10xCoca Mash and5xKerosene (to skip ahead to extractor testing)6xCoca Extract and4xAcetone (to skip ahead to cocaine cooking)12xCocaine (to test the crack cook, bagging, and a brick press)3xCrack (to test bagging crack)4xBaking Soda plus5xeach of the other seven cutting agents — Cornstarch, Baby Laxative, Creatine, Caffeine Powder, Benzocaine, Lidocaine, Levamisole (to test cutting crack)20xBaggy (the empty bags bagging uses up — one per sealed bag)
Some cuts are level-gated (Lidocaine and Benzocaine at level 5, Levamisole at level 7), so they won't show in the crack cut picker until you raise your level with
/cocaine setlevel.
Run it in game on a test character. Running it from the server console does nothing useful — it'll tell you to run it in game, because the items go to a player.
/cocaine setlevel [id] [level]
Sets a player's cocaine level, and sets their XP to that level's starting threshold.
id— the player's server IDlevel— 1 to 10 (with the default level table)
The player must be online with a character loaded. Both you and the player get a confirmation message. Useful for testing the level-gated brick press — for example /cocaine setlevel 1 5 lets player 1 place the press.
This command also works from the live server console (txAdmin or terminal), where no permission is needed.
Police Alerts
Under Dispatch (in the Core category, on the Advanced tab) you can make production carry a risk of being reported to police.
Set Alert chance above 0 and every time a player starts a stage the server rolls for a dispatch call at that station's location. Each of the four stages — stomp, cook, press, package — can carry its own chance; leave one at -1 and it follows the master chance.
Two settings stop it becoming noise:
- Site cooldown (default 5 minutes) — the same station can't raise a second alert until it expires. Other stations are unaffected.
- Per-stage chance — turn the quiet stages down or off and leave the cook itself risky.
Everything is decided on the server from the station's stored position, so a player can't suppress the alert or make it point somewhere else.
Changes apply live. See Configuration for the full field list and what you need installed.
Player Command
/cocaine stats
Any player can run this. It shows their stats card for a few seconds:
- current level, XP, and progress to the next level
- total product made and sold
- which stations are unlocked, and the level each one needs
The in-game manual points players to this command.
Permissions
The admin subcommands (settings, kit, setlevel) check whether you're a server admin through your framework. The check is the same on every framework, so there's nothing framework-specific to set up — it uses FiveM's built-in permission system (called ACE).
If a player without permission runs an admin subcommand, they get a "You do not have permission." message.
To make someone an admin, two lines in server.cfg are needed — one to put the player in the admin group, and one to grant that group the admin permission:
add_principal identifier.license:YOUR_LICENSE_HERE group.admin
add_ace group.admin admin allowReplace YOUR_LICENSE_HERE with the player's license identifier. If your server already has an admin group set up this way (most do), the commands work for your admins with no extra setup.
The live server console is always allowed to run /cocaine setlevel — handy for setting levels without an in-game admin. /cocaine stats needs no permission.