RedM Natives

_ITEMDATABASE_GET_BUNDLE_ITEM_COUNT

Hash0x3332695B01015DF9
Runtime nameItemdatabaseGetBundleItemCount
NamespaceITEMDATABASE
SideClient
NameCommunity guess
Docs
Since build1207

Signature

int _ITEMDATABASE_GET_BUNDLE_ITEM_COUNT(int bundleId, Any* data);

Parameters

NameTypeDescription
bundleIdint—
dataAny*—

Returns int

Usage

Lua
local retval, data = ItemdatabaseGetBundleItemCount(bundleId, data)

-- always works, by hash
local retval, data = Citizen.InvokeNative(0x3332695B01015DF9, bundleId, Citizen.PointerValueIntInitialized(data), Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const [retval, data] = ItemdatabaseGetBundleItemCount(bundleId, data);

// by hash
const [retval, data] = Citizen.invokeNative('0x3332695B01015DF9', bundleId, Citizen.pointerValueIntInitialized(data), Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
var data = new OutputArgument();
int retval = Function.Call<int>((Hash)0x3332695B01015DF9, bundleId, data);
// data.GetResult<int>()
  • The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.
  • 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.