Features
Everything is drawn by one React interface. Players open their own settings with /settings and what they change is saved in their game client, so two people on the same server can have very different screens.
The settings menu is built from editable/shared/js.json rather than hardcoded — the windows below are the ones that file ships with.
Status bars
Eight bars: health, shield, food, water, stamina, oxygen, voice and stress.
| Control | Choices |
|---|---|
| Style | default, line, modern, percent, progress |
| Colour | Per bar — each of the eight has its own |
| Corner radius | 0.01 – 1.5 |
| Scale | 0.5, 1.5, 3 |
| Visibility | On or off for the whole group |
Showing a bar only when it matters
Each of the eight has its own percent rule: a threshold, and whether it applies above or below that value. A hunger bar set to show below 50 stays off screen until the player is actually hungry, which is how you keep eight bars from filling the corner permanently.
Stress
Stress is driven from outside the resource, with events rather than exports:
TriggerEvent('koja-hud:addStress', 5)
TriggerEvent('koja-hud:removeStress', 5)
Read it back with exports['koja_hud']:GetStress().
Speedometer
| Control | Choices |
|---|---|
| Style | default |
| Units | kmh or mph |
| Visibility | On or off |
Notifications
| Control | Choices |
|---|---|
| Style | default, minimalistic, modern |
| Position | top-right, bottom-left |
| Visibility | On or off |
KOJA.Notify in config.lua decides which system actually receives a notification — the HUD's own, or ESX / QBCore / Ox. See Configuration.
Send one with sendNotify.
Information panel
A small panel with its own opacity slider (0 – 1) and an on/off switch.
Progress bar
Shown by startProgressbar. It can play an animation for its duration and disable chosen keys while it runs, and it calls back telling you whether it finished or was cancelled.
Text UI
Shown by TextUI, hidden by HideUI. Both are reachable as events too, for when the server decides what to show.
Minimap
A square minimap, streamed from the resource's own stream/ folder. KOJA.MiniMap controls its position and size, the mask that gives it its shape, and the blurred backing behind it.
It can be hidden on foot, or gated behind an item the player must carry. See Configuration.
Vehicle systems
Four, each with its own key and its own key hint.
Engine
Toggles the engine, B by default. StartEngineOnEntering can start it as the player gets in.
Seatbelt
L by default. Above MaxVehicleSpeedToRagdoll — 70 by default — a crash without a belt throws the ped through the windscreen.
Other resources can read and set the state with IsSeatbeltOn() and SeatbeltState(state).
Cruise control
T by default, and it will not engage below MinSpeed (20).
Nitro
N by default. NitroForce multiplies engine power while it is active — 1.5 is a 50% boost — and RemoveNitroOnMilliseconds sets how quickly it drains.
Refilling can be tied to an item (KOJA.Nitro.Item, nitro by default) or driven entirely from your own code with SetNitro(). It is the one thing this resource persists: see Database.
Voice
A voice bar with three proximity levels — 25, 75 and 100 by default. pma-voice drives it unless KOJA.Microphone.Custom is set.
Related pages
- Installation — Read the entire installation process to ensure the resource is fully usable.
- Configuration — Changing Language, Debug Prints, Settings Command, Hide Minimap, Notifications, Nitro, Engine, Seatbelt and Cruisemode.
- Guides — Creating/Editing Locales, Progress Bar, Text UI and Stress.
- Exports & Commands
- Database
- HUD — back to the section overview