_CREATE_HERB_COMPOSITES
Returns compositeId
Hash
0x5B4BBE80AD5972DCRuntime name
CreateHerbCompositesNamespaceTASK
SideClient
NameCommunity guess
Docs
Since build1207
Signature
int _CREATE_HERB_COMPOSITES(Hash asset, float x, float y, float z, float heading, int groundSetting, Any* p6, int p7);Parameters
| Name | Type | Description |
|---|---|---|
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
local retval, p6 = CreateHerbComposites(asset, x, y, z, heading, groundSetting, p7)
-- always works, by hash
local retval, p6 = Citizen.InvokeNative(0x5B4BBE80AD5972DC, asset, x, y, z, heading, groundSetting, Citizen.PointerValueInt(), p7, Citizen.ResultAsInteger())JavaScript and C#
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());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.InvokeNativeneeds the number — passjoaat("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. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to 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
InvokeNativewith the hash — it always works.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.