SET_ENTITY_HEADING
Set the heading of an entity in degrees also known as "Yaw".
Signature
void SET_ENTITY_HEADING(Entity entity, float heading);Parameters
| Name | Type | Description |
|---|---|---|
entity | Entity | The entity to set the heading for. |
heading | float | The heading in degrees. |
Returns void
Description
Set the heading of an entity in degrees also known as "Yaw".
This is the server-side RPC native equivalent of the client native SET_ENTITY_HEADING.
Usage
SetEntityHeading(entity, heading)
-- always works, by hash
Citizen.InvokeNative(0xe0ff064d, entity, heading)JavaScript and C#
SetEntityHeading(entity, heading);
// by hash
Citizen.invokeNative('0xe0ff064d', entity, heading + 0.0000001);Function.Call((Hash)0xe0ff064d, entity, heading);- 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.
See also
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.