TasksClient

taskAimGunAtEntity

TASK_AIM_GUN_AT_ENTITY0x9B53BB6E8943AF53

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

SignatureJavaScript
taskAimGunAtEntity(
  ped: Ped,
  entity: Entity,
  duration: number,
  instantBlendToAim: boolean
): void
SignatureLua
taskAimGunAtEntity(
  ped: Ped,
  entity: Entity,
  duration: integer,
  instantBlendToAim: boolean
)

Usage

JavaScript
taskAimGunAtEntity(ped, entity, duration, instantBlendToAim);
Lua
taskAimGunAtEntity(ped, entity, duration, instantBlendToAim)

Parameters

ParameterTypeJavaScriptLuaDescription
pedPednumberinteger
entityEntitynumberinteger
durationintnumberintegerthe amount of time in milliseconds to do the task. -1 will keep the task going until either another task is applied, or CLEAR_ALL_TASKS() is called with the ped
instantBlendToAimBOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

Reference

Namespace
Tasks TASK
In the game
void TASK_AIM_GUN_AT_ENTITY(Ped ped, Entity entity, int duration, BOOL instantBlendToAim)
Hash
0x9B53BB6E8943AF53

Open in the interactive natives reference