PedClient3 outputs

getPedHairTintColor

GET_PED_HAIR_TINT_COLOR0x4852FC386E2E1BB5

The GTA V native GET_PED_HAIR_TINT_COLOR of the PED namespace, as LS:MP client scripts call it: the global function getPedHairTintColor, in JavaScript and in Lua.

SignatureJavaScript
getPedHairTintColor(hairColorIndex: number): [
  outR: number,
  outG: number,
  outB: number
]
SignatureLua
getPedHairTintColor(hairColorIndex: integer): integer, integer, integer

Usage

JavaScript
const [outR, outG, outB] = getPedHairTintColor(hairColorIndex);
Lua
local outR, outG, outB = getPedHairTintColor(hairColorIndex)

Parameters

ParameterTypeJavaScriptLua
hairColorIndexintnumberinteger

Returns

3 values, in this order: an array in JavaScript, multiple return values in Lua.

#ValueTypeJavaScriptLuaDescription
1outRintnumberintegeroutput
2outGintnumberintegeroutput
3outBintnumberintegeroutput

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Input: Haircolor index, value between 0 and 63 (inclusive).
Output: RGB values for the haircolor specified in the input.

This is used with the hair color swatches scaleform.
Use getPedMakeupTintColor to get the makeup colors.

Reference

Namespace
Ped PED
In the game
void GET_PED_HAIR_TINT_COLOR(int hairColorIndex, int* outR, int* outG, int* outB)
Hash
0x4852FC386E2E1BB5
Formerly
_GET_HAIR_RGB_COLOR _GET_PED_HAIR_RGB_COLOR

Open in the interactive natives reference