# INVENTORY::_INVENTORY_GET_INVENTORY_ITEM_LAST_CREATION

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

## Signature

```c
BOOL _INVENTORY_GET_INVENTORY_ITEM_LAST_CREATION(int inventoryId, Hash item, int* year, int* month, int* day, int* hour, int* minute, int* second);
```

## Parameters

- `inventoryId` (`int`)
- `item` (`Hash`)
- `year` (`int*`)
- `month` (`int*`)
- `day` (`int*`)
- `hour` (`int*`)
- `minute` (`int*`)
- `second` (`int*`)

## Returns

`BOOL`

## Description

*Source: alloc8or RDR3 NativeDB*

Outputs the last creation date of the item for the selected inventory. Returns true if successful, false otherwise.

*Source: VORPCORE RDR3natives*

Returns the last creation date of an inventory item

## Usage

### Lua

```lua
local retval, year, month, day, hour, minute, second = InventoryGetInventoryItemLastCreation(inventoryId, item)

-- always available, by hash
local retval, year, month, day, hour, minute, second = Citizen.InvokeNative(0x112BCA290D2EB53C, inventoryId, item, Citizen.PointerValueInt(), Citizen.PointerValueInt(), Citizen.PointerValueInt(), Citizen.PointerValueInt(), Citizen.PointerValueInt(), Citizen.PointerValueInt(), Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const [retval, year, month, day, hour, minute, second] = InventoryGetInventoryItemLastCreation(inventoryId, item);

// by hash
const [retval, year, month, day, hour, minute, second] = Citizen.invokeNative('0x112BCA290D2EB53C', inventoryId, item, Citizen.pointerValueInt(), Citizen.pointerValueInt(), Citizen.pointerValueInt(), Citizen.pointerValueInt(), Citizen.pointerValueInt(), Citizen.pointerValueInt(), Citizen.returnResultAnyway());
```

### C#

```csharp
var year = new OutputArgument();
var month = new OutputArgument();
var day = new OutputArgument();
var hour = new OutputArgument();
var minute = new OutputArgument();
var second = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0x112BCA290D2EB53C, inventoryId, item, year, month, day, hour, minute, second);
// year.GetResult<int>()
// month.GetResult<int>()
// day.GetResult<int>()
// hour.GetResult<int>()
// minute.GetResult<int>()
// second.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` ``.
- Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
- 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, VORPCORE RDR3natives.*
