How to add drugs to your FiveM server
To add drugs to a FiveM server, install a drug script, add its items to your inventory and set up three stages in its config: where ingredients come from, how they’re processed and who buys the result. Our All-in-One Drug System V2 covers all three stages in one resource, on ESX, Qbox or QBCore. Police risk comes from alert chances on each sale.
Two more of our scripts each cover part of it, Ownable Drug Labs and Drug Selling to NPCs:
| Script | Ingredients | Processing | Selling | Police risk |
|---|---|---|---|---|
All-in-One Drug System V2 (tk_drugs) |
Plants in pots, picking fields, shops | Placed equipment with a minigame each, labs with NPC workers | Street NPCs and the Plug app | Alert chance on sales, deliveries and pickpocketing |
Ownable Drug Labs (esx_tk_drugs, qb_tk_drugs) |
None by default; each lab item can list a need |
The lab generates meth, coke or weed every 30 minutes by default | Darkchat offers from clients and dealers | Police raids, alerts on sales, a police count to sell |
Drug Selling to NPCs (esx_tk_selldrugs, qb_tk_selldrugs) |
None | None | Price negotiation with pedestrians | Alert and robbery chances, a police count to sell |
The rest of this guide sets up All-in-One Drug System V2. Every file path is inside tk_drugs.
Before you start
- A server running ESX, Qbox or QBCore, with oxmysql or mysql-async.
- ox_inventory, qb-inventory, qs-inventory or ESX’s own inventory. ox_target or qb-target is optional.
- The two free model packs the README links to: weed props and mushrooms.
- A game build that has the models. Our docs use build 3258.
Install the resource
- Put the
tk_drugsfolder in yourresourcesfolder. - In
server, add.cfg ensure tk_drugsafter your framework, oxmysql and your inventory. - Import
tk_drugsinto your database..sql - In
config, set.lua Configto.Framework 'esx'or'qb'. Qbox runs QBCore scripts through its QBCore bridge, so on Qbox you use'qb'too. - Set
Configto.Inventory 'ox'for ox_inventory (which Qbox uses) or'qs'for qs-inventory. For the framework’s own inventory, use'default'. That means ESX’s built-in inventory, or qb-inventory on QBCore. - Set
Configto.Target 'ox','qb'or'none'.Configis covered under police risk..Dispatch - Add the script’s items to your inventory. The README lists all 133, in both ox_inventory and qb-inventory format. The items guide shows where each format goes.
- Restart the server. You shouldn’t see any
tk_drugserrors in the console.
Set where ingredients come from
- In
Config, edit the two shops. The General Store sells seeds, pots, fertilizer, water, the precursors and the.Shops trap_phone. The Equipment Store sells ovens, tables, the press, lamps and shelves. Each line is an itemname, apriceand anamount. - In
Config, each seed lists the items it needs (a.Plants plant_potby default), its growthstagesand itsyield. Each stage has atime, but the last stage’s time does nothing. A plant only dies when its water or fertilizer reaches 0. - In
Config, set how fast water and fertilizer drain, and.PlantSettings maxPlantsPerPlayer(100 by default). If plants should only grow while their owner is online, setConfig..OnlineOnlyGrowth = true - In
Config, set picking areas with a centre, a radius and the plants that spawn there. The default field grows three mushroom types and.Fields rye_ergot.
Heroin and LSD don’t grow from a seed. For heroin, players buy poppy_resin and acetic_anhydride. For LSD, they buy diethylamine and rye_ergot, which they can also pick in the field. Then they process them.
Set how drugs are processed
- In
Config, each piece of equipment is an item that places a prop. Its.EquipmentItems recipeslist theneedandgetitems. The meth oven, for example, turns 3liquid_methand anempty_trayinto aliquid_meth_tray, and hammers ameth_trayinto 10meth. - Players buy equipment from the shop and place it. If you’d rather put equipment at fixed spots, add entries to
Config..EquipmentLocations - To allow equipment only inside labs, set
Config. List any no-build zones in.PlaceOnlyInsideLabs = true Config..DisabledAreas - In
Config, set.PhoneSettings labPrice,maxOwnedLabs(1 by default) andsellPercentage, which is the share of the price a player gets back when they sell a lab. Players buy labs from the trap phone, and there are meth, weed and coke interiors.
Set who buys and for how much
- In
Config, each street-sale drug has a.Selling .items pricerange, amaxAmountand abaseChance. Only items listed here sell to street NPCs. An empty table turns street selling off. - The more a player offers at once, the lower the chance. Offering the full
maxAmounthalvesbaseChance. - Set
Configto how many police must be online before street sales work (0 by default). Set.Selling .minPolice moneyTypeto the account sales pay into. - In
Config, set.PlugApp sellModeto'walkup'or'delivery'. With'walkup'the customer walks up to the player, and with'delivery'the player goes to the customer.
Set police risk
- In
Config, list the jobs that count as police (.PoliceJobs policeandsheriffby default). - In
Config, each activity has its own alert chance. By default, a failed street sale alerts police 50% of the time and a successful one never does. A failed pickpocket alerts them 25% of the time, and a Plug delivery 10%..PoliceAlerts - Set
Configto.Dispatch 'tk'for our Dispatch System or'cd'for cd_dispatch. Any other value, including the empty default, sends the script’s own alert to online players whose job is inConfig..PoliceJobs
Add a drug of your own
- Add the item to your inventory, the same way as the shipped items.
- Give players a way to get it: add it to a recipe’s
getinConfig, or to a plant’s.EquipmentItems yield. - Add it to
Configwith a price range,.Selling .items maxAmountandbaseChance. - To make it usable, add it to
Configwith a.Drugs drugType, ananimationand itseffects. The comment beforeConfiglists the effects you can use, such as.Drugs RunningSpeedIncreaseandGlitterBomb.
Labs that produce on their own: Ownable Drug Labs
Ownable Drug Labs is a separate script. It comes as an ESX package and a QBCore package that also runs on Qbox. Players buy one of 11 labs on a darkweb tablet (Config, darkweb_tablet). By default each lab generates 5 meth, weed or coke every 30 minutes, with no ingredients. To make it use chemicals, uncomment the need example under Config.
Darkchat offers buy the drugs, and dealers show up once an area’s reputation reaches 100. Police can enter a lab and seize items, and Config sets how many police are needed for sales (1 by default). Other players can destroy labs with bolt_cutters. The ESX package’s SQL file adds darkweb_tablet and bolt_cutters to the items table.
Selling only: Drug Selling to NPCs
Drug Selling to NPCs handles the selling stage and nothing else. It comes as an ESX package and a QBCore package that also runs on Qbox. It sells whatever items are named in its Config, so it can sell drugs made by another script. The player names a price and the NPC makes a counter-offer. The risk comes from Config, Config (used when the NPC isn’t interested) and Config.
Check it works
/drugsadminmenuis a restricted command, so it only opens for players with the ACE permission for commands. Inserver, give your admin group that permission and add yourself to the group. The Cfx.re example server.cfg does this with.cfg add_ace groupand.admin command allow add_principal.- Give yourself an
og_kush_seedand aplant_pot, and use the seed to place a plant. The pot appears with the first growth stage in it. - Run
/drugsadminmenuand you’ll see the plant listed. Restart the server and run it again. The plant is still there.
To see each stage in game, watch the All-in-One Drug System V2 showcase (9:34).
If it fails
Failed to load model x: the model comes from a newer GTA V game build. Update the server’s game build, or change that model name inconfig(our docs)..lua - The cursor sticks in the top-right corner: a client-side anticheat or another script is getting in the way of the menu. Change or remove that script.
- An item has no picture in the script’s menus:
Configdoesn’t point at your inventory’s image folder, or the PNG isn’t there. The items guide has the paths..ImagePath


