Exports
- Added
- Updated
Client side
openSettings
Open the HUD display settings.
Takes no arguments.
Returns boolean.
exports.REC_Hud:openSettings()
setGaugeValue
Update a custom gauge that does not have a source.
| Argument | Type | Description |
|---|---|---|
key | string | Registered gauge key |
value | number|nil | New value |
Returns boolean.
exports.REC_Hud:setGaugeValue(key, value)
registerGauge
Registers a custom gauge with its display settings and optional value source.
| Argument | Type |
|---|---|
payload | REC_Hud.Shared.Gauge.Payload |
Returns: boolean.
exports.REC_Hud:registerGauge(payload)
unregisterGauge
Removes a registered custom gauge.
| Argument | Type |
|---|---|
key | string |
Returns: boolean.
exports.REC_Hud:unregisterGauge(key)
setHudVisible
Adds or removes a visibility restriction identified by reason. Use the same reason when restoring visibility.
| Argument | Type |
|---|---|
reason | string |
visible | boolean |
Returns: boolean.
exports.REC_Hud:setHudVisible(reason, visible)
setGaugesVisible
Changes the normal NUI HUD, including elements such as the clock. Use setHudVisible to also change radar visibility.
| Argument | Type |
|---|---|
reason | string |
visible | boolean |
Returns: boolean.
exports.REC_Hud:setGaugesVisible(reason, visible)
openLayout
Opens the HUD layout editor.
Takes no arguments.
Returns: boolean.
exports.REC_Hud:openLayout()
setMinimapPosition
Sets the minimap position using normalized screen coordinates.
| Argument | Type |
|---|---|
x | number |
y | number |
Returns: boolean.
exports.REC_Hud:setMinimapPosition(x, y)
resetMinimapPosition
Restores the configured minimap position.
Takes no arguments.
Returns: boolean.
exports.REC_Hud:resetMinimapPosition()
setSeatbelt
Sets the seatbelt state.
| Argument | Type |
|---|---|
buckled | boolean |
Returns: boolean.
exports.REC_Hud:setSeatbelt(buckled)
isSeatbeltOn
Returns whether the seatbelt is fastened.
Takes no arguments.
Returns: boolean.
exports.REC_Hud:isSeatbeltOn()
setMinimapShape
Sets the minimap shape; nil restores the configured shape.
| Argument | Type |
|---|---|
shape | REC_Hud.Shared.Enum.MinimapShape|nil |
Returns: boolean.
exports.REC_Hud:setMinimapShape(shape)
setMinimapScale
Sets the minimap scale.
| Argument | Type |
|---|---|
scale | number |
Returns: boolean.
exports.REC_Hud:setMinimapScale(scale)
setMinimapOnFoot
Sets whether the minimap is shown while on foot.
| Argument | Type |
|---|---|
shown | boolean |
Returns: boolean.
exports.REC_Hud:setMinimapOnFoot(shown)
setRadarVisible
Adds or removes a radar visibility restriction identified by reason.
| Argument | Type |
|---|---|
reason | string |
visible | boolean |
Returns: boolean.
exports.REC_Hud:setRadarVisible(reason, visible)
setCinematic
Enables or disables cinematic mode.
| Argument | Type |
|---|---|
enabled | boolean |
Returns: boolean.
exports.REC_Hud:setCinematic(enabled)
isCinematic
Returns whether cinematic mode is enabled.
Takes no arguments.
Returns: boolean.
exports.REC_Hud:isCinematic()
setVisible
Show or hide the normal HUD and radar together. false also closes and blocks settings and layout editors. true removes this override without reopening either editor.
| Argument | Type |
|---|---|
visible | boolean |
Returns boolean: invalid non-boolean input returns false; repeated valid calls succeed. Showing still respects spawn state, cinematic mode, preferences and other hide reasons. Cinematic bars, audio and gameplay continue.
exports.REC_Hud:setVisible(false)
exports.REC_Hud:setVisible(true)
This override is shared by all callers and resets on resource restart. For independent ownership, use setHudVisible("my_resource:activity", false) and clear the same reason with true. The reason-based API does not block editors.
