Hand-checkedUnofficial name
INVENTORY::_INVENTORY_GET_ITEM_FROM_COLLECTION_INDEX
0x2C0326487D05DB3C ·RVA 0x03E8A640
Signature
BOOL _INVENTORY_GET_ITEM_FROM_COLLECTION_INDEX(
int collectionId,
int itemIndex,
InventoryItem* outItem
);
Parameters 3
| # | Type | Name | Notes |
|---|---|---|---|
| 0 | int | collectionId |
– |
| 1 | int | itemIndex |
– |
| 2 | InventoryItem* | outItem |
– |
Returns
BOOL
Notes
- Fills outItem with item number itemIndex of a collection made by _INVENTORY_CREATE_ITEM_COLLECTION_WITH_FILTER. Returns true if there is one. Release the collection with _INVENTORY_RELEASE_ITEM_COLLECTION. Read from the game code.
- InventoryItem: 64 bytes (8 script cells); clear it before the call. +0x00 Guid guid (16 bytes); +0x10 Hash item; +0x14 Guid parentGuid (16 bytes); +0x24 Hash slotId; +0x28 BOOL isEquipped (1 byte); +0x30 int64 quantity; +0x38 int childCount (items under this one); +0x3C BOOL isExpired (1 byte: the item has an expiry time and it has passed).
- The same InventoryItem layout is filled by INVENTORY_GET_INVENTORY_ITEM, _INVENTORY_GET_INVENTORY_ITEM_CHILD, _INVENTORY_GET_INVENTORY_ITEM_EQUIPPED_IN_SLOT and _INVENTORY_GET_ITEM_FROM_COLLECTION_INDEX.
Call it
// INVENTORY::_INVENTORY_GET_ITEM_FROM_COLLECTION_INDEX
auto result = invoke<BOOL>(0x2C0326487D05DB3C, collectionId, itemIndex, &outItem);// INVENTORY::_INVENTORY_GET_ITEM_FROM_COLLECTION_INDEX
bool result = Function.Call<bool>((Hash)0x2C0326487D05DB3C, collectionId, itemIndex, outItem);-- INVENTORY::_INVENTORY_GET_ITEM_FROM_COLLECTION_INDEX
local result = Citizen.InvokeNative(0x2C0326487D05DB3C, collectionId, itemIndex, outItem)// INVENTORY::_INVENTORY_GET_ITEM_FROM_COLLECTION_INDEX
const result = Citizen.invokeNative("0x2C0326487D05DB3C", collectionId, itemIndex, outItem);Generic call-by-hash templates in the style of the common GTA V / RDR2 script frameworks. Adapt the types to your tooling.
Improve this page
Know what this native does, a better name, or the real parameter types? Suggest an edit. A moderator reviews every suggestion, and approved edits credit you here.