Documentation

Pepper HUD

Clean, modern HUD with 3 styles and an in-game editor – ESX & QBCore.

Overview

Pepper HUD shows everything players need – status, money, job, compass, ammo and a speedometer with seatbelt and cruise control. Every player sets it up with /hud: style (rings, bars, pills), colors, size, visible elements and position. Settings are saved locally per player, no database needed.

Features

  • 3 switchable styles – rings, bars and pills
  • In-game menu /hud with live preview: style, accent color, color mode, size, opacity, every element on/off
  • Drag elements anywhere with the mouse, saved per player
  • Health, armor, hunger, thirst, stamina, oxygen, voice chat (pma-voice and SaltyChat) including radio
  • Cash, bank, black money (ESX) with plus/minus animation, job and grade, player ID, time
  • Compass with street and area, ammo display
  • Speedometer with RPM, gear, fuel, engine health, lights and lock state (km/h or mph)
  • Seatbelt with ejection on crashes and cruise control
  • Cinematic mode and square or round minimap
  • Show-when-needed elements (e.g. armor only when you have some)
  • Optional (from the next version, already in the code): weather and temperature with Pepper Weather, clothing cleanliness with Pepper Laundry
  • Only sends changed values to the UI
  • English and German; config, locales and framework bridge open

Requirements

Dependency Required/optional What for Link
FiveM server build 7290 or newer required Listed as a dependency in fxmanifest.lua (/server:7290) https://runtime.fivem.net/artifacts/fivem/
ESX Legacy or QBCore required for money, job, hunger and thirst Without a framework the HUD only runs with health, armor, vehicle etc. https://github.com/esx-framework/esx_core · https://github.com/qbcore-framework/qb-core
esx_status (ESX only) required for hunger/thirst on ESX Provides hunger and thirst –
pma-voice or SaltyChat optional Voice range, talking, radio – detected automatically https://github.com/AvarianKnight/pma-voice
Fuel script (ox_fuel, LegacyFuel, cdn-fuel, ps-fuel …) optional Fuel display via Config.GetFuel –
Pepper Weather / Pepper Laundry optional (from the next version) Weather display or clothing display; without the resource it stays hidden –
OneSync not needed – –
Database, ox_lib not needed Every player stores their settings locally (KVP) –

