# ENTITY::GET_MATCHING_ENTITIES

- **Hash:** `0x84CCF9A12942C83D`
- **Namespace:** ENTITY
- **Runtime name (Lua/JS):** `GetMatchingEntities`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** named only
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/ENTITY/GET_MATCHING_ENTITIES

## Signature

```c
int GET_MATCHING_ENTITIES(Volume volume, ItemSet itemSet, int entityType, Any p3, Hash p4, const char* p5);
```

## Parameters

- `volume` (`Volume`)
- `itemSet` (`ItemSet`)
- `entityType` (`int`)
- `p3` (`Any`)
- `p4` (`Hash`)
- `p5` (`const char*`)

## Returns

`int`

## Usage

### Lua

```lua
local retval = GetMatchingEntities(volume, itemSet, entityType, p3, p4, p5)

-- always available, by hash
local retval = Citizen.InvokeNative(0x84CCF9A12942C83D, volume, itemSet, entityType, p3, p4, p5, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = GetMatchingEntities(volume, itemSet, entityType, p3, p4, p5);

// by hash
const retval = Citizen.invokeNative('0x84CCF9A12942C83D', volume, itemSet, entityType, p3, p4, p5, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0x84CCF9A12942C83D, volume, itemSet, entityType, p3, p4, p5);
```

- Hash parameters: the named function also accepts a string and hashes it for you; `Citizen.InvokeNative` needs the number — pass `joaat("name")` or a backtick literal like `` `name` ``.

*Sources: alloc8or RDR3 NativeDB.*
