WeaponClient

setPedWeaponTintIndex

SET_PED_WEAPON_TINT_INDEX0x50969B9B89ED5738

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

SignatureJavaScript
setPedWeaponTintIndex(ped: Ped, weaponHash: Hash, tintIndex: number): void
SignatureLua
setPedWeaponTintIndex(ped: Ped, weaponHash: Hash, tintIndex: integer)

Usage

JavaScript
setPedWeaponTintIndex(ped, weaponHash, tintIndex);
Lua
setPedWeaponTintIndex(ped, weaponHash, tintIndex)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
weaponHashHashnumberinteger
tintIndexintnumberinteger

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.

tintIndex can be the following:

0 - Normal
1 - Green
2 - Gold
3 - Pink
4 - Army
5 - LSPD
6 - Orange
7 - Platinum
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
void SET_PED_WEAPON_TINT_INDEX(Ped ped, Hash weaponHash, int tintIndex)
Hash
0x50969B9B89ED5738

Open in the interactive natives reference