What sh-hud Displays
sh-hud renders two panels depending on the player’s current state.- On-Foot Panel
- Vehicle Panel
When a player is not inside a vehicle, sh-hud shows a compact panel with the following information:
| Field | Description |
|---|---|
| Server ID | The player’s current FiveM server ID |
| Compass | Cardinal and intercardinal direction (N, NE, E, SE, S, SW, W, NW) based on the player’s entity heading |
Installation
Installing sh-hud takes only two steps.Add the resource to your server
Download the
sh-hud folder and place it inside your server’s resources directory.sh-hud has no
config.lua and no exported functions. All HUD behavior — update interval, panel transitions, displayed fields, and compass logic — is built into the resource and cannot be changed without modifying the source directly.Technical Details
Update interval and performance
Update interval and performance
sh-hud polls vehicle and player data every 200 ms inside a NUI-driven loop. This interval keeps the display responsive while keeping client-side CPU overhead minimal. The panels use CSS transitions to fade in and out smoothly whenever the player enters or exits a vehicle, so there is no jarring visual snap between states.
Compass calculation
Compass calculation
The compass direction is derived from the player’s entity heading value (0–360°), normalised to always be positive, and mapped to the nearest of the eight cardinal and intercardinal points. The value updates on the same 200 ms cycle as all other HUD fields.
| Heading Range | Displayed Direction |
|---|---|
| 337.5° – 22.5° | N |
| 22.5° – 67.5° | NW |
| 67.5° – 112.5° | W |
| 112.5° – 157.5° | SW |
| 157.5° – 202.5° | S |
| 202.5° – 247.5° | SE |
| 247.5° – 292.5° | E |
| 292.5° – 337.5° | NE |
Gear display logic
Gear display logic
| Condition | Displayed Label |
|---|---|
| Speed = 0 and gear = 0, or speed = 0 and gear = 1 | N (neutral / stationary) |
| Speed > 0 and gear = 0 | R (reversing) |
| Gear 1–8 at speed | 1 – 8 |