Admin Guide

The /cocaine command, the in-game settings menu, progression and brick stamp admin commands, police alerts, permissions, and the player profile 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

CommandWhat it doesWho can use it
/cocaine statsOpens the player's own profile: level, cut mastery, goals and master ranksEveryone
/cocaine settingsOpens the in-game settings menuAdmins (see Permissions)
/cocaine kitGives a full cocaine production starter kitAdmins
/cocaine setlevel [id] [level]Sets a player's cocaine levelAdmins (also works from the server console)
/cocaine setxp [amount] [id]Sets a player's total cocaine XP; their level follows, up or downAdmins (also works from the server console)
/cocaine resetjournal [id]Clears a player's journal, so their first-time XP pays againAdmins (also works from the server console)
/cocaine setmastery [track] [cooks] [id]Sets a player's cooks on one cut mastery trackAdmins (also works from the server console)
/cocaine resetgoals [id]Clears a player's daily and weekly goals, so new ones are drawnAdmins (also works from the server console)
/cocaine setrank [rank] [id]Moves a player's XP to where a master rank startsAdmins (also works from the server console)
/cocaine resetpicks [id]Clears a player's master rank picks, freeAdmins (also works from the server console)
/cocaine setstamp [id] [symbol] [name]Gives a player a brick stamp, or renames theirsAdmins (also works from the server console)
/cocaine clearstamp [stamp id or name]Takes a brick stamp awayAdmins (also works from the server console)
/cocaine setrep [amount] [stamp id or name]Sets a brick stamp's reputationAdmins (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 file editing. The only exceptions are Config.UseHudAccent and Config.SceneAnims: they are not in the menu, so change them in shared/config.lua and restart.

  • Settings are organized into a sidebar of five categories — Core, Production, World, Players and Environment — each holding related sections (25 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/config files.
  • Everything but those two 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 over another cocaine screen

While a cocaine screen that holds the cursor is open (the profile, the cut picker, the cook's START COOK button or the manual), /cocaine settings shows "Close the current activity before opening settings". Close that screen 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:

  • 1x each of the four stations: Coca Pool, Coca Extractor, Cook & Bag Table, Brick Press
  • 1x Cocaine Manual
  • 20x Coca Leaves (to stomp)
  • 10x Coca Mash and 5x Kerosene (to skip ahead to extractor testing)
  • 6x Coca Extract and 4x Acetone (to skip ahead to cocaine cooking)
  • 12x Cocaine (to test the crack cook, bagging, and a brick press)
  • 3x Crack (to test bagging crack)
  • 4x Baking Soda plus 5x each of the other nine cutting agents — Cornstarch, Baby Laxative, Creatine, Caffeine Powder, Benzocaine, Lidocaine, Levamisole, Procaine, Tetracaine (to test cutting crack)
  • 20x Baggy (the empty bags bagging uses up — one per sealed bag)

Some cuts are level-gated (Creatine and Caffeine Powder at level 3, Lidocaine and Benzocaine at level 5, Levamisole at level 7, Procaine at level 8, Tetracaine at level 9), 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. It can raise or lower the level.

  • id — the player's server ID
  • level — 1 to 10 (with the default level table)

The player must be online with a character loaded. You get a confirmation message. When the new level is higher, the player sees the level-up banner with what the levels unlocked; lowering it shows them nothing. 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.

/cocaine setxp [amount] [id]

Sets a player's total cocaine XP. Their level follows from your level table, up or down. The change is saved to the database straight away.

ParameterTypeRequiredDescription
amountnumberYesThe total XP, a whole number from 0 to 10,000,000
idnumberNoThe player's server ID. Leave it out to set your own XP.

Note the order: the amount comes first, then the ID. That's the other way round from /cocaine setlevel.

/cocaine setxp 0          -- your own XP back to 0 (level 1)
/cocaine setxp 1200 4     -- player 4 to 1200 XP (level 5 with the default level table)
  • Success: "Set player 4 cocaine XP to 1200 (level 5)"
  • Failure: "Usage: /cocaine setxp [amount] [id]", "Player 4 is not online", "Player 4 has no loaded character", or "The progression could not be saved. Check the server console."

When the new XP raises the player's level, they see the level-up banner. Lowering it shows them nothing. Only XP and level change: the made and sold totals stay as they are.

From the server console, always give an ID. Without one there's nobody to target, and you get "Player ? is not online".

/cocaine resetjournal [id]

Clears a player's journal: the firsts they have claimed, their best cook purity and their cook count. Their next wild harvest, stomp, bucket, cocaine cook, crack cook, bag and brick each pay first-time XP again, and their next cook sets a new best purity mark. Level and XP are not changed. Useful to test the firsts, or to give a character a fresh start.

ParameterTypeRequiredDescription
idnumberNoThe player's server ID. Leave it out to clear your own journal.
  • Success: "Cleared player 4's cocaine journal"
  • Failure: "Player 4 is not online", "Player 4 has no loaded character", or "The journal could not be cleared. Check the server console."

From the server console, always give an ID.

/cocaine setmastery [track] [cooks] [id]

Sets how many cooks a player has on one cut mastery track. The track is a cut's item name (cornstarch, levamisole, or any cut you added) or powder for cocaine cooks. 0 clears the track. Useful to test a tier, or to put back a player's progress.

ParameterTypeRequiredDescription
tracktextYesA cut's item name, or powder.
cooksnumberYesThe number of cooks on the track, 0 to 100000.
idnumberNoThe player's server ID. Leave it out to set your own.
  • Success: "Set player 4's cornstarch mastery to 39 cooks"
  • Failure: "Usage: /cocaine setmastery [track] [cooks] [id]", "No mastery track named flour: use a cut's item name, or powder", "Player 4 is not online", "Player 4 has no loaded character", or "The mastery could not be saved. Check the server console."

A count set this way never pays tier XP: every tier up to the new count counts as paid. Set a track to one cook below a tier, and the player's next cook on it reaches the tier and pays its XP as in normal play, unless that tier already paid on this track: a tier stays paid until the track is cleared with 0. Clearing a track with 0 also clears what it has paid, so its tiers pay again when it is cooked back up.

From the server console, always give an ID.

/cocaine resetgoals [id]

Clears a player's daily and weekly goals, finished or not. New goals are drawn the next time the player does something that counts or opens /cocaine stats. Their swaps for the day come back too.

ParameterTypeRequiredDescription
idnumberNoThe player's server ID. Leave it out to clear your own goals.
  • Success: "Cleared player 4's cocaine goals"
  • Failure: "Player 4 is not online", "Player 4 has no loaded character", or "The goals could not be cleared. Check the server console."

A goal already paid today can be drawn and paid again after a reset, so use it for testing, not as a reward.

From the server console, always give an ID.

/cocaine setrank [rank] [id]

Sets a player's total XP to where a master rank starts, so the rank follows. 0 puts them at the start of the top level (11,000 XP, level 10, no rank). Their picks are not touched. Useful to test the Ranks tab, or to put back a player's progress.

ParameterTypeRequiredDescription
ranknumberYesThe master rank, from 0 to the number of ranks (5 by default)
idnumberNoThe player's server ID. Leave it out to set your own rank.
/cocaine setrank 2        -- you become Master Refiner II (19,000 XP)
/cocaine setrank 0 4      -- player 4 goes to level 10 with no rank (11,000 XP)
  • Success: "Set player 4 to master rank 2 (19000 XP)"
  • Failure: "Usage: /cocaine setrank [rank] [id]", "Rank must be from 0 to 5", "Master ranks are off", "Player 4 is not online", "Player 4 has no loaded character", or "The progression could not be saved. Check the server console."

A higher rank shows the player the rank-up message and banner, and a higher level the level-up banner. A lower rank shows them nothing: their picks for the ranks above stay saved but give nothing until they reach those ranks again. Only XP, level and rank change.

From the server console, always give an ID.

/cocaine resetpicks [id]

Clears every master rank pick a player has made, for free. They can pick again from the Ranks tab straight away. XP and rank are not changed. Use it to give a player a free respec, or after you change the perk pool.

ParameterTypeRequiredDescription
idnumberNoThe player's server ID. Leave it out to clear your own picks.
  • Success: "Cleared player 4's master rank picks"
  • Failure: "Player 4 is not online", "Player 4 has no loaded character", or "The picks couldn't be cleared"

From the server console, always give an ID.

/cocaine setstamp [id] [symbol] [name]

Gives a player a brick stamp, or renames the one they have and changes its symbol. No level, mastery or price is needed, but the name rules still apply (length, characters, the blocklist, and no other stamp with the same name). A renamed stamp keeps its reputation. Bricks already pressed keep showing the old name, and their sales still count for the stamp.

ParameterTypeRequiredDescription
idnumberYesThe player's server ID. Here the ID comes first and is always needed.
symboltextYescrown, star, skull, horse, dragon, spider, bolt or diamond
nametextYesEverything after the symbol. Spaces are fine, no quotes needed.
/cocaine setstamp 4 crown Snow Queen     -- player 4's stamp is now "Snow Queen", with a crown
  • Success: "Player 4's stamp is now Snow Queen"
  • Failure: "Usage: /cocaine setstamp [id] [symbol] [name]", "No symbol moon. Symbols: crown, star, skull, horse, dragon, spider, bolt, diamond", "Player 4 is not online", "Player 4 has no loaded character", "That name is too short or too long", "Use letters, digits, spaces, hyphens and apostrophes only", "That name isn't allowed", "That name is taken", "Your last registration is still saving" (the player's own registration, or another change to their stamp, hasn't finished saving yet: try again in a moment), or "The stamp couldn't be registered. Nothing was charged."

The player's bricks carry the stamp from their next press, while Brick Stamps is switched on.

/cocaine clearstamp [stamp id or name]

Takes a brick stamp away, with its reputation. Bricks already pressed keep its name in their description and sell at the usual price; their sales no longer build anything. The owner can register a new stamp once they qualify again.

ParameterTypeRequiredDescription
stamptextYesThe stamp's name, in any case (spaces are fine), or its id: the number in a stamped brick's stamp metadata. A name is checked first, so for a stamp named only with digits write the id as #<id> (for example #12).
/cocaine clearstamp Snow Queen
/cocaine clearstamp #12
  • Success: "Removed the stamp Snow Queen"
  • Failure: "No stamp by that id or name" or "That change couldn't be saved"

/cocaine setrep [amount] [stamp id or name]

Sets a stamp's reputation. It's held between 0 and the most a stamp can have (1,000 by default), so a bigger number sets the most. The stamp's tier and price bonus follow at once.

ParameterTypeRequiredDescription
amountnumberYesThe reputation, 0 to 1000000. Anything above the most sets the most.
stamptextYesThe stamp's name or id, as for /cocaine clearstamp.
/cocaine setrep 800 Snow Queen      -- Snow Queen becomes Legendary
/cocaine setrep 0 Snow Queen        -- back to Unknown
  • Success: "Set Snow Queen's reputation to 800"
  • Failure: "Usage: /cocaine setrep [amount] [stamp id or name]", "No stamp by that id or name", or "That change couldn't be saved"

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. A stage set to 0 or more uses its own chance instead, even while the master chance is 0.

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 opens their profile, a menu they work with the keyboard (← → change the tab, ↑ ↓ pick a row, BACKSPACE or ESC closes). It never opens over another cocaine menu or while the player is working a station ("Finish what you are doing first"). It has four tabs:

  • Overview: their level, XP and progress to the next level, the purity penalty their level gives, their master rank and the XP to the next one, how much they have made (each bag and brick) and sold, the units they have sold of each product, their journal (cooks, best purity and firsts), their perks (level perks and rank picks), and beside it the next unlocks and the badges they have earned.
  • Mastery: their brick stamp first (or what registering one needs; ENTER registers it once they qualify), then one row for cocaine cooks (powder) and one for each cut, with the cooks, best purity and tier on each. Cuts above the player's level are greyed out with the level they open at. The card beside a row shows the way to the next tier, every tier's rewards and, once a tier shows it, the cut's purity and yield.
  • Goals: the day's and the week's goals with their progress, reward and the time until they reset. ENTER twice on an unfinished daily goal swaps it for another (once a day by default).
  • Ranks: the master ranks with the perk each holds, the perk pool and the respec. ENTER twice on a pool perk picks it; ENTER twice on Respec clears every pick ($25,000 by default).

The Goals and Ranks tabs are hidden while goals or master ranks are switched off. The Mastery tab is hidden while cut mastery is off, unless the player holds a brick stamp: then it shows just their stamp row. The stamp row is hidden while brick stamps are off. On a server with oxide-phone or oxide-tablet, players can also open the same profile as the Refiner app (see Features).

When a player levels up they also see a banner at the top of the screen listing what the new level unlocked, and every bit of XP they earn pops up as "+XP" above the stage card, with first-time XP, a new best purity, mastery XP and finished goals as lines of their own. Both can be moved or switched off in Oxide HUD's /hud editor, and turned off for everyone under Cocaine XP in /cocaine settings.

The in-game manual points players to this command.

Permissions

The admin subcommands (settings, kit, setlevel, setxp, resetjournal, setmastery, resetgoals, setrank, resetpicks, setstamp, clearstamp, setrep) 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 to use this command" 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:

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. 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 every admin subcommand except settings and kit (those need a player in game). Handy for setting levels or fixing a stamp without an in-game admin. From the console, always give the player's ID where the command takes one.

/cocaine stats needs no permission.

Next Steps