# PLAYER::_GET_PEDS_IN_COMBAT_WITH_RECENTLY

- **Hash:** `0x1A6E84F13C952094`
- **Namespace:** PLAYER
- **Runtime name (Lua/JS):** `GetPedsInCombatWithRecently`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described with examples
- **Since game build:** 1207
- **Other names:** `_GET_PEDS_DAMAGED_BY_PLAYER_RECENTLY`
- **URL:** https://natives.borderlinerp.com/natives/PLAYER/_GET_PEDS_IN_COMBAT_WITH_RECENTLY

## Signature

```c
BOOL _GET_PEDS_IN_COMBAT_WITH_RECENTLY(Player player, int recentlyMs, Any* outArray);
```

## Parameters

- `player` (`Player`)
- `recentlyMs` (`int`)
- `outArray` (`Any*`)

## Returns

`BOOL`

## Description

*Source: alloc8or RDR3 NativeDB*

Alternate name: _GET_PEDS_DAMAGED_BY_PLAYER
Returns an array of peds the player has recently attacked in a combo, tracking up to three consecutive peds.
Video: https://imgur.com/gallery/0x1a6e84f13c952094-USZqpAJ

*Source: VORPCORE RDR3natives*

it is used to check for that period of time if player damaged any peds only returns the last 3 hits with the entity ids so if you hit the same entity 3 times it will return the same entity id 3 times, if you hit 4 different entities within that time it will return the last 3 entity ids
 only stores the last 3 hits in the data view buffer
duration is in miliseconds
you need dataview

## Usage

### Lua

```lua
local retval, outArray = GetPedsInCombatWithRecently(player, recentlyMs, outArray)

-- always available, by hash
local retval, outArray = Citizen.InvokeNative(0x1A6E84F13C952094, player, recentlyMs, Citizen.PointerValueIntInitialized(outArray), Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const [retval, outArray] = GetPedsInCombatWithRecently(player, recentlyMs, outArray);

// by hash
const [retval, outArray] = Citizen.invokeNative('0x1A6E84F13C952094', player, recentlyMs, Citizen.pointerValueIntInitialized(outArray), Citizen.returnResultAnyway());
```

### C#

```csharp
var outArray = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0x1A6E84F13C952094, player, recentlyMs, outArray);
// outArray.GetResult<int>()
```

- The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.
- `Any*` arguments are often structs. Build them with a DataView buffer and pass it with `:Buffer()` — see the examples and notes below.
- 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.

## Examples

*Source: VORPCORE RDR3natives*

```lua
Citizen.InvokeNative(0x1A6E84F13C952094, PlayerId(), 10000, dataView:Buffer())
local entity = dataView:GetInt32(8 * 1)
local entity2 = dataView:GetInt32(8 * 2)
local entity3 = dataView:GetInt32(8 * 3)
print(entity, entity2, entity3)
```

*Sources: alloc8or RDR3 NativeDB, VORPCORE RDR3natives.*
