getShopPedQueryComponentIndex
GET_SHOP_PED_QUERY_COMPONENT_INDEX0x96E2929292A4DB77The 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.
getShopPedQueryComponentIndex(componentHash: Hash): numbergetShopPedQueryComponentIndex(componentHash: Hash): integerUsage
JavaScript
const result = getShopPedQueryComponentIndex(componentHash);Lua
local result = getShopPedQueryComponentIndex(componentHash)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
componentHash | Hash | number | integer |
Returns
int JavaScript number, Lua integerNotes
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