Exports
Client
get_visible()
Gets whether the HUD is visible.
Returns
| Returns | Type | Description |
|---|---|---|
visible | boolean | Whether the HUD is visible. |
Example
set_visible(visible)
Sets whether the HUD is visible.
Parameters
| Parameter | Type | Description |
|---|---|---|
visible | boolean | Whether the HUD is visible. |
Example
toggle_visible()
Toggles the visibility of the HUD.
Example
create_info(options)
Creates a custom segment to the info module.
Parameters
| Parameter | Type | Description |
|---|---|---|
options | InfoOptions | The options for the segment. |
Returns
| Returns | Type | Description |
|---|---|---|
info | Info | The info segment. |
Example
remove_info(id)
Removes a custom segment from the info module.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The ID of the segment to remove. |
Returns
| Returns | Type | Description |
|---|---|---|
success | boolean | Whether the segment was removed successfully. |
Example
get_postal()
Alternate: getPostal()
Gets the nearest postal code of the player's current location.
Returns
| Returns | Type | Description |
|---|---|---|
postal | string | The nearest postal code. |
Example
set_indicator_seatbelt(state)
Sets the seatbelt indicator on or off.
Parameters
| Parameter | Type | Description |
|---|---|---|
state | boolean | Whether the seatbelt indicator is on or off. |
Example
set_indicator_anchor(state)
Sets the anchor indicator on or off.
Parameters
| Parameter | Type | Description |
|---|---|---|
state | boolean | Whether the anchor indicator is on or off. |
Example
Footnotes
- Type definitions that can be used with the Lua extension in VSCode are available on the public GitHub repository.