Configuration
All settings live in config/config.lua. The file is outside Asset Escrow — fully editable.
Config = {}
Config.Locale = 'en' -- 14 languages available
Config.Debug = false -- F8 console logs
Config.OpenKey = 'F7' -- Default keybind (rebindable in pause menu)
Config.OpenCommand = 'audiomixer' -- Chat command
Config.KVPPrefix = 'hz_amix_v2_' -- Storage prefix (don't change after release)
Config.DefaultVolume = 100 -- 0-100, 100 = full volume (1% precision)
Config.Categories = {
weapons = true,
vehicles = true,
ambience = true,
weather = true,
speech = true,
peds = true,
scripted = true,
music = true,
radio = true,
}
Settings Reference
Config.Locale
UI language. Valid values :
en fr de es it pt nl pl ru tr ja ko zh ar
Drop a new file in locales/<code>.lua to add custom translations. Use any existing locale as a template.
Config.OpenKey
Default keybind for opening the mixer. Players can rebind it in the FiveM pause menu (Settings → Keybinds). Valid values follow FiveM RegisterKeyMapping format — common: F1–F12, letters, numpad, etc.
Config.OpenCommand
Chat command alias. With default audiomixer, players can type /audiomixer to open the mixer.
Config.KVPPrefix
Prefix of the keys each player's volumes are saved under (one client KVP key per channel: prefix + channel ID). Changing it makes every player start again from Config.DefaultVolume, so leave it as it is once players have saved their settings.
Config.DefaultVolume
Volume applied to all categories on first connection (when no saved value exists). Range 0–100 (1% precision). It is also the value the Reset key (R) and the resetAll export go back to.
100= full volume — recommended0= muted on first launch (not recommended unless you want a silent default)
Config.Categories
Set any entry to false to hide that category from the mixer UI. The slider won't appear, the audio scene patch for it won't be applied, and the exports skip it (setVolume returns false).
Example — hide the radio slider :
Config.Categories = {
weapons = true,
vehicles = true,
ambience = true,
weather = true,
speech = true,
peds = true,
scripted = true,
music = true,
radio = false, -- hidden
}
Config.Debug
Enables debug prints in F8 client console :
[HZ-AudioMixer] Scene active
Useful for troubleshooting. Leave false in production.
Customizing the UI
The mixer panel is built on the hz_lib UI kit, like the other HZ screens. The html/ files are outside Asset Escrow: index.html (structure), style.css (panel layout) and app.js (rows, groups, keyboard).
Colours and fonts
There is no colour or font to set in this resource. The panel uses your hz_lib theme: change the accent, surfaces and fonts in /hzpanel (Appearance tab), see the hz_lib admin panel. Every HZ screen follows the change.
Where to change what
| What | Where |
|---|---|
| Texts: title, group names, channel names and descriptions, key hints, reset question | locales/<code>.lua (ui_* and cat_* keys) |
| Hide a channel | Config.Categories |
| Groups and channel order | GROUPS in html/app.js |
Arrow key step (5%, Shift for 1%) | STEP in html/app.js |
| Channel icons | ICONS in html/app.js (inline SVG) |
| Panel width and padding, dark shade behind the panel | .amx-panel and .amx-shade in html/style.css |
hz-* classes come from the hz_lib kit and are shared by every HZ screen. Restyle the amx-* classes in style.css rather than the kit's.Layout & sections
Categories are grouped into 4 logical sections (Action, Environment, People, Audio). Edit the GROUPS array at the top of html/app.js :
const GROUPS = [
{ key: 'sectionAction', fallback: 'Action', ids: ['weapons', 'vehicles'] },
{ key: 'sectionEnv', fallback: 'Environment', ids: ['ambience', 'weather'] },
{ key: 'sectionPeople', fallback: 'People', ids: ['speech', 'peds'] },
{ key: 'sectionAudio', fallback: 'Audio', ids: ['scripted', 'music', 'radio'] },
];
Add/remove/reorder freely. A channel that is in no group is not shown. The four section labels come from the locale file under the ui_section_* keys; a group you add shows its fallback text.
Adding a Custom Language
- Copy
locales/en.lua→locales/<your_code>.lua - Translate the values (keys must stay the same)
- Set
Config.Locale = '<your_code>' - Restart resource
-- locales/myloc.lua
return {
['ui_title'] = 'Mon Mixeur',
['ui_section_action'] = 'Action',
-- ... (see en.lua for full list)
['cat_weapons'] = 'Armes',
['cat_weapons_desc'] = 'Armes à feu, explosions',
-- ...
}
Next Step
- Exports & Events — integrate the mixer into your own pause menu / NUI
- FAQ
