Events, state bags & commands
Events
| Event | Side | Arguments | Notes |
|---|---|---|---|
np_hud:client:notify | client net | data | Same as the client Notify export: TriggerClientEvent('np_hud:client:notify', src, data) |
np_hud:notifyAction | client local | id, action | Every toast action (click or key) |
np_hud:notifyAction | server local | src, id, action | Fired only after validation. Listen to this one |
np_hud:server:notifyAction | server net | id, action | Internal. Sent by the client for sv:* toasts. Don't listen to it |
State bags
| Bag | Replicated | Description |
|---|---|---|
LocalPlayer.state.seatbelt | yes | Buckled. np_hud sets it; other scripts may set it too (the server reads Player(src).state.seatbelt) |
LocalPlayer.state.cruise | no | Set by a cruise-control script to light up the cruise indicator |
GlobalState.np_hud_players | – | Player count, maintained by np_hud's server script |
GlobalState.np_hud_maxPlayers | – | Max players |
Commands
| Command | Description |
|---|---|
/hud | Toggle the HUD (Config.Commands.toggle) |
/hudtheme <#hex|reset|none> [accent|tiles|glass] | Preview a theme for yourself only (Config.Commands.theme) |
/hud_demo | Only with Config.Debug: every toast variant, a prompt and a progress bar |
Key mappings (hudseatbelt, hudaccept, huddecline, hudcancel) are listed under Configuration → Key mappings.