# PED::COUNT_PEDS_IN_COMBAT_WITH_TARGET

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

## Signature

```c
int COUNT_PEDS_IN_COMBAT_WITH_TARGET(Ped ped, int flag);
```

## Parameters

- `ped` (`Ped`)
- `flag` (`int`)

## Returns

`int`

## Usage

### Lua

```lua
local retval = CountPedsInCombatWithTarget(ped, flag)

-- always available, by hash
local retval = Citizen.InvokeNative(0x5407B7288D0478B7, ped, flag, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = CountPedsInCombatWithTarget(ped, flag);

// by hash
const retval = Citizen.invokeNative('0x5407B7288D0478B7', ped, flag, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0x5407B7288D0478B7, ped, flag);
```

## See also

- [PED::_GET_PEDS_IN_COMBAT_WITH_TARGET](https://natives.borderlinerp.com/natives/PED/_GET_PEDS_IN_COMBAT_WITH_TARGET.md)

*Sources: alloc8or RDR3 NativeDB.*
