# TASK::TASK_TURN_PED_TO_FACE_ENTITY

- **Hash:** `0x5AD23D40115353AC`
- **Namespace:** TASK
- **Runtime name (Lua/JS):** `TaskTurnPedToFaceEntity`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/TASK/TASK_TURN_PED_TO_FACE_ENTITY

## Signature

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

## Parameters

- `ped` (`Ped`)
- `targetEntity` (`Entity`)
- `duration` (`int`)
- `p3` (`float`)
- `p4` (`float`)
- `p5` (`float`)

## 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

```lua
TaskTurnPedToFaceEntity(ped, targetEntity, duration, p3, p4, p5)

-- always available, by hash
Citizen.InvokeNative(0x5AD23D40115353AC, ped, targetEntity, duration, p3, p4, p5)
```

### JavaScript

```js
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#

```csharp
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.*
