Config File
Config = {}
Config.Debug = false
-- Debug mode, will display target zones and other debug information.
-- DO NOT LEAVE ON IN A LIVE SERVER!
Config.Difficulty = 4
-- Difficulty setting, 1 = easy, 2 = medium (default), 3 = hard, 4 = very hard
-- Difficulty settings that affect various aspects of the cooking process
Config.DifficultySettings = {
[1] = { -- Easy
qualityPenalty = 5,
qualityBonus = 15,
qualityDecreaseRate = 0.2,
pressureChangeRate = 0.5,
temperatureChangeMultiplier = 0.7,
pressureChangeMultiplier = 0.7,
equipmentBreakChanceMultiplier = 0.5,
onFireQualityLossMin = 10,
onFireQualityLossMax = 20
},
[2] = { -- Medium (default)
qualityPenalty = 10,
qualityBonus = 10,
qualityDecreaseRate = 0.5,
pressureChangeRate = 1.0,
temperatureChangeMultiplier = 1.0,
pressureChangeMultiplier = 1.0,
equipmentBreakChanceMultiplier = 1.0,
onFireQualityLossMin = 30,
onFireQualityLossMax = 40
},
[3] = { -- Hard
qualityPenalty = 15,
qualityBonus = 7,
qualityDecreaseRate = 1.5,
pressureChangeRate = 1.5,
temperatureChangeMultiplier = 1.3,
pressureChangeMultiplier = 1.3,
equipmentBreakChanceMultiplier = 1.5,
onFireQualityLossMin = 40,
onFireQualityLossMax = 50
},
[4] = { -- Very Hard
qualityPenalty = 20,
qualityBonus = 3,
qualityDecreaseRate = 2.0,
pressureChangeRate = 2.0,
temperatureChangeMultiplier = 1.6,
pressureChangeMultiplier = 1.6,
equipmentBreakChanceMultiplier = 2.0,
onFireQualityLossMin = 50,
onFireQualityLossMax = 90
}
}
Config.DebugCooking = false
-- Debug mode for cooking, will display debug information for cooking process.
-- [[ WARNING!! ]]
-- DO NOT LEAVE ON IN A LIVE SERVER AS THIS ALSO ENABLES NEW TESTING COMMAND TO GIVE ALL ITEMS
-- Command: /testMethItems
Config.RefreshTime = 5
-- Time in seconds that zones will refresh: [[ LOWER THAN 2 IS NOT RECCOMENDED ]]
-- Lower = More accurate but more heavy on performance.
-- Higher = More optimized but less accurate.
Config.VanCooldown = 20
-- Time in minutes the van will be on cooldown after you finish a cook.
Config.SnitchChance = 100
-- Chance % that a nearby NPC will snitch on you while cooking.
-- EQUIPMENT SETTINGS --
Config.PestleAndMortarItem = 'pestle_and_mortar' -- Item name for pestle and mortar (used for crushing pseudoephedrine)
Config.BeakerItem = 'beaker' -- Item name for chemical beaker (used for mixing chemicals)
Config.MethLabItem = 'methlab' -- Item name for meth lab
Config.TestKitItem = 'meth_testkit' -- Item name for meth test kit -- will show the current quality when cooking
Config.EggTimerItem = 'eggtimer' -- Item name for egg timer -- will show the current progress when cooking
Config.EquipmentBreakChance = 30 -- Chance % that equipment will break when used. (Default: 100)
-- CHEMICAL MIX SETTINGS --
Config.ChemicalMix = {
{label = 'Hydrochloric Acid', item = 'hydrochloricacid'},
{label = 'Red Phosphorus', item = 'red_phos'},
{label = 'Lithium', item = 'lithium'},
{label = 'Crushed Pseudoephedrin', item = 'crushed_pseudo'},
}
Config.ChemicalAmount = 1 -- Amount of each chemical needed to cook meth. (Default: 1)
-- ADDITIONAL CHEMICALS --
Config.AcetoneItem = 'acetone' -- Item name for acetone
Config.FoodColoringItem = 'food_coloring' -- Item name for food coloring
Config.PillsItem = 'pseudoephedrine' -- Item name for pseudoephedrine pills
Config.CrushedPillsItem = 'crushed_pseudo' -- Item name for crushed pseudoephedrine pills
-- GAS MASK SETTINGS --
Config.GasMaskItem = 'gasmask' -- Item name for gas mask
Config.GasMaskMale = 175 -- Number for gas mask (in clothing menus)
Config.GasMaskFemale = 46 -- Number for gas mask (in clothing menus)
-- METH REWARD SETTINGS --
Config.UseMethMetadata = true
-- If you want to use metadata for meth
-- you will recieve item with quality rating.
-- ONLY for use with metadata inventories
-- Settings for WITHOUT metadata --
Config.MethItem = 'meth' -- Item name for meth lab (Amount is based on final quality rating!)
-- Settings for WITH metadata --
Config.MethMetadataAmount = math.random(10, 20)
Config.MethMetadataItem = 'meth' -- Item name for meth reward (with metadata)
Config.CancelAnimationWithMenu = true
-- For those who dont have it built into their hands-up or emote script
---------------------------------------------------------------------------------------------
-- Advanced Settings / Custom Functions - you can edit these if you know what you're doing. -
---------------------------------------------------------------------------------------------
openWardrobe = function()
TriggerEvent("qb-clothing:client:openOutfitMenu") -- QB CLOTHING
--TriggerEvent('esx_skin:openSaveableMenu') -- ESX SKIN
-- exports['fivem-appearance']:startPlayerCustomization() -- FIVEM APPEARANCE
-- TriggerEvent('illenium-appearance:client:openOutfitMenu') -- ILLENIUM APPEARANCE
-- exports['fivem-appearance']:openWardrobe() -- WASABI FIVEM APPEARANCE
-- exports.renzu_clothes:OpenClotheInventory() -- RENZU CLOTHES
end
-- Open wardrobe function, you can uncomment the one you need or edit this to your own wardrobe script.
canCook = function()
if not Framework.HasJob('police', Framework.Player) then
return true
else
Framework.Notify('Respect the law!', 'error')
return false
end
end
-- Editable CLIENT SIDE function if you want to add any additional checks..
callTheFuzz = function()
exports['ps-dispatch']:SuspiciousActivity()
end
-- Editable CLIENT SIDE function that will allow you to change dispatch system.
useSink = function()
-- add any additional things here
-- for example, if you want the sink to wash off GSR
end
useBed = function()
-- add any additional things here
-- for example, if you want to relieve stress while relaxing
end
onExplosion = function(ped, coords, prop, propCoords)
-- add any additional things here
-- for example, if you want to alert EMS or do something else
end
onFireStarted = function(fire, coords)
-- add any additional things here
-- for example, if you want to alert Fire Service or do something else
end
onGasLeak = function(coords)
-- add any additional things here
-- for example, if you want to alert EMS or do something else
end
Config.CustomRandomEvents = false
-- If set to true, the script will occasionally use one of these instead of pre-made random events
customRandomEvent1 = function()
print('Custom Random Event 1 Triggered')
end
customRandomEvent2 = function()
print('Custom Random Event 2 Triggered')
end
customRandomEvent3 = function()
print('Custom Random Event 3 Triggered')
end
customRandomEvent4 = function()
print('Custom Random Event 4 Triggered')
end
-- METH EFFECTS (WITHOUT METADATA)--
local overDose = 0
methEffects = function() -- DO NOT EDIT THIS LINE
-- Effects for meth, you can edit these if you want to change the effects.
local dict = "switch@trevor@trev_smoking_meth"
local anim = "trev_smoking_meth_loop"
local methQuality = math.random(10, 100)
print(methQuality)
RequestAnimDict(dict)
while not HasAnimDictLoaded(dict) do
print('waiting for anim dict')
Wait(100)
end
TaskPlayAnim(PlayerPedId(), dict, anim, 8.0, 8.0, -1, 49, 0, false, false, false)
Wait(7000)
ClearPedTasks(PlayerPedId())
local duration = methQuality
if duration > 60 then duration = 60 end
if duration < 15 then duration = 15 end
local time = (duration * 1000) / 3
if overDose > 3 then
local hp = GetEntityHealth(PlayerPedId())
local newHp = hp - math.random(50, 150)
SetEntityHealth(PlayerPedId(), newHp)
Framework.Notify('You\'re overdosing!', 'error')
StartScreenEffect("DrugsTrevorClownsFightIn", 3.0, 0)
Wait(3000)
StartScreenEffect("DrugsTrevorClownsFight", 3.0, 0)
SetPedToRagdoll(PlayerPedId(), 10000, 25000, 0, 0, 0, 0)
Wait(25000)
StartScreenEffect("DrugsTrevorClownsFightOut", 3.0, 0)
StopScreenEffect("DrugsTrevorClownsFight")
StopScreenEffect("DrugsTrevorClownsFightIn")
StopScreenEffect("DrugsTrevorClownsFightOut")
overDose = 0
end
if methQuality < 95 then overDose = overDose + 1 end
if methQuality <= 20 then
overDose = overDose + 1
local hp = GetEntityHealth(PlayerPedId())
local newHp = hp - 20
SetEntityHealth(PlayerPedId(), newHp)
RestorePlayerStamina(PlayerId(), 1.0)
SetRunSprintMultiplierForPlayer(PlayerId(), 1.10)
SetSwimMultiplierForPlayer(PlayerId(), 1.10)
elseif methQuality > 20 and methQuality <= 80 then
RestorePlayerStamina(PlayerId(), 1.0)
SetRunSprintMultiplierForPlayer(PlayerId(), 1.20)
SetSwimMultiplierForPlayer(PlayerId(), 1.20)
else
RestorePlayerStamina(PlayerId(), 1.0)
SetRunSprintMultiplierForPlayer(PlayerId(), 1.49)
SetSwimMultiplierForPlayer(PlayerId(), 1.49)
end
Wait(time)
RestorePlayerStamina(PlayerId(), 1.0)
Wait(time)
RestorePlayerStamina(PlayerId(), 1.0)
Wait(time)
SetRunSprintMultiplierForPlayer(PlayerId(), 1.0)
SetSwimMultiplierForPlayer(PlayerId(), 1.0)
SetTimeout(120000, function()
overDose = 0
end)
end
-- METH EFFECTS (WITH METADATA)--
methEffectsMetadata = function(methQuality) -- DO NOT EDIT THIS LINE
-- Effects for meth, you can edit these if you want to change the effects.
local dict = "switch@trevor@trev_smoking_meth"
local anim = "trev_smoking_meth_loop"
methQuality = tonumber(methQuality)
if not methQuality then methQuality = math.random(15, 50) end
lib.requestAnimDict(dict)
TaskPlayAnim(PlayerPedId(), dict, anim, 8.0, 8.0, -1, 49, 0, false, false, false)
Wait(7000)
ClearPedTasks(PlayerPedId())
local duration = methQuality
if duration > 60 then duration = 60 end
if duration < 15 then duration = 15 end
local time = (duration * 1000) / 3
if overDose > 3 then
local hp = GetEntityHealth(PlayerPedId())
local newHp = hp - math.random(50, 150)
SetEntityHealth(PlayerPedId(), newHp)
Framework.Notify('You\'re overdosing!', 'error')
StartScreenEffect("DrugsTrevorClownsFightIn", 3.0, 0)
Wait(3000)
StartScreenEffect("DrugsTrevorClownsFight", 3.0, 0)
SetPedToRagdoll(PlayerPedId(), 10000, 25000, 0, 0, 0, 0)
Wait(25000)
StartScreenEffect("DrugsTrevorClownsFightOut", 3.0, 0)
StopScreenEffect("DrugsTrevorClownsFight")
StopScreenEffect("DrugsTrevorClownsFightIn")
StopScreenEffect("DrugsTrevorClownsFightOut")
overDose = 0
end
if methQuality < 95 then overDose = overDose + 1 end
if methQuality <= 20 then
overDose = overDose + 1
local hp = GetEntityHealth(PlayerPedId())
local newHp = hp - 20
SetEntityHealth(PlayerPedId(), newHp)
SetRunSprintMultiplierForPlayer(PlayerId(), 1.10)
SetSwimMultiplierForPlayer(PlayerId(), 1.10)
elseif methQuality > 20 and methQuality <= 80 then
SetRunSprintMultiplierForPlayer(PlayerId(), 1.20)
SetSwimMultiplierForPlayer(PlayerId(), 1.20)
else
SetRunSprintMultiplierForPlayer(PlayerId(), 1.49)
SetSwimMultiplierForPlayer(PlayerId(), 1.49)
end
Wait(time)
RestorePlayerStamina(PlayerId(), 1.0)
Wait(time)
RestorePlayerStamina(PlayerId(), 1.0)
Wait(time)
SetRunSprintMultiplierForPlayer(PlayerId(), 1.0)
SetSwimMultiplierForPlayer(PlayerId(), 1.0)
SetTimeout(120000, function()
overDose = 0
end)
end
Config.Vehicles = {
[-800979823] = { -- vehicle hash
modelname = 'envimethvan', -- model name
door = {offset = vector3(1.15, -1.65, 0.9), id = 5, boneIndex = 5},
cooking = {offset = vector3(-0.7,-2.8,1.0 ), id = 6},
equipment = {offset = vector3(0.6,-2.9,1.0 ), id = 7},
equipment2 = {offset = vector3(0.6,-4.3,1.0 ), id = 8},
sitOffsets = {
{offset = vector3(0.7, -4.9, 0.8), pitch = -15.0, heading = 0.0, dict = "amb@code_human_in_car_idles@van@ds@idle_a", anim = "idle_a"},
{offset = vector3(0.7, -3.7, 0.8), pitch = -15.0, heading = 180.0, dict = "amb@code_human_in_car_idles@van@ds@idle_a", anim = "idle_a"},
{offset = vector3(-0.75, -4.3, 0.75),pitch = -25.5, heading = -90.0, dict = "amb@code_human_in_car_idles@generic@ps@idle_e", anim = "idle_m"},
},
bedOffsets = {
{offset = vector3(0.0, -1.15, 1.55),pitch = 0.0, heading = 90.0, dict = 'savem_default@', anim = 'm_sleep_r_loop'},
},
sinkOffsets = {
{offset = vector3(-0.7, -3.45, 1.00)},
},
wardrobeOffsets = {
{offset = vector3(-0.3, -5.15, 1.55)},
},
storageOffsets = {
{offset = vector3(0.0, -1.15, 0.80)},
},
cookingOffsets = {
{offset = vector3(-0.7, -3.00, 2.00)},
},
},
[2140716337] = { -- vehicle hash
modelname = 'cararv', -- model name
door = {offset = vector3(1.15, -1.65, 0.9), id = 5, boneIndex = 5},
cooking = {offset = vector3(-0.7,-2.8,1.0 ), id = 6},
equipment = {offset = vector3(0.6,-2.9,1.0 ), id = 7},
equipment2 = {offset = vector3(0.6,-4.3,1.0 ), id = 8},
sitOffsets = {
{offset = vector3(0.7, -4.9, 0.8), pitch = -15.0, heading = 0.0, dict = "amb@code_human_in_car_idles@van@ds@idle_a", anim = "idle_a"},
{offset = vector3(0.7, -3.7, 0.8), pitch = -15.0, heading = 180.0, dict = "amb@code_human_in_car_idles@van@ds@idle_a", anim = "idle_a"},
{offset = vector3(-0.75, -4.3, 0.75),pitch = -25.5, heading = -90.0, dict = "amb@code_human_in_car_idles@generic@ps@idle_e", anim = "idle_m"},
},
bedOffsets = {
{offset = vector3(0.0, -1.15, 1.55),pitch = 0.0, heading = 90.0, dict = 'savem_default@', anim = 'm_sleep_r_loop'},
},
sinkOffsets = {
{offset = vector3(-0.7, -3.45, 1.00)},
},
wardrobeOffsets = {
{offset = vector3(-0.3, -5.15, 1.55)},
},
storageOffsets = {
{offset = vector3(0.0, -1.15, 0.80)},
},
cookingOffsets = {
{offset = vector3(-0.7, -3.00, 2.00)},
},
},
}
-- LANGUAGE SETTINGS --
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!",
-- NEW RANDOM EVENTS FOR 1.5.0 --
ContaminationRisk = 'Contamination Risk!',
ContaminationContent = 'You notice impurities forming in the mixture. How do you want to address this?',
FilterMixture = 'Filter the mixture',
AddStabilizer = 'Add chemical stabilizer',
MixtureFiltered = "You carefully filtered out the impurities, improving quality!",
StabilizerAdded = "The stabilizer reduced the impurities but affected the overall chemistry.",
CondensationBuildUp = 'Condensation Build-up!',
CondensationContent = 'Moisture is building up on the equipment. This could affect the electrical components or the chemical reaction.',
WipeEquipment = 'Wipe down equipment',
IncreaseHeat = 'Increase heat to evaporate moisture',
EquipmentWiped = "You carefully wiped down the equipment, preventing potential issues.",
HeatIncreased = "The increased heat evaporated the moisture but made the reaction more volatile!",
EarlyCrystallization = 'Early Crystallization!',
CrystallizationContent = 'The product is starting to crystallize earlier than expected. What do you want to do?',
DissolveBack = 'Dissolve back into solution',
HarvestEarly = 'Harvest a portion early',
CrystalsRedissolved = "You dissolved the early crystals back into the solution.",
PartialHarvest = "You harvested some product early. This has effected the quality and could potentially decrease the final yield.",
}
Last updated