RedM Natives

_INVENTORY_GET_INVENTORY_ITEM_LAST_CREATION

Outputs the last creation date of the item for the selected inventory.

Hash0x112BCA290D2EB53C
Runtime nameInventoryGetInventoryItemLastCreation
NamespaceINVENTORY
SideClient
NameCommunity guess
Docs
Since build1207

Signature

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

Parameters

NameTypeDescription
inventoryIdint—
itemHash—
yearint*—
monthint*—
dayint*—
hourint*—
minuteint*—
secondint*—

Returns BOOL

Description

alloc8or RDR3 NativeDB

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

VORPCORE RDR3natives

Returns the last creation date of an inventory item

Usage

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

-- always works, 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 and C#
JavaScript
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#
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

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.