YaHudAPI
YaHudAPI allows you to manage HUD (heads-up display) displayed on a player, a NPC (non-character player), or an object. HUD contains information about the player or the team, such as the player's name, HP, the corresponding team's name, the team's icon.
Properties
boolean HudEnable
CLIENT ONLY
YaHudAPI allows you to manage HUD (heads-up display) displayed on a player, a NPC (non-character player), or an object. HUD contains information about the player or the team, such as the player's name, HP, the corresponding team's name, the team's icon.
number MaxDistance
CLIENT ONLY
The maximum distance between the current player's camera and the HUD, beyond which HUD is hidden.
number MinDistance
CLIENT ONLY
The minimum distance between the current player's camera and the HUD, within which HUD is hidden.
boolean ShowMainPanelHUD
CLIENT ONLY
Determines whether to display the main panel HUD.
boolean EnableHUDAutoScale
CLIENT ONLY
Whether to allow the HUD to automatically scale or not.
Functions
YaUIComponent GetHudComponentByID(number id)
CLIENT ONLY
Gets the HUD component using the player/NPC/object's ID.
idThe entity ID of the player/NPC/object
void DisplayHud(number id, boolean value)
CLIENT ONLY
Displays or hides the HUD component.
idThe EntityId of the teamvalueDetermines whether to display the HUD component. Defaults to true.
void DisplayHpBar(number id, boolean value)
CLIENT ONLY
show or hide hud hp bar
void DisplayTeamName(number id, boolean value)
CLIENT ONLY
Displays or hides the HUD team name.
idThe EntityId of the teamvalueDetermines whether to display the HUD team name. Defaults to true.
void DisplayTeamArrow(number id, boolean value)
CLIENT ONLY
Displays or hides the HUD team arrow.
idThe EntityId of the teamvalueDetermines whether to display the HUD team arrow. Defaults to true.
void SetTeamIcon(number id, string url)
CLIENT ONLY
Sets the icon for the team arrow.
idThe EntityId of the teamurlThe arrow icon. The format can only be PNG, JPG, or JPEG.
void SetName(number id, string name)
CLIENT ONLY
Sets the name to display on HUD. It defaults to the nickname in the game.
idThe entity ID of the player/NPC/objectnameThe name to display on HUD
void SetHpBar(number id, number currentValue, number MaxValue)
CLIENT ONLY
Sets up the HUD HP bar. You can specify the current health and the maximum health
identity idcurrentValuehpBar current valueMaxValuehpBar max value
void SetTeamName(number id, string name)
CLIENT ONLY
Sets the HUD team name.
idThe EntityId of the teamnameThe name of the team