# ITEMDATABASE::_ITEMDATABASE_GET_BUNDLE_ACQUIRE_COST

- **Hash:** `0x3A0B667ABFF87F6E`
- **Namespace:** ITEMDATABASE
- **Runtime name (Lua/JS):** `ItemdatabaseGetBundleAcquireCost`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described with examples
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/ITEMDATABASE/_ITEMDATABASE_GET_BUNDLE_ACQUIRE_COST

## Signature

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

## Parameters

- `bundle` (`Hash`)
- `index` (`int`)
- `outData` (`Any*`)

## Returns

`BOOL`

## Description

*Source: 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;
};

*Source: VORPCORE RDR3natives*

eg: BUNDLE_CLOTHING_ITEM_F_OFFHAND_000_TINT_001 index: To use with 0x7A35A72A692BE9DB

## Usage

### Lua

```lua
local retval, outData = ItemdatabaseGetBundleAcquireCost(bundle, index, outData)

-- always available, by hash
local retval, outData = Citizen.InvokeNative(0x3A0B667ABFF87F6E, bundle, index, Citizen.PointerValueIntInitialized(outData), Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const [retval, outData] = ItemdatabaseGetBundleAcquireCost(bundle, index, outData);

// by hash
const [retval, outData] = Citizen.invokeNative('0x3A0B667ABFF87F6E', bundle, index, Citizen.pointerValueIntInitialized(outData), Citizen.returnResultAnyway());
```

### C#

```csharp
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

*Source: VORPCORE RDR3natives*

```lua
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.*
