_INVENTORY_GET_INVENTORY_ITEM_CHILD
Hash
0xCD9A485F2B383B44Runtime name
InventoryGetInventoryItemChildNamespaceINVENTORY
SideClient
NameCommunity guess
Docs
Since build1207
Signature
BOOL _INVENTORY_GET_INVENTORY_ITEM_CHILD(int inventoryId, Any* parentGuid, Any childIndex, Any* outInventoryItem);Parameters
| Name | Type | Description |
|---|---|---|
inventoryId | int | — |
parentGuid | Any* | — |
childIndex | Any | — |
outInventoryItem | Any* | — |
Returns BOOL
Usage
local retval, parentGuid, outInventoryItem = InventoryGetInventoryItemChild(inventoryId, childIndex)
-- always works, by hash
local retval, parentGuid, outInventoryItem = Citizen.InvokeNative(0xCD9A485F2B383B44, inventoryId, Citizen.PointerValueInt(), childIndex, Citizen.PointerValueInt(), Citizen.ReturnResultAnyway())JavaScript and C#
const [retval, parentGuid, outInventoryItem] = InventoryGetInventoryItemChild(inventoryId, childIndex);
// by hash
const [retval, parentGuid, outInventoryItem] = Citizen.invokeNative('0xCD9A485F2B383B44', inventoryId, Citizen.pointerValueInt(), childIndex, Citizen.pointerValueInt(), Citizen.returnResultAnyway());var parentGuid = new OutputArgument();
var outInventoryItem = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0xCD9A485F2B383B44, inventoryId, parentGuid, childIndex, outInventoryItem);
// parentGuid.GetResult<int>()
// outInventoryItem.GetResult<int>()- Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
Any*arguments are often structs. Build them with a DataView buffer and pass it with:Buffer()— see the examples and notes below.- The name is a community guess and may change. If the named call is missing in your client build, use
InvokeNativewith the hash — it always works.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.