Settings
ControlPanel V3 has two layers of settings: server-wide defaults defined in the config file and per-player preferences that individual players can change through the in-game settings panel.
Server-Wide Settings
These settings are defined in shared/config.lua under Config.Settings and apply as defaults for all players on the server.
Config.Settings = {
switchWithHornKey = true,
switchAmbulanceWithoutHorn = true,
defaultLanguage = "NL",
stopSirenOutsideVeh = false,
toggleButtonSoundEnabled = true,
toggleIndicatorSoundEnabled = true,
toggleButtonSoundSrc = "button",
beaconAnimationEnabled = true,
muteHornOnSirenSwitchPresets = {
"^ambulance",
"^spooky$",
"^asimex$",
"^mug$",
"^motor$",
"^micu$",
"^vama$"
},
excludeFromHornKeySwitchPresets = {
"^bw",
"^crashtender$",
"^EQ2B$"
}
}
Setting Reference
| Setting | Type | Default | Description |
|---|---|---|---|
switchWithHornKey | boolean | true | Enables switching between siren tones by quickly pressing the horn key. Holding the horn key still plays the vehicle horn. Presets listed in excludeFromHornKeySwitchPresets are excluded from this behaviour. |
switchAmbulanceWithoutHorn | boolean | true | Allows configured siren presets to switch tones through the horn key without playing an audible horn sound. The affected presets are configured in muteHornOnSirenSwitchPresets. |
defaultLanguage | string | "NL" | Defines the default language used by the control panel UI. |
stopSirenOutsideVeh | boolean | false | Automatically stops the active siren when the player exits the vehicle. |
toggleButtonSoundEnabled | boolean | true | Enables the click sound played when toggling buttons in the control panel. |
toggleIndicatorSoundEnabled | boolean | true | Enables the sound played when toggling vehicle indicators. |
toggleButtonSoundSrc | string | "button" | Defines the audio source used for control panel button click sounds. |
beaconAnimationEnabled | boolean | true | Enables the hand animation used when toggling supported beacon lights. |
muteHornOnSirenSwitchPresets | table | See config | Defines which siren presets can switch tones through the horn key without playing an audible horn. This list is only used when switchAmbulanceWithoutHorn is enabled. |
excludeFromHornKeySwitchPresets | table | See config | Defines which siren presets are excluded from horn-key siren switching. This list is only used when switchWithHornKey is enabled. |
Siren Preset Matching
The values in muteHornOnSirenSwitchPresets and excludeFromHornKeySwitchPresets are Lua patterns. These patterns are matched against the configured siren preset name.
Pattern Reference
| Pattern | Behaviour |
|---|---|
^name | Matches every preset name that starts with name. |
name$ | Matches every preset name that ends with name. |
^name$ | Matches only the exact preset name name. |
For example:
"^ambulance"
Matches presets such as:
ambulance
ambulance2
ambulance7
The following pattern:
"^spooky$"
Only matches the exact preset name:
spooky
Presets Without an Audible Horn
The following presets switch siren tones through the horn key without playing an audible horn when switchAmbulanceWithoutHorn is enabled:
muteHornOnSirenSwitchPresets = {
"^ambulance",
"^spooky$",
"^asimex$",
"^mug$",
"^motor$",
"^micu$",
"^vama$"
}
| Pattern | Matching presets |
|---|---|
^ambulance | Any preset starting with ambulance, such as ambulance, ambulance2, or ambulance7. |
^spooky$ | Only the exact preset spooky. |
^asimex$ | Only the exact preset asimex. |
^mug$ | Only the exact preset mug. |
^motor$ | Only the exact preset motor. |
^micu$ | Only the exact preset micu. |
^vama$ | Only the exact preset vama. |
muteHornOnSirenSwitchPresets is only applied when switchAmbulanceWithoutHorn is set to true.
Presets Excluded From Horn-Key Switching
The following presets cannot switch siren tones through the horn key when switchWithHornKey is enabled:
excludeFromHornKeySwitchPresets = {
"^bw",
"^crashtender$",
"^EQ2B$"
}
| Pattern | Matching presets |
|---|---|
^bw | Any preset starting with bw, such as bw, bw2, bwbig, or bwsmall. |
^crashtender$ | Only the exact preset crashtender. |
^EQ2B$ | Only the exact preset EQ2B. |
Lua pattern matching is case-sensitive. For example, ^EQ2B$ matches EQ2B, but it does not match eq2b.
Per-Player Settings
Several settings can be overridden by individual players through the in-game settings panel, which can be opened using:
/cp-settings
These preferences are stored locally on the player's machine using FiveM's KVP system and persist across sessions.
Player-Adjustable Settings
| Setting | Description | Stored As |
|---|---|---|
| Button sound | Enables or disables control panel button click sounds. | button_sound KVP |
| Button sound source | Selects which button click sound is used. | button_sound_src KVP |
| Indicator sound | Enables or disables indicator toggle sounds. | indicator_sound KVP |
| Stop siren outside vehicle | Enables or disables automatic siren stopping on exit. | stopSirenOutsideVeh KVP |
| UI theme | Selects the visual theme used by the control panel. | ui_theme KVP |
Per-player settings override the corresponding server defaults. For example, when toggleButtonSoundEnabled is enabled in the server configuration but a player disables button sounds in the settings panel, button sounds will remain disabled for that player.
The following settings are controlled exclusively through the server configuration and cannot be overridden through the player settings panel:
switchWithHornKeyswitchAmbulanceWithoutHorndefaultLanguagebeaconAnimationEnabledmuteHornOnSirenSwitchPresetsexcludeFromHornKeySwitchPresets
How Settings Are Applied
Server configuration
↓
Default settings are sent to the player
↓
Locally stored KVP preferences are loaded
↓
Available KVP preferences override server defaults
↓
Final effective settings are applied
- 1
The resource loads the values from
Config.SettingsThese values act as the default configuration for all players connected to the server.
- 2
The player initializes the control panel UI
When the player joins and the control panel initializes, the script checks for locally stored KVP preferences.
- 3
Supported KVP values override server defaults
When a stored player preference exists for an adjustable setting, that value takes precedence over the corresponding server default for that player.
- 4
Server defaults apply when no override exists
First-time players and players who have not changed a setting use the value defined in
Config.Settings.
Resetting Player Settings
Players can reset their preferences by changing the values manually through the in-game settings panel.
Because these preferences are stored locally through FiveM's KVP system, server administrators cannot directly reset the individual settings of a specific player from the server configuration.
Changing a server default does not necessarily overwrite an existing player preference. When a player already has a locally stored KVP value for a supported setting, that local value continues to take precedence.