Installation

  1. Download the resource from the Cfx.re Portal (https://portal.cfx.re/assets/granted-assets).
  2. Extract it to resources/[pepper]/pepper_hud. Do not rename the folder pepper_hud – escrow and the exports (exports.pepper_hud:…) depend on the name.
  3. Start it in your server.cfg after your framework (and voice and fuel script, if any):
    ensure es_extended   # or qb-core
    ensure esx_status    # ESX only
    ensure pma-voice     # optional
    ensure pepper_hud
    
  4. Disable other HUDs (esx_hud, qb-hud, ps-hud …), otherwise two HUDs overlap.
  5. QBCore only: turn off seatbelt/cruise in qb-smallresources or set Config.Seatbelt.enabled / Config.Cruise.enabled to false.
  6. English texts: set Config.Locale = 'en' in config/config.lua. There is no database and there are no items.

First test

  1. Log in – status displays appear at the bottom, money, job, ID and time at the top right.
  2. Type /hud: switch the style to bars and pick another accent color – the preview changes instantly.
  3. Get into a car and press B (seatbelt click), then from 30 km/h press Y for cruise control; braking ends it.
  4. Type /cinema – HUD and minimap disappear, black bars appear; /cinema again to leave.
  5. After a reconnect your /hud settings are still there.

Configuration

File Controls
config/config.lua Server defaults: language, framework, currency, commands/keys, seatbelt, cruise, minimap, fuel, voice, clock, intervals, menu rights, start values, colors
locales/de.json, locales/en.json All texts; more languages as locales/<code>.json
bridge/client/esx.lua, qbcore.lua, standalone.lua Connection to money, job and status – hook up your own systems here
bridge/detect.lua Framework detection

These are server defaults – players can change much of it for themselves via /hud (saved locally on their PC, per server). New players start with Config.Defaults.

General

Option Default Description
Config.Locale 'de' Language: 'de' or 'en'
Config.Framework 'auto' 'auto', 'esx' or 'qbcore'
Config.Debug false Debug output
Config.Voice 'auto' 'auto', 'pma-voice', 'saltychat' or 'none'
Config.Clock 'real' 'real' (player's local time) or 'game' (game time)
Config.ServerName '' Optional server name at the top right (empty = off)
Config.Currency symbol = '$', position = 'before', locale = 'en-US' Currency symbol, before/after, number format (e.g. 'de-DE')

Commands and keys

Config.Commands = { menu = 'hud', cinema = 'cinema', seatbelt = 'seatbelt', cruise = 'cruise' }
Config.Keys = { seatbelt = 'B', cruise = 'Y', cinema = '' }

The keys are defaults; players change them under Settings → Key Bindings → FiveM.

Seatbelt and cruise control

Option Default Description
Config.Seatbelt.enabled true false if you use another seatbelt script
Config.Seatbelt.ejectSpeed 90 km/h – above this, players without a seatbelt are ejected in a crash
Config.Seatbelt.ejectDamage 20 Damage when ejected (0 = none)
Config.Seatbelt.lockExit true Buckled players can only exit after unbuckling
Config.Seatbelt.warnSpeed 20 km/h – above this the seatbelt icon blinks when not buckled
Config.Seatbelt.sounds true Click sound when buckling/unbuckling
Config.Cruise.enabled true Cruise control on/off
Config.Cruise.minSpeed 30 km/h – it cannot be switched on below this

Minimap, fuel and performance

Config.GetFuel = function(vehicle)
    local state = Entity(vehicle).state.fuel
    if type(state) == 'number' then return state end
    return GetVehicleFuelLevel(vehicle)
end
Option Default Description
Config.Minimap.managed true false = the HUD does not touch the minimap at all (if another script controls it)
Config.Minimap.hideHealthBars true Hides the GTA health/armor bars below the minimap
Config.GetFuel State bag fuel or GTA value Returns the fuel level 0–100; adjust it for your fuel script, e.g. return exports['LegacyFuel']:GetFuel(vehicle)
Config.Intervals onFoot = 250, vehicle = 60 Update rate in ms – smaller = smoother, but more load
Config.HideDefaultHud { 3, 4, 6, 7, 8, 9, 13 } GTA default HUD components that are hidden

Menu rights and start values

Option Default Description
Config.Menu.enabled true /hud menu on/off
Config.Menu.allowStyle / allowColors / allowLayout true May players change style, colors or positions? Locked parts are set to the default
Config.Defaults.style 'rings' 'rings', 'bars' or 'pills'
Config.Defaults.accent '#e5484d' Accent color (hex)
Config.Defaults.colorMode 'colored' 'colored', 'accent' or 'mono'
Config.Defaults.scale / opacity 1.0 / 1.0 Size 0.7–1.4, opacity 0.4–1.0
Config.Defaults.speedUnit 'kmh' 'kmh' or 'mph'
Config.Defaults.minimapShape 'square' 'square' or 'circle'
Config.Defaults.minimapOnlyInVehicle false Minimap only in vehicles
Config.Defaults.show all on Visible elements (including laundry, weather)
Config.Defaults.dynamic armor, stamina Elements that only appear when needed
Config.Defaults.cinemaBars 12 Height of the cinematic bars in % (5–20)
Config.Colors per display Colors of the status displays in colored mode
Config.AccentPresets 9 colors Choices in the menu's color picker

Using it in game

Area Content
Status Health, armor, hunger, thirst, stamina, oxygen (under water only), voice range, talking and radio
Info Cash, bank, black money (ESX), job and grade, player ID, time, optionally weather
Orientation Compass (follows the camera), street/crossing and area
Weapon Ammo in clip / reserve
Speedometer Speed, RPM, gear, fuel, engine health, lights/high beam, lock state, altitude in helis/planes

In the menu's layout mode you drag elements anywhere with the mouse; Reset restores the default layout. The seatbelt does not apply to motorbikes, bicycles, boats, helicopters, planes and trains. Cruise control only works as the driver; braking, the handbrake or slowing down noticeably ends it.

Commands and permissions

Command Default key Who What
/hud – everyone Settings menu (only with Config.Menu.enabled = true)
/cinema – (bindable) everyone Cinematic mode on/off
/seatbelt B everyone Seatbelt on/off
/cruise Y everyone Cruise control on/off

There are no permissions (ACE/groups); what players may change is controlled with Config.Menu. Change the command names in Config.Commands.

Exports and events

All exports run on the client:

Export Description
setVisible(bool) Hide (false) or show (true) the HUD – e.g. for a phone or camera
isVisible() Is the HUD visible?
isSeatbeltOn() Is the seatbelt on?
isCruiseActive() Is cruise control active?
setCinema(bool) Cinematic mode on/off
openMenu() Open the /hud menu
setLaundry(value) Show clothing cleanliness 0–100, false hides it (for Pepper Laundry; from the next version)
exports.pepper_hud:setVisible(false)
if exports.pepper_hud:isSeatbeltOn() then … end
Source Description
Client event pepper_hud:seatbelt On every seatbelt change, parameter on
LocalPlayer.state.seatbelt Current seatbelt state as a state bag

FAQ

Two HUDs on screen – what now?

Disable other HUDs (esx_hud, qb-hud, ps-hud …) in your server.cfg. Only one HUD may run.

Two seatbelts or cruise controls (QBCore)?

Turn them off in qb-smallresources or set Config.Seatbelt.enabled / Config.Cruise.enabled to false.

Hunger and thirst stay empty (ESX)?

On ESX, Pepper HUD needs esx_status for hunger and thirst. Start it before pepper_hud.

Money, job and hunger are missing completely?

Then no framework was detected (the F8 console shows a hint). Start pepper_hud after es_extended or qb-core, or set Config.Framework to 'esx' or 'qbcore'.

Fuel always shows 0 or 100?

Adjust Config.GetFuel to your fuel script, e.g. return exports['LegacyFuel']:GetFuel(vehicle).

The minimap looks wrong?

Another script controls the minimap – set Config.Minimap.managed = false, then the HUD leaves it alone.

Players cannot change the style or colors?

Check Config.Menu (allowStyle, allowColors, allowLayout). Locked parts are always set to the defaults from Config.Defaults.

Where are player settings stored?

Locally on the player's PC (KVP), per server. No database is needed.

Which voice systems are supported?

pma-voice and SaltyChat – both are detected automatically (Config.Voice = 'auto'). 'none' hides the voice display.

How do I hide the HUD for my phone or camera script?

Call exports.pepper_hud:setVisible(false) on the client and setVisible(true) afterwards.

How do I change the colors for all new players?

Config.Defaults.accent and colorMode set the start values, Config.Colors the colors of the single displays, Config.AccentPresets the choices in the color picker. Players with their own settings keep their choice.

How do I connect my own status or money system?

The bridge files bridge/client/esx.lua and bridge/client/qbcore.lua are open. That is where the HUD reads money, job and status – adjust the events or lookups to your system.

How do I update Pepper HUD?

Download the new version from the Cfx.re Portal, back up config/config.lua and changed bridge or language files, then replace the folder. Player settings are kept. Changes are listed in the CHANGELOG.md in the resource folder.

Support

Questions or bugs? Open a ticket in our Discord: https://discord.gg/6NaFJWKDYu – link your purchase with /verify first.

Permanently tested on the Pepper Scripts dev server.

Changelog

Current version 1.0.0 (first version). In progress: optional weather display with Pepper Weather and clothing display with Pepper Laundry. All changes are listed in the CHANGELOG.md in the resource folder.


Found a mistake? Report it on Discord.