getWeaponObjectComponentTintIndex
GET_WEAPON_OBJECT_COMPONENT_TINT_INDEX0xB3EA4FEABF41464BThe GTA V native GET_WEAPON_OBJECT_COMPONENT_TINT_INDEX of the WEAPON namespace, as LS:MP client scripts call it: the global function getWeaponObjectComponentTintIndex, in JavaScript and in Lua.
getWeaponObjectComponentTintIndex(
weaponObject: Object,
camoComponentHash: Hash
): numbergetWeaponObjectComponentTintIndex(
weaponObject: Object,
camoComponentHash: Hash
): integerUsage
JavaScript
const result = getWeaponObjectComponentTintIndex(weaponObject, camoComponentHash);Lua
local result = getWeaponObjectComponentTintIndex(weaponObject, camoComponentHash)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
weaponObject | Object | number | integer |
camoComponentHash | Hash | number | integer |
Returns
int JavaScript number, Lua integerNotes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Returns -1 if camoComponentHash is invalid/not attached to the weapon object.
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
int GET_WEAPON_OBJECT_COMPONENT_TINT_INDEX(Object weaponObject, Hash camoComponentHash)- Hash
0xB3EA4FEABF41464B- Introduced
- Game build 1103 legacy numbering
- Formerly
_GET_WEAPON_OBJECT_LIVERY_COLOR