DRUG SCRIPTCUSTOM DRUGSDRUG SELLINGCRIMINAL RPTUTORIALHOW-TOOX_INVENTORYQBCOREESXQBOX November 9, 2026 · 13 min read

How to Make Custom Drugs in FiveM (2026 Guide)

Every criminal RP server ends up with the same request in its suggestions channel: “can we get our own drug?” Not weed number six from the default config. A drug with its own name, its own look, a lab somewhere on the map that a crew can fight over, and corners that pay more than others. Then you open the drug script you already run and find a hardcoded list of items and a sell price table.

I’ve run drug selling on my own servers for years, written two versions of a drug selling script before this one, and spent more evenings than I’d like moving vector3s around a config file. “Making a custom drug” can mean three very different amounts of work, so here are all three, from least effort to most control, with the honest trade-offs.

A quick note on terms, because people mix them up. A drug in FiveM is just an inventory item that does something when used. The production chain is how players get it: gather or grow a raw item, process it, maybe package it. Selling is a separate system again, usually corner selling to NPCs inside a sale zone, plus whatever the police side does about it. A complete drug system is all three, and most of the work is in the last two.

Option 1: Install a Free Drug Script (Fastest)

If you just want drugs on the server tonight and you’re fine with somebody else’s drugs, a free script is the right call.

On QBCore, the usual starting point is the official pair:

  • qb-drugs (free, github.com/qbcore-framework/qb-drugs). According to its manifest, it “allows players to deliver packages and sell drugs to npcs”. Corner selling is started from the Corner Selling entry in qb-radialmenu, the sell prices live in Config.DrugsPrice, and there are deliveries of weed and coke bricks with a reputation system.
  • qb-weed (free, github.com/qbcore-framework/qb-weed). Its manifest describes it as letting players “grow weed plants in their house to harvest for items to sell”, with seven growth stages from germination to harvest.

On ESX, you’ll find plenty of esx_drugs forks on GitHub, but the most-starred ones I checked haven’t been updated since 2020 or 2021. Read the code before you trust an old fork with your economy.

The install is the same as any resource, and I go deeper on that in how to install FiveM scripts:

  1. Download the resource and extract it so you have one named folder, for example qb-drugs.
  2. Check its dependencies. qb-drugs loads PolyZone and oxmysql in its manifest, so both have to be running first.
  3. Make sure the items exist. The script sells items like weed_skunk, cokebaggy and meth. If your inventory doesn’t define them, nothing sells.
  4. Add ensure qb-drugs to server.cfg, below your framework and inventory, and restart.

The honest downside: you get a fixed set of drugs and a fixed way of making them. A new drug means new items, new config entries, new coordinates and a restart, and the production side (where the drug comes from) is often missing or limited to one drug. Every server that installs the same script ends up with the same economy, and your players have seen it before.

Option 2: Build the Drug Chain Yourself (The Manual Way)

This is how most established servers end up doing it: their own resource, built on ox_lib, ox_target and ox_inventory. You get exactly the drug you want, and you also write every check that stops people from abusing it.

Here’s the shape of one drug, start to finish.

1. Define the items. On ox_inventory, items live in ox_inventory/data/items.lua. A raw item and a usable product:

['bluesky_leaf'] = {
    label = 'Blue Sky Leaf',
    weight = 50,
},

['bluesky'] = {
    label = 'Blue Sky',
    weight = 20,
    client = {
        anim = { dict = 'mp_suicide', clip = 'pill', flag = 49 },
        usetime = 2500,
    },
},

On QBCore and ESX without ox_inventory, the item goes in the framework’s own items list or database table instead. If you haven’t done this before, how to add items in FiveM covers every inventory, and the picture side is in FiveM inventory images not showing.

2. Place the gather and process spots. An ox_target sphere zone per spot, with an onSelect that runs a progress bar and then asks the server for the reward:

exports.ox_target:addSphereZone({
    coords = vec3(2221.3, 5577.1, 53.8),
    radius = 1.5,
    options = {{
        name = 'bluesky_gather',
        label = 'Pick leaves',
        icon = 'fa-solid fa-leaf',
        onSelect = function()
            if lib.progressBar({ duration = 10000, label = 'Picking...', canCancel = true }) then
                TriggerServerEvent('bluesky:gather')
            end
        end,
    }},
})

For a cook that can fail, lib.skillCheck({'easy', 'medium'}) returns true or false, and you decide what a failure costs.

3. Do the swap on the server. This is the part people get wrong. The client only asks. The server checks the distance, the cooldown and the inputs, then moves the items:

