taskUseNearestScenarioToCoord
TASK_USE_NEAREST_SCENARIO_TO_COORD0x277F471BA9DB000BThe GTA V native TASK_USE_NEAREST_SCENARIO_TO_COORD of the TASK namespace, as LS:MP client scripts call it: the global function taskUseNearestScenarioToCoord, in JavaScript and in Lua.
taskUseNearestScenarioToCoord(
ped: Ped,
x: number,
y: number,
z: number,
distance: number,
duration: number
): voidtaskUseNearestScenarioToCoord(
ped: Ped,
x: number,
y: number,
z: number,
distance: number,
duration: integer
)Usage
JavaScript
taskUseNearestScenarioToCoord(ped, x, y, z, distance, duration);Lua
taskUseNearestScenarioToCoord(ped, x, y, z, distance, duration)Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.
JavaScript · with vectors
taskUseNearestScenarioToCoord(ped, pos, distance, duration);Lua · with vectors
taskUseNearestScenarioToCoord(ped, pos, distance, duration)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
x | float | number | number |
y | float | number | number |
z | float | number | number |
distance | float | number | number |
duration | int | number | integer |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Updated variables
An alternative to taskUseNearestScenarioToCoordWarp. Makes the ped walk to the scenario instead.
Reference
- Namespace
- Tasks TASK
- In the game
void TASK_USE_NEAREST_SCENARIO_TO_COORD(Ped ped, float x, float y, float z, float distance, int duration)- Hash
0x277F471BA9DB000B