The drugs module is Config.Drugs in data/config.drugs.lua, with growth and police values in the server only file. Config.Drugs.enabled = false turns it off. Plants and placed tables are saved in jcks_job_plants and jcks_job_drug_tables and survive restarts. Every option is listed in Drugs settings.
Growing
Seeds are usable items. A seed is planted anywhere, or only inside the zones listed in its zones. A plant grows through the models in stages in growMinutes (zones can speed this up with growMultiplier). Water and fertiliser drop every minute (waterDecay, fertilizerDecay). Below threshold the plant loses healthDecay health per minute. Care items add water and fertiliser:
| Item | Water | Fertiliser |
|---|---|---|
watering_can |
30 | 0 |
fertilizer |
0 | 30 |
liquid_fertilizer |
15 | 15 |
Harvest gives the products of the seed and with seedBack a chance for seeds. A player has at most plantLimit (10) plants, at least plantDistance (1.5 m) apart.
Default seeds: weed_seed (anywhere, 30 min, 2 to 5 weed_bud) and coca_seed (only in the grapeseed zone, 45 min, 1 to 3 coca_leaf).
Police jobs in Config.Drugs.policeJobs burn plants and get policeDestroyReward (250). destroyItem can require an item.
Processing tables and workbenches
A table is a placeable item (item) or a fixed spot in Config.Drugs.fixedTables. Each table has recipes with ingredients, outputs, time and failChance. A recipe can need a blueprint item that is not consumed, a table can be limited with jobs = { mechanic = true }. workbenches = true enables workbenches.
| Table | Item | Recipes |
|---|---|---|
weed_table |
weed_table |
joint, weed_bag |
workbench |
workbench |
lockpick, repairkit, pistol_ammo (needs blueprint_ammo) |
coke_table |
coke_table |
cocaine |
Using drugs
Config.Drugs.use sets the animation, duration, cooldown and effects per item: joint (armor, relaxed, drunk), cocaine (speed, stamina, shake), weed_bag (relaxed).
Corner selling
/selldrugs (selling.command) toggles selling mode: walk up to NPCs inside a sell zone and press E. A sale succeeds with sellChance percent, the NPC robs the player with robChance and the police get a 10-19 call with policeAlertChance. minPolice police must be on duty. Each zone has its own prices per item as a min and max range.
Dealer
An NPC (dealer.ped at dealer.coords) sells seeds, care items, papers, bags, acetone and tables for cash.