hudluaroleplay8 min read · updated 9/19/2026

Hiding GTA HUD components in FiveM: every component ID and how to use them

The vanilla GTA HUD was designed for a single-player action game: area names that slide in when you cross a district, a vehicle name in the corner when you enter a car, cash counters, an aiming reticle, weapon stats on the wheel. Most roleplay servers replace much of it with their own HUD, and almost all of them do it with the same native, HideHudComponentThisFrame, and a list of magic numbers. This page is the reference for those numbers, a sensible default set for roleplay servers, the sniper-scope exception most scripts get wrong, and the natives for moving components rather than hiding them.

Short answer: HideHudComponentThisFrame(id) hides one HUD component for the current frame, so it runs in a Wait(0) loop. The useful IDs are 1 wanted stars, 2 weapon icon, 3 cash, 4 MP cash, 6 vehicle name, 7 area name, 8 vehicle class, 9 street name, 13 cash change, 14 reticle and 20 weapon wheel stats. The minimap itself is controlled with DisplayRadar, not component IDs. Components can be moved with SetHudComponentPosition and restored with ResetHudComponentValues.

FiveM HideHudComponentThisFrame: HUD Component IDs

#Every HUD component ID

IDComponentHide it on RP?
1WANTED_STARSYes, if wanted levels are disabled
2WEAPON_ICONUsually
3CASHYes, if your HUD shows money
4MP_CASHYes
5MP_MESSAGERarely
6VEHICLE_NAMEUsually
7AREA_NAMEIf your HUD shows the zone
8VEHICLE_CLASSUsually
9STREET_NAMEIf your HUD shows streets
10HELP_TEXTNo; many scripts use it for prompts
11FLOATING_HELP_TEXT_1No
12FLOATING_HELP_TEXT_2No
13CASH_CHANGEYes
14RETICLEOften, with a sniper exception
15SUBTITLE_TEXTNo
16RADIO_STATIONSOnly if you have a custom radio UI
17SAVING_GAMEYes, harmless
18GAME_STREAMRarely
19WEAPON_WHEELNo, unless you replace the wheel
20WEAPON_WHEEL_STATSYes, on most servers
21HUD_COMPONENTSNo
22HUD_WEAPONSNo

IDs for HideHudComponentThisFrame and ShowHudComponentThisFrame

The same IDs work with ShowHudComponentThisFrame, which forces a component to show for a frame, and IsHudComponentActive, which tells you whether it is currently displayed. Rockstar's own enum starts at 0 for the HUD as a whole; the individual components are 1 to 20.

#A sensible roleplay default

client.lua
local HIDE = { 1, 2, 3, 4, 6, 7, 8, 9, 13, 17, 20 }

CreateThread(function()
    while true do
        for i = 1, #HIDE do
            HideHudComponentThisFrame(HIDE[i])
        end
        Wait(0)
    end
end)

This is one of the few places where a permanent Wait(0) loop is correct: the native only lasts one frame, and eleven native calls per frame are negligible. What is not fine is five different resources each running their own copy of this loop with slightly different lists, which happens easily when every downloaded HUD, speedometer and street-label script brings its own. Pick one resource to own component hiding, remove the loops from the others, and keep the list in that resource's config.

#Hiding the reticle without breaking snipers

Removing the white aiming dot (component 14) is popular on serious roleplay servers because it makes gunfights less arcade-like. Done naively, it also hides the scope overlay's aiming point on sniper rifles, which then become unusable. Exempt sniper-class weapons:

client.lua
local SNIPER_GROUP = 3082541095

CreateThread(function()
    while true do
        local sleep = 250
        local ped = PlayerPedId()
        if IsPlayerFreeAiming(PlayerId()) then
            sleep = 0
            local weapon = GetSelectedPedWeapon(ped)
            local group = GetWeapontypeGroup(weapon) & 0xFFFFFFFF
            if group ~= SNIPER_GROUP then
                HideHudComponentThisFrame(14)
            end
        end
        Wait(sleep)
    end
end)

3082541095 is the joaat hash of GROUP_SNIPER. Masking with 0xFFFFFFFF normalises the value whether the runtime hands it back signed or unsigned. The loop only runs per frame while the player is aiming, so it costs nothing the rest of the time.

#Related HUD natives

NativeEffectPer frame?
DisplayHud(false)Hides the whole HUD until turned back onNo
DisplayRadar(false)Hides the minimapNo
HideHudAndRadarThisFrame()Hides HUD and radar for one frame; also blocks the weapon wheelYes
DisplayAmmoThisFrame(false)Hides the ammo counterYes
DisplayCash(false)Stops the cash display renderingNo
DisplayAreaName(false)Turns off the area nameNo
HideAreaAndVehicleNameThisFrame()Hides area and vehicle names togetherYes
HideHelpTextThisFrame()Hides the help text boxYes
ThefeedHideThisFrame()Hides feed notifications above the mapYes

HideHudAndRadarThisFrame is the right tool for cinematic moments such as a character creator camera or a cutscene. It is the wrong tool for general HUD cleanup, because it also prevents the weapon wheel from opening, which players notice immediately.

