Skip to content

Configuration

The script offers several configuration options to adapt to your FiveM server.
You can modify these parameters to adjust the features according to your needs.

  • The configuration file is located in the shared folder, under the name config.lua.
  • Open this file with a text editor (such as Notepad++, Visual Studio Code or even Notepad 😜).

Here are the parameters you can customize :

Config = {}
Config.Debug = false
Config.AllowedWeapons = {
"WEAPON_DARTRIFLE",
}
Config.EventHasItem = ""
Config.Timeouts = {
Hit = 3000
}
Config.Hit = {
Wait = {
BeforeSound = 100,
BeforeEffect = 100,
BeforeHit = 100,
BeforeFadeOut = 20000,
AfterFadeIn = 7000
},
Duration = {
FadeOut = 1000,
FadeIn = 1000
}
}
Config.MaxDistance = 500.0
  • Debug : Enable debug mode (true/false). If true, debug messages will be displayed in console.

  • AllowedWeapons : Weapon(s) usable for the script

  • EventHasItem : Event that checks the item (must return a “callback” with a boolean), if empty, no ammunition check, infinite fire

  • Timeouts : Timeout before launching the sequence after being hit

  • Hit : Parameters related to the stun effect (ragdoll)

    • Wait : Waiting times before each step of the effect
      • BeforeSound : Time before the sound
      • BeforeEffect : Time before the visual effect
      • BeforeHit : Time before applying the stun effect (ragdoll)
      • BeforeFadeOut : Time before the screen starts fading to black
      • AfterFadeIn : Time after the black screen fade disappears
    • Duration : Duration of fade effects
      • FadeOut : Duration of fade to black
      • FadeIn : Duration of fade from black
  • MaxDistance : Maximum distance for the shot to be effective

  • After each modification to the configuration file, restart the script or server for the changes to take effect.
  • If a parameter is not recognized, check that it is correctly spelled and placed in the correct section of the file.