# ENTITY::GET_NEAREST_PARTICIPANT_TO_ENTITY

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

## Signature

```c
Player GET_NEAREST_PARTICIPANT_TO_ENTITY(Entity entity);
```

## Parameters

- `entity` (`Entity`)

## Returns

`Player`

## Usage

### Lua

```lua
local retval = GetNearestParticipantToEntity(entity)

-- always available, by hash
local retval = Citizen.InvokeNative(0x6888A43C35A5F630, entity, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = GetNearestParticipantToEntity(entity);

// by hash
const retval = Citizen.invokeNative('0x6888A43C35A5F630', entity, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0x6888A43C35A5F630, entity);
```

*Sources: alloc8or RDR3 NativeDB.*
