# PED::COUNT_PEDS_IN_COMBAT_WITH_TARGET_WITHIN_RADIUS

- **Hash:** `0x336B3D200AB007CB`
- **Namespace:** PED
- **Runtime name (Lua/JS):** `CountPedsInCombatWithTargetWithinRadius`
- **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_WITHIN_RADIUS

## Signature

```c
int COUNT_PEDS_IN_COMBAT_WITH_TARGET_WITHIN_RADIUS(Ped ped, float x, float y, float z, float radius, int flag);
```

## Parameters

- `ped` (`Ped`)
- `x` (`float`)
- `y` (`float`)
- `z` (`float`)
- `radius` (`float`)
- `flag` (`int`)

## Returns

`int`

## Usage

### Lua

```lua
local retval = CountPedsInCombatWithTargetWithinRadius(ped, x, y, z, radius, flag)

-- always available, by hash
local retval = Citizen.InvokeNative(0x336B3D200AB007CB, ped, x, y, z, radius, flag, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = CountPedsInCombatWithTargetWithinRadius(ped, x, y, z, radius, flag);

// by hash
const retval = Citizen.invokeNative('0x336B3D200AB007CB', ped, x + 0.0000001, y + 0.0000001, z + 0.0000001, radius + 0.0000001, flag, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0x336B3D200AB007CB, ped, x, y, z, radius, flag);
```

- Float parameters: Lua integers (`10`, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write `10.0` or `value + 0.0`. The generated JS wrappers add `0.0000001` to non-zero floats for the same reason.

*Sources: alloc8or RDR3 NativeDB.*
