_GET_CATEGORY_OF_COMPONENT_AT_INDEX (0x9B90842304C938A7): p2 is the metaped type (0=human, 6=horse), not "Any"
Context
_GET_CATEGORY_OF_COMPONENT_AT_INDEX (0x9B90842304C938A7) documents its third param as p2 (Any). It's actually the metaped/ped type discriminator: pass 6 for horses, 0 for humans. Wrong value → wrong category hash comes back.
Usage
local pedType = IsThisModelAHorse(GetEntityModel(ped)) and 6 or 0
local category = InvokeNative(0x9B90842304C938A7, ped, componentIndex, pedType,
Citizen.ResultAsInteger())
Notes
- Result is read via
Citizen.ResultAsInteger(). - The same
0 = human / 6 = horsemetaped-type convention recurs across the clothing natives (GetMetaPedTypein jo_libs).
Verified
component/g_client.lua:78-80.
Linked natives
_GET_CATEGORY_OF_COMPONENT_AT_INDEX(0x9B90842304C938A7)
Tags: ped, metaped, component, category, horse, param-meaning
Category: natives
Source: jo_libs-fleet
Created: 2026-05-31T09:42:55.167Z