# ENTITY::IS_ENTITY_AT_ENTITY

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

## Signature

```c
BOOL IS_ENTITY_AT_ENTITY(Entity entity1, Entity entity2, float xSize, float ySize, float zSize, BOOL p5, BOOL p6, int p7);
```

## Parameters

- `entity1` (`Entity`)
- `entity2` (`Entity`)
- `xSize` (`float`)
- `ySize` (`float`)
- `zSize` (`float`)
- `p5` (`BOOL`)
- `p6` (`BOOL`)
- `p7` (`int`)

## Returns

`BOOL`

## Description

Checks if entity1 is within the box defined by x/y/zSize of entity2.

Last three parameters are almost always p5 = 0, p6 = 1, p7 = 0

## Usage

### Lua

```lua
local retval = IsEntityAtEntity(entity1, entity2, xSize, ySize, zSize, p5, p6, p7)

-- always available, by hash
local retval = Citizen.InvokeNative(0xC057F02B837A27F6, entity1, entity2, xSize, ySize, zSize, p5, p6, p7, Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const retval = IsEntityAtEntity(entity1, entity2, xSize, ySize, zSize, p5, p6, p7);

// by hash
const retval = Citizen.invokeNative('0xC057F02B837A27F6', entity1, entity2, xSize + 0.0000001, ySize + 0.0000001, zSize + 0.0000001, p5, p6, p7, Citizen.returnResultAnyway());
```

### C#

```csharp
bool retval = Function.Call<bool>((Hash)0xC057F02B837A27F6, entity1, entity2, xSize, ySize, zSize, p5, p6, p7);
```

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