# INVENTORY::_INVENTORY_CREATE_ITEM_COLLECTION

- **Hash:** `0x80D78BDC9D88EF07`
- **Namespace:** INVENTORY
- **Runtime name (Lua/JS):** `InventoryCreateItemCollection`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/INVENTORY/_INVENTORY_CREATE_ITEM_COLLECTION

## Signature

```c
int _INVENTORY_CREATE_ITEM_COLLECTION(int inventoryId, const char* filterName, Hash slotId, int* size);
```

## Parameters

- `inventoryId` (`int`)
- `filterName` (`const char*`)
- `slotId` (`Hash`)
- `size` (`int*`)

## Returns

`int`

## Description

filterName (collections): "ALL", "ALL SATCHEL", "ALL HORSES", "ALL COACHES", "ALL MOUNTS", "ALL CLOTHING", "ALL WEAPONS", "ALL SATCHEL EXCLUDING CLOTHING", "ALL EXCLUDING CLOTHING"
slotId: -1591664384
p3: outCollectionSize (?)
Returns collectionId

## Usage

### Lua

```lua
local retval, size = InventoryCreateItemCollection(inventoryId, filterName, slotId, size)

-- always available, by hash
local retval, size = Citizen.InvokeNative(0x80D78BDC9D88EF07, inventoryId, filterName, slotId, Citizen.PointerValueIntInitialized(size), Citizen.ResultAsInteger())
```

### JavaScript

```js
const [retval, size] = InventoryCreateItemCollection(inventoryId, filterName, slotId, size);

// by hash
const [retval, size] = Citizen.invokeNative('0x80D78BDC9D88EF07', inventoryId, filterName, slotId, Citizen.pointerValueIntInitialized(size), Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
var size = new OutputArgument();
int retval = Function.Call<int>((Hash)0x80D78BDC9D88EF07, inventoryId, filterName, slotId, size);
// size.GetResult<int>()
```

- Hash parameters: the named function also accepts a string and hashes it for you; `Citizen.InvokeNative` needs the number — pass `joaat("name")` or a backtick literal like `` `name` ``.
- The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.
- The name is a community guess and may change. If the named call is missing in your client build, use `InvokeNative` with the hash — it always works.

*Sources: alloc8or RDR3 NativeDB.*
