Before You Begin#
Before installing Drugs Creator, make sure your server meets these requirements. Starting the script without them causes errors.
Requirement | Status | Notes |
|---|---|---|
OneSync | Required | Labs use routing buckets and networked props. |
oxmysql | Required | Database access. |
ox_lib | Required | Callbacks, menus, skill checks and progress bars. |
screenshot-basic | Required | Listed as a dependency. Used for the furniture creator's thumbnails. |
Framework | Required | es_extended (ESX), qb-core (QBCore) or qbx_core (Qbox). |
Inventory | Required | For lab stashes. See Integrations for the supported list. |
K4MB1-QuasarDrugs | Included | The map resource that streams the lab shells. It ships in the download. |
Target, dispatch, clothing, sound | Optional | Detected automatically when started. |
Downloading Drugs Creator#
After purchasing Drugs Creator, the resource is linked to your CFX Portal account automatically. Sign in to the CFX Portal with the same account you used at checkout, open Granted Assets and download the latest version.
After extracting the download, you should have the following folders:
[drugscreator]/
├── qs-drugs-creator/ -- the script
│ ├── config/ -- main.lua, furniture.lua, scenes.lua
│ ├── custom/ -- framework bridges, notifications, progress bar, /selldrug
│ ├── client/custom/ -- inventory, wardrobe, dispatch, target, weather
│ ├── server/custom/ -- qs-inventory quests
│ ├── locales/ -- 41 languages
│ └── music/ -- lab music tracks
├── [shells]/K4MB1-QuasarDrugs/ -- the lab shells (map resource)
├── [sql]/esx.sql · qb.sql -- database
└── [img]/ -- inventory item imagesThe folder must be named exactly
qs-drugs-creator. The script checks its own name on start and shuts the server down if it was renamed, and the interface paths depend on it.
Installing the Resource#
Move qs-drugs-creator and K4MB1-QuasarDrugs into your server's resources directory. They can sit in any category folder:
resources/
└── [qs]/
├── K4MB1-QuasarDrugs/
└── qs-drugs-creator/Then open your server.cfg and start everything in this order:
setr game_enableDynamicDoorCreation "true" # needed for MLO lab doors
ensure oxmysql
ensure ox_lib
ensure screenshot-basic
# Framework
ensure es_extended
# ensure qb-core
# ensure qbx_core
# Your inventory, target, clothing and dispatch
ensure ox_inventory
# ensure ox_target
# ensure illenium-appearance
# ensure qs-dispatch
ensure K4MB1-QuasarDrugs
ensure qs-drugs-creatorThe loading order matters. Detection only sees resources that are already started, so an inventory or a dispatch that starts after Drugs Creator is not found.
The Database#
Import the SQL file that matches your framework from the [sql] folder with HeidiSQL, phpMyAdmin or any MySQL client. The tables are not created automatically.
Framework | File | Also changes |
|---|---|---|
ESX |
| Adds |
QBCore / Qbox |
| Adds |
Table | Holds |
|---|---|
| Farming zones and their plant spawn points. |
| Laboratories: owner, key holders, price, level, experience, lock, public access, vault codes and the shell or MLO data. |
| Every piece of furniture placed inside a lab. |
| NPC dealers and knock-door spots. |
| Furniture and categories added in game with the furniture creator. |
On ESX, the last two lines of
esx.sqlinsert intoaddon_inventoryanddatastore. If your server has no esx_addoninventory or esx_datastore, remove those two lines before importing.
Inventory Items#
Drugs Creator does not create items. Add these to your inventory, and copy the pictures from the [img] folder into your inventory's image folder.
Item | Used for |
|---|---|
| Harvested in farming zones. |
| Made by the first processing step. |
| The finished product, sold to dealers and on corners. |
| The money-laundering line. |
| Breaking into a locked lab. |
| Police raids on labs. |
| Qbox only: black money is an item. ESX uses its |
Add to qs-inventory/shared/items.lua:
['weed'] = { ['name'] = 'weed', ['label'] = 'Marijuana', ['weight'] = 10, ['type'] = 'item', ['image'] = 'weed.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Freshly harvested cannabis.' },
['weed_packaged'] = { ['name'] = 'weed_packaged', ['label'] = 'Packaged Marijuana', ['weight'] = 10, ['type'] = 'item', ['image'] = 'weed_packaged.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Bagged and ready to sell.' },
['cocaine'] = { ['name'] = 'cocaine', ['label'] = 'Cocaine', ['weight'] = 10, ['type'] = 'item', ['image'] = 'cocaine.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Raw coca.' },
['cocaine_cut'] = { ['name'] = 'cocaine_cut', ['label'] = 'Cut Cocaine', ['weight'] = 10, ['type'] = 'item', ['image'] = 'cocaine_cut.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Cut and ready to press.' },
['cocaine_packaged'] = { ['name'] = 'cocaine_packaged', ['label'] = 'Packaged Cocaine', ['weight'] = 10, ['type'] = 'item', ['image'] = 'cocaine_packaged.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Pressed and wrapped.' },
['chemicals'] = { ['name'] = 'chemicals', ['label'] = 'Chemicals', ['weight'] = 10, ['type'] = 'item', ['image'] = 'chemicals.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Precursors for cooking.' },
['meth'] = { ['name'] = 'meth', ['label'] = 'Methamphetamine', ['weight'] = 10, ['type'] = 'item', ['image'] = 'meth.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Freshly cooked.' },
['meth_packaged'] = { ['name'] = 'meth_packaged', ['label'] = 'Packaged Methamphetamine', ['weight'] = 10, ['type'] = 'item', ['image'] = 'meth_packaged.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Bagged and ready to sell.' },
['sorted_money'] = { ['name'] = 'sorted_money', ['label'] = 'Sorted Money', ['weight'] = 10, ['type'] = 'item', ['image'] = 'sorted_money.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Cut bills.' },
['package_money'] = { ['name'] = 'package_money', ['label'] = 'Packaged Money', ['weight'] = 10, ['type'] = 'item', ['image'] = 'package_money.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Counted and banded.' },
['lockpick'] = { ['name'] = 'lockpick', ['label'] = 'Lockpick', ['weight'] = 300, ['type'] = 'item', ['image'] = 'lockpick.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Opens locked doors.' },
['police_stormram'] = { ['name'] = 'police_stormram', ['label'] = 'Stormram', ['weight'] = 18000, ['type'] = 'item', ['image'] = 'police_stormram.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Breaks doors open.' },For the default ESX inventory, run this SQL:
INSERT INTO `items` (`name`, `label`, `weight`) VALUES
('weed', 'Marijuana', 10),
('weed_packaged', 'Packaged Marijuana', 10),
('cocaine', 'Cocaine', 10),
('cocaine_cut', 'Cut Cocaine', 10),
('cocaine_packaged', 'Packaged Cocaine', 10),
('chemicals', 'Chemicals', 10),
('meth', 'Methamphetamine', 10),
('meth_packaged', 'Packaged Methamphetamine', 10),
('sorted_money', 'Sorted Money', 10),
('package_money', 'Packaged Money', 10),
('lockpick', 'Lockpick', 300),
('police_stormram', 'Stormram', 18000);Add to qb-core/shared/items.lua (also ps-inventory and most qb-based inventories):
weed = { name = 'weed', label = 'Marijuana', weight = 10, type = 'item', image = 'weed.png', unique = false, useable = true, shouldClose = true, description = 'Freshly harvested cannabis.' },
weed_packaged = { name = 'weed_packaged', label = 'Packaged Marijuana', weight = 10, type = 'item', image = 'weed_packaged.png', unique = false, useable = true, shouldClose = true, description = 'Bagged and ready to sell.' },
cocaine = { name = 'cocaine', label = 'Cocaine', weight = 10, type = 'item', image = 'cocaine.png', unique = false, useable = true, shouldClose = true, description = 'Raw coca.' },
cocaine_cut = { name = 'cocaine_cut', label = 'Cut Cocaine', weight = 10, type = 'item', image = 'cocaine_cut.png', unique = false, useable = true, shouldClose = true, description = 'Cut and ready to press.' },
cocaine_packaged = { name = 'cocaine_packaged', label = 'Packaged Cocaine', weight = 10, type = 'item', image = 'cocaine_packaged.png', unique = false, useable = true, shouldClose = true, description = 'Pressed and wrapped.' },
chemicals = { name = 'chemicals', label = 'Chemicals', weight = 10, type = 'item', image = 'chemicals.png', unique = false, useable = true, shouldClose = true, description = 'Precursors for cooking.' },
meth = { name = 'meth', label = 'Methamphetamine', weight = 10, type = 'item', image = 'meth.png', unique = false, useable = true, shouldClose = true, description = 'Freshly cooked.' },
meth_packaged = { name = 'meth_packaged', label = 'Packaged Methamphetamine', weight = 10, type = 'item', image = 'meth_packaged.png', unique = false, useable = true, shouldClose = true, description = 'Bagged and ready to sell.' },
sorted_money = { name = 'sorted_money', label = 'Sorted Money', weight = 10, type = 'item', image = 'sorted_money.png', unique = false, useable = true, shouldClose = true, description = 'Cut bills.' },
package_money = { name = 'package_money', label = 'Packaged Money', weight = 10, type = 'item', image = 'package_money.png', unique = false, useable = true, shouldClose = true, description = 'Counted and banded.' },
lockpick = { name = 'lockpick', label = 'Lockpick', weight = 300, type = 'item', image = 'lockpick.png', unique = false, useable = true, shouldClose = true, description = 'Opens locked doors.' },
police_stormram = { name = 'police_stormram', label = 'Stormram', weight = 18000, type = 'item', image = 'police_stormram.png', unique = false, useable = true, shouldClose = true, description = 'Breaks doors open.' },Add to ox_inventory/data/items.lua. On Qbox, also add black_money if it is not there yet.
['weed'] = { label = 'Marijuana', weight = 10, stack = true },
['weed_packaged'] = { label = 'Packaged Marijuana', weight = 10, stack = true },
['cocaine'] = { label = 'Cocaine', weight = 10, stack = true },
['cocaine_cut'] = { label = 'Cut Cocaine', weight = 10, stack = true },
['cocaine_packaged'] = { label = 'Packaged Cocaine', weight = 10, stack = true },
['chemicals'] = { label = 'Chemicals', weight = 10, stack = true },
['meth'] = { label = 'Methamphetamine', weight = 10, stack = true },
['meth_packaged'] = { label = 'Packaged Methamphetamine', weight = 10, stack = true },
['sorted_money'] = { label = 'Sorted Money', weight = 10, stack = true },
['package_money'] = { label = 'Packaged Money', weight = 10, stack = true },
['lockpick'] = { label = 'Lockpick', weight = 300, stack = true },
['police_stormram'] = { label = 'Stormram', weight = 18000, stack = true },
['black_money'] = { label = 'Black Money', weight = 0, stack = true }, -- QboxThe usable items (weed, meth, lockpick, police_stormram) are registered by the script itself through your framework. You do not need to register them anywhere else.
Admin Access#
The creator (/drugcreator), the furniture creator (/drugfurniture) and /set_lab_level are for admins only. The check is made by your framework:
The player's group must be admin or superadmin. From the server console:
setgroup <server id> adminThe player needs the god or admin permission, or the command ace. In server.cfg:
add_principal identifier.license:xxxxxxxx group.admin
add_ace group.admin command allowWho counts as an admin is decided in custom/esx/server.lua or custom/qb/server.lua, in the function playerIsAdmin. Change it there if your server uses another permission system.
Configuring the Resource#
Farms, labs and dealers are created in game. What they do is set in the config files:
File | Contents |
|---|---|
| Language, money, shells, harvest items, processing recipes, dealer catalogues, corner selling, usable drugs, police, keys and detection. |
| The decoration shop: tabs, categories, every prop and its price, and which props are processing tables. |
| The animations and props of each processing scene. Advanced. |
| Open bridges to your framework, inventory, dispatch, clothing, target and notifications. |
| Every text, in 41 languages. |
The values worth reviewing first:
Config.Locale = 'en' -- language file in locales/
Config.MoneyType = 'bank' -- pays for labs and furniture: 'money' | 'bank' | 'black_money'
Config.UseTarget = false -- true to use ox_target / qb-target instead of [E] prompts
Config.RequiredCops = 0 -- police online needed for corner selling
Config.PoliceJobs = { 'realestate', 'police', 'realestatejob' } -- leave only your police jobs
Config.Debug = true -- set to false on a live server
Config.ZoneDebug = true -- set to false on a live serverEvery option is explained in Usage → The Configuration.
Verifying the Installation#
Restart the server and check the console for errors from qs-drugs-creator. Then join and work through the first loop:
Open the creator
As an admin, type
/drugcreator. If nothing opens, see Common Errors.Create a weed farm
Create Drug → Collection → Weed. Draw the zone, place the plants, save, and harvest one with E.
Create a lab and process
Create a shell laboratory, buy it by signing the contract, open
/labDecoand buy a weed table. Walk up to the table and press E to sort your weed.



