# TASK::_IS_PED_LOOKING_AT_COORD

- **Hash:** `0x508F5053E3F6F0C4`
- **Namespace:** TASK
- **Runtime name (Lua/JS):** `IsPedLookingAtCoord`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/TASK/_IS_PED_LOOKING_AT_COORD

## Signature

```c
BOOL _IS_PED_LOOKING_AT_COORD(Ped ped, float x, float y, float z, float radius);
```

## Parameters

- `ped` (`Ped`)
- `x` (`float`)
- `y` (`float`)
- `z` (`float`)
- `radius` (`float`)

## Returns

`BOOL`

## Description

*Source: alloc8or RDR3 NativeDB*

Returns true if the ped's current 'IK look-at' target is within `radius` of (x, y, z). This checks the active look-at point (head/eyes) not LOS or heading and returns false if the ped has no active look-at target. Typical radius range: 1.0-30.0.

*Source: VORPCORE RDR3natives*

Only used in R* SP Scripts
Params: p4 = 1.0f - 30.0f

## Usage

### Lua

```lua
local retval = IsPedLookingAtCoord(ped, x, y, z, radius)

-- always available, by hash
local retval = Citizen.InvokeNative(0x508F5053E3F6F0C4, ped, x, y, z, radius, Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const retval = IsPedLookingAtCoord(ped, x, y, z, radius);

// by hash
const retval = Citizen.invokeNative('0x508F5053E3F6F0C4', ped, x + 0.0000001, y + 0.0000001, z + 0.0000001, radius + 0.0000001, Citizen.returnResultAnyway());
```

### C#

```csharp
bool retval = Function.Call<bool>((Hash)0x508F5053E3F6F0C4, ped, x, y, z, radius);
```

- 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.
- The name is a community guess and may change. If the named call is missing in your client build, use `InvokeNative` with the hash — it always works.

*Sources: alloc8or RDR3 NativeDB, VORPCORE RDR3natives.*
