# PED::_DETECT_PLAYER_SHOT_NEAR_PED

- **Hash:** `0x9C81338B2E62CE0A`
- **Namespace:** PED
- **Runtime name (Lua/JS):** `DetectPlayerShotNearPed`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described
- **Since game build:** 1207
- **Other names:** `_HAS_PED_BEEN_SHOT_BY_PLAYER_RECENTLY`
- **URL:** https://natives.borderlinerp.com/natives/PED/_DETECT_PLAYER_SHOT_NEAR_PED

## Signature

```c
BOOL _DETECT_PLAYER_SHOT_NEAR_PED(Player player, Ped ped, int shotNearTimeMs);
```

## Parameters

- `player` (`Player`)
- `ped` (`Ped`)
- `shotNearTimeMs` (`int`)

## Returns

`BOOL`

## Description

*Source: alloc8or RDR3 NativeDB*

The time of the shot must've occured <= shotNearTimeMs for this native to return true

*Source: VORPCORE RDR3natives*

this native checks if player has shot a specific ped for the duration passed p2 is in milliseconds

## Usage

### Lua

```lua
local retval = DetectPlayerShotNearPed(player, ped, shotNearTimeMs)

-- always available, by hash
local retval = Citizen.InvokeNative(0x9C81338B2E62CE0A, player, ped, shotNearTimeMs, Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const retval = DetectPlayerShotNearPed(player, ped, shotNearTimeMs);

// by hash
const retval = Citizen.invokeNative('0x9C81338B2E62CE0A', player, ped, shotNearTimeMs, Citizen.returnResultAnyway());
```

### C#

```csharp
bool retval = Function.Call<bool>((Hash)0x9C81338B2E62CE0A, player, ped, shotNearTimeMs);
```

- The name is a community guess and may change. If the named call is missing in your client build, use `InvokeNative` with the hash — it always works.

*Sources: alloc8or RDR3 NativeDB, VORPCORE RDR3natives.*
