TasksClient

taskGoToEntityWhileAimingAtCoord

TASK_GO_TO_ENTITY_WHILE_AIMING_AT_COORD0x04701832B739DCE5

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

SignatureJavaScript
taskGoToEntityWhileAimingAtCoord(
  ped: Ped,
  entity: Entity,
  aimX: number,
  aimY: number,
  aimZ: number,
  moveBlendRatio: number,
  shoot: boolean,
  targetRadius: number,
  slowDistance: number,
  useNavMesh: boolean,
  instantBlendToAim: boolean,
  firingPattern: Hash
): void
SignatureLua
taskGoToEntityWhileAimingAtCoord(
  ped: Ped,
  entity: Entity,
  aimX: number,
  aimY: number,
  aimZ: number,
  moveBlendRatio: number,
  shoot: boolean,
  targetRadius: number,
  slowDistance: number,
  useNavMesh: boolean,
  instantBlendToAim: boolean,
  firingPattern: Hash
)

Usage

JavaScript
taskGoToEntityWhileAimingAtCoord(
  ped, entity, aimX, aimY, aimZ, moveBlendRatio, shoot, targetRadius, slowDistance, useNavMesh,
  instantBlendToAim, firingPattern
);
Lua
taskGoToEntityWhileAimingAtCoord(
    ped, entity, aimX, aimY, aimZ, moveBlendRatio, shoot, targetRadius, slowDistance,
    useNavMesh, instantBlendToAim, firingPattern
)

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
taskGoToEntityWhileAimingAtCoord(
  ped, entity, aim, moveBlendRatio, shoot, targetRadius, slowDistance, useNavMesh,
  instantBlendToAim, firingPattern
);
Lua · with vectors
taskGoToEntityWhileAimingAtCoord(
    ped, entity, aim, moveBlendRatio, shoot, targetRadius, slowDistance, useNavMesh,
    instantBlendToAim, firingPattern
)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
entityEntitynumberinteger
aimXfloatnumbernumber
aimYfloatnumbernumber
aimZfloatnumbernumber
moveBlendRatiofloatnumbernumber
shootBOOLbooleanboolean
targetRadiusfloatnumbernumber
slowDistancefloatnumbernumber
useNavMeshBOOLbooleanboolean
instantBlendToAimBOOLbooleanboolean
firingPatternHashnumberinteger

Returns

Nothing. In JavaScript the call evaluates to undefined.

Reference

Namespace
Tasks TASK
In the game
void TASK_GO_TO_ENTITY_WHILE_AIMING_AT_COORD(Ped ped, Entity entity, float aimX, float aimY, float aimZ, float moveBlendRatio, BOOL shoot, float targetRadius, float slowDistance, BOOL useNavMesh, BOOL instantBlendToAim, Hash firingPattern)
Hash
0x04701832B739DCE5

Open in the interactive natives reference