WeaponClient

getPedWeaponTintIndex

GET_PED_WEAPON_TINT_INDEX0x2B9EEDC07BD06B9F

The GTA V native GET_PED_WEAPON_TINT_INDEX of the WEAPON namespace, as LS:MP client scripts call it: the global function getPedWeaponTintIndex, in JavaScript and in Lua.

SignatureJavaScript
getPedWeaponTintIndex(ped: Ped, weaponHash: Hash): number
SignatureLua
getPedWeaponTintIndex(ped: Ped, weaponHash: Hash): integer

Usage

JavaScript
const result = getPedWeaponTintIndex(ped, weaponHash);
Lua
local result = getPedWeaponTintIndex(ped, weaponHash)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
weaponHashHashnumberinteger

Returns

int JavaScript number, Lua integer

Notes

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

Full list of weapons, components & tint indexes 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_TINT_INDEX(Ped ped, Hash weaponHash)
Hash
0x2B9EEDC07BD06B9F

Open in the interactive natives reference