TASK_START_SCENARIO_AT_POSITION
Tasks ped to play the scenario scenarioHash at (x, y, z) facing heading for duration.
Signature
void TASK_START_SCENARIO_AT_POSITION(Ped ped, Hash scenarioHash, float x, float y, float z, float heading, int duration, BOOL sittingScenario, BOOL teleport, const char* p9, float p10, BOOL p11); // 0x4D1F61FC34AF3CD1 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | ped | Ped |
| 2 | scenarioHash | Hash |
| 3 | x | float |
| 4 | y | float |
| 5 | z | float |
| 6 | heading | float |
| 7 | duration | int |
| 8 | sittingScenario | BOOL |
| 9 | teleport | BOOL |
| 10 | p9 | const char* |
| 11 | p10 | float |
| 12 | p11 | BOOL |
Facts
| Name | TASK_START_SCENARIO_AT_POSITION |
|---|---|
| Hash | 0x4D1F61FC34AF3CD1 |
| Namespace | |
| Returns | void |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
Citizen.InvokeNative(0x4D1F61FC34AF3CD1, -- TASK_START_SCENARIO_AT_POSITION
PlayerPedId(), -- Ped ped
GetHashKey("name"), -- Hash scenarioHash
0.0, -- float x
0.0, -- float y
0.0, -- float z
0.0, -- float heading
0, -- int duration
false, -- BOOL sittingScenario
false, -- BOOL teleport
"text", -- const char* p9
0.0, -- float p10
false -- BOOL p11
)// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
Citizen.invokeNative("0x4D1F61FC34AF3CD1", // TASK_START_SCENARIO_AT_POSITION
PlayerPedId(), // Ped ped
GetHashKey("name"), // Hash scenarioHash
0.0, // float x
0.0, // float y
0.0, // float z
0.0, // float heading
0, // int duration
false, // BOOL sittingScenario
false, // BOOL teleport
"text", // const char* p9
0.0, // float p10
false // BOOL p11
);Function.Call((Hash)0x4D1F61FC34AF3CD1, // TASK_START_SCENARIO_AT_POSITION
API.PlayerPedId(), // Ped ped
(uint)API.GetHashKey("name"), // Hash scenarioHash
0.0f, // float x
0.0f, // float y
0.0f, // float z
0.0f, // float heading
0, // int duration
false, // BOOL sittingScenario
false, // BOOL teleport
"text", // const char* p9
0.0f, // float p10
false // BOOL p11
);Related TASK natives
- TASK_START_SCENARIO_IN_PLACE_HASH
- _TASK_START_SCENARIO_IN_PLACE_2
- TASK_SHOOT_AT_COORD
- TASK_SHOOT_AT_ENTITY
- TASK_AIM_AT_COORD
- TASK_AIM_AT_ENTITY
- TASK_AIM_GUN_AT_COORD
- TASK_AIM_GUN_AT_ENTITY
- TASK_CLEAR_LOOK_AT
- TASK_FOLLOW_ENTITY_ALONG_WAYPOINT_RECORDING_AT_OFFSET
- TASK_FOLLOW_ENTITY_WHILE_AIMING_AT_ENTITY
- TASK_FOLLOW_WAYPOINT_RECORDING_AT_OFFSET
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.