TasksClient

taskTurnPedToFaceCoord

TASK_TURN_PED_TO_FACE_COORD0x1DDA930A0AC38571

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

SignatureJavaScript
taskTurnPedToFaceCoord(
  ped: Ped,
  x: number,
  y: number,
  z: number,
  duration: number
): void
SignatureLua
taskTurnPedToFaceCoord(
  ped: Ped,
  x: number,
  y: number,
  z: number,
  duration: integer
)

Usage

JavaScript
taskTurnPedToFaceCoord(ped, x, y, z, duration);
Lua
taskTurnPedToFaceCoord(ped, x, y, z, duration)

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
taskTurnPedToFaceCoord(ped, pos, duration);
Lua · with vectors
taskTurnPedToFaceCoord(ped, pos, duration)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
xfloatnumbernumber
yfloatnumbernumber
zfloatnumbernumber
durationintnumberinteger

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.

duration in milliseconds

Reference

Namespace
Tasks TASK
In the game
void TASK_TURN_PED_TO_FACE_COORD(Ped ped, float x, float y, float z, int duration)
Hash
0x1DDA930A0AC38571

Open in the interactive natives reference