Troubleshooting
Diagnose startup, settings, inventory, equipment, production, effects, and progression issues in oxide-cocaine.
Common problems and how to fix them. Work top to bottom — most issues are item names or load order.
The resource doesn't start
- Check the server console for red errors mentioning
oxide-cocaine. - Make sure
ox_lib,oxmysql, ando-linkall start beforeoxide-cocainein yourserver.cfg. - The database tables are created automatically the first time the resource starts — but that only works if
oxmysqlis connected to your database. If the console showsoxmysqlconnection errors, fix those first. - Your framework and inventory resources must start before
o-link— if other Oxide resources work, this is already right.
To see detailed logging from the resource, turn on Debug in the settings menu (/cocaine settings → Core → General → Advanced tab). Turn it back off when you're done.
I changed a setting in a config file and nothing happened
This is expected. After the resource has started once, the shared/config files no longer control anything — the resource reads its settings from the database (see Configuration). Those files are only the factory defaults it imported on the very first start.
To change a setting on a running server:
- As an admin, run
/cocaine settingsin-game. - Find the setting, change it, and Save Changes — it applies live.
To pull a setting back to the value in the config file, use that setting's Reset to default button in the menu.
"You don't have the required items" (but the player does)
This almost always means an item name doesn't match exactly.
- Compare the item names in your inventory against the tables in Installation — every letter and underscore must match (
coca_leaf, notcoca-leaforcocaLeaf). - Check the amounts, too. Each stage needs a minimum: stomping needs 5
coca_leaf; soaking needs 3coca_mashand 1kerosene; a cocaine cook needs 2coca_extractand 1acetone; a crack cook needs 1cocaineand at least one cutting agent; a brick needs 10cocaine. - Make sure all the chain items exist —
coca_mash,coca_extract,cocaine,crack,cocaine_bag,crack_bag,cocaine_brick. If one is missing, the step that produces it will fail.
Using an equipment item does nothing
- The item must be marked usable in your inventory (qb-inventory:
useable = true; ox_inventory: usable by default). This applies to all four stations and thecocaine_manual. - Equipment can't be used from inside a vehicle — the player gets a "You can't do that in a vehicle." message.
- The Brick Press needs level 5 to place. That's intentional — the press is gated behind progression (its
requiredLevel, under Core → Equipment & Stations in the settings menu). A player below level 5 gets a "You need level 5 to place this." message. Use/cocaine setlevel [id] 5to test it. - Placement is blocked by your placement zones — the player gets "You can't place that here." (they're inside a blocked area) or "You can only place that inside a designated area." (zone mode is Allowed areas only and they're outside every allowed area, or none are drawn).
- A Usage Whitelist rule is blocking the item for their job or gang — the player gets "You aren't allowed to use this.", "Your rank is too low to use this.", or "You must be on duty to use this." Check the rule for that item under Usage Whitelist in
/cocaine settings; deleting the rule restores the old open-to-everyone behaviour.
No interaction options on placed equipment
The walk-up options (Stomp, Use Stove, Bag Up Product, etc.) come through your targeting resource (usually ox_target) via o-link. If other Oxide resources' target options work, cocaine's will too. If none work, your targeting resource isn't running or isn't connected through o-link.
Note the Coca Pool uses a circle on the ground rather than the prop itself for its menu (because the player stands inside it) — aim at the pool area, not the rim.
Stomping won't start or finish
- The player needs at least 5
coca_leafto start. - Only one batch of mash sits in a pool at a time. If the pool already holds finished mash, the stomp option is hidden until that mash is collected — the player gets a "There's already mash in this pool." message if they try.
- The leaves are only spent when the mash is finished. If a player bails mid-stomp, they keep their leaves — that's by design, not a bug.
- Movement only counts while the player is inside the pool and actually walking. Standing still doesn't fill the bar. Wandering off for too long auto-cancels the stomp.
The extractor never finishes / the timer seems wrong
- The soak runs 30 minutes by default. If that's too long or too short for your server, change
Config.Container.processTimein the settings menu (/cocaine settings→ Production → Extraction; it's in seconds —1800is 30 minutes). The change applies live. - Collecting too early gives an "It's not done yet." message. Hold the label key (
H) near the extractor to see how long is left. - Only one batch soaks per extractor at a time. Loading a busy extractor gives a "This extractor is already running." message.
- The timer is saved to the database, so it keeps counting through a restart. If timers reset on restart, confirm the
cocaine_container_statetable exists.
A cook keeps failing
- The cook explodes if the temperature hits 100°C, and goes cold if it sits under 15°C for about 5 seconds. Either way the reagents are lost — that's the minigame working as intended. Tell players to keep the pot in the 35-65°C sweet spot.
- Purity feels low even on a good cook? New cooks take a heavy purity penalty (−30 at level 1). The penalty shrinks every level and reaches 0 at level 10. Level up to make cleaner product. Remember that cutting a crack batch also lowers its purity — that's the trade for the extra rocks.
- The "Make Crack" cook needs 1
cocaineto show, and at least one cutting agent to actually start — if the player has the cocaine but no eligible cut, starting it tells them they need a cutting agent. (Crack isn't tied to baking soda anymore — any one cut works.)
A cutting agent isn't in the crack cut picker
The picker only lists cuts the player has unlocked by level and currently holds in their inventory.
- Below the required level? Lidocaine and Benzocaine unlock at level 5, Levamisole at level 7. Use
/cocaine setlevelto test the higher tiers. - None in inventory? The player has to be holding the cut item — they're consumed when the batch finishes, the same as any ingredient. By default they aren't sold anywhere, so make sure players have a way to get them (a dealer, a shop script, or
/cocaine kitfor testing). - Item not registered? If a cut's item name isn't in your inventory, it can never appear. Check the names against Installation.
- Can't start crack / picker never opens? Crack must be cut, so the cook won't start unless the player holds at least one eligible cut — they'll get a "you need at least one cutting agent" message instead. Give them a cut (or unlock one by level) and the picker will open.
Bagging or pressing gives nothing
- Bagging needs at least 1 of the bulk product (
cocaineorcrack) and at least 1baggy— one baggy is used up per sealed bag. Pressing needs 10cocaine. - No
baggyitem registered? Bagging will fail with a "you don't have the required items" message even when the player is holding plenty of powder. Confirmbaggyexists in your inventory (see Installation — it's easy to miss in the item list). - If the action completes but no item arrives, the player's inventory may be full — they'll get a "Your inventory is full." message and the materials are refunded.
- A bagging session makes at most 10 bags at a time (
maxBagsPerSession). For more, the player runs it again.
Purity grades collapse when bagging a mix
This is by design. If a player bags several purity grades together with Mix All, the finished bags take the lowest grade in the mix. To keep grades separate, the player should pick a specific grade in the bagging menu instead of mixing. Careful cooks keep their product sorted.
Equipment can't be packed up
With ownership on (Config.RequireOwnership = true, the default), only the player who placed a station can pick it back up. Other players get no response by design. To let anyone pack up anyone's equipment, turn Require ownership off in the settings menu (/cocaine settings → Core → General).
Usage effects look wrong or don't trigger
- Only the bagged street products are usable —
cocaine_bagandcrack_bag. Bulkcocaine,crack, mash, and extract are not. - The bag items must be marked usable in your inventory.
- There's a cooldown after the previous high ends (60 seconds for cocaine, 45 for crack) — the player gets a wait message.
- Stress relief (and the comedown that adds it back) needs a framework with a stress system. QBCore and QBX have one; ESX does not, so on ESX those parts of the effect simply do nothing while the visuals and speed/stamina still work.
Wild coca bushes don't appear
- Confirm Wild Plants → Enabled is on in the settings menu (
/cocaine settings→ World → Wild Plants). - Bushes only appear within
spawnDistance(100 metres by default) — drive into a zone to see them. - A harvested bush takes 30-60 minutes to respawn. An empty-looking zone may just be on cooldown.
- Want bushes somewhere else? Redraw the Spawn zones in that same menu section (they're drawn right in the world), or turn bushes off and supply leaves another way.
Progression doesn't save
- Confirm the
drugs_progressiontable exists. - Watch the server console for
oxmysqlerrors — usually wrong database credentials or a missing table. - Progression is saved per character. If
/cocaine statsshows nothing, the character may not be fully loaded yet — have the player relog.
The settings menu says I don't have permission
/cocaine settings is admin-only, and the resource re-checks your permission on the server every time — so a non-admin can't open or change it.
- Make sure your account is a server admin. The setup is two lines in
server.cfg(put yourself in the admin group, and grant that group theadminpermission) — see the Permissions section of the Admin Guide for the exact lines. - If other admin commands on your server work for you but this one doesn't, double-check you used the same identifier for the
add_principalline. - The live server console can't open the in-game menu (it has no player screen), but it can still run
/cocaine setlevel.
The settings menu won't open
If you get "Close the current activity before opening settings," you're in the middle of a cook or a bagging session — those take over the screen and hold the cursor. Finish or cancel the activity first, then run /cocaine settings again.
If you get "In-world placement needs an updated o-link" when you try to draw a zone, your o-link is out of date. The rest of the menu still works — update o-link to use the in-world zone drawing tool.
A model I typed in the settings menu now shows as a number
This is expected. Model fields accept either a prop name (like prop_pot_03) or a hash number. When you save, a name is converted to the game's internal hash — a number — so it will display as a number afterward. The prop still works exactly the same; nothing is wrong.
Police alerts never fire
- Check Alert chance under Dispatch in
/cocaine settings(Advanced tab). It ships at0, which means off. Set it to1while testing so every stage alerts. - If a stage's Per-stage chance is set to something other than
-1, that value wins over the master chance for that stage. - Someone with the alert job (default
police) must be online. With nobody on that job, the alert is discarded rather than queued. - Check the job name matches what your framework actually uses. A typo means no one is ever found.
- Only the first alert from a given station fires within the Site cooldown window (default 5 minutes). Test at a second station, or lower the cooldown.
Police alerts fire too often
Lower Alert chance, or set the noisy stage's Per-stage chance to a lower number and leave the rest at -1. Raising the Site cooldown also helps: it caps how often any one lab can be reported, no matter how many stages are run there.
Quick test tools
/cocaine kit— gives a full production kit, with extra mid-chain materials to skip ahead (admin)/cocaine setlevel [id] [level]— set a player's level to test the press unlock and purity penalties (admin)/cocaine stats— confirms the client can talk to the server and read progression
See Admin for the permission setup these need.
Getting Help
If none of the above resolves your issue:
- Turn on Debug in the settings menu (
/cocaine settings→ Core → General → Advanced tab), then reproduce the problem. - Check your server console for error messages.
- Contact Oxide Studios support with your debug output and the exact steps that trigger the problem.