Shop metadataClient3 outputs

getVariantComponent

GET_VARIANT_COMPONENT0x6E11F282F11863B6

The GTA V native GET_VARIANT_COMPONENT of the EXTRAMETADATA namespace, as LS:MP client scripts call it: the global function getVariantComponent, in JavaScript and in Lua.

SignatureJavaScript
getVariantComponent(componentHash: Hash, variantComponentIndex: number): [
  nameHash: Hash,
  enumValue: number,
  componentType: number
]
SignatureLua
getVariantComponent(
  componentHash: Hash,
  variantComponentIndex: integer
): Hash, integer, integer

Usage

JavaScript
const [nameHash, enumValue, componentType] = getVariantComponent(
  componentHash, variantComponentIndex
);
Lua
local nameHash, enumValue, componentType = getVariantComponent(
    componentHash, variantComponentIndex
)

Parameters

ParameterTypeJavaScriptLua
componentHashHashnumberinteger
variantComponentIndexintnumberinteger

Returns

3 values, in this order: an array in JavaScript, multiple return values in Lua.

#ValueTypeJavaScriptLuaDescription
1nameHashHashnumberintegeroutput
2enumValueintnumberintegeroutput
3componentTypeintnumberintegeroutput

Reference

Namespace
Shop metadata EXTRAMETADATA
In the game
void GET_VARIANT_COMPONENT(Hash componentHash, int variantComponentIndex, Hash* nameHash, int* enumValue, int* componentType)
Hash
0x6E11F282F11863B6

Open in the interactive natives reference