rytrak.fr Documentation
  • 🛡️FiveM Assets Escrow
    • You lack the required entitlement
    • Failed to verify protected resource
    • Error parsing script / Failed to load script
  • ❓Store FAQ
    • Do you accept orders to create a custom script
    • Do you give decrypted scripts
    • What payment methods are accepted for the purchase of your scripts?
    • Do you offer discounts or special offers on your scripts?
    • Can I modify or customize your scripts to meet my needs
    • Are your scripts compatible with frameworks
    • Do you provide development assistance?
  • FiveM Scripts
    • 🚒Firefighter SCBA System
      • General Configuration
      • Adapt your EUP
      • General Exports
      • General Events
      • ❓FAQ
        • No such export IsFireNearby in resource SmartFires
      • Test it now
    • 👮‍♂️Advanced Police Grab Ped
      • General Configuration
      • General Exports
      • General Events
      • Compatibility with esx_policejob
      • Test it now
    • 🚿Advanced Pepper Spray
      • General Configuration
      • General Exports
      • Anticheat
      • Test it now
    • 📣Advanced Megaphone System
      • General Configuration
      • General Exports
      • Compatibility with pma-voice
      • Compatibility with mumble-voip
      • Compatibility with saltychat
      • ❓FAQ
        • I can't hear my voice through the megaphone
      • Test it now
    • 🚁Advanced Helicopter Bucket
      • General Configuration
      • Adapt our script with ToxicFire
      • General Exports
      • 🔐Test it now
    • 🔗Advanced Remote Restraint
      • General Configuration
      • General Exports
      • Test it now
    • 🚗Advanced Extrication System
      • General Configuration
      • General Exports
      • Adapt a vehicle to the roof system
      • List of vehicles compatible with the roof system
      • 🔐Test it now
    • 🔗Advanced Handcuffs System
      • General Configuration
      • General Exports
      • Make ESX compatible
      • Make QBCore compatible
      • Make OX-Inventory compatible
      • 🔐Test it now
    • ✈️Advanced Aerial Firefighting
      • General Configuration
      • Adapt our script with ToxicFire
      • General Exports
      • 🔐Test it now
    • 💣Advanced Tactical Gas System
      • General Configuration
      • Test it now
  • RedM Scripts
    • 🤠Advanced Sheriff Grab Ped
      • General Configuration
      • General Exports
  • Framework compatibility
    • Add a custom weapon on ESX
    • Add a custom weapon on QBCore
    • Add a custom weapon on OX Inventory
  • 🚀Test our resources for free with Zap-Hosting
Powered by GitBook
On this page
  • 1. General Configuration
  • 2. Framework Compatibility
  • 3. Inventory Management
  • 4. Recharge System
  • 5. Player Control Settings
  • 6. Weapon Settings
  • 7. Pepper Spray Configuration
  • 8. Decontamination Spray
  • 9. Progress Bar Design
  • 7. Key Bindings
  • 8. Language Library
  1. FiveM Scripts
  2. Advanced Pepper Spray

General Configuration

PreviousAdvanced Pepper SprayNextGeneral Exports

Last updated 8 days ago

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.

Config.AutoRemoveEmptyItems = {
    enabled = false,
    framework = {
        ESX = false,
        QBCore = false,
        OXInventory = false
    }
}

4. Recharge System

Recharge Locations Defines coordinates where players can refill their sprays.

Config.RechargeLocations = {
    vector3(-323.72, -1465.74, 30.55),
    vector3(-313.63, -1461.49, 30.54)
}
Config.RechargeRadius = 3.0 -- Radius around the recharge point (in meters)

5. Player Control Settings

Disable certain actions when affected by gas.

Config.DisableControl = {
    Sprint = true,
    EnterVehicle = true,
    Fight = true
}

6. Weapon Settings

Weapon Display Names Names displayed in the weapon wheel.

Config.WeaponWheelName = {
    pepperspray = 'Pepper Spray',
    antidote = 'Antidote'
}

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.

🚿
ESX Guide
QBCore Guide
OX Inventory Guide