# CFX::SET_ENTITY_HEADING

- **Hash:** `0xE0FF064D`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `SetEntityHeading`
- **Side:** server (Cfx runtime native)
- **Name status:** official
- **Documentation:** described
- **URL:** https://natives.borderlinerp.com/natives/CFX/SET_ENTITY_HEADING

## Signature

```c
void SET_ENTITY_HEADING(Entity entity, float heading);
```

## Parameters

- `entity` (`Entity`) — The entity to set the heading for.
- `heading` (`float`) — The heading in degrees.

## Returns

`void`

## Description

*Source: Cfx.re native reference*

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](?\_0x8E2530AA8ADA980E).**

## Usage

### Lua

```lua
SetEntityHeading(entity, heading)

-- always available, by hash
Citizen.InvokeNative(0xe0ff064d, entity, heading)
```

### JavaScript

```js
SetEntityHeading(entity, heading);

// by hash
Citizen.invokeNative('0xe0ff064d', entity, heading + 0.0000001);
```

### C#

```csharp
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. Write `10.0` or `value + 0.0`. The generated JS wrappers add `0.0000001` to non-zero floats for the same reason.

## See also

- [CFX::GET_ENTITY_HEADING](https://natives.borderlinerp.com/natives/CFX/GET_ENTITY_HEADING.md)

*Sources: Cfx.re native reference.*
