Shop metadataClient3 outputs

getForcedComponent

GET_FORCED_COMPONENT0x6C93ED8C2F74859B

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

SignatureJavaScript
getForcedComponent(componentHash: Hash, forcedComponentIndex: number): [
  nameHash: Hash,
  enumValue: number,
  componentType: number
]
SignatureLua
getForcedComponent(
  componentHash: Hash,
  forcedComponentIndex: integer
): Hash, integer, integer

Usage

JavaScript
const [nameHash, enumValue, componentType] = getForcedComponent(
  componentHash, forcedComponentIndex
);
Lua
local nameHash, enumValue, componentType = getForcedComponent(
    componentHash, forcedComponentIndex
)

Parameters

ParameterTypeJavaScriptLua
componentHashHashnumberinteger
forcedComponentIndexintnumberinteger

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_FORCED_COMPONENT(Hash componentHash, int forcedComponentIndex, Hash* nameHash, int* enumValue, int* componentType)
Hash
0x6C93ED8C2F74859B

Open in the interactive natives reference