RedM Natives

_ITEMDATABASE_GET_BUNDLE_ITEM_INFO

Outputs bundle item info.

Hash0x5D48A77E4B668B57
Runtime nameItemdatabaseGetBundleItemInfo
NamespaceITEMDATABASE
SideClient
NameCommunity guess
Docs
Since build1207

Signature

BOOL _ITEMDATABASE_GET_BUNDLE_ITEM_INFO(int bundleId, Any* data, int index, Hash* outBundle);

Parameters

NameTypeDescription
bundleIdint—
dataAny*—
indexint—
outBundleHash*—

Returns BOOL

Description

Outputs bundle item info.
struct BundleItemInfo
{
	alignas(8) Hash item;
	alignas(8) Hash slotId;
	alignas(8) int  unk2;
	alignas(8) int  unk3;
};

Usage

Lua
local retval, data, outBundle = ItemdatabaseGetBundleItemInfo(bundleId, index)

-- always works, by hash
local retval, data, outBundle = Citizen.InvokeNative(0x5D48A77E4B668B57, bundleId, Citizen.PointerValueInt(), index, Citizen.PointerValueInt(), Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const [retval, data, outBundle] = ItemdatabaseGetBundleItemInfo(bundleId, index);

// by hash
const [retval, data, outBundle] = Citizen.invokeNative('0x5D48A77E4B668B57', bundleId, Citizen.pointerValueInt(), index, Citizen.pointerValueInt(), Citizen.returnResultAnyway());
C#
var data = new OutputArgument();
var outBundle = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0x5D48A77E4B668B57, bundleId, data, index, outBundle);
// data.GetResult<int>()
// outBundle.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.