This guide will help you configure the script to suit your needs, covering all available options in the config.lua file. Each setting is explained step by step.
1. General Configuration
Language
Set the language used by the script.
Config.Language = 'en' -- Available options: 'en' (English), 'fr' (French).
Use Outdated Version
Enable this option to suppress alert messages when using an older version of the script.
Config.UseOutdatedVersion = false -- Set to true if using an outdated script version.
2. Framework Compatibility
If you're using a framework like ESX, QB, or OX Inventory, enable this setting.
Config.UseFramework = false
When true, the system uses the inventory (e.g., weapon usage) instead of command-based interactions.
Setup instructions for each framework are available on:
3. Inventory Management
Auto Remove Empty Items
Automatically removes empty pepper spray or antidote items from the inventory based on your framework.
Cooldown Delay
Sets the cooldown time between certain actions to prevent spam.
Config.CooldownDelay = 500 -- In milliseconds
7. Pepper Spray Configuration
You can define multiple pepper spray types with their own stats.
Config.PepperSpray = {
['pepperspray'] = {
weaponModel = 'WEAPON_PEPPERSPRAY', -- Weapon model name
sprayQuantity = 500, -- Maximum spray capacity
sprayDescentSpeed = 10, -- How quickly the spray runs out
sprayRange = 4, -- Effective range
sprayDamageMultiplier = 1, -- Affects how quickly the gas effect builds up
gasDescentSpeed = 500, -- How quickly the gas effect fades
coughEnabled = true, -- Enable coughing when the player is affected by the gas.
coughSound = true, -- Enable sound effect when the player coughs. (only if the cough system is enabled)
spitEnabled = true, -- Can the player spit to reduce effects?
spitDescentSpeed = 5, -- Gas reduction per spit
spitTimeout = 10000, -- Delay between spits in ms
rubbingEnabled = true, -- Can the player rub their eyes?
rubbingDescentSpeed = 2.0, -- Gas reduction speed when rubbing
selfDecontamination = true, -- Allow use of decontamination spray
effect = {
timecycle = {
[1] = { name = 'ufo', opacity = 1.0 },
[2] = { name = 'MP_death_grade_blend01', opacity = 0.8 }
},
shakeCamera = {
name = 'DRUNK_SHAKE',
intensity = 3.0
}
},
particle = {
dict = 'core',
particle = 'exp_sht_extinguisher',
particleCoords = vector3(0.10, 0.0, 0.0),
particleRotation = vector3(-80.0, 0.0, -90.0),
particleSize = 0.5
},
gasMask = {
[`mp_m_freemode_01`] = { [1] = {}, [2] = {} },
[`mp_f_freemode_01`] = { [1] = {}, [2] = {} }
}
}
}
8. Decontamination Spray
Config.Decontamination = {
command = 'antidote', -- Command to receive the spray
weaponModel = 'WEAPON_ANTIDOTE', -- Model used for the spray
decontaminationQuantity = 100, -- Max amount available
decontaminationDescent = 10, -- How long the effect takes to go down
decontaminationCooldown = 2000, -- Cooldown between uses
decreaseLevel = 10, -- How much the effect is reduced per use
particle = {
dict = 'scr_bike_business',
particle = 'scr_bike_spraybottle_spray',
particleCoords = vector3(0.30, 0.0, 0.0),
particleRotation = vector3(-80.0, 0.0, -90.0),
particleSize = 1.5
}
}
9. Progress Bar Design
Customize the look of the progress bar when recovering.
Config.Design = {
ProgressBar = {
color = {52, 152, 219}, -- RGB color of the bar
text = 'RECOVERY' -- Max 8 characters, leave empty to hide text
}
}
7. Key Bindings
Spit Key
Set the key used to spit out the gas.
Config.Keys.SpitKey = 47 -- Key to spit the gas (default: G)
Config.Keys.SpitKeyString = '~INPUT_DETONATE~' -- Display name for the spit key
Rubbing Key
Set the key used to rub the eyes and reduce the gas effect.
Config.Keys.RubbingKey = 104 -- Key to rub the eyes (default: H)
Config.Keys.RubbingKeyString = '~INPUT_VEH_SHUFFLE~' -- Display name for the rubbing key
Replace Key
Set the key used to replace your pepper spray or antidote.
Config.Keys.ReplaceKey = 47 -- Key to replace the pepper spray (default: G)
Config.Keys.ReplaceKeyString = '~INPUT_DETONATE~' -- Display name for the replace key
8. Language Library
Edit the text displayed for different actions in multiple languages.