RedM Natives

_ITEMDATABASE_GET_BUNDLE_ACQUIRE_COST

Fills out acquire-cost data for a bundle entry.

Hash0x3A0B667ABFF87F6E
Runtime nameItemdatabaseGetBundleAcquireCost
NamespaceITEMDATABASE
SideClient
NameCommunity guess
Docs
Since build1207

Signature

BOOL _ITEMDATABASE_GET_BUNDLE_ACQUIRE_COST(Hash bundle, int index, Any* outData);

Parameters

NameTypeDescription
bundleHash—
indexint—
outDataAny*—

Returns BOOL

Description

alloc8or RDR3 NativeDB

Fills out acquire-cost data for a bundle entry.
Use index with _ITEMDATABASE_GET_BUNDLE_ACQUIRE_COSTS_COUNT.

outData:
struct AcquireCost
{
	alignas(8) Hash cost;
	alignas(8) Any  p1;
	alignas(8) Hash costType;
	alignas(8) int  numCosts;
	alignas(8) int  p4;
	alignas(8) Any* costs; // array of Cost entries
};
struct Cost
{
	alignas(8) Hash currency;
	alignas(8) int  amount;
};

VORPCORE RDR3natives

eg: BUNDLE_CLOTHING_ITEM_F_OFFHAND_000_TINT_001 index: To use with 0x7A35A72A692BE9DB

Usage

Lua
local retval, outData = ItemdatabaseGetBundleAcquireCost(bundle, index, outData)

-- always works, by hash
local retval, outData = Citizen.InvokeNative(0x3A0B667ABFF87F6E, bundle, index, Citizen.PointerValueIntInitialized(outData), Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const [retval, outData] = ItemdatabaseGetBundleAcquireCost(bundle, index, outData);

// by hash
const [retval, outData] = Citizen.invokeNative('0x3A0B667ABFF87F6E', bundle, index, Citizen.pointerValueIntInitialized(outData), Citizen.returnResultAnyway());
C#
var outData = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0x3A0B667ABFF87F6E, bundle, index, outData);
// outData.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`.
  • 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.

Examples

LUA · VORPCORE RDR3natives
struct outData {
  Hash cost;
  Any unk1; // Maybe bool, int otherwise
  Hash costType;
  int numCosts;
  int unk2;
  Any* costs; // Array of costs
};

struct Cost {
  Hash currency;
  int amount;
};

Sources

alloc8or RDR3 NativeDB · VORPCORE RDR3natives

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