taskUseNearestScenarioChainToCoord
TASK_USE_NEAREST_SCENARIO_CHAIN_TO_COORD0x9FDA1B3D7E7028B3The GTA V native TASK_USE_NEAREST_SCENARIO_CHAIN_TO_COORD of the TASK namespace, as LS:MP client scripts call it: the global function taskUseNearestScenarioChainToCoord, in JavaScript and in Lua.
taskUseNearestScenarioChainToCoord(
ped: Ped,
x: number,
y: number,
z: number,
maxRange: number,
timeToLeave: number
): voidtaskUseNearestScenarioChainToCoord(
ped: Ped,
x: number,
y: number,
z: number,
maxRange: number,
timeToLeave: integer
)Usage
JavaScript
taskUseNearestScenarioChainToCoord(ped, x, y, z, maxRange, timeToLeave);Lua
taskUseNearestScenarioChainToCoord(ped, x, y, z, maxRange, timeToLeave)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
taskUseNearestScenarioChainToCoord(ped, pos, maxRange, timeToLeave);Lua · with vectors
taskUseNearestScenarioChainToCoord(ped, pos, maxRange, timeToLeave)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
x | float | number | number |
y | float | number | number |
z | float | number | number |
maxRange | float | number | number |
timeToLeave | 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.
p5 is always 0 in scripts
Reference
- Namespace
- Tasks TASK
- In the game
void TASK_USE_NEAREST_SCENARIO_CHAIN_TO_COORD(Ped ped, float x, float y, float z, float maxRange, int timeToLeave)- Hash
0x9FDA1B3D7E7028B3