Configuration
All options live in config.lua at the root of the resource. It is loaded as a shared script, so the server reads it too (the stress relay uses Config.DisableStress, Config.WhitelistedJobs and the notification strings from locales/).
General
| Key | Type | Default | What it does |
|---|---|---|---|
Config.OpenMenu | string | 'I' | Default key for the settings menu. Registered with RegisterKeyMapping, so each player can rebind it in FiveM settings. The /hudmenu command works regardless |
Config.UseMPH | boolean | true | Speed readout in MPH. false switches to KM/H. The stress speed thresholds use the same unit |
Config.ShowCompass | boolean | true | Loads client/compass.lua. false skips the whole compass and street-name logic |
Config.DisableStress | boolean | false | true disables stress gain, the screen effects and the server relay. Only relevant on QBCore and QBox; ESX has no stress |
Status bars
| Key | Type | Default | What it does |
|---|---|---|---|
Config.StatusTimeout | number (ms) | 6000 | How long the hunger, thirst and stress bars stay visible after a change (hunger or thirst going down, stress going up). Outside that window they are hidden, unless hunger or thirst is at 30 or lower, or stress at 75 or higher, which keeps the bar on screen |
Config.ShowStatusAlways | boolean | false | true shows the hunger, thirst and stress bars permanently, ignoring the timeout and the thresholds |
Config.ShowFullHealthInVehicle | boolean | false | true keeps the health bar on screen inside vehicles. On foot the health bar is always visible |
Config.VehicleHealthTimeout | number (ms) | 6000 | Inside a vehicle, how long the health bar stays visible after the player loses health |
Config.VehicleHealthLow | number | 50 | Health value at or below which the bar stays visible inside a vehicle. The bar also stays while the player is dead |
The bar reacts to losing health, not to being below 100%. With qb-ambulancejob health regeneration is off, so "below full" would keep the bar on screen almost all the time.
Vehicle column
| Key | Type | Default | What it does |
|---|---|---|---|
Config.ShowZone | boolean | true | Zone pill directly above the minimap while in a vehicle. false removes the element and stops calling GetNameOfZone |
Config.ShowNavigation | boolean | true | Navigation pill (instruction, distance, manoeuvre icon) while a waypoint is set. false removes the element and stops calling GenerateDirectionsToCoord |
Config.Locale | string | 'en' | Language of the whole resource: navigation, notifications, the settings menu and the key-binding label. Read on the client and on the server. Must match a file in locales/; anything else falls back to English |
Config.NavUnits | string | 'imperial' | Distance units on the navigation pill. 'imperial' shows feet (rounded to 10 ft) up to 1000 ft and miles with one decimal above that. 'metric' shows metres up to 1000 m and kilometres with one decimal above that. Any other value is treated as imperial |
Every visible string lives in locales/<code>.lua — one file per language, fifty-three flat keys each, loaded by the locales/*.lua glob in fxmanifest.lua. Twelve languages ship with the resource.
Locales['en'] = {
['nav_left'] = 'Turn Left',
['low_fuel'] = 'Low fuel!',
['menu_title'] = 'HUD settings',
['section_map'] = 'Map',
['option_isOutMapChecked'] = 'Show minimap outside vehicles',
-- …
}
See Localization for the full key list, the fallback rules and how to add a language.
Weapon HUD
| Key | Type | Default | What it does |
|---|---|---|---|
Config.CustomWeaponHud | boolean | true | Enables client/weapon.lua: the ammo and icon block in the top-right corner, plus hiding of the native weapon component (HUD component 2) every frame. false returns the game's own counter |
Config.WeaponHudHidden | table of hashes | weapon_unarmed | Weapon hashes for which the block is hidden. Written with Lua backtick hashes |
Config.WeaponIcons | table of strings | 101 names | Weapons that have an icon in html/weapons/<name>.png. A weapon not on the list still shows its ammo, just without an icon. To add a custom weapon append its spawn name and drop a PNG with the same name into html/weapons |
Stress system (QBCore and QBox)
These tables are inherited from qb-hud and behave the same way.
| Key | Default | What it does |
|---|---|---|
Config.StressChance | 0.1 | Chance (0 to 1) that a shot adds stress. Checked every frame while the player is shooting |
Config.MinimumStress | 50 | Stress level from which the blur effect starts |
Config.MinimumSpeed | 100 | Speed (in the unit set by Config.UseMPH) from which driving adds stress with the seatbelt on |
Config.MinimumSpeedUnbuckled | 50 | Same threshold without a seatbelt. Motorcycles (vehicle class 8) always use Config.MinimumSpeed |
Config.VehClassStress | classes 0 to 12 on, 13 to 21 off | Which vehicle classes cause driving stress, keyed by the class number as a string. Class 17 (service) has no entry, which counts as off |
Config.WhitelistedVehicles | {} | Model hashes that never cause driving stress |
Config.WhitelistedWeaponStress | petrol can, hazard can, fire extinguisher | Weapons whose "shots" never add stress |
Config.WhitelistedWeaponArmed | 35 weapons | Weapons that do not show the "armed" chip next to the status bars: melee weapons, throwables, tools and cans. This table is used on every framework |
Config.WhitelistedJobs | leo, ambulance | Players whose job name or job type matches never gain stress. Checked on the server |
Config.Intensity.blur | 5 bands | Blur duration in ms for the stress ranges 50–60, 60–70, 70–80, 80–90 and 90–100 (1500 to 3000 ms) |
Config.EffectInterval | 5 bands | Pause between effects for the same ranges, randomised once at load between 50–60 s (lowest band) and 15–20 s (highest band) |
Settings menu defaults
Config.Menu holds the default state of every switch in the HUD Menu. Once a player changes anything, the whole table is saved to the client KVP gta6_hud_settings, and the config defaults are only used again after "Restore defaults".
Config.Menu = {
isOutMapChecked = false,
isOutCompassChecked = false,
isCompassFollowChecked = true,
isOpenMenuSoundsChecked = true,
isResetSoundsChecked = true,
isListSoundsChecked = true,
isLowFuelChecked = true,
isCinematicNotifChecked = true,
isDynamicHealthChecked = true,
isDynamicArmorChecked = true,
isDynamicHungerChecked = true,
isDynamicThirstChecked = true,
isDynamicStressChecked = true,
isDynamicOxygenChecked = true,
isChangeFPSChecked = true,
isHideMapChecked = false,
isDynamicEngineChecked = true,
isDynamicNitroChecked = true,
isChangeCompassFPSChecked = true,
isCompassShowChecked = true,
isShowStreetsChecked = true,
isPointerShowChecked = true,
isDegreesShowChecked = true,
isCinematicModeChecked = false,
}
Notification texts
The strings the HUD sends to the notification function live in locales/<code>.lua. The server reads the same file for the two stress messages.
| Key | When it is shown |
|---|---|
hud_restart | Start of /resethud or the menu's Restart button (type error) |
hud_start | End of the restart sequence (type success) |
cinematic_on | Cinematic mode switched on (only if the "cinematic notifications" switch is on) |
cinematic_off | Cinematic mode switched off (type error) |
low_fuel | Fuel at 20% or lower, at most once per minute (type error) |
stress_gain | Sent by the server when stress goes up (type error, 1500 ms) |
stress_removed | Sent by the server when stress goes down |
HUD.Notify sends to gta6_notify whenever that resource is started, on every framework. Only without it does the HUD fall back to the framework's own notify function.