WeaponClient

getPedWeaponCamoIndex

GET_PED_WEAPON_CAMO_INDEX0xA2C9AC24B4061285

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

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

Usage

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

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
weaponHashHashnumberinteger

Returns

int JavaScript number, Lua integer

Reference

Namespace
Weapon WEAPON
In the game
int GET_PED_WEAPON_CAMO_INDEX(Ped ped, Hash weaponHash)
Hash
0xA2C9AC24B4061285
Introduced
Game build 1103 legacy numbering

Open in the interactive natives reference