RedM Natives

TASK_ACHIEVE_HEADING

Makes the specified ped achieve the specified heading.

Hash0x93B93A37987F1F3D
Runtime nameTaskAchieveHeading
NamespaceTASK
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x93B93A37987F1F3D

Signature

void TASK_ACHIEVE_HEADING(Ped ped, float heading, int timeout);

Parameters

NameTypeDescription
pedPed—
headingfloat—
timeoutint—

Returns void

Description

Makes the specified ped achieve the specified heading.

pedHandle: The handle of the ped to assign the task to.
heading: The desired heading.
timeout: The time, in milliseconds, to allow the task to complete. If the task times out, it is canceled, and the ped will stay at the heading it managed to reach in the time.

Usage

Lua
TaskAchieveHeading(ped, heading, timeout)

-- always works, by hash
Citizen.InvokeNative(0x93B93A37987F1F3D, ped, heading, timeout)
JavaScript and C#
JavaScript
TaskAchieveHeading(ped, heading, timeout);

// by hash
Citizen.invokeNative('0x93B93A37987F1F3D', ped, heading + 0.0000001, timeout);
C#
Function.Call((Hash)0x93B93A37987F1F3D, ped, heading, timeout);
  • 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.