SHOWCASE VIDEOS
About The Cocaine Factory
With the many entities that this script features, you will have a full cocaine factory on your server. Players can cook cocaine on a stove, use the extractor to blend it all together and get raw cocaine, to then dry it under lamps to finish the process.Not only that, but once cocaine has been fully dried it can be packed into the cocaine box, which is then brought to the druggie who will offer you a price for your hard work.
Awesome right?
Features





















Installation
This addon supports DarkRP 2.7.0 and above.
Extract
You can setup multiply druggie NPC's with the latest update, here is how to do it.
Go to the location you want to position an NPC at. Write in console
If you want to delete the NPC, you can write
Content
Only custom models and materials are used for this script. Script content can be found at:
https://steamcommunity.com/workshop/filedetails/?id=1734833080
Make sure to add this to your servers workshop collection as well.
This addon supports DarkRP 2.7.0 and above.
Extract
the_cocaine_factory
to your addons and visit the configuration file at lua/ch_cocaine/shared/cocaine_config.lua
to set your own settings or just use the default ones.You can setup multiply druggie NPC's with the latest update, here is how to do it.
Go to the location you want to position an NPC at. Write in console
cocainebuyer_setpos uniquename
and he will spawn at your location after 5 seconds.If you want to delete the NPC, you can write
cocainebuyer_removepos uniquename
and the NPC will be removed. You can also find all the saved NPC's in data/craphead_scripts/the_cocaine_factory/map_name/*
.Content
Only custom models and materials are used for this script. Script content can be found at:
https://steamcommunity.com/workshop/filedetails/?id=1734833080
Make sure to add this to your servers workshop collection as well.
How it Works
Step 1.
Purchase a stove entity. The stove will need to have gas and cooking plates. You can buy the amount of cooking plates you want to start out with, and add more afterwards.
Purchase a cooking pot, fill it with water and baking soda and drop it onto the stove. It will attach to an available cooking plate.
Once the pots are attached the thermometer becomes visible and you will turn on the gas for the plate(s). When it is cooked the color of the mixture will change, and you can use the gravity gun or physgun to take it off the stove.
Step 2.
Next step is buying the extractor and fill it with leaves and the finished mixture from the pots (also known as carbonate). When the extractor is filled, the red lights will turn off and a green light will appear instead.
Place a bucket in the extractor until all red laps are off, and press E on the switch to start the extracting process. Watch the beautiful blend sequences move the arrows accordingly to the process and watch the bucket get filled with raw cocaine.
Once the bucket is finished, green lamps will appear and you can remove it from the extractor. The gauge meter (displayed with a bucket icon on model) will also slide back to 0.
Step 3.
Purchase a drying rack and drag the bucket to the table. Once it touches the cocaine will be poured over the table. If the drying rack is turned on already, the process will begin automatically.
The drying rack is powered using batteries. Purchase these through the F4 menu. The switch for the lights and drying process is located on the front left of the drying rack. You can see how much power the batteries have on the arrow next to the switch.
Once batteries are installed red and green lights are available to display if the drying rack is on or off. Turn it on while there is cocaine on the table to begin the process.
You can follow the progress by looking on the right side as an arrow will move as the temperature rises on the table.
When the process is finished, the packed cocaine will appear on the table.
Step 4.
The last part is buying a cocaine box (drug holder). Drag and drop your packed cocaine into the box. You can press E on the box to open and close it.
Once you have cocaine packs in the box (you can have up to 4 packs), bring it to the druggie NPC on the map and speak to him.
He will offer you a price based on the amount of cocaine packs you have in your box, and based on your donator bonus.
Step 1.
Purchase a stove entity. The stove will need to have gas and cooking plates. You can buy the amount of cooking plates you want to start out with, and add more afterwards.
Purchase a cooking pot, fill it with water and baking soda and drop it onto the stove. It will attach to an available cooking plate.
Once the pots are attached the thermometer becomes visible and you will turn on the gas for the plate(s). When it is cooked the color of the mixture will change, and you can use the gravity gun or physgun to take it off the stove.
Step 2.
Next step is buying the extractor and fill it with leaves and the finished mixture from the pots (also known as carbonate). When the extractor is filled, the red lights will turn off and a green light will appear instead.
Place a bucket in the extractor until all red laps are off, and press E on the switch to start the extracting process. Watch the beautiful blend sequences move the arrows accordingly to the process and watch the bucket get filled with raw cocaine.
Once the bucket is finished, green lamps will appear and you can remove it from the extractor. The gauge meter (displayed with a bucket icon on model) will also slide back to 0.
Step 3.
Purchase a drying rack and drag the bucket to the table. Once it touches the cocaine will be poured over the table. If the drying rack is turned on already, the process will begin automatically.
The drying rack is powered using batteries. Purchase these through the F4 menu. The switch for the lights and drying process is located on the front left of the drying rack. You can see how much power the batteries have on the arrow next to the switch.
Once batteries are installed red and green lights are available to display if the drying rack is on or off. Turn it on while there is cocaine on the table to begin the process.
You can follow the progress by looking on the right side as an arrow will move as the temperature rises on the table.
When the process is finished, the packed cocaine will appear on the table.
Step 4.
The last part is buying a cocaine box (drug holder). Drag and drop your packed cocaine into the box. You can press E on the box to open and close it.
Once you have cocaine packs in the box (you can have up to 4 packs), bring it to the druggie NPC on the map and speak to him.
He will offer you a price based on the amount of cocaine packs you have in your box, and based on your donator bonus.
Customizing
To customize the general settings, go to
To customize the darkrp entities, go to
There are over 25 different configuration options in the general settings. I can add any configuration you would like as well. Please just submit a support ticket with your request, and I will see if it's possible.
General Config
To customize the general settings, go to
the_cocaine_factory/lua/ch_cocaine/shared/cocaine_config.lua.
To customize the darkrp entities, go to
the_cocaine_factory/lua/ch_cocaine/shared/cocaine_darkrp_entities.lua.
There are over 25 different configuration options in the general settings. I can add any configuration you would like as well. Please just submit a support ticket with your request, and I will see if it's possible.
General Config
Code:
-- SET LANGUAGE
-- Available languages: English: en - Danish: da - German: de - Polish: pl - Russian: ru - Spanish: es - French: fr - Chinese: cn
TCF.Config.Language = "en" -- Set the language of the script.
-- GENERAL Config
TCF.Config.RemoveEntsOnTeamChange = true -- Should all cocaine related entities owned by the player be removed when changing to a non Criminal team (from list below)?
TCF.Config.RemoveEntsOnDC = true -- Same as above, but on disconnect all owned entities are removed.
-- GENERAL TEAM CONFIGURATION
TCF.Config.CriminalTeams = { -- These teams are allowed to interact with the cocaine buyer NPC.
"Citizen",
"Gangster",
"Criminal",
"Mafia",
"Mafia Leader",
"Mob Boss",
"Organized Crime" -- THE LAST TEAM SHOULD NOT HAVE A COMMA
}
TCF.Config.PoliceTeams = { -- Police teams. These teams are NOT allowed to use the cocaine buyer NPC and can also confiscate packed boxes with cocaine.
"Police Officer",
"Civil Protection",
"Police Chief",
"Chief Civil Protection",
"FBI",
"S.W.A.T",
"S.W.A.T Chief" -- THE LAST TEAM SHOULD NOT HAVE A COMMA
}
-- COCAINE BUYER NPC
TCF.Config.NPCDisplayName = "Tyrone Johnson" -- The display name shown above the NPC
TCF.Config.NPCDisplayDescription = "Sell me your cocaine packs." -- The description displayed above the NPC.
TCF.Config.SellDistance = 150 -- How far away can the NPC detect your drug holder.
TCF.Config.RandomPayoutInterval = 300 -- How many seconds before the randomized payout is changed again. It randomizes the settings below.
TCF.Config.PayPerPackMin = 1000 -- How much should each cocaine pack be worth? Minimum value (without any donator bonuses)
TCF.Config.PayPerPackMax = 1500 -- How much should each cocaine pack be worth? Maximum value (without any donator bonuses)
-- STOVE ENTITY
TCF.Config.StoveHealth = 250 -- The amount of health the stove entity have.
TCF.Config.GasButtonDelay = 0.75 -- The amount of seconds delay there is when switching gas on/off on the stove.
TCF.Config.StoveExplosion = true -- Should the stove explode when destroyed. true/false
TCF.Config.StoveSmokeEffect = true -- Should the pots on the stove emit smoke effect when cooking/turned on. true/false
TCF.Config.MinTemperatureForSmoke = 10 -- Minimum temperature the pot has to have before the smoke appears. It goes from 0 - 100.
-- EXTRACTOR ENTITY
TCF.Config.ExtractorHealth = 200 -- The amount of health the barrel entity have.
TCF.Config.ExtractorSound = "ambient/gas/steam2.wav" -- Sound that plays while extracting the cocaine from the extractor entity.
TCF.Config.MinLeafAmount = 10 -- Minimum amount of leaf percentage added when adding leafs.
TCF.Config.MaxLeafAmount = 20 -- Maximum amount of leaf percentage added when adding leafs.
TCF.Config.MinCarbonateAmount = 25 -- Minimum amount of carbonate added when you add your finished pot.
TCF.Config.MaxCarbonateAmount = 25 -- Maximum amount of carbonate added when you add your finished pot.
TCF.Config.ExtractionTime = 30 -- Amount of seconds it takes for the extractor to finish.
TCF.Config.ExtractorExplosion = true -- Should the extractor explode when destroyed. true/false
-- POT/PAN ENTITY
TCF.Config.CookingPanHealth = 50
-- DRYING RACK ENTITY
TCF.Config.DryingRackHealth = 150
TCF.Config.DryingTime = 20
-- COCAINE BOX ENTITY
TCF.Config.CocaineBoxHealth = 75
TCF.Config.PoliceConfiscateAmount = 200
-- BAKING SODA ENTITY
TCF.Config.BakingSodaHealth = 50
-- COCAINE ENTITY
TCF.Config.CocaineHealth = 25
-- GAS ENTITY
TCF.Config.GasHealth = 100
TCF.Config.GasExplosion = true
-- LEAF ENTITY
TCF.Config.LeafHealth = 50
-- WATER ENTITY
TCF.Config.WaterHealth = 50
-- BUCKET ENTITY
TCF.Config.BucketHealth = 50
-- COOKING PLATE ENTITY
TCF.Config.CookingPlateHealth = 50
-- DONATOR SETTINGS
TCF.Config.EnableDonatorBonus = true
TCF.Config.DonatorBonuses = {
{ ULXGroup = "vip", Bonus = 1.25 },
{ ULXGroup = "gold_member", Bonus = 1.50 },
{ ULXGroup = "admin", Bonus = 1.60 },
{ ULXGroup = "superadmin", Bonus = 1.60 },
{ ULXGroup = "owner", Bonus = 2 },
}
I have previously heard that this conflicts with the delivery system of Realistic Properties. If you have issues with these two addons, then unfortunately I cannot help you.
Discord Server & Support
I own a Discord server for customers and anyone else who wish to join. I will occasionally provide exclusive offers and help with minor issues that might occur with my scripts. If you have a more serious problem, please create a conversation with me onsite.Conflicting addons is not to be said if I will support that or not. This is something I will decide upon confrontation about a conflicting addon. If you have found a conflicting addon, then feel free to create a conversation and I'll see if I can assist with solving the conflict.