📺Custom Indicators
Our HUD allows you to easily extend its functionality by registering your own components, such as a stamina bar, a job label, or even a cryptocurrency tracker.
1. RegisterComponent
Use this export to initialize a new element on the HUD. You can choose between a status type (circle near health, armour etc.) or a card type (for text and labels by default in top right).
exports["17mov_Hud"]:RegisterComponent(componentName, componentData)Parameters:
componentName(string): A unique identifier for your component.componentData(table): A configuration table containing:type: The style of the component ("status"or"card").label: The text displayed on the component.icon: A table containingtype("svg"or"image") and thedata(SVG string or file path).position: A table withxandycoordinates (from 0.0 to 1.0).
2. UpdateComponentValue
This export is used to dynamically update the data or progress of an existing component.
exports["17mov_Hud"]:UpdateComponentValue(name, value)Parameters:
name(string): The unique name of the component you wish to update.value(any): The new value.For status types, this is typically a float between
0.0and1.0.For card types, this can be any string or number value
3. ToggleComponentVisibility
Allows you to show or hide a specific component based on game events (e.g., hiding the stamina bar when the player is in a vehicle).
Parameters:
name(string): The unique name of the component.value(boolean): Set totrueto show the component, orfalseto hide it.
4. Integration Examples
Below you can find a professional implementation of a Stamina status bar and a Job Information card.
Last updated