getShopPedQueryComponentIndex

GET_SHOP_PED_QUERY_COMPONENT_INDEX0x96E2929292A4DB77

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

SignatureJavaScript
getShopPedQueryComponentIndex(componentHash: Hash): number
SignatureLua
getShopPedQueryComponentIndex(componentHash: Hash): integer

Usage

JavaScript
const result = getShopPedQueryComponentIndex(componentHash);
Lua
local result = getShopPedQueryComponentIndex(componentHash)

Parameters

ParameterTypeJavaScriptLua
componentHashHashnumberinteger

Returns

int JavaScript number, Lua integer

Notes

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

Returns some sort of index/offset for components.
Needs setupShopPedApparelQueryTu to be called with p3 = false and componentId with the drawable's component slot first, returns -1 otherwise.

Reference

Namespace
Shop metadata EXTRAMETADATA
In the game
int GET_SHOP_PED_QUERY_COMPONENT_INDEX(Hash componentHash)
Hash
0x96E2929292A4DB77
Introduced
Game build 2189 legacy numbering

Open in the interactive natives reference