The Lab
TASK native

TASK_START_SCENARIO_AT_POSITION

returns void12 paramsbuild 1207

Tasks ped to play the scenario scenarioHash at (x, y, z) facing heading for duration.

Signature

C
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 b1207

Parameters

#NameType
1pedPed
2scenarioHashHash
3xfloat
4yfloat
5zfloat
6headingfloat
7durationint
8sittingScenarioBOOL
9teleportBOOL
10p9const char*
11p10float
12p11BOOL

Facts

Facts about TASK_START_SCENARIO_AT_POSITION
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.

Lua
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
)
JavaScript
// 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
);
C#
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
);
All TASK natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.