> For the complete documentation index, see [llms.txt](https://tefox-scripts.gitbook.io/tefox-scripts-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tefox-scripts.gitbook.io/tefox-scripts-docs/tefox-scripts-documentation/tefox_hud/configuration.md). Agents can also search and read this documentation through its [MCP server](https://tefox-scripts.gitbook.io/tefox-scripts-docs/~gitbook/mcp).

# Configuration

All settings are in <mark style="color:$info;">`config.lua`</mark>.

### General

```lua
Config.Locale = 'en'
Config.Framework = 'auto'
Config.CheckUpdates = true
Config.Debug = false
```

| Option         | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Locale`       | HUD language: <mark style="color:$info;">`en`</mark> <mark style="color:$info;">`de`</mark> <mark style="color:$info;">`fr`</mark> <mark style="color:$info;">`es`</mark> <mark style="color:$info;">`pt`</mark> <mark style="color:$info;">`pt-br`</mark> <mark style="color:$info;">`ru`</mark> <mark style="color:$info;">`ar`</mark> <mark style="color:$info;">`tr`</mark> <mark style="color:$info;">`th`</mark> <mark style="color:$info;">`id`</mark> <mark style="color:$info;">`ms`</mark> <mark style="color:$info;">`pl`</mark> <mark style="color:$info;">`ro`</mark> <mark style="color:$info;">`ko`</mark> <mark style="color:$info;">`sr`</mark> <mark style="color:$info;">`tl`</mark> <mark style="color:$info;">`ja`</mark> |
| `Framework`    | <mark style="color:green;">`auto`</mark>, <mark style="color:green;">`qbcore`</mark>, <mark style="color:green;">`qbox`</mark>, <mark style="color:green;">`esx`</mark> or <mark style="color:green;">`standalone`</mark>. Leave on <mark style="color:green;">`auto`</mark> unless you need to force one.                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `CheckUpdates` | Prints a message in the server console when a new version is available.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `Debug`        | Prints framework, voice, fuel and export calls in F8. Keep <mark style="color:$info;">`false`</mark> on a live server.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |

### Server brand

```lua
Config.Brand = {
    Style = 'tile',
    Name = 'Tefox RolePlay',
    Logo = 'img/logo.png',
    ShowOnline = true
}
```

| Option                                          | Description                                                                                                                                                              |
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <mark style="color:orange;">`Style`</mark>      | Default look: <mark style="color:$info;">`tile`</mark>, <mark style="color:$info;">`minimal`</mark> or <mark style="color:$info;">`badge`</mark>. Players can change it. |
| <mark style="color:orange;">`Name`</mark>       | Your server name, shown at the top right.                                                                                                                                |
| <mark style="color:orange;">`Logo`</mark>       | Path to your logo inside the `web` folder.                                                                                                                               |
| <mark style="color:orange;">`ShowOnline`</mark> | Shows the online player count under the name.                                                                                                                            |

### Settings menu

```lua
Config.SettingsCommand = 'hud'
Config.SettingsKey = 'I'
```

Players can rebind the key in **GTA Settings → Key Bindings → FiveM**.

### Welcome screen

```lua
Config.Welcome = {
    Enabled = true,
    Command = 'hudwelcome'
}
```

A welcome screen shows the first time a player opens the settings. `/hudwelcome` shows it again on that player's next opening.

### Cinematic mode

```lua
Config.Cinematic = {
    Enabled = true,
    Command = 'cinematic',
    Key = '',
    BarSize = 0.08
}
```

| Option                                       | Description                                                  |
| -------------------------------------------- | ------------------------------------------------------------ |
| <mark style="color:orange;">`Command`</mark> | Toggles cinematic mode (hides the HUD and shows black bars). |
| <mark style="color:orange;">`Key`</mark>     | Optional default key. Leave empty for no key.                |
| <mark style="color:orange;">`BarSize`</mark> | Height of each black bar, as a fraction of the screen.       |

### Heartbeat

```lua
Config.Heartbeat = {
    Enabled = true,
    Below = 50,
    Volume = 0.6
}
```

A heartbeat plays when health drops below `Below` %, faster as health drops. A heart-stop sound plays on death.

### Units & display

```lua
Config.SpeedUnit = 'kmh'
Config.SpeedoMax = 300
Config.TemperatureUnit = 'C'
Config.AircraftSpeedUnit = 'kts'
Config.AltitudeUnit = 'm'
Config.RefreshRate = 200
```

| Option                                                 | Description                                                                   |
| ------------------------------------------------------ | ----------------------------------------------------------------------------- |
| <mark style="color:yellow;">`SpeedUnit`</mark>         | `kmh` or `mph`. All speed values in this file use this unit.                  |
| <mark style="color:yellow;">`SpeedoMax`</mark>         | Highest value on the car speedometer.                                         |
| <mark style="color:yellow;">`TemperatureUnit`</mark>   | `C` or `F`.                                                                   |
| <mark style="color:yellow;">`AircraftSpeedUnit`</mark> | `kts`, `kmh` or `mph`.                                                        |
| <mark style="color:yellow;">`AltitudeUnit`</mark>      | `m` or `ft`.                                                                  |
| <mark style="color:yellow;">`RefreshRate`</mark>       | How often (ms) the HUD reads game data. Lower is smoother, higher is lighter. |

### Elements

```lua
Config.Elements = {
    health = true,
    armor = true,
    -- ...
    music = true
}
```

Set any element to <mark style="color:$info;">`false`</mark> to remove it for **everyone**. It also disappears from the settings menu, so players can't turn it back on.

### Minimap

```lua
Config.Minimap = {
    Enabled = true,
    Raise = 0.055,
    -- ...
}
```

| Option    | Description                                                                                                      |
| --------- | ---------------------------------------------------------------------------------------------------------------- |
| `Enabled` | Lets the HUD reshape the minimap (circle, square or hidden). Set `false` if another script manages your minimap. |
| `Raise`   | Lifts the minimap from the bottom of the screen.                                                                 |

{% hint style="info" %}
⚠️ The <mark style="color:$info;">`Circle`</mark> and <mark style="color:$info;">`Square`</mark> values are already tuned. Only change them if you know what you are doing.
{% endhint %}

### Seatbelt

```lua
Config.Seatbelt = {
    Enabled = true,
    Mode = 'external',
    Key = 'B',
    EjectSpeed = 45,
    Alarm = {
        Enabled = true,
        Speed = 20,
        Volume = 0.2,
        Sound = 'sounds/seatbelt.ogg',
        Interval = 1500
    }
}
```

| Option           | Description                                                                                                     |
| ---------------- | --------------------------------------------------------------------------------------------------------------- |
| `Mode`           | `external`: display only, for servers with their own seatbelt script. `internal`: the HUD handles the seatbelt. |
| `Key`            | Seatbelt key (internal mode).                                                                                   |
| `EjectSpeed`     | Speed above which players without a seatbelt fly out on a crash (internal mode).                                |
| `Alarm.Speed`    | The chime starts above this speed without a seatbelt.                                                           |
| `Alarm.Sound`    | Custom sound file. Use `''` for the built-in chime.                                                             |
| `Alarm.Interval` | Time between chimes (ms).                                                                                       |

### Cruise control

```lua
Config.Cruise = {
    Enabled = true,
    Key = 'Y',
    MinSpeed = 30
}
```

Locks the current speed. It cancels on brake, handbrake or a crash. Set `Enabled = false` if your server already has a cruise script.

### Music

```lua
Config.Music = {
    Enabled = true,
    RedirectUri = 'http://127.0.0.1:43790/tefox',
    PollInterval = 3000
}
```

Each player connects their own Spotify account from the settings menu. The login stays on their PC and is never sent to the server. Leave `RedirectUri` as it is.

### Radio

```lua
Config.Radio = {
    Enabled = true,
    Stations = {
        { Name = 'Station name', Url = 'https://example.com/stream.mp3', Logo = 'https://example.com/logo.png' },
    }
}
```

Add live radio streams. Only the player who plays a station hears it.

### Turn signals

```lua
Config.Indicators = {
    Enabled = true,
    Left = 'MINUS',
    Right = 'EQUALS',
    Hazard = 'BACK'
}
```

### Weapon

```lua
Config.Weapon = {
    Enabled = true,
    HideGameAmmo = true,
    TaserRecharge = 3000
}
```

| Option          | Description                                           |
| --------------- | ----------------------------------------------------- |
| `HideGameAmmo`  | Hides the default GTA ammo counter.                   |
| `TaserRecharge` | Must match your server's stun gun recharge time (ms). |

### Fuel & voice

```lua
Config.Fuel = 'auto'
Config.Voice = 'auto'
Config.VoiceKey = {
    Show = true,
    Fallback = 'N'
}
```

| Option              | Description                                                         |
| ------------------- | ------------------------------------------------------------------- |
| `Fuel`              | `auto`, `LegacyFuel`, `ox_fuel`, `cdn-fuel`, `ps-fuel` or `native`. |
| `Voice`             | `auto`, `pma-voice` or `saltychat`.                                 |
| `VoiceKey.Show`     | Shows the push-to-talk key next to the voice icon.                  |
| `VoiceKey.Fallback` | Key shown when it can't be detected.                                |

### Stress

```lua
Config.Stress = {
    Enabled = true,
    MaxGainPerCall = 25,
    MaxRelievePerCall = 100,
    WhitelistedJobs = { police = true, ambulance = true },
    Shooting = { Enabled = true, Chance = 0.15, Min = 1, Max = 3 },
    Speeding = {
        Enabled = true,
        Speed = 160,
        Belt   = { Min = 1, Max = 1, Interval = 25000 },
        NoBelt = { Min = 2, Max = 4, Interval = 7000 },
    },
    Effects = true
}
```

| Option                                 | Description                                                 |
| -------------------------------------- | ----------------------------------------------------------- |
| `MaxGainPerCall` / `MaxRelievePerCall` | Safety limit on how much stress one call can add or remove. |
| `WhitelistedJobs`                      | Jobs that never gain stress.                                |
| `Shooting`                             | Chance to gain stress on each shot, and how much.           |
| `Speeding.Speed`                       | Stress starts above this speed.                             |
| `Speeding.Belt` / `NoBelt`             | Stress gain and interval with and without a seatbelt.       |
| `Effects`                              | Screen effects at high stress.                              |

Set <mark style="color:$info;">`Enabled = false`</mark> if your server already has a stress script.

### Player defaults

<mark style="color:$info;">`Config.Defaults`</mark> is what new players start with, and what **Reset to default** restores. Players can change all of it from the settings menu.

| Option           | Values                                                                 |
| ---------------- | ---------------------------------------------------------------------- |
| `carStyle`       | `apex`, `pulse`, `line`, `halo`                                        |
| `airStyle`       | `cockpit`, `glass`                                                     |
| `boatStyle`      | `helm`, `tide`                                                         |
| `boatUnit`       | `kts`, `kmh`, `mph`                                                    |
| `mapShape`       | `circle`, `square`, `hidden`                                           |
| `mapVehicleOnly` | Shows the minimap only in vehicles                                     |
| `locStyle`       | `strip`, `card`, `minimal`                                             |
| `locPos`         | `top`, `map`                                                           |
| `weatherStyle`   | `card`, `bar`                                                          |
| `brandStyle`     | `tile`, `minimal`, `badge`                                             |
| `musicBar`       | Shows the music bar                                                    |
| `musicPos`       | `bottom`, `top`, `left`, `right`                                       |
| `musicSource`    | `spotify`, `radio`                                                     |
| `statusShape`    | `circle`, `hexagon`, `square`, `segment`, `arc`                        |
| `statusLayout`   | `row`, `column`                                                        |
| `infoStyle`      | `row`, `stack`, `card`                                                 |
| `iconStyle`      | `line`, `filled`                                                       |
| `showValues`     | Shows numbers on status icons                                          |
| `scale`          | Overall HUD size (`1.0` = 100%)                                        |
| `accent`         | Main HUD color                                                         |
| `colors`         | Color for each status                                                  |
| `visibility`     | `always` or `auto` (shows only when the value changes) for each status |
