SCode StudiosSCodeDocs
Tebex Store

HUD

The rr_hud resource of SCode Inventory + Hud

rr_hud shows:

  • Event feed (top left): kills, rewards and system messages from other scripts.

  • Player card (bottom left, next to the minimap): name, health, armour and voice.

  • Badges next to the player card: job, radio frequency, hunger, thirst and stress, plus your own badges.

  • Key hints on the right edge, with the player's real key bindings.

  • Vehicle gauge while driving: speed, fuel, RPM, gear and engine health.

  • Location line: zone, street and heading.

The HUD hides itself in the pause menu and while the screen is faded out. Players can turn it off and on with /rrhud. Their choice is saved.

Requirements

  • Player name, job, hunger, thirst and stress are read from QBCore. Hunger and thirst can also come from zyke_status.

  • The radio badge reads the pma-voice radio channel.

  • The fuel level comes from the fuel script set in Config.vehicle.fuelResource (with a GetFuel export), otherwise from the game.

Configuration

All settings are in rr_hud/config.lua:

Lua
Config.accent = '#c9fa43'          -- same accent colour as rr_inventory
Config.scale = 1.0                 -- overall size (0.8 - 1.3)
Config.toggleCommand = 'rrhud'     -- command that turns the HUD on/off

Config.feed = {
    enabled = true,
    maxLines = 6,
    duration = 14,               -- seconds, then the line fades out
    gameClock = true,            -- show the in-game time on each line
}

Config.player = {
    nameSource = 'character',     -- 'character' (character name) | 'server' (FiveM name)
    showArmor = true,             -- thin blue line under health when the player has armour
}

Config.badges = {
    job    = { enabled = true,  order = 10 },               -- hidden while unemployed
    radio  = { enabled = true,  order = 20 },               -- pma-voice radio frequency
    hunger = { enabled = true,  order = 30, warnBelow = 35 },
    thirst = { enabled = true,  order = 40, warnBelow = 35 },
    stress = { enabled = true,  order = 50, showAbove = 15 },
}

Config.actions = {
    { id = 'emote', icon = 'smile', label = 'Emote',   command = 'emotemenu', key = 'F4' },
    { id = 'phone', icon = 'phone', label = 'Telefon', key = 'M' },
    { id = 'help',  icon = 'help',  label = 'Yardım',  key = 'K', enabled = false },
}

Config.vehicle = {
    enabled = true,
    unit = 'kmh',                -- 'kmh' | 'mph'
    fuelResource = 'lc_fuel',    -- fuel script with a GetFuel export
}

Config.location = { enabled = true }

Config.statusResource = 'zyke_status'

In Config.actions, if command is set, the HUD shows the key the player has bound to that command. Otherwise key is shown.

Exports and events (client)

Lua
-- Add a line to the event feed. kind: 'info' | 'good' | 'bad' | 'warn'
exports.rr_hud:Feed('Package delivered', 'good')

-- From the server:
TriggerClientEvent('rr_hud:feed', source, 'Package delivered', 'good')

-- Hide or show the HUD (for example during a cutscene)
exports.rr_hud:SetHudVisible(false)

-- Add your own badge, or remove it
exports.rr_hud:SetBadge('wanted', { icon = 'job', label = 'Wanted', value = '3', tone = 'bad', order = 60 })
exports.rr_hud:RemoveBadge('wanted')

-- Red notification dot on a key hint from Config.actions
exports.rr_hud:SetActionDot('phone', true)

tone can be 'good', 'warn', 'bad' or 'muted'.

Last updated: December 6, 2026