TasksClient

taskGoToEntityWhileAimingAtEntity

TASK_GO_TO_ENTITY_WHILE_AIMING_AT_ENTITY0x97465886D35210E9

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

SignatureJavaScript
taskGoToEntityWhileAimingAtEntity(
  ped: Ped,
  entityToWalkTo: Entity,
  entityToAimAt: Entity,
  speed: number,
  shootatEntity: boolean,
  targetRadius: number,
  slowDistance: number,
  useNavMesh: boolean,
  instantBlendToAim: boolean,
  firingPattern: Hash
): void
SignatureLua
taskGoToEntityWhileAimingAtEntity(
  ped: Ped,
  entityToWalkTo: Entity,
  entityToAimAt: Entity,
  speed: number,
  shootatEntity: boolean,
  targetRadius: number,
  slowDistance: number,
  useNavMesh: boolean,
  instantBlendToAim: boolean,
  firingPattern: Hash
)

Usage

JavaScript
taskGoToEntityWhileAimingAtEntity(
  ped, entityToWalkTo, entityToAimAt, speed, shootatEntity, targetRadius, slowDistance,
  useNavMesh, instantBlendToAim, firingPattern
);
Lua
taskGoToEntityWhileAimingAtEntity(
    ped, entityToWalkTo, entityToAimAt, speed, shootatEntity, targetRadius, slowDistance,
    useNavMesh, instantBlendToAim, firingPattern
)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
entityToWalkToEntitynumberinteger
entityToAimAtEntitynumberinteger
speedfloatnumbernumber
shootatEntityBOOLbooleanboolean
targetRadiusfloatnumbernumber
slowDistancefloatnumbernumber
useNavMeshBOOLbooleanboolean
instantBlendToAimBOOLbooleanboolean
firingPatternHashnumberinteger

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.

shootatEntity:
If true, peds will shoot at Entity till it is dead.
If false, peds will just walk till they reach the entity and will cease shooting.

Reference

Namespace
Tasks TASK
In the game
void TASK_GO_TO_ENTITY_WHILE_AIMING_AT_ENTITY(Ped ped, Entity entityToWalkTo, Entity entityToAimAt, float speed, BOOL shootatEntity, float targetRadius, float slowDistance, BOOL useNavMesh, BOOL instantBlendToAim, Hash firingPattern)
Hash
0x97465886D35210E9

Open in the interactive natives reference