WeaponClient

getWeaponComponentVariantExtraModel

GET_WEAPON_COMPONENT_VARIANT_EXTRA_MODEL0x4D1CB8DC40208A17

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

SignatureJavaScript
getWeaponComponentVariantExtraModel(
  componentHash: Hash,
  extraComponentIndex: number
): Hash
SignatureLua
getWeaponComponentVariantExtraModel(
  componentHash: Hash,
  extraComponentIndex: integer
): Hash

Usage

JavaScript
const hash = getWeaponComponentVariantExtraModel(componentHash, extraComponentIndex);
Lua
local hash = getWeaponComponentVariantExtraModel(componentHash, extraComponentIndex)

Parameters

ParameterTypeJavaScriptLua
componentHashHashnumberinteger
extraComponentIndexintnumberinteger

Returns

Hash JavaScript number, Lua integer

A game hash. Natives return it unsigned (0 to 4294967295), the value lsmp.hash gives. As an argument, the signed and unsigned forms of a hash are the same value.

Notes

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

Returns the model hash of the extra component at specified index.

Reference

Namespace
Weapon WEAPON
In the game
Hash GET_WEAPON_COMPONENT_VARIANT_EXTRA_MODEL(Hash componentHash, int extraComponentIndex)
Hash
0x4D1CB8DC40208A17
Introduced
Game build 372 legacy numbering
Formerly
_GET_WEAPON_COMPONENT_VARIANT_EXTRA_COMPONENT_MODEL

Open in the interactive natives reference