RegisterNetEvent('bluesky:process', function()
    local src = source
    local pos = GetEntityCoords(GetPlayerPed(src))
    if #(pos - LAB_COORDS) > 3.0 then return end
    if exports.ox_inventory:GetItemCount(src, 'bluesky_leaf') < 3 then return end
    if exports.ox_inventory:RemoveItem(src, 'bluesky_leaf', 3) then
        exports.ox_inventory:AddItem(src, 'bluesky', 1)
    end
end)

If the gather event just hands out items with no distance or time check, someone will trigger it in a loop from across the map within a week.

4. Draw the sale zone. lib.zones.poly takes a list of points and a thickness, with onEnter and onExit callbacks. You walk the corners yourself, print your coordinates at each one and paste them in.

5. Write the selling. Pick a nearby ped, walk it over, make the offer, roll for a police alert, then pay out on the server after checking the player still has the item. Count officers on duty if you want a minimum police rule.

6. Make it usable. On ox_inventory the client block above handles the use. On QBCore it’s QBCore.Functions.CreateUseableItem, and on ESX’s own inventory it’s ESX.RegisterUsableItem, where you apply the effects yourself and remember to end them.

Then comes the loop that eats your evenings. Change a coordinate, restart the resource. Add an item, restart the inventory. Balance a price, restart, sell a few bags, check the numbers, repeat. A second drug is a copy of all of this with new names.

The manual route is the right call when you want behaviour nobody else has, you’re comfortable in Lua, and you’ll maintain it. If you’re new to it, learn the client-asks, server-decides pattern first, because it’s the whole security model here. I walk through the full build, with every server check, in building a FiveM drug system the hard way.

Option 3: Make Every Drug, Lab and Sale Zone In-Game

Full disclosure: this is our script. Weigh what I say accordingly. It’s the third version of our drug selling script, and I built it so a new drug stops being a config file and a restart.

The LMX Drug Creator is $39.99 one-time, for ESX, QBCore and Qbox. You type /drugcreator and every drug on the server is on one screen. According to its docs, a new drug, its places and its sale zones go live without a server restart.

What making a drug looks like, from the docs:

  • One screen per drug: name, look, items, effects, selling, police rule and the production chain, with live checks that say what still blocks going live.
  • A production chain of grow, gather, process, cook, package and combine stages, each with inputs, outputs, time, level requirements and XP. Plants need water, rot if nobody picks them and stay through restarts.
  • Walk-and-place building. A ghost follows your aim and E places a field, station, lab, stash, supplier, bulk buyer or laundering spot where you stand. Sale zones are drawn by walking their corners and pressing E at each one.
  • Items made for you. Pick one of 22 included pictures, press Create items and Publish items, and the items land in your inventory. The LMX Item Creator isn’t needed for this.
  • 12 kinds of effects (hunger, thirst, stress, health, armour, sprint speed, stamina, walk style, screen effect, drunk, camera shake and named modifiers) that end by themselves, and six ways to take it: cup, bag, pill, brick, joint and syringe.
  • Five built-in minigames or an ox_lib skill check, with quality from 1 to 100 that carries along the chain and moves the price. Failed cooks can cost inputs, give off smoke and call the police.
  • Selling that pushes back: /dealer brings buyers to you, haggling, a price breakdown on every offer, robberies, bulk buyers, delivery runs by van, boat or plane, and auctions at secret spots.
  • Police and heat: a minimum police count per drug or per stage, alerts through ps-dispatch, cd_dispatch, core_dispatch, rcore_dispatch, qs-dispatch or a built-in alert, and heat per sale zone that lowers prices and raises alert chances on busy corners.
  • Labs players own inside five business interiors, with keys, a doorbell, upgrades, workers who cook while the owner is away, break-ins with a lockpick and police raids. Plus gang turf points per zone, hired dealers, levels, addiction and a dashboard of sales.
  • A starter pack you install from Import: kush, hash, cocaine, crack, meth, heroin, lean, ecstasy, LSD and mushrooms, with full chains and 32 places around the map.

The docs state that every price, count and roll is worked out on the server, which is the part from Option 2 I’d least want to write myself. There’s a showcase video if you want to see the editor first.

