TasksClient

taskGoStraightToCoordRelativeToEntity

TASK_GO_STRAIGHT_TO_COORD_RELATIVE_TO_ENTITY0x61E360B7E040D12E

The GTA V native TASK_GO_STRAIGHT_TO_COORD_RELATIVE_TO_ENTITY of the TASK namespace, as LS:MP client scripts call it: the global function taskGoStraightToCoordRelativeToEntity, in JavaScript and in Lua.

SignatureJavaScript
taskGoStraightToCoordRelativeToEntity(
  ped: Ped,
  entity: Entity,
  x: number,
  y: number,
  z: number,
  moveBlendRatio: number,
  time: number
): void
SignatureLua
taskGoStraightToCoordRelativeToEntity(
  ped: Ped,
  entity: Entity,
  x: number,
  y: number,
  z: number,
  moveBlendRatio: number,
  time: integer
)

Usage

JavaScript
taskGoStraightToCoordRelativeToEntity(ped, entity, x, y, z, moveBlendRatio, time);
Lua
taskGoStraightToCoordRelativeToEntity(ped, entity, x, y, z, moveBlendRatio, time)

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
taskGoStraightToCoordRelativeToEntity(ped, entity, pos, moveBlendRatio, time);
Lua · with vectors
taskGoStraightToCoordRelativeToEntity(ped, entity, pos, moveBlendRatio, time)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
entityEntitynumberinteger
xfloatnumbernumber
yfloatnumbernumber
zfloatnumbernumber
moveBlendRatiofloatnumbernumber
timeintnumberinteger

Returns

Nothing. In JavaScript the call evaluates to undefined.

Reference

Namespace
Tasks TASK
In the game
void TASK_GO_STRAIGHT_TO_COORD_RELATIVE_TO_ENTITY(Ped ped, Entity entity, float x, float y, float z, float moveBlendRatio, int time)
Hash
0x61E360B7E040D12E

Open in the interactive natives reference