Basic understanding of FiveM server setup and resource management
An up-to-date version of ox_lib
Introduction
This documentation provides a comprehensive guide to the configuration options available in the Envi-DrugLabs script. The script simulates a detailed and interactive drug manufacturing process, specifically focused on methamphetamine production. It offers a wide range of customizable features to create a realistic and immersive drug lab experience.
Target issues
qb-target is known for having issues where zones cannot overlap and you are likely seeing an option like 'Push Vehicle' from qb-smallresources taking priority.
Config Preview
1. Debug Settings
Debug Mode
Config.Debug = false -- Debug mode displays target zones and other debug information.
--WARNING: Do not leave this enabled on a live server!
Debug Cooking
Config.DebugCooking = false --Debug mode for the cooking process.
--Displays debug information during cooking.
--WARNING: This also enables a testing command to give all items (/testMethItems).
--Do not leave this enabled on a live server!
2. General Settings
Refresh Time
Config.RefreshTime = 5 --Time in seconds that zones will refresh.
--Lower values (not recommended below 2) provide more accuracy but are heavier on performance.
--Higher values are more optimized but less accurate.
Van Cooldown
Config.VanCooldown = 20 -- Time in minutes the van will be on cooldown after finishing a cook.
Snitch Chance
Config.SnitchChance = 100 -- Percentage chance that a nearby NPC will snitch on you while cooking.
3. Equipment Settings
Config.PestleAndMortarItem = 'pestle_and_mortar' -- item name for Pestle And Mortar
Config.BeakerItem = 'beaker' -- item name for Beaker
Config.MethLabItem = 'methlab' -- item name for Methlab
Config.TestKitItem = 'meth_testkit' -- item name for Meth test kit
Config.EggTimerItem = 'eggtimer' -- item name for Egg Timer
These settings define the item names for various equipment used in the meth cooking process.
Equipment Break Chance
Config.EquipmentBreakChance = 30 -- Default 30
Percentage chance that equipment will break when used.
Interactions are performed using a '3rd eye' target system like Ox Target or QB-Target. Turn on Config.DebugCooking for a detailed guide in the F8 console. It is recommended to turn debug off when in a live setting after testing is completed.
Start Cook: Interact with the Envi Meth Van and select "Start Cook".
Set Up Equipment: Interact with the equipment station to spawn necessary props. One on each table and one on the stove. Ensure you have the required items in your inventory.
Mix Chemicals: Adjust the chemical ratios for your unique mix. This is all based on ratios. If someone does over 125 total or under 50 total - the mix is randomized.
Turn on Stove: Use the provided option to turn on the stove.
Add Chemical Mixture: Once the stove is on, add the chemical mixture to begin cooking.
Maintain Pressure and Temperature: Keep pressure above 70 but below 100 and pressure at a medium to high level for best results.
Avoid Extremes: Avoid letting pressure and temperature get too high, as this may lead to fire or explosion.
Additional Chemicals: Adding the correct chemicals at specific times enhances cook quality.
Chemical 1: Add between 30% and 60% of the cook.
Chemical 2: Add between 60% and 80% of the cook.
Chemical 3: Can be used between 10% and 70% progress.
Chemical 4: Must be added at the start, before 15%.
Acetone: Add between 50% and 85%.
Food Coloring: Add at the end, after 85%.
12. Language Settings
The Config.Lang table provides extensive language customization options, including:
Debug messages
Notifications and menu text
Equipment and action labels
Event descriptions and choices
Config.Lang = {
-- DEBUG PRINTS --
stoppedBecauseNotExists = "stopping because not DoesEntityExist(methLabVeh)",
stoppedBecauseNotStarted = "stopping because not isStarted",
stoppedBecauseNotMixCooking = "stopping because not mixCooking",
stoppedBecauseStopCounter = "stopped because StopCounter > 5",
stoppedBecauseFailCounter = "stopped because failCounter > 10",
stoppedBecauseQuality = "stopped because qualityScore <= 0",
stoppedBecauseDead = "stopped because you are dead",
-- NOTIFICATIONS AND MENUS --
abandonedCook = "You abandoned the cook!!",
failedCook = "You failed the cook! Pay more attention next time!",
diedCookAbandoned = "You died! Cook abandoned!",
MixtureBoiling = "The mixture is starting to boil over and the pressure is rising fast! - Lower the pressure immediately!",
StoveOut = "The stove has almost gone out! Turn it up before we ruin the mixture!",
DecisionsHeader = 'Decisions, Decisions...',
MixtureSettling = 'The mixture is starting to settle, do you want to stir it?',
StirItUp = 'Stir it up!',
BetterNot = 'Better not..',
MixtureStirred = "The mixture has been stirred!",
MixtureSettled = "The mixture has settled!",
ToxicSpillAlert = 'Toxic Spill Alert!',
ToxicSpillContent = 'There is a toxic spill in the cooking area. Do you want to neutralize the spill with a chemical or ventilate the area?',
Neutralize = 'Neutralize with chemical',
Ventilate = 'Ventilate area',
NeutralizedSpill = "You neutralized the spill, but the chemical reaction affected the quality.",
VentilatedArea = "You ventilated the area, reducing the pressure.",
ChemicalReactionChain = 'Chemical Reaction Chain!',
ChemicalReactionContent = 'A chain of chemical reactions is starting to occur. Do you want to introduce a stabilizer or adjust the mixture composition?',
IntroduceStabilizer = 'Introduce a stabilizer',
StabilizerIntroduced = "You introduced a stabilizer..",
powerOutage = "The power has gone out! Check the engine bay and investigate the problem!",
inspectPowerHeader = "Decisions, Decisions...",
inspectPowerContent = "Could be the fuse or the battery connection. What do you want to do?",
secureConnection = "Secure the connection!",
switchFuse = "Switch the fuse!",
adjustingPowerCable = "Adjusting power cable!",
foundLooseConnection = "Found a loose connection - Attempting to repair!",
connectionSecured = "The connection has been secured!",
shockedYourself = "The connection has been secured but you shocked yourself!!",
installingFreshFuse = "Installing a fresh fuse!",
powerRestored = "The power has been restored!",
UnusualNoise = 'Unusual Noise!',
NoiseContent = 'A strange noise is coming from the equipment. Do you want to investigate the noise or continue the process?',
InvestigateNoise = 'Investigate the noise',
ContinueProcess = 'Continue the process',
ValveTightened = "You discovered a loose valve and tightened it. Pressure stabilized.",
WaterLeak = "Ignoring the noise led to a small water leak.",
TemperatureDrop = "Temperature Drop",
TemperatureDropContent = "The temperature in the lab has dropped significantly. You need to take action.",
SealWindows = "Seal Windows",
AddInsulation = "Add Insulation",
WindowsSealed = "Windows Sealed Successfully",
InsulationFailed = "Insulation Attempt Failed",
TemperatureSpike = 'Temperature Spike!',
TemperatureSpikeContent = 'The temperature is rising rapidly. Do you want to add cold water or adjust the mixture composition?',
AddColdWater = 'Add cold water',
AdjustMixture = 'Adjust Mixture Composition',
FireStarted = "Water and Chemicals don't mix well. You started a fire!",
PressureSpike = "Adjusting the mixture led to a pressure spike.",
CookingAreaFire = "A fire has started in the cooking area!",
ToxicFumes = "You are inhaling toxic fumes!",
CallingCops = "Looks like someone is calling the cops!",
PressToGetUp = "Press E to get up",
MissingItems = "You are missing some items!",
CantUsePowerOut = "You can't use this while the power is out. Check the engine bay to investigate the problem!",
RaisedTemperature = "You raised the temperature to Level: ",
LoweredTemperature = "You lowered the temperature to Level: ",
LoweredPressure = "You turn the release valve, lowering the pressure.",
AlreadyStartedCooking = "You have already started cooking.",
CantUseThis = "You can't use this!",
cookingComplete = "Cooking Complete! Final Quality: ",
Attention = "Attention!",
MysteriousSmell = "What's that smell?",
SmellContent = "There is a mysterious smell coming from the equipment. Do you want to investigate the smell or continue on?",
InvestigateSmell = "Investigate",
IgnoreSmell = "Continue",
LeakStopped = "You found a small leak coming from the gas pipe! Good thing you stopped it before it got worse.",
LeakIgnored = "You ignored the smell and a leak started in the gas pipe!",
CurrentQualityScore = "Current Quality Rating: ",
Broken = "Your equipment broke!",
-- EQUIPMENT MENU --
EquipmentGauges = "Equipment Gauges",
EquipmentGaugesProgress = "Equipment Gauges - Progress: ",
CheckThermometer = "Check Thermometer",
ViewCurrentTemperature = "View the current temperature of the equipment",
CheckPressureGauge = "Check Pressure Gauge",
AddChemicals = "Add Chemicals",
AddAdditionalChemicals = "Add additional chemicals to the mixture",
TestKit = "Use Testing Kit",
TestMixtureQuality = "Test the current quality of the mixture",
ReleasePressure = "Release Pressure",
TurnPressureReleaseValve = "Turn the pressure release valve to lower the pressure",
StopCooking = "Stop Cooking",
StopCookingDrugs = "Stop cooking the drugs",
Temperature = "Temperature",
TemperatureLevel = "Temperature Level",
Pressure = "Pressure",
-- TARGET LABELS --
Sit = "Sit",
LayDown = "Lay Down",
OpenDoor = "Open Door",
CloseDoor = "Close Door",
StartCooking = "Start Cooking",
TurnUpTemperature = "Turn Up Temperature",
TurnDownTemperature = "Turn Down Temperature",
SwitchOn = "Switch On",
AddChemicalMixture = "Add Chemical Mixture",
SetUpEquipment = "Set-Up Equipment",
SetUpChemicalBeaker = "Set-Up Chemical Beaker",
MixChemicals = "Mix Chemicals",
RemoveChemicalBeaker = "Remove Chemical Beaker",
SetUpPestleAndMortar = "Set-Up Pestle and Mortar",
CrushPsuedoephedrine = "Crush Psuedoephedrine",
PickUpPestleAndMortar = "Pick Up Pestle and Mortar",
UseSink = "Use Sink",
OpenWardrobe = "Open Wardrobe",
OpenStorage = "Open Storage",
CheckEquipment = "Check Equipment",
inspectPower = "Inspect Power",
PressureOFF = "OFF",
Pressure1 = "1 BAR - (LOW)",
Pressure2 = "2 BAR - (MEDIUM)",
Pressure3 = "3 BAR - (HIGH)",
Pressure4 = "4 BAR - (VERY HIGH)",
-- SEATS/ BEDS --
BedBusy = "This bed is currently occupied!",
SeatBusy = "This seat is currently occupied!",
}
This allows for easy localization and customization of all text elements in the script.
This configuration file offers a high degree of customization for the Envi-DrugLabs script, allowing server administrators to fine-tune the meth cooking experience to their specific needs. From adjusting item names and chances to customizing vehicle layouts and language settings, the script provides a comprehensive and flexible system for simulating drug manufacturing in a FiveM environment.