# TASK::_CREATE_HERB_COMPOSITES

- **Hash:** `0x5B4BBE80AD5972DC`
- **Namespace:** TASK
- **Runtime name (Lua/JS):** `CreateHerbComposites`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/TASK/_CREATE_HERB_COMPOSITES

## Signature

```c
int _CREATE_HERB_COMPOSITES(Hash asset, float x, float y, float z, float heading, int groundSetting, Any* p6, int p7);
```

## Parameters

- `asset` (`Hash`)
- `x` (`float`)
- `y` (`float`)
- `z` (`float`)
- `heading` (`float`)
- `groundSetting` (`int`)
- `p6` (`Any*`)
- `p7` (`int`)

## Returns

`int`

## Description

groundSetting: 0: spawn on ground, 2 (1?): do not spawn on ground
p7: -1 in R* Scripts
Returns compositeId

## Usage

### Lua

```lua
local retval, p6 = CreateHerbComposites(asset, x, y, z, heading, groundSetting, p7)

-- always available, by hash
local retval, p6 = Citizen.InvokeNative(0x5B4BBE80AD5972DC, asset, x, y, z, heading, groundSetting, Citizen.PointerValueInt(), p7, Citizen.ResultAsInteger())
```

### JavaScript

```js
const [retval, p6] = CreateHerbComposites(asset, x, y, z, heading, groundSetting, p7);

// by hash
const [retval, p6] = Citizen.invokeNative('0x5B4BBE80AD5972DC', asset, x + 0.0000001, y + 0.0000001, z + 0.0000001, heading + 0.0000001, groundSetting, Citizen.pointerValueInt(), p7, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
var p6 = new OutputArgument();
int retval = Function.Call<int>((Hash)0x5B4BBE80AD5972DC, asset, x, y, z, heading, groundSetting, p6, p7);
// p6.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` ``.
- Float parameters: Lua integers (`10`, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write `10.0` or `value + 0.0`. The generated JS wrappers add `0.0000001` to non-zero floats for the same reason.
- 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.*
