HUDClientChecked by LS:MP

replaceHudColourWithRgba

REPLACE_HUD_COLOUR_WITH_RGBA0xF314CF4F0211894E

The GTA V native REPLACE_HUD_COLOUR_WITH_RGBA of the HUD namespace, as LS:MP client scripts call it: the global function replaceHudColourWithRgba, in JavaScript and in Lua.

SignatureJavaScript
replaceHudColourWithRgba(
  hudColorIndex: number,
  r: number,
  g: number,
  b: number,
  a: number
): void
SignatureLua
replaceHudColourWithRgba(
  hudColorIndex: integer,
  r: integer,
  g: integer,
  b: integer,
  a: integer
)

Usage

JavaScript
replaceHudColourWithRgba(hudColorIndex, r, g, b, a);
Lua
replaceHudColourWithRgba(hudColorIndex, r, g, b, a)

Parameters

ParameterTypeJavaScriptLua
hudColorIndexintnumberinteger
rintnumberinteger
gintnumberinteger
bintnumberinteger
aintnumberinteger

Returns

Nothing. In JavaScript the call evaluates to undefined.

On LS:MP

ℹ
Checked by LS:MP

hudColorIndex must be between 0 and 234. Otherwise the call is ignored: nothing reaches the game, and no error is raised.

Reference

Namespace
HUD HUD
In the game
void REPLACE_HUD_COLOUR_WITH_RGBA(int hudColorIndex, int r, int g, int b, int a)
Hash
0xF314CF4F0211894E
Formerly
_SET_HUD_COLOUR

Open in the interactive natives reference