WeaponClient

setWeaponObjectTintIndex

SET_WEAPON_OBJECT_TINT_INDEX0xF827589017D4E4A9

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

SignatureJavaScript
setWeaponObjectTintIndex(weapon: Object, tintIndex: number): void
SignatureLua
setWeaponObjectTintIndex(weapon: Object, tintIndex: integer)

Usage

JavaScript
setWeaponObjectTintIndex(weapon, tintIndex);
Lua
setWeaponObjectTintIndex(weapon, tintIndex)

Parameters

ParameterTypeJavaScriptLua
weaponObjectnumberinteger
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.

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_WEAPON_OBJECT_TINT_INDEX(Object weapon, int tintIndex)
Hash
0xF827589017D4E4A9

Open in the interactive natives reference