getPedWeaponComponentTintIndex
GET_PED_WEAPON_COMPONENT_TINT_INDEX0xF0A60040BE558F2DThe GTA V native GET_PED_WEAPON_COMPONENT_TINT_INDEX of the WEAPON namespace, as LS:MP client scripts call it: the global function getPedWeaponComponentTintIndex, in JavaScript and in Lua.
getPedWeaponComponentTintIndex(
ped: Ped,
weaponHash: Hash,
camoComponentHash: Hash
): numbergetPedWeaponComponentTintIndex(
ped: Ped,
weaponHash: Hash,
camoComponentHash: Hash
): integerUsage
JavaScript
const result = getPedWeaponComponentTintIndex(ped, weaponHash, camoComponentHash);Lua
local result = getPedWeaponComponentTintIndex(ped, weaponHash, camoComponentHash)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
weaponHash | Hash | 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.
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_PED_WEAPON_COMPONENT_TINT_INDEX(Ped ped, Hash weaponHash, Hash camoComponentHash)- Hash
0xF0A60040BE558F2D- Introduced
- Game build 1103 legacy numbering
- Formerly
_GET_PED_WEAPON_LIVERY_COLOR