This guide helps you configure your script step by step using the config.lua file. Each section below details the available options to tailor the behavior of gas grenades, effects, and compatibility.
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. Grenade Types Configuration
Each grenade has its own behavior and configuration.
3.1 Tear Gas Grenade
Config.Grenade['tearGas']
weaponModel: Hash name of the weapon.
weaponProp: Prop model shown in-game.
weaponDisplay: Wheel weapon name.
disableControl: Disables sprint, vehicle entry, fight, and jump during exposure.
effects:
timecycle: Visual effects applied.
shakeCamera: Screen shaking intensity and style.
smokeScale: Size of the smoke cloud.
smokeDuration: Duration in milliseconds (e.g., 50000).
smokeParticles: Defines the FX dictionary and particle.
gasMask: Masks that grant immunity (see section 4).
gasMaskItem: The configuration only works if one of the three frameworks is enabled. You must then create the gasMask item in your framework and define it here. If the player then carries this item in their inventory, they will not be affected by the effects.
Compatibility
pepperspray: Enables sync with r_pepperspray.
3.2 Stun Grenade
weaponModel: Hash name of the weapon.
weaponProp: Prop model shown in-game.
weaponDisplay: Wheel weapon name.
disableControl: Disables sprint, vehicle entry, fight, and jump during exposure.
flashDuration: Duration of blinding/stunning effect in milliseconds.
flashScale: Intensity of the flash visual effect
flashSound: Enable or disable flashbang sound effect
flashVolume: Volume of the flashbang sound (0.0 to 1.0)
stunMask: Masks that grant immunity (see section 4).
stunMaskItem: The configuration only works if one of the three frameworks is enabled. You must then create the gasMask item in your framework and define it here. If the player then carries this item in their inventory, they will not be affected by the effects.
3.3 Smoke Grenade
weaponModel: Hash name of the weapon.
weaponProp: Prop model shown in-game.
weaponDisplay: Wheel weapon name.
smokeScale: Size of the smoke cloud.
smokeDuration: Duration in milliseconds (e.g., 50000).
smokeParticles: Defines the FX dictionary and particle.
3. Gas Mask Protection
Prevents gas effects if players are wearing certain masks or accessories.
Config.Grenade['tearGas'].compatibility = {
enabled = false,
resourceName = 'r_pepperspray',
applyEffect = 'pepperspray' -- The pepperspray name in the config.lua file of the Advanced Pepper Spray script.
}
Config.Design = {
ProgressBar = {
color = {52, 152, 219}, -- RGB
text = 'RECOVERY' -- Max 8 characters
}
}
Config.Keys = {
GrabAndDropKey = 289, -- Key to grab and release a person.
GrabAndDropKeyString = '~INPUT_REPLAY_START_STOP_RECORDING_SECONDARY~', -- Key name for display.
TaskEnterKey = 305, -- Key to put a person in the vehicle.
TaskEnterKeyString = '~INPUT_REPLAY_STARTPOINT~' -- Key name for display.
}