GetHudColor

From GT-MP
Jump to: navigation, search
GetHudColor
Client-Side Function
System-users.png Client-Side Javascript.png JavaScript

Returns a Color object containing RGBA values of the specified HUD color.

Dialog-warning.png Note: This feature is currently not in the API, or is currently not accurate on the wiki due to upcoming API changes. New API functions and changes will be released with the next update.

Syntax

In Javascript
Client-Side Function

API.getHudColor(int hudColor);

Required Arguments

  • hudColor parameter input should be in int type. See HudColorList.


NOTE: This function returns data in Color type.

Usage example

In Javascript
Client-Side Function

var colorValue = API.getHudColor(6); // HUD_COLOUR_RED
API.sendChatMessage("HUD_COLOUR_RED: rgba(" + colorValue.R + ", " + colorValue.G + ", " + colorValue.B + ", " + colorValue.A + ")");
// Will output: HUD_COLOUR_RED: rgba(224, 50, 50, 255)

References