Showcase
HEROIN SCRIPT
Purchase
[QBCore & ESX] - Heroin script
Features
- Realistic Heroin Processing Cycle: Simulates the entire process of heroin manufacturing, from gathering poppy to the final product.
- Advanced Processing Techniques: Implements realistic methods like gathering poppies, adding water and calcium oxide, checking pH levels, and obtaining a morphine base.
- Barrel and Fire Processing: Players need to mix white morphine base with Sodium Carbonate and Acetic Anhydride over a fire to get brown morphine base. They should ensure to manage the fire properly to avoid mishaps.
- Interactive Heroin Processing: The final step of processing involves mixing the brown morphine base with Acetone Acid, Ammonia Solution, Hydrochloric Acid, and Activated Carbon to produce heroin.
- Packaging and Usage: Heroin can be packaged for selling or used directly for experiencing the effects of the drug.
- Fully Customizable: Every aspect of the script can be customized via a config file, making it adaptable to various RP scenarios and server rules.
- Integrated Admin Menu: For easy accessibility and management, an admin menu is integrated into the script.
- Optimized Performance: Fully optimized script ensuring smooth gameplay and performance with no significant hit to server resources.
- Protection Against Exploits: Advanced measures have been implemented to prevent script exploitation.
Optimization
Full optimized.
0.00 ms
Code is accessible | No |
Subscription-based | No |
Lines (approximately) | : ~3600 |
Requirements | d3MBA-lib - Support most popular context menus (ox_lib, qb-menu, nh-context) - (ox_target, qtarget, qb-target) |
Support | Yes |
Other Resources
- [ESX] & [QBCORE] Butcher job
- [ESX] & [QBCORE] Cocaine script
- [ESX] & [QBCORE] Vehicle rental
- [ESX] & [QBCORE] Ownable vending machines
- [QBCORE] QB-CUSTOMS REWORK | Receipt system
- [ESX] & [QBCORE] Recycler job
- [ESX] & [QBCORE] Tailor job
- [ESX & QBCORE] Potions
- [ESX] Oxy Run | NoPixel Inspired
- [ESX] Easter Hunt
Config
Config.KickReason = "[d3MBA-heroin] | Protection!" -- Kick reason if player try to cheat.
Config.BlacklistZonesDebug = false -- true/flase | Default: false | If you set this to true, you will see the Blacklist Zones in the game (marker).
Config.BlacklistZones = { -- Blacklist zones where player can't do actions.
{coords = vector3(453.1656, -985.860, 30.689), radius = 70.0}, -- MRPD
{coords = vector3(332.6394, -582.348, 43.224), radius = 70.0}, -- Pillbox Hospital
-- Add more zones as needed
}
-- Particles synchronization
Config.SyncParticlesWithAllPlayers = { -- If is false particles will see only the player who triggered it.
BarrelMixing = true, -- Barrel mixing particles.
Filtering = true, -- Filtering particles.
}
Config.Items = {
-- Change item names here for every action.
GasMask = "gas_mask",
ScoringTool = "heroin_scoring_tool",
Barrel = "heroin_barrel",
Poppy = "heroin_poppy",
WaterCanister = "heroin_water_canister",
Water = "heroin_water",
CalciumOxide = "heroin_calcium_oxide",
MixingStick = "heroin_mixing_stick",
FilteringPipe = "heroin_filtering_pipe",
Wood = "heroin_wood",
Lighter = "lighter",
Pot = "heroin_pot",
Spoon = "heroin_spoon",
MorphineBase = "heroin_morphine_base",
SodiumCarbonate = "heroin_sodium_carbonate",
AceticAnhydride = "heroin_acetic_anhydride",
BrownHeroinBase = "heroin_brown_heroin_base",
PlasticPot = "heroin_plastic_pot",
AcetoneAcid = "heroin_acetone_acid",
AmmoniaSolution = "heroin_ammonia_solution",
HydrochloricAcid = "heroin_hydrochloric_acid",
ActivatedCarbon = "heroin_activated_carbon",
PhTestPaper = "heroin_litmus_paper",
Ph8 = "heroin_ph_8",
Ph9 = "heroin_ph_9",
Ph10 = "heroin_ph_10",
Ph11 = "heroin_ph_11",
Ph12 = "heroin_ph_12",
Ph13 = "heroin_ph_13",
Ph14 = "heroin_ph_14",
ToxicWaste = "heroin_toxic_waste",
Syringe = "heroin_syringe",
HeroinDose = "heroin_syringe_dose",
Scale = "scale",
Baggy = "drug_bag",
HeroinPackage = "heroin_package",
Heroin = "heroin",
}
Config.ShopPed = {
Use = true, -- [true/false] - Set this to false if you want to disable the shop.
Account = "cash", -- (bank / cash) | Default: cash | If you set this to bank, you will pay from bank account.
Model = "s_m_y_dealer_01", -- https://docs.fivem.net/docs/game-references/ped-models/ - Ped model that will be spawned.
Pos = vector4(1532.630, 3795.410, 32.518, 25.46), -- Pos = position of shop ped.
TimeCheck = {
Use = true, -- (true/false) | Default: true | If you set this to false, shop will be open 24/7.
CheckTime = 3, -- Every 3 sec scitpt will check in game time.
OpeningTime = 8, -- Shop opening time = 8:00 AM.
ClosingTime = 22, -- Shop close time = 10:00 PM.
},
Blip = { -- https://docs.fivem.net/docs/game-references/blips/
Use = true, -- (true/false) | Default: true | If you set this to false, you will not see the blip on the map.
Sprite = 51, -- Blip sprite.
Scale = 0.9, -- Blip scale.
Color = 7, -- Blip color.
Label = "[Heroin] Shop Dealer",
},
OpenShopAfterBuy = false, -- [true/false] If true, script will open shop menu again after player bought something
DynamicPrices = {
Use = true, -- [true/false] - If you want to use dynamic prices, set it to 'true'
PriceMinMultiplier = 0.7, -- Min price multiplier, 70% of original price
PriceMaxMultiplier = 1.5, -- Max price multiplier, 150% of original price
},
Items = {
-- ItemName = name of item, Price = price of item
{ItemName = "heroin_scoring_tool", Price = 80, Icon = "fas fa-scissors"},
{ItemName = "heroin_barrel", Price = 500, Icon = "fas fa-trash"},
{ItemName = "heroin_mixing_stick", Price = 200, Icon = "fas fa-spoon"},
{ItemName = "heroin_filtering_pipe", Price = 250, Icon = "fas fa-filter"},
{ItemName = "heroin_litmus_paper", Price = 2, Icon = "fas fa-teeth-open"},
{ItemName = "heroin_water_canister", Price = 50, Icon = "fas fa-bottle-water"},
{ItemName = "heroin_calcium_oxide", Price = 25, Icon = "fas fa-circle"},
{ItemName = "heroin_wood", Price = 15, Icon = "fas fa-tree"},
{ItemName = "heroin_pot", Price = 100, Icon = "fas fa-kitchen-set"},
{ItemName = "heroin_sodium_carbonate", Price = 30, Icon = "fas fa-bottle-water"},
{ItemName = "heroin_acetic_anhydride", Price = 30, Icon = "fas fa-bottle-water"},
{ItemName = "heroin_acetone_acid", Price = 50, Icon = "fas fa-skull-crossbones"},
{ItemName = "heroin_plastic_pot", Price = 150, Icon = "fas fa-trash"},
{ItemName = "heroin_ammonia_solution", Price = 40, Icon = "fas fa-skull-crossbones"},
{ItemName = "heroin_hydrochloric_acid", Price = 40, Icon = "fas fa-skull-crossbones"},
{ItemName = "heroin_activated_carbon", Price = 25, Icon = "fas fa-tablets"},
{ItemName = "gas_mask", Price = 450, Icon = "fas fa-mask-ventilatorfilter"},
{ItemName = "heroin_spoon", Price = 50, Icon = "fas fa-spoon"},
{ItemName = "heroin_syringe", Price = 25, Icon = "fas fa-syringe"},
{ItemName = "scale", Price = 75, Icon = "fas fa-scale-balanced"},
{ItemName = "drug_bag", Price = 15, Icon = "fas fa-bag-shopping"},
{ItemName = "lighter", Price = 5, Icon = "fas fa-fire"},
}
}
Config.HintsPed = {
Use = true, -- [true/false] - Set this to false if you want to disable the hints dealer.
Model = "g_m_m_chemwork_01", -- https://docs.fivem.net/docs/game-references/ped-models/ - Ped model that will be spawned.
Pos = vector4(-58.0410, 6441.551, 31.685, 48.71), -- Pos = position of hints dealer.
TimeCheck = {
Use = true, -- (true/false) | Default: true | If you set this to false, hints dealer will be open 24/7.
CheckTime = 3, -- Every 3 sec scitpt will check in game time.
OpeningTime = 20, -- Shop opening time = 8:00 AM.
ClosingTime = 08, -- Shop close time = 10:00 PM.
},
Blip = { -- https://docs.fivem.net/docs/game-references/blips/
Use = true, -- (true/false) | Default: true | If you set this to false, you will not see the blip on the map.
Sprite = 499, -- Blip sprite.
Scale = 0.7, -- Blip scale.
Color = 1, -- Blip color.
Label = "[Heroin] Hints Dealer",
},
}
Config.Water = {
FillingTime = 5, -- FillingTime = time to fill up the canister in sec.
WaterAmount = 1, -- WaterAmount = amount of water you will get with every fill up.
}
Config.HeroinePoppy = {
Prop = "prop_plant_cane_01a", -- Prop = set prop that will be spawned.
UseMiniGame = false, -- true/false if is true, you will need to play minigame to pick up the poppy.
CheckIfPlayerHasTool = true, -- true/false if is true, script will check if player has tool to pick up the poppy, if not, player will not be able to pick up the poppy. (heroin_scoring_tool)
MinSpawn = 50, -- MinSpawn = min amount of prop that will be spawned.
MaxSpawn = 70, -- MaxSpawn = max amount of prop that will be spawned.
PickingUpTime = 4, --PickingUpTime = time to pick up prop in sec.
PoppyAmount = { -- PoppyAmount = amount of poppy you will get with every pick up.
Min = 1, -- Random amount will be generated between Min and Max.
Max = 1 -- Random amount will be generated between Min and Max.
},
ClearTaskImmediately = true, -- Clear task immediately after prop is picked up (true/false) | Default: true | If you set this to false, you will need to wait until the prop is picked up.
Zones = { -- Coords = center of zone, blip = true/false, name = name of zone, color = color of blip, sprite = sprite of blip, radius = radius of zone
{Coords = vector3(1827.434, -2361.98, 146.48), Blip = true, Name = "Heroin Poppy Field", Color = 7, Alpha = 500, Radius = 75.0},
{Coords = vector3(3587.525, 4618.660, 16.830), Blip = true, Name = "Heroin Poppy Field", Color = 7, Alpha = 1000, Radius = 50.0},
}
}
Config.Barrel = {
Prop = "prop_barrel_03d", -- Set the prop that will be spawned.
AutoDeleteDays = 5, -- AutoDeleteDays = time to auto delete barrel in days.
GiveBackItems = true, -- Set to true/false | Default: true | If set to true, the player will get back all items they put in the barrel. Target: [Pick up the barrel]
PlacingTime = 3, -- Time to place the barrel in seconds.
PickingUpTime = 2, -- Time to pick up the barrel in seconds.
AddingPoppyTime = 8, -- Time to add poppy to barrel in seconds.
AddingPoppyAmount = 20, -- Amount of poppy that will be added to the barrel.
AddingWaterTime = 7, -- Time to add water in seconds.
AddingWaterAmount = 1, -- Amount of water that will be added to the barrel.
AddingCalciumOxideTime = 2, -- Time to add calcium oxide in seconds.
AddingCalciumOxideAmount = 1, -- Amount of calcium oxide that will be added to the barrel.
DamageAmount = 5, -- The amount of damage that will be inflicted if the player does not wear a gas mask.
UseMiniGame = true, -- Set to true/false. If true, the player will need to play a minigame to start the mixing progress.
SpillBarrelUseMiniGame = true, -- Set to true/false. If true, the player will need to play a minigame to start the spill barrel progress.
MixingTime = 5, -- Time to mix the ingredients in seconds.
PickingUpMorphineBaseTime = 4, -- Time to pick up morphine base in seconds.
MorphineBaseAmount = {-- Amount of morphine base the player will get with every pick up.
Min = 1, -- Random amount will be generated between Min and Max.
Max = 1 -- Random amount will be generated between Min and Max.
},
GiveBackBarrel = true, -- [true / fasle] -- If is true, player will get back barrel item after pick up morphine base.
PhProcess = {
RandomTime = { -- Random time in hours when the pH process will be updated to the next pH value. The default pH is 8, and the next pH update will occur after a random time between 1 and 3 hours by default.
Min = 1, -- Minimum time in hours.
Max = 3 -- Maximum time in hours.
},
CheckingPhValueTime = 4, -- Time to check ph value, time for player animation
CheckTime = 10, -- Time to check if the pH process is done in minutes.
},
}
Config.FirePot = {
FireProp = "prop_beach_fire",
MakingFireTime = 5, -- MakingFireTime = time to make fire in sec.
PotProp = "prop_kitch_pot_huge",
PlacingPotTime = 2, -- PlacingPotTime = time to place pot in sec.
WoodAmount = 6, -- WoodAmount = amount of wood you wneed to make fire.
MorphineBaseAmount = 1, -- MorphineBaseAmount = amount of morphine base you will put in pot.
SodiumCarbonateAmount = 1, -- SodiumCarbonateAmount = amount of sodium carbonate you will put in pot.
AceticAnhydrideAmount = 1, -- AceticAnhydrideAmount = amount of acetic anhydride you will put in pot.
SpoonProp = "bkr_prop_coke_spoon_01",
MixingIngredientsTime = 5, -- MixingIngredientsTime = time to mix ingredients in sec.
CookingTime = { -- If you want every time to have the same cooking time just set min and max variable to the same value.
Min = 1, -- Minimum coocking time in minutes.
Max = 1 -- Maximum coocking time in minutes.
},
BrownHeroinBaseAmount = { -- BrownHeroinBaseAmount = amount of brown heroin base you will get with every pick up.
Min = 1, -- Random amount will be generated between Min and Max.
Max = 1 -- Random amount will be generated between Min and Max.
},
TimeLeftCheck = true, -- [true/false] If you want to have target for checking time left for coocking heroin.
TimePerLog = 10, -- TimePerLog = time to burn one log in sec.
AddingWoodTime = 5, -- AddingWoodTime = time to add wood in sec.
PutingOutTheFireTime = 7, -- PutingOutTheFireTime = time to put out the fire in sec.
}
Config.PlasticPot = {
Prop = "v_serv_plastic_box", -- Prop = set prop that will be spawned.
AcetoneAcidAmount = 1, -- AcetoneAcidAmount = amount of acetone acide you will put in plastic pot.
AddingAcetoneAcidTime = 5, -- AddingAcetoneAcidTime = time to add acetone acide in sec.
AmmoniaSolutionAmount = 1, -- AmmoniaSolution = amount of ammonia solution you will put in plastic pot.
AddingAmmoniaSolutionTime = 5, -- AddingAmmoniaSolutionTime = time to add ammonia solution in sec.
HydrochloricAcidAmount = 1, -- HydrochloricAcidAmount = amount of hydrochloric acid you will put in plastic pot.
AddingHydrochloricAcidTime = 5, -- AddingHydrochloricAcidTime = time to add hydrochloric acid in sec.
ActivatedCarbonAmount = 1, -- ActivatedCarbonAmount = amount of activated carbon you will put in plastic pot.
AddingActivatedCarbonTime = 5, -- AddingActivatedCarbonTime = time to add activated carbon in sec.
HeroinAmount = { -- HeroinAmount = amount of heroin you will get with every pick up.
Min = 1, -- Random amount will be generated between Min and Max.
Max = 1 -- Random amount will be generated between Min and Max.
},
MixingIngredientsTime = 5, -- MixingIngredientsTime = time to mix ingredients in sec.
}
Config.Heroin = {
MakingHeroinDoseTime = 5, -- PackingHeroineTime = time to pack heroin in sec.
MakingHeroinDoseAmount = 1, -- PackingHeroinAmount = amount of heroin you will get with every pack.
PackingHeroinTime = 10, -- PackingHeroineTime = time to pack heroin in sec. MUST BE LONGER THAN 7 SEC!
PackingHeroinAmount = 1, -- PackingHeroinAmount = amount of heroin you will get with every pack.
EffectDuration = 60, -- EffectDuration = duration of effect in sec. More about effect you can edit in clint/use_heroin_syringe_item.lua file.
}
Config.Rotation = {
-- Here you can find key codes: https://docs.fivem.net/docs/game-references/controls/
RotationCounterClockwise = 189, -- 189 = "ARROW LEFT" key
RotationClockwise = 190, -- 190 = "ARROW RIGHT" key
Submit = 38, -- 38 = "E" key
Cancel = 47, -- 47 = "G" key
Text3D = { -- Position of 3D text that will be displayed when you rotate the object.
x = 0.365, -- x = 0.365 | 0.365 = center of the screen | 0.0 = left side of the screen | 1.0 = right side of the screen
y = 0.95 -- y = 0.95 | 0.95 = bottom of the screen | 0.0 = top of the screen | 1.0 = bottom of the screen
},
}