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.Electric = false
Config.Duration = 8000
Config.VisualEffectDuration = 10000
Config.Cooldown = 5000
Config.OnlyVictim = false
Config.Key = { key = "F1", register_mapping = false,}
Config.Degats = { default = 1.0, electric = 1.05,}
Config.Particle = { PedBone = 24818, fxName = "des_tv_smash", effectName = "ent_sht_electrical_box_sp", scale = 1.2,}
Config.SyncDistance = 5
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"end
if 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"end
if Config.Debug then print("[DEBUG] Config.SoundSystem: " .. Config.SoundSystem)end
Config.Sound = { url = "", volume = 1,}
-
Debug: Enable debug mode (true/false). If true, debug messages will be shown in the console.
-
Locale: Script language (e.g., “fr”, “en”, “de”, “es”, “ru”).
-
Electric: If true, electricity is always active on the brass knuckles.
-
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.
-
OnlyVictim: If true, only the player hit by the brass knuckles will experience the visual effects.
-
Key: Key configuration to toggle electricity on/off (default F1).
key
: Key to use (e.g., “F1”, “E”, “G”).register_mapping
: If true, registers the key in FiveM’s control settings.
-
Degats: Damage multipliers.
default
: Damage multiplier without electricity.electric
: Damage multiplier when electricity is active.
-
Particle: Particle effects configuration.
PedBone
: Character bone where the effect will attach (List of bones here).fxName
: Name of the particle effect (must be loaded in the game).effectName
: Name of the specific effect to use.scale
: Scale of the particle effect.
-
SyncDistance: Distance (in meters) to synchronize visual effects with other players.
-
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”).url
: URL of the audio file to play (must be a direct link to a compatible audio file or a YouTube URL).volume
: Volume of the sound (value between 0.0 and 1.0).
- After each modification of the configuration file, restart the script or the server to apply changes.
- If a parameter is not recognized, verify that it is spelled correctly and placed in the correct section of the file.