TASK_START_SCENARIO_AT_POSITION
Hash
0x4D1F61FC34AF3CD1Runtime name
TaskStartScenarioAtPositionNamespaceTASK
SideClient
NameOfficial
Docs
Since build1207
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);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
scenarioHash | Hash | — |
x | float | — |
y | float | — |
z | float | — |
heading | float | — |
duration | int | — |
sittingScenario | BOOL | — |
teleport | BOOL | — |
p9 | const char* | — |
p10 | float | — |
p11 | BOOL | — |
Returns void
Usage
TaskStartScenarioAtPosition(ped, scenarioHash, x, y, z, heading, duration, sittingScenario, teleport, p9, p10, p11)
-- always works, by hash
Citizen.InvokeNative(0x4D1F61FC34AF3CD1, ped, scenarioHash, x, y, z, heading, duration, sittingScenario, teleport, p9, p10, p11)JavaScript and C#
TaskStartScenarioAtPosition(ped, scenarioHash, x, y, z, heading, duration, sittingScenario, teleport, p9, p10, p11);
// by hash
Citizen.invokeNative('0x4D1F61FC34AF3CD1', ped, scenarioHash, x + 0.0000001, y + 0.0000001, z + 0.0000001, heading + 0.0000001, duration, sittingScenario, teleport, p9, p10 + 0.0000001, p11);Function.Call((Hash)0x4D1F61FC34AF3CD1, ped, scenarioHash, x, y, z, heading, duration, sittingScenario, teleport, p9, p10, p11);- 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.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.