TasksClient

taskAimGunAtCoord

TASK_AIM_GUN_AT_COORD0x6671F3EEC681BDA1

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

SignatureJavaScript
taskAimGunAtCoord(
  ped: Ped,
  x: number,
  y: number,
  z: number,
  time: number,
  instantBlendToAim: boolean,
  playAnimIntro: boolean
): void
SignatureLua
taskAimGunAtCoord(
  ped: Ped,
  x: number,
  y: number,
  z: number,
  time: integer,
  instantBlendToAim: boolean,
  playAnimIntro: boolean
)

Usage

JavaScript
taskAimGunAtCoord(ped, x, y, z, time, instantBlendToAim, playAnimIntro);
Lua
taskAimGunAtCoord(ped, x, y, z, time, instantBlendToAim, playAnimIntro)

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
taskAimGunAtCoord(ped, pos, time, instantBlendToAim, playAnimIntro);
Lua · with vectors
taskAimGunAtCoord(ped, pos, time, instantBlendToAim, playAnimIntro)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
xfloatnumbernumber
yfloatnumbernumber
zfloatnumbernumber
timeintnumberinteger
instantBlendToAimBOOLbooleanboolean
playAnimIntroBOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

Reference

Namespace
Tasks TASK
In the game
void TASK_AIM_GUN_AT_COORD(Ped ped, float x, float y, float z, int time, BOOL instantBlendToAim, BOOL playAnimIntro)
Hash
0x6671F3EEC681BDA1

Open in the interactive natives reference