vi/raiser
ui
ui, GTA 6 style illustration
Vaultbeginnerui

Compass Heading Strip HUD

A native-draw top-screen compass strip showing cardinal direction, heading degrees and the current street name, with correct counter-clockwise heading conversion.

PRODUCTION-SHAPED, the reference Lua is validated and written framework-correct for ESX, QBCore, and QBox, ready to drop into your server.
Est. Lua
~44 loc
Claude
Claude Opus 4.x / Sonnet 4.x
Validation
syntax-validated
Updated
2026-06-25
Unlock price
$199Vault

Unlock all 510 prompts

Profit potential / mostable
$450($120 to $1,700)

$50-389 script band, sized for a stable niche; top sellers clear around $11.85K/mo.

Effort vs return
beginner2-4h

Description

A top-screen compass strip drawn with native DrawText / DrawRect: it shows the cardinal direction (N/NE/E…), the heading in degrees and the current street name. It is a staple of every roleplay HUD pack, low differentiation, but reliable baseline demand as a clean standalone or pack component.

Prompt Template

You are writing a FiveM CLIENT compass HUD. No framework money/state is involved,…

🔒 Eyes-only, locked prompt body

The full prompt template and its reference Lua are part of a one-time pack. Pick your depth, both are lifetime access, no subscription, ever.

Core$49one-time
  • 60 prompts + syntax-validated reference Lua
  • Lifetime access, pay once
Most Popular · Best Value
Vault$199one-time
  • All 510 prompts, the full library
  • Per-prompt profit/trend intelligence (CSV + playbook)
  • Lifetime free updates, new niches as the market moves
Get the Vault, $199

$49 for 60 · $199 for all 510 + intelligence, one-time, no subscription.

Expected Output

The reference Lua lives at content/expected-outputs/ui/14-compass-heading-hud.lua.

🔒 Eyes-only, locked prompt body

The full prompt template and its reference Lua are part of a one-time pack. Pick your depth, both are lifetime access, no subscription, ever.

Core$49one-time
  • 60 prompts + syntax-validated reference Lua
  • Lifetime access, pay once
Most Popular · Best Value
Vault$199one-time
  • All 510 prompts, the full library
  • Per-prompt profit/trend intelligence (CSV + playbook)
  • Lifetime free updates, new niches as the market moves
Get the Vault, $199

$49 for 60 · $199 for all 510 + intelligence, one-time, no subscription.

Known Failure Modes & Corrective Prompt

  • Raw heading as bearing, GetEntityHeading is counter-clockwise; N/S and E/W flip without the (360 - heading) % 360 conversion.
  • Draw outside the loop, DrawText/DrawRect must run every frame.
  • Off-by-one cardinal, the +22.5 offset must wrap with % 360 before the /45 bucket so 350° rounds to N, not NW.

Corrective re-prompt: "The compass shows E when I face west, convert the heading with compass = (360.0 - GetEntityHeading(ped)) % 360.0 before bucketing, and confirm the +22.5/%360 offset so 350 degrees reads N."

Framework Integration

  • ESX: no money/state needed; drop into an existing ESX HUD resource as an extra client_script and toggle it off the same HUD settings event.
  • QBCore: pair with LocalPlayer.state HUD-visibility flags so it hides when the QBCore HUD is toggled.
  • QBox: identical client-only code; wire visibility to your qbx HUD toggle.

Profit Potential

$120-$1700/mo on Tebex (expected ~$450), priced in the $50-389 script band against a corpus of comparable Tebex sellers (median seller $11.85K/mo); low differentiation pins it to the band floor.

Trend Signal

stable, inferred: compass strips ship in nearly every roleplay HUD pack; steady baseline demand, low differentiation.

Sales Angle

Position as a clean, standalone compass that drops into any HUD pack with zero dependencies. Recommended Tebex price $59.

Difficulty & Ship Time

beginner · ships in 2-4h.