RedM Natives

TASK_TURN_PED_TO_FACE_ENTITY

Hash0x5AD23D40115353AC
Runtime nameTaskTurnPedToFaceEntity
NamespaceTASK
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x5AD23D40115353AC

Signature

void TASK_TURN_PED_TO_FACE_ENTITY(Ped ped, Entity targetEntity, int duration, float p3, float p4, float p5);

Parameters

NameTypeDescription
pedPed—
targetEntityEntity—
durationint—
p3float—
p4float—
p5float—

Returns void

Description

duration: the 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

Usage

Lua
TaskTurnPedToFaceEntity(ped, targetEntity, duration, p3, p4, p5)

-- always works, by hash
Citizen.InvokeNative(0x5AD23D40115353AC, ped, targetEntity, duration, p3, p4, p5)
JavaScript and C#
JavaScript
TaskTurnPedToFaceEntity(ped, targetEntity, duration, p3, p4, p5);

// by hash
Citizen.invokeNative('0x5AD23D40115353AC', ped, targetEntity, duration, p3 + 0.0000001, p4 + 0.0000001, p5 + 0.0000001);
C#
Function.Call((Hash)0x5AD23D40115353AC, ped, targetEntity, duration, p3, p4, p5);
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.