Where it falls short, honestly:

  • Custom models need the LMX Prop Creator, sold separately. Without it, every drug uses a GTA prop and nothing breaks. With it, a new model needs one full server restart before players see it, because that’s when GTA registers models. If you want to try that side, how to make custom props in FiveM shows how the photo-to-model step works.
  • ox_inventory has one paste step, once. At your first publish you replace ox_inventory/data/items.lua with a file the Drug Creator writes for you. After that every publish is live by itself, but publishing restarts ox_inventory for a few seconds, which clears items on the ground and temporary stashes.
  • Other inventories have their own catch. qs-inventory needs a file pasted on every publish. ESX 1.12’s default inventory reads new items at server start, so restart once after publishing (1.13 and later take them at once), and it has no stashes.
  • Testing so far: the docs list in-game tests on ESX 1.12.4 (with ox_inventory and with its own inventory), QBCore with qb-inventory and qb-target, and Qbox with ox_inventory. qs-inventory and the dispatch scripts other than ps-dispatch are built from their docs and covered by automated tests, not yet in game.
  • Requirements: OneSync, oxmysql and ox_lib, and the folder has to stay named lmx_drugcreator. It also runs on FiveM for GTA V (Legacy) only for now, because Enhanced can’t load escrowed scripts yet.

The fair comparison: qb-drugs and qb-weed are free, open and good enough if you want standard drugs on QBCore. The manual route gives you anything you can code. What the Drug Creator adds is speed of change: a new drug, a moved lab or a redrawn corner is a few minutes in game instead of an evening of config and restarts, with the production, labs and police side already there. If you own our older Advanced Drug Sales 2.5, the docs say Import brings your drugs, zones and player levels over, and 2.5 owners get 50% off through a ticket in Discord.

Troubleshooting: Custom Drugs Not Working

These are the problems I see most, whichever route you took. If the drugs exist but nobody will buy them, FiveM drug selling not working goes through every cause in more depth.

The drug can’t be used, or “item does not exist”. The inventory doesn’t know the item yet. Add it to the right file for your inventory, then restart the inventory. On ESX 1.12’s default inventory, restart the whole server. With the Drug Creator, each item card says whether it’s a draft, waiting for a restart or in your inventory.

Players get “nobody buys around here” or nothing happens at a corner. They’re outside every sale zone. Draw one, or with qb-drugs, check that the items they carry are listed in Config.DrugsPrice.

Selling is blocked by “not enough police”. The minimum police count is above the officers on duty. On ESX with the older esx_service duty system, the Drug Creator docs note that ESX reports every officer as on duty, so every officer counts.

Items have no picture. qb-inventory and qs-inventory read pictures from their own html/images/ folder, and pictures copied into a running inventory show after it restarts. The full list of fixes is in FiveM inventory images not showing.

The custom model shows as a GTA prop. New models only load when the server starts. Install the pack, ensure it above the drug script and restart the whole server, not the resource.

Everything stopped after restarting ox_lib or ox_inventory. FiveM stops resources that depend on the one you stopped and doesn’t start them again. ensure the drug script afterwards, or restart the server. With ox_inventory, the Drug Creator also needs lmx_drugcreator_items started before ox_inventory.

Custom Drugs FAQ

Can I make my own drug without coding? With a free script you can add a drug if it follows the same pattern as the ones already there, by editing the config and adding items. Anything new, like a different production chain, needs Lua. The LMX Drug Creator does it from an in-game screen with no config editing.

Does a drug script work on Qbox? Check the script’s README before you install it. qb-drugs is written for QBCore. The LMX Drug Creator supports Qbox with ox_inventory and has been tested on it in game, according to its docs.

How do I stop players exploiting drug selling? Do every check on the server: distance, cooldown, item count and the payout. Never let a client event say how much it sold or for how much. Logs help too. The Drug Creator has optional Discord logs, including one for requests a normal game never sends.

Will a drug script hurt server performance? It depends on how it’s written. Lots of zones and peds checked every frame cost the most. Measure it with resmon before and after, as covered in the FiveM resmon guide.

Can gangs fight over drug corners? Not with a basic corner selling script. You need territory on top. The Drug Creator has turf points per sale zone, and if you want those zones visible on the map, the hood and turf minimap guide covers drawing them.

Which One Should You Pick?

If you’re on QBCore and want standard drugs running tonight, install qb-drugs and qb-weed and add the items. Browse our free scripts page while you’re at it. If you want behaviour nobody else has and you’re happy writing and maintaining Lua, build it yourself on ox_lib, ox_target and ox_inventory, with every check on the server. And if you want your own drugs, labs and corners made and moved in game, with the production, police and turf side already built, the LMX Drug Creator is what I’d set up.

Stuck on a setup, or moving over from 2.5? Ask in our Discord.

YBN
YBN Limax Scripts
FiveM script developer at YBN. Building premium ESX, QBCore & Qbox resources.

Related Posts

Need scripts for your server?

Check out our premium FiveM resources — ESX, QBCore & Qbox supported.

Browse Premium Scripts → Free Scripts →