RedM Natives

_INVENTORY_COPY_ITEM_TO_INVENTORY

Hash0xC04F47D488EF9EBA
Runtime nameInventoryCopyItemToInventory
NamespaceINVENTORY
SideClient
NameCommunity guess
Docs
Since build1207

Signature

void _INVENTORY_COPY_ITEM_TO_INVENTORY(int inventoryId, int inventoryIdCloned, Any* p2, Any p3);

Parameters

NameTypeDescription
inventoryIdint—
inventoryIdClonedint—
p2Any*—
p3Any—

Returns void

Usage

Lua
local p2 = InventoryCopyItemToInventory(inventoryId, inventoryIdCloned, p3)

-- always works, by hash
local p2 = Citizen.InvokeNative(0xC04F47D488EF9EBA, inventoryId, inventoryIdCloned, Citizen.PointerValueInt(), p3)
JavaScript and C#
JavaScript
const p2 = InventoryCopyItemToInventory(inventoryId, inventoryIdCloned, p3);

// by hash
const p2 = Citizen.invokeNative('0xC04F47D488EF9EBA', inventoryId, inventoryIdCloned, Citizen.pointerValueInt(), p3);
C#
var p2 = new OutputArgument();
Function.Call((Hash)0xC04F47D488EF9EBA, inventoryId, inventoryIdCloned, p2, p3);
// p2.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 InvokeNative with the hash — it always works.

Sources

alloc8or RDR3 NativeDB

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