getShopPedQueryPropIndex

GET_SHOP_PED_QUERY_PROP_INDEX0x6CEBE002E58DEE97

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

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

Usage

JavaScript
const result = getShopPedQueryPropIndex(componentHash);
Lua
local result = getShopPedQueryPropIndex(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 props.
Needs setupShopPedApparelQueryTu to be called with p3 = true and componentId = -1 first, returns -1 otherwise.

Reference

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

Open in the interactive natives reference