# ENTITY::IS_ENTITY_AT_COORD

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

## Signature

```c
BOOL IS_ENTITY_AT_COORD(Entity entity, float xPos, float yPos, float zPos, float xSize, float ySize, float zSize, BOOL p7, BOOL p8, int p9);
```

## Parameters

- `entity` (`Entity`)
- `xPos` (`float`)
- `yPos` (`float`)
- `zPos` (`float`)
- `xSize` (`float`)
- `ySize` (`float`)
- `zSize` (`float`)
- `p7` (`BOOL`)
- `p8` (`BOOL`)
- `p9` (`int`)

## Returns

`BOOL`

## Description

Checks if entity is within x/y/zSize distance of x/y/z. 

Last three are unknown ints, almost always p7 = 0, p8 = 1, p9 = 0

## Usage

### Lua

```lua
local retval = IsEntityAtCoord(entity, xPos, yPos, zPos, xSize, ySize, zSize, p7, p8, p9)

-- always available, by hash
local retval = Citizen.InvokeNative(0x5E58342602E94718, entity, xPos, yPos, zPos, xSize, ySize, zSize, p7, p8, p9, Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const retval = IsEntityAtCoord(entity, xPos, yPos, zPos, xSize, ySize, zSize, p7, p8, p9);

// by hash
const retval = Citizen.invokeNative('0x5E58342602E94718', entity, xPos + 0.0000001, yPos + 0.0000001, zPos + 0.0000001, xSize + 0.0000001, ySize + 0.0000001, zSize + 0.0000001, p7, p8, p9, Citizen.returnResultAnyway());
```

### C#

```csharp
bool retval = Function.Call<bool>((Hash)0x5E58342602E94718, entity, xPos, yPos, zPos, xSize, ySize, zSize, p7, p8, p9);
```

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