#Moving components instead of hiding them

Sometimes a component is useful but in the wrong place, typically because a custom HUD occupies the corner where GTA draws it. SetHudComponentPosition(id, x, y) moves it using screen fractions, and ResetHudComponentValues(id) restores the default. GetHudComponentPosition(id) returns the current position, which is handy for nudging from the default rather than guessing absolute numbers. FiveM adds SetHudComponentSize(id, x, y) for resizing.

client.lua — move help text down a little
local HELP_TEXT = 10

CreateThread(function()
    local pos = GetHudComponentPosition(HELP_TEXT)
    SetHudComponentPosition(HELP_TEXT, pos.x, pos.y + 0.05)
end)

AddEventHandler('onResourceStop', function(name)
    if name == GetCurrentResourceName() then
        ResetHudComponentValues(HELP_TEXT)
    end
end)

Component positions come from frontend.xml and are relative to the safe zone, so test at two resolutions and two safe-zone settings before shipping a layout. The minimap has its own positioning system, covered in minimap position and HUD anchors.

#Replacing street and area names with your own

Hiding components 7 and 9 only makes sense if players still get the information somewhere. Most roleplay HUDs show the current street, the crossing street and the zone name next to the minimap. The data comes from three natives, and the one rule is to fetch it on a timer rather than every frame, because the text rarely changes and the path-finding lookup is not free.

client.lua — street and zone, twice a second
local current = { street = '', crossing = '', zone = '' }

CreateThread(function()
    while true do
        local pos = GetEntityCoords(PlayerPedId())
        local streetHash, crossingHash = GetStreetNameAtCoord(pos.x, pos.y, pos.z)
        current.street = GetStreetNameFromHashKey(streetHash)
        current.crossing = crossingHash ~= 0 and GetStreetNameFromHashKey(crossingHash) or ''
        current.zone = GetLabelText(GetNameOfZone(pos.x, pos.y, pos.z))
        Wait(500)
    end
end)

GetNameOfZone returns a short code such as LEGSQU, and GetLabelText turns it into the display name, "Legion Square". A full table of those codes is in GTA 5 zone names. Send the result to your NUI only when it changes; pushing an identical message to the browser every frame is one of the most common causes of a HUD resource showing high in the resource monitor.

Players who rely on postal codes rather than street names need the nearest postal in the same panel, which works the same way on a one-second timer; see nearest-postal scripts.

#The weapon wheel

Component 20 hides the stats panel (damage, fire rate, accuracy, range) that appears when you hover a weapon on the wheel. Most roleplay servers hide it because the numbers mean nothing with modified weapon damage and they clutter the screen. Component 19 hides the wheel itself, which only makes sense if you have replaced weapon selection entirely, for example with an inventory hotbar.

Two related requests are not HUD components at all. The radio station list is component 16, but hiding it only hides the list, not the radio; a server without car radios should disable the radio wheel control instead. And the most common weapon-wheel request on roleplay servers, stopping players from cycling weapons with the mouse wheel, is a control problem solved with DisableControlAction, not a HUD one.

The wheel's look is a separate matter from what is hidden. Its background textures can be restyled with a streamed texture replacement, which is what custom weapon wheels do; that combines cleanly with hiding component 20, since the stats panel is drawn separately from the wheel art.

#Troubleshooting

SymptomCauseFix
Component flickersHide loop uses Wait(1) or longerWait(0) while hiding
Street name still appears occasionallyAnother resource calls ShowHudComponentThisFrame(9)Search resources for ShowHudComponentThisFrame
Weapon wheel will not openHideHudAndRadarThisFrame running constantlyUse component hides instead
Sniper scope has no aim pointReticle hidden for all weaponsExempt GROUP_SNIPER
Health bars under the map still visibleThey are not a HUD componentUse the minimap scaleform
Cash still shows after paydayOnly 3 hidden, not 4 and 13Hide 3, 4 and 13 together

For performance, the entire hide loop is cheap. If the resource monitor shows your HUD resource high, the cost is almost always elsewhere: NUI messages sent every frame, street name lookups every frame, or ped and vehicle queries that could run every 200 ms. Throttle those, not the component hides.

Questions

How do I hide the street name in FiveM?
Call HideHudComponentThisFrame(9) every frame, and HideHudComponentThisFrame(7) for the area name.
What is HUD component 14?
The aiming reticle. Hide it with HideHudComponentThisFrame(14), but exempt sniper rifles so scopes still work.
How do I hide weapon stats on the weapon wheel?
Hide component 20, WEAPON_WHEEL_STATS, every frame.
Why do I need to call it every frame?
The native only applies to the current frame. Run it in a thread with Wait(0).
How do I hide the ammo counter?
Call DisplayAmmoThisFrame(false) every frame. Hiding the weapon icon, component 2, does not remove the ammo count on its own.
Can I hide the minimap with a component ID?
No. The minimap is controlled with DisplayRadar(false), not with HUD component IDs.

Ready to pick a map?

Twelve themes on three base map styles, $8 each, instant download.

Relevant to what you just read