TASK_ACHIEVE_HEADING
Makes the specified ped achieve the specified heading.
Hash
0x93B93A37987F1F3DRuntime name
TaskAchieveHeadingNamespaceTASK
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x93B93A37987F1F3DSignature
void TASK_ACHIEVE_HEADING(Ped ped, float heading, int timeout);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
heading | float | — |
timeout | int | — |
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
TaskAchieveHeading(ped, heading, timeout)
-- always works, by hash
Citizen.InvokeNative(0x93B93A37987F1F3D, ped, heading, timeout)JavaScript and C#
TaskAchieveHeading(ped, heading, timeout);
// by hash
Citizen.invokeNative('0x93B93A37987F1F3D', ped, heading + 0.0000001, timeout);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. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.