Configuration
The script offers several configuration options to adapt to your FiveM server.
You can modify these settings to adjust the features to your needs.
Configuration File
Section titled “Configuration File”- The configuration file is located in the shared folder, named
config.lua
. - Open this file with a text editor (such as Notepad++, Visual Studio Code, or even a simple notepad 😜).
Main Settings
Section titled “Main Settings”Here are the parameters you can customize:
Config = {}
Config.Debug = false
Config.Locale = "en"
Config.Duration = 8000
Config.VisualEffectDuration = 10000
Config.Cooldown = 10000
Config.Degats = 0.01
Config.Animation = { "anim@cover@weapon@reloads@rifle@pdw", "reload_low_left" }
Config.Notify = "default"
if GetResourceState("mythic_notify") == "started" then Config.Notify = "mythic_notify"elseif GetResourceState("k5_notify") == "started" then Config.Notify = "k5_notify"elseif GetResourceState("FL-Notify") == "started" then Config.Notify = "FL-Notify"elseif GetResourceState("dillen-notifications") == "started" then Config.Notify = "dillen-notifications"elseif GetResourceState("noxen_notify") == "started" then Config.Notify = "noxen_notify"elseif GetResourceState("wasabi_notify") == "started" then Config.Notify = "wasabi_notify"endif Config.Debug then print("[DEBUG] Config.Notify: " .. Config.Notify)end
Config.SoundSystem = ""
if GetResourceState("xsound") == "started" then Config.SoundSystem = "xsound"elseif GetResourceState("interact-sound") == "started" then Config.SoundSystem = "interact_sound"elseif GetResourceState("evo_sound") == "started" then Config.SoundSystem = "evo_sound"else Config.SoundSystem = "custom"endif Config.Debug then print("[DEBUG] Config.SoundSystem: " .. Config.SoundSystem)end
Config.Sound = { reload = "", empty = "", volume = 0.1,
-
Debug: Enable debug mode (true/false). If true, debug messages will be displayed in the console.
-
Locale: Script language (e.g., “fr”, “en”, “de”, “es”, “ru”).
-
Duration: Duration (in milliseconds) of the electric effect when activated.
-
VisualEffectDuration: Duration (in milliseconds) of the particle visual effect.
-
Cooldown: Duration (in milliseconds) before the electric effect can be used again.
-
Animation: Animation played when using the electric brass knuckles.
- First element: animation dictionary.
- Second element: animation name.
-
Notify: Notification system to use. The script automatically detects some popular systems (mythic_notify, k5_notify, FL-Notify, dillen-notifications, noxen_notify, wasabi_notify). If none is found, it uses the default system.
-
SoundSystem: Sound system to use. The script automatically detects some popular systems (xsound, interact-sound, evo_sound). If none is found, it uses a custom system.
-
Sound: Custom sound configuration (if
SoundSystem
is set to “custom”).reload
: URL of the audio file to play when reloading (must be a direct link to a compatible audio file or a YouTube URL).empty
: URL of the audio file to play when the magazine is empty (must be a direct link to a compatible audio file or a YouTube URL).volume
: Sound volume (value between 0.0 and 1.0).
- After each modification of the configuration file, restart the script or the server to apply the changes.
- If a parameter is not recognized, check that it is correctly spelled and placed in the appropriate section of the file.