Configuration

Every setting in oxide-hud's config.lua — speed and instrument units, flight warnings, server logo, default layout, editing lock, colours, accent, auto-hide, reserved areas, update intervals, translations and choosing providers.

Every setting lives in oxide-hud/config.lua. Open it in any text editor (Notepad++ or VS Code work well), change the values, and save.

Changes take effect after oxide-hud restarts. Type restart oxide-hud in your server console, or restart the server. Players keep their layouts.

All Settings

SettingTypeDefaultDescription
Config.SpeedUnitstring'mph''mph' or 'kmh'. Unit for land speed and the odometer
Config.Unitstablesee belowUnits for boats and aircraft: speed, altitude, vertical speed and depth
Config.Flighttablesee belowWhen the stall and pull up warnings show in planes
Config.ServerLogo.enabledbooleanfalseShow your server's logo in the top-right corner
Config.ServerLogo.imagestring''The logo: a web address, or a file inside the oxide-hud folder
Config.ServerLogo.heightnumber48Logo height in pixels
Config.DefaultLayoutstring''A share code: the HUD new players start with, and what Reset returns to. Empty uses the HUD's own. See below
Config.LockEditingbooleanfalsetrue turns the editor off and shows everyone the default layout. See below
Config.Colorstablesee belowColour of each status value
Config.IconColorstablesee belowColour of each status value's icon
Config.Theme.accentstring''Your server's accent colour. Empty uses Oxide red. See below
Config.Theme.lockAccentbooleanfalsetrue stops players replacing your accent with their own colours. See below
Config.AutoHidetablesee belowWhen each status value hides itself
Config.EditCommandstring'hud'Chat command that opens the editor, without the /
Config.DefaultGridSizenumber50Editor grid size, in pixels, until a player picks their own
Config.ReservedAreastable{}Screen areas used by other HUD elements, kept free of other resources' panels
Config.Intervalstablesee belowHow often each kind of data is read, in milliseconds

Speed Unit

SettingTypeDefaultDescription
Config.SpeedUnitstring'mph''kmh' shows kilometres per hour and kilometres. Anything else shows miles per hour and miles

The unit applies to every block showing the vehicle's speed or the odometer, the car and bike speedometers (Sweep, Ghost, Instrument, Rail and the classic set), and the MPH text label. Rings, bars and dials showing speed run to 200 mph, or 320 km/h. Boats and aircraft have their own units, below.

Config.SpeedUnit = 'kmh'  -- kilometres per hour

Boat and Aircraft Units

The boat speedometer (Helm) and the aircraft one (Glass), and every block showing boat or aircraft data, use these units. Each player sees the values in your server's units.

SettingTypeDefaultDescription
Config.Units.waterstring'kn'Speed on water: 'kn' (knots), 'mph' or 'kmh'. Also the wind speed in boats
Config.Units.airstring'kn'Airspeed and ground speed: 'kn', 'mph' or 'kmh'. Also the wind speed in aircraft
Config.Units.altitudestring'ft'Altitude and height above ground: 'ft' (feet) or 'm' (metres)
Config.Units.verticalSpeedstring'fpm'Climb and descent: 'fpm' (feet per minute) or 'ms' (metres per second)
Config.Units.depthstring'm'Submarine depth: 'm' or 'ft'
Config.Units = { water = 'kn', air = 'kn', altitude = 'ft', verticalSpeed = 'fpm', depth = 'm' }

A value that is not one of the choices uses the default. Rings, bars and scales run to 400 knots for aircraft (460 mph, 740 km/h), 60 knots on water (70 mph, 110 km/h), 6,000 feet per minute up and down (30 m/s), and 300 metres deep (1,000 feet).

Flight Warnings

Glass shows STALL and PULL UP in planes. GTA does not say when a plane stalls, so the HUD works both out from the plane's speed, angle and height. The defaults are cautious: they show only when the plane is in real trouble.

SettingTypeDefaultDescription
Config.Flight.warningsbooleantruefalse turns both warnings off
Config.Flight.stallSpeednumber50In knots, whatever Config.Units says. Slower than this in the air is a stall
Config.Flight.stallAnglenumber18Degrees between the nose and where the plane is going. More than this, below one and a half times stallSpeed, is also a stall
Config.Flight.minHeightnumber20Metres above the ground. Lower than this, neither warning shows (take-off and landing)
Config.Flight.pullUpSecondsnumber4PULL UP shows when the plane would reach the ground within this many seconds at the rate it is descending
Config.Flight.pullUpHeightnumber120PULL UP shows only below this many metres above the ground, and only with the landing gear raised (planes whose gear does not retract never show it)
Config.Flight = {
    warnings = true,
    stallSpeed = 50,
    stallAngle = 18,
    minHeight = 20,
    pullUpSeconds = 4,
    pullUpHeight = 120,
}

