# ENTITY::IS_ENTITY_IN_ANGLED_AREA

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

## Signature

```c
BOOL IS_ENTITY_IN_ANGLED_AREA(Entity entity, float originX, float originY, float originZ, float edgeX, float edgeY, float edgeZ, float angle, BOOL p8, BOOL p9, Any p10);
```

## Parameters

- `entity` (`Entity`)
- `originX` (`float`)
- `originY` (`float`)
- `originZ` (`float`)
- `edgeX` (`float`)
- `edgeY` (`float`)
- `edgeZ` (`float`)
- `angle` (`float`)
- `p8` (`BOOL`)
- `p9` (`BOOL`)
- `p10` (`Any`)

## Returns

`BOOL`

## Description

Creates a spherical cone at origin that extends to surface with the angle specified. Then returns true if the entity is inside the spherical cone

Angle is measured in degrees.

## Usage

### Lua

```lua
local retval = IsEntityInAngledArea(entity, originX, originY, originZ, edgeX, edgeY, edgeZ, angle, p8, p9, p10)

-- always available, by hash
local retval = Citizen.InvokeNative(0xD3151E53134595E5, entity, originX, originY, originZ, edgeX, edgeY, edgeZ, angle, p8, p9, p10, Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const retval = IsEntityInAngledArea(entity, originX, originY, originZ, edgeX, edgeY, edgeZ, angle, p8, p9, p10);

// by hash
const retval = Citizen.invokeNative('0xD3151E53134595E5', entity, originX + 0.0000001, originY + 0.0000001, originZ + 0.0000001, edgeX + 0.0000001, edgeY + 0.0000001, edgeZ + 0.0000001, angle + 0.0000001, p8, p9, p10, Citizen.returnResultAnyway());
```

### C#

```csharp
bool retval = Function.Call<bool>((Hash)0xD3151E53134595E5, entity, originX, originY, originZ, edgeX, edgeY, edgeZ, angle, p8, p9, p10);
```

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