setWeaponObjectComponentTintIndex
SET_WEAPON_OBJECT_COMPONENT_TINT_INDEX0x5DA825A85D0EA6E6The GTA V native SET_WEAPON_OBJECT_COMPONENT_TINT_INDEX of the WEAPON namespace, as LS:MP client scripts call it: the global function setWeaponObjectComponentTintIndex, in JavaScript and in Lua.
setWeaponObjectComponentTintIndex(
weaponObject: Object,
camoComponentHash: Hash,
colorIndex: number
): voidsetWeaponObjectComponentTintIndex(
weaponObject: Object,
camoComponentHash: Hash,
colorIndex: integer
)Usage
setWeaponObjectComponentTintIndex(weaponObject, camoComponentHash, colorIndex);setWeaponObjectComponentTintIndex(weaponObject, camoComponentHash, colorIndex)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
weaponObject | Object | number | integer |
camoComponentHash | Hash | number | integer |
colorIndex | int | number | integer |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Colors:
0 = Gray
1 = Dark Gray
2 = Black
3 = White
4 = Blue
5 = Cyan
6 = Aqua
7 = Cool Blue
8 = Dark Blue
9 = Royal Blue
10 = Plum
11 = Dark Purple
12 = Purple
13 = Red
14 = Wine Red
15 = Magenta
16 = Pink
17 = Salmon
18 = Hot Pink
19 = Rust Orange
20 = Brown
21 = Earth
22 = Orange
23 = Light Orange
24 = Dark Yellow
25 = Yellow
26 = Light Brown
27 = Lime Green
28 = Olive
29 = Moss
30 = Turquoise
31 = Dark Green
Full list of weapons, components, tint indexes & weapon liveries by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
Reference
- Namespace
- Weapon WEAPON
- In the game
void SET_WEAPON_OBJECT_COMPONENT_TINT_INDEX(Object weaponObject, Hash camoComponentHash, int colorIndex)- Hash
0x5DA825A85D0EA6E6- Introduced
- Game build 1103 legacy numbering
- Formerly
_SET_WEAPON_OBJECT_LIVERY_COLOR