_CREATE_HERB_COMPOSITES
Spawns the herb or plant composite asset at the given position and heading, returning the composite id.
Request the asset first with _REQUEST_HERB_COMPOSITE_ASSET.
Signature
int _CREATE_HERB_COMPOSITES(Hash asset, float x, float y, float z, float heading, int groundSetting, Any* p6, int p7); // 0x5B4BBE80AD5972DC b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | asset | Hash |
| 2 | x | float |
| 3 | y | float |
| 4 | z | float |
| 5 | heading | float |
| 6 | groundSetting | int |
| 7 | p6 | Any* (out pointer) |
| 8 | p7 | int |
Facts
| Name | _CREATE_HERB_COMPOSITES |
|---|---|
| Hash | 0x5B4BBE80AD5972DC |
| Namespace | |
| Returns | int |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local result, p6 = Citizen.InvokeNative(0x5B4BBE80AD5972DC, -- _CREATE_HERB_COMPOSITES
GetHashKey("name"), -- Hash asset
0.0, -- float x
0.0, -- float y
0.0, -- float z
0.0, -- float heading
0, -- int groundSetting
Citizen.PointerValueInt(), -- Any* p6
0, -- int p7
Citizen.ResultAsInteger()
)
print(result, p6)// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const [result, p6] = Citizen.invokeNative("0x5B4BBE80AD5972DC", // _CREATE_HERB_COMPOSITES
GetHashKey("name"), // Hash asset
0.0, // float x
0.0, // float y
0.0, // float z
0.0, // float heading
0, // int groundSetting
Citizen.pointerValueInt(), // Any* p6
0, // int p7
Citizen.resultAsInteger()
);
console.log(result, p6)var p6Arg = new OutputArgument();
int result = Function.Call<int>((Hash)0x5B4BBE80AD5972DC, // _CREATE_HERB_COMPOSITES
(uint)API.GetHashKey("name"), // Hash asset
0.0f, // float x
0.0f, // float y
0.0f, // float z
0.0f, // float heading
0, // int groundSetting
p6Arg, // Any* p6
0 // int p7
);
int p6 = p6Arg.GetResult<int>();Related TASK natives
- _DELETE_PATCH_OBJECTS_FROM_HERB_COMPOSITES
- _CREATE_WAYPOINT_PATH
- _GET_HERB_COMPOSITE_NUM_ENTITIES
- _REQUEST_HERB_COMPOSITE_ASSET
- CREATE_PATROL_ROUTE
- CREATE_SCENARIO_POINT_HASH
- CREATE_SCENARIO_POINT_HASH_ATTACHED_TO_ENTITY
- _CALCULATE_WAYPOINT_DISTANCE_FROM_START
- _CLEAR_VEHICLE_TASKS
- _CLEAR_VEHICLE_TASKS_SECONDARY
- _CUFF_PED
- _ADD_COVER_BLOCKING_VOLUME
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.