Helicopters never show either warning.

SettingTypeDefaultDescription
Config.ServerLogo.enabledbooleanfalsetrue shows the logo in the top-right corner of every player's screen
Config.ServerLogo.imagestring''A web address starting with https://, or the name of an image file inside the oxide-hud folder, such as 'logo.png'
Config.ServerLogo.heightnumber48How tall the logo is drawn, in pixels. The width follows the image's shape. This is a fixed pixel size, so the logo looks smaller on a higher resolution

The logo sits in the top-right corner. It is not part of a player's HUD: players cannot move it, and other resources' panels keep clear of it.

Using a web address

Config.ServerLogo = {
    enabled = true,
    image = 'https://example.com/images/logo.png',
    height = 48,
}

The address must start with https:// and link straight to the image file (it usually ends in .png, .jpg or .webp), not to a web page that shows it. Use a link that does not expire, such as an image on your own website: images hosted on imgur do not load in FiveM, and Discord attachment links stop working after about a day.

After changing config.lua, type restart oxide-hud in the server console. The logo appears in the top-right corner within a few seconds.

Using an image file

Copy your image (for example logo.png) into the oxide-hud folder, next to config.lua.

Open oxide-hud/fxmanifest.lua and find the files { block. Add your file's name on a new line inside it:

files {
    'locales/*.json',
    'web/dist/**',
    'logo.png',
}

Without this line the server never sends the image to players, and no logo appears.

In config.lua, set:

Config.ServerLogo = {
    enabled = true,
    image = 'logo.png',
    height = 48,
}

Save both files and restart your server.

Updating oxide-hud replaces fxmanifest.lua, so add the 'logo.png', line again after every update, and copy your image back into the new folder.

If the image cannot be loaded, the logo does not appear, and the F8 console shows a line starting [oxide-hud] The server logo could not be loaded from with the address it tried. See Server Logo Does Not Show.

Default Layout

SettingTypeDefaultDescription
Config.DefaultLayoutstring''A share code for a whole HUD. Empty uses Oxide HUD's own default layout

The default layout is the HUD that:

  • every player who has never changed their HUD uses, including players who joined before you set it,
  • Reset in the editor returns to,
  • is listed as Default under Share > My layouts.

A player's HUD is only saved once they change something in the editor. Until then they follow your default, so changing the code changes their HUD too. Once they have changed it, it is their own and a new code no longer replaces it; they can switch to your default with Reset or Share > My layouts > Default, or you can put everyone on your layout with Locking the Editor.

To make one

Join your server and type /hud.

Build the HUD you want new players to have, in both On Foot and In Vehicle. Move the minimap too if you want it somewhere else. If you changed your own colours in the Theme tab, put them back: the code carries them, and every player on your default would get them.

Click Share, then Share code. Choose Whole HUD and turn Positions on.

Click Copy.

Open oxide-hud/config.lua and paste the code between the quotes:

Config.DefaultLayout = 'OXHUD1.eJy...'

The code is one long line. Spaces and line breaks inside the quotes are ignored, so a code that wrapped when you pasted it still works.

Save the file and restart oxide-hud. New players now start on your HUD.

If the code moves the minimap, players who never moved their minimap get its position too.

If the code cannot be read (it was cut short, made by a newer version of Oxide HUD, or is not an Oxide HUD code at all), players get Oxide HUD's own default instead and each player's F8 console shows one line starting [oxide-hud] Config.DefaultLayout cannot be used: with the reason. See The Default Layout Is Not Used.

Locking the Editor

SettingTypeDefaultDescription
Config.LockEditingbooleanfalsetrue turns the HUD editor off for everyone

With editing locked:

  • /hud only shows Editing the HUD is turned off on this server. The editor does not open.
  • Every player sees Config.DefaultLayout, or Oxide HUD's own default layout when that is empty, including its minimap position.
  • Nothing a player saved is changed. Set it back to false and every player gets their own HUD back.
Config.DefaultLayout = 'OXHUD1.eJy...'
Config.LockEditing = true

Restart oxide-hud after changing it. Only true locks the editor.

Status Colours

SettingTypeDefaultDescription
Config.Colors.healthstring'#ef4444'Health (red)
Config.Colors.armorstring'#14b8a6'Armour (teal)
Config.Colors.hungerstring'#f59e0b'Hunger (amber)
Config.Colors.thirststring'#60a5fa'Thirst (blue)
Config.Colors.stressstring'#e771f6'Stress (pink)
Config.Colors.oxygenstring'#bbbbbb'Oxygen (grey)
Config.Colors.staminastring'#bbbbbb'Stamina (grey)
Config.IconColors.healthstring'#fecaca'Health icon
Config.IconColors.armorstring'#99f6e4'Armour icon
Config.IconColors.hungerstring'#fde68a'Hunger icon
Config.IconColors.thirststring'#bfdbfe'Thirst icon
Config.IconColors.stressstring'#ebbbff'Stress icon
Config.IconColors.oxygenstring'#ffffff'Oxygen icon
Config.IconColors.staminastring'#ffffff'Stamina icon

Colours are hex codes, the same kind you use on websites ('#ff0000' is red). They are the Data color of each status value: every status block, in every style and template, uses them unless a colour is picked for it. Config.IconColors colours the icons. A player can still pick their own colour for one block in the editor (Colors in the inspector), or for every block showing that data (Theme > Data colors), and sees their own colour instead.

Config.Colors = {
    health = '#ef4444',
    armor = '#14b8a6',
    hunger = '#f59e0b',
    thirst = '#60a5fa',
    stress = '#e771f6',
    oxygen = '#bbbbbb',
    stamina = '#bbbbbb',
}

-- Lighter tints for the icons
Config.IconColors = {
    health = '#fecaca',
    armor = '#99f6e4',
    hunger = '#fde68a',
    thirst = '#bfdbfe',
    stress = '#ebbbff',
    oxygen = '#ffffff',
    stamina = '#ffffff',
}

Accent Colour

SettingTypeDefaultDescription
Config.Theme.accentstring''One colour as a hex code, such as '#9b2c2c', to match your server's branding. Leave it empty for Oxide red on the HUD, and other resources' own colours on their panels
Config.Theme.lockAccentbooleanfalsetrue keeps your accent on accent-coloured parts even when a player picks another colour. See Locking the Accent

Oxide HUD uses your accent colour for:

  • the editor: its buttons, highlights, the outline around each block and the boxes for other resources' panels;
  • every part of a player's HUD set to Accent. In the templates that is the speed readouts and arcs, the fuel gauges while fuel is not low, the player ID badges and the accent lines of the speedometers.

Without an accent, those parts are Oxide red.

Colours that mean something keep their colour: the status values (set those in Status Colours), warnings such as low fuel, high revs and engine damage, and the seatbelt, lights, voice and money readouts. The Holo speedometer keeps its cyan.

A player can choose their own accent for their own HUD in the editor's Theme tab. It wins over yours unless you lock the accent.

You only set one colour. The HUD works out a lighter shade for text, a darker shade, and whether text drawn on top of the colour should be white or black. A very dark colour is lightened just enough to stay readable on the dark HUD.

Config.Theme = {
    accent = '#9b2c2c',
    lockAccent = false,
}

Restart oxide-hud after changing it. If the value is not a colour, your server console prints a line saying so and the HUD keeps its own colours.

Resources updated for Oxide HUD can use the same colour for their on-screen panels, such as notifications, the progress bar and job HUDs. Each of them has its own setting to keep its own colours instead.

Locking the Accent

Players can choose their own accent in the Theme tab, and pick their own colour for any part of a block (Colors in the inspector). By default their choices win over your accent.

Set lockAccent = true to keep your branding on every player's screen:

Config.Theme = {
    accent = '#9b2c2c',
    lockAccent = true,
}

With the accent locked:

  • every part set to show the accent keeps your accent. A colour a player picked for such a part is ignored, and the editor offers no custom colour for it (No custom color: your server sets the accent.);
  • a player's own accent, and their own colour for speed, fuel and the server ID (the data that uses the accent), are ignored. The Theme tab shows Your server sets the accent color. instead of the accent control;
  • everything else is unchanged. Status values, warnings such as low fuel, cash, voice and every part not set to the accent still show the player's colours;
  • players' choices are kept. Set lockAccent back to false and their colours come back.

lockAccent only works together with an accent. Only true locks it; any other value, or leaving the line out, leaves it unlocked. Restart oxide-hud after changing it.

Auto-Hide

Each status block hides itself while there is nothing worth showing. These numbers decide when, for every status block that still follows your config. Every value runs from 0 to 100.

SettingTypeDefaultThe block shows while...
Config.AutoHide.healthnumber100health is below this. Hidden at full health
Config.AutoHide.armornumber0armour is above this. Hidden with no armour
Config.AutoHide.hungernumber80hunger is below this. Hidden while 80 or more
Config.AutoHide.thirstnumber80thirst is below this. Hidden while 80 or more
Config.AutoHide.stressnumber0stress is above this. Hidden with no stress
Config.AutoHide.oxygennumber100the player is underwater and oxygen is below this
Config.AutoHide.staminanumber5the player is on land and stamina use is above this. Hidden while rested

To make a status value always visible, set a number it can never reach:

Config.AutoHide = {
    health = 101,   -- always show health (full health is 100)
    armor = -1,     -- always show armour, even at 0
    hunger = 101,   -- always show hunger
    thirst = 101,   -- always show thirst
    stress = -1,    -- always show stress, even at 0
    oxygen = 100,   -- oxygen only ever shows underwater
    stamina = 5,
}

These are the starting point. A player can change when any block hides in its Rules (see Rules). A block whose rule they changed keeps their choice; every other block follows your config, including after you change it.

Inside the editor, every block is shown regardless, so players can place them.

Editor

SettingTypeDefaultDescription
Config.EditCommandstring'hud'The chat command that opens the editor, typed without the /. Every player can use it, because each player only changes their own screen. Change it if another script already uses /hud. To turn the editor off, see Locking the Editor
Config.DefaultGridSizenumber50The grid size players start with in the editor, in pixels. Use 10, 20, 25, 50 or 100: those are the sizes the editor's Grid menu offers. Once a player picks a size, they keep their own
Config.DefaultGridSize = 50
Config.EditCommand = 'hud'   -- players type /hud

Reserved Areas

SettingTypeDefaultDescription
Config.ReservedAreastable{}A list of screen areas taken by other HUD elements on your server, such as a chat box or a third-party corner display

Oxide HUD knows where its own blocks, the minimap and the logo are, and places other resources' panels clear of them. It cannot see things drawn by other scripts. List those here, and panels are placed clear of them too.

Each entry has:

FieldTypeDescription
idstringAny name, to help you remember what it is
anchorstringThe corner or edge the area sits against: top-left, top, top-right, left, center, right, bottom-left, bottom or bottom-right
xnumberDistance in from that edge, sideways
ynumberDistance in from that edge, up or down
wnumberWidth of the area
hnumberHeight of the area

All four numbers are in vh: percent of the screen height. 10 is a tenth of the screen height at any resolution. On a 1080p screen, 1 vh is about 11 pixels, so a 400 x 300 pixel chat box is about 37 x 28 vh. A normal widescreen monitor is about 178 vh wide and 100 vh tall.

For the top, bottom and center anchors, x is measured from the middle of the screen (positive is to the right). For left, right and center, y is measured from the middle (positive is down).

Config.ReservedAreas = {
    -- A chat box in the top-left corner, from a chat resource that does not support Oxide HUD
    { id = 'chat', anchor = 'top-left', x = 0, y = 0, w = 60, h = 30 },
    -- A third-party display in the bottom-right corner
    { id = 'corner', anchor = 'bottom-right', x = 2, y = 2, w = 30, h = 20 },
}

What reserved areas do and do not do:

  • They only move other resources' panels. They never move the HUD's own blocks.
  • A panel a player has dragged somewhere in the editor stays where they put it.
  • An entry with a width or height of 0 (or missing) is ignored.

Update Intervals

How often Oxide HUD reads each kind of data, in milliseconds (1000 = one second). Lower numbers make the HUD react faster but do a little more work. Higher numbers are lighter but slower to update. The defaults suit most servers.

SettingTypeDefaultDescription
Config.Intervals.statusnumber200Health, armour, oxygen, stamina and the equipped weapon
Config.Intervals.deathnumber1000Re-checks whether the player is dead or downed, in case a death event was missed
Config.Intervals.vehiclenumber100Speed, RPM, gear, lights, doors and the rest, while in a vehicle
Config.Intervals.fuelnumber1000Fuel level from your fuel resource, while in a vehicle
Config.Intervals.vehicleIdlenumber500On foot: how often the HUD checks whether the player got into a vehicle
Config.Intervals.locationnumber1000Street and area names
Config.Intervals.voicenumber200Voice range, talking and radio
Config.Intervals.nuinumber200How often the screen is redrawn with the new values
Config.Intervals.flightnumber100In a helicopter or plane: how often the flight instruments (speed, altitude, horizon, heading) are redrawn, so the tapes and the horizon move smoothly
Config.Intervals.idlenumber1000Wait between checks while the HUD is not loaded (for example at character select)
Config.Intervals = {
    status = 200,
    death = 1000,
    vehicle = 100,
    fuel = 1000,
    vehicleIdle = 500,
    location = 1000,
    voice = 200,
    nui = 200,
    flight = 100,
    idle = 1000,
}

Do not set any of these to 0.

Translations

Every text in the editor and on the HUD lives in oxide-hud/locales/en.json: the editor's buttons and tabs, the names of the data, styles, options and templates, HUD labels such as CH and MPH, compass points and weapon names.

To add a language:

Make a copy of locales/en.json in the same folder, named after your language code, for example locales/de.json for German.

Open the copy and translate the text on the right of each :. Leave the names on the left exactly as they are.

"reset": "Zurücksetzen",

Keep %s and %d where they are: the HUD puts a number or name there ("radio_channel": "CH %s" shows CH 1).

Save the file.

Open your server.cfg and set ox_lib's language setting to your language code:

setr ox:locale de

Use setr, not set: setr also sends the setting to players, and the HUD reads it on each player's side. If you already have this line for other resources, you do not need another one.

The HUD and the editor always use this server language. If ox_lib lets players pick their own language, that choice changes only the /hud chat hint and the "editing is turned off" message.

Restart your server.

Good to know:

  • Anything missing from your file shows in English. Oxide HUD never shows raw text keys.
  • If the file has a mistake that breaks it (a missing comma or quote, for example), the whole HUD falls back to English. Check the file with any online JSON checker.
  • Street and area names come from GTA itself and follow each player's game language.
  • Text a player typed into their HUD, such as a label or the word on a warning lamp, stays as they typed it. The words on the built-in speedometer templates (SEATBELT, STALL, PULL UP, ANCHOR, BELOW DESIGN DEPTH, GEAR, THR) are typed text of this kind: players can change them in the editor, or you can give everyone translated ones through Config.DefaultLayout.
  • Updating oxide-hud may add new lines to en.json. Compare your file with the new one after an update.

Choosing Seatbelt, Voice and Fuel Resources

Oxide HUD reads the seatbelt, voice and fuel through o-link, and o-link picks the resource for each by itself. You only need to step in when it picks the wrong one: for example when two seatbelt resources, two voice resources or two fuel resources are installed.

The choice is made in o-link's settings file, not in Oxide HUD's.

Open o-link/config.lua.

Find the Config.Overrides = { block. Every line in it starts with --, which means it is switched off.

Find the line you need and remove the -- at the start, then change the value:

Seatbelt          = 'qbx_seatbelt',
Voice             = 'pma-voice',
Fuel              = 'LegacyFuel',

Save the file and restart your server.

The values you can use:

LineValues
Seatbelt'qbx_seatbelt', 'qb-smallresources', or '_default' for no seatbelt resource (the light always shows the belt as off)
Voice'pma-voice', 'saltychat', or '_default' for FiveM's built-in voice chat (no radio)
FuelThe name of a supported fuel resource (see Optional Resources), or '_default' for GTA's own fuel level

Upper and lower case do not matter in these values.

The fuel resource must still start before o-link. Choosing it here does not change the start order. See Start Order.

The same block also has a Hud line. Leave it switched off: o-link finds Oxide HUD by itself.

What Players Set Themselves

Each player's HUD, theme, saved layouts and templates, the grid size after they change it, and the minimap's Hide on foot are chosen by each player in the editor and saved on their own computer. You choose what new players start with (Config.DefaultLayout) and whether the editor opens at all (Config.LockEditing), but you cannot change a player's own saved HUD. See What Each Player Keeps.

Next Steps