getPedHairTintColor
GET_PED_HAIR_TINT_COLOR0x4852FC386E2E1BB5The 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.
getPedHairTintColor(hairColorIndex: number): [
outR: number,
outG: number,
outB: number
]getPedHairTintColor(hairColorIndex: integer): integer, integer, integerUsage
JavaScript
const [outR, outG, outB] = getPedHairTintColor(hairColorIndex);Lua
local outR, outG, outB = getPedHairTintColor(hairColorIndex)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
hairColorIndex | int | number | integer |
Returns
3 values, in this order: an array in JavaScript, multiple return values in Lua.
| # | Value | Type | JavaScript | Lua | Description |
|---|---|---|---|---|---|
| 1 | outR | int | number | integer | output |
| 2 | outG | int | number | integer | output |
| 3 | outB | int | number | integer | output |
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