# TASK::TASK_COMBAT_HATED_TARGETS_AROUND_PED

- **Hash:** `0x7BF835BB9E2698C8`
- **Namespace:** TASK
- **Runtime name (Lua/JS):** `TaskCombatHatedTargetsAroundPed`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/TASK/TASK_COMBAT_HATED_TARGETS_AROUND_PED

## Signature

```c
void TASK_COMBAT_HATED_TARGETS_AROUND_PED(Ped ped, float radius, int flags, Any p3);
```

## Parameters

- `ped` (`Ped`)
- `radius` (`float`)
- `flags` (`int`)
- `p3` (`Any`)

## Returns

`void`

## Description

Despite its name, it only attacks ONE hated target. The one closest hated target.

## Usage

### Lua

```lua
TaskCombatHatedTargetsAroundPed(ped, radius, flags, p3)

-- always available, by hash
Citizen.InvokeNative(0x7BF835BB9E2698C8, ped, radius, flags, p3)
```

### JavaScript

```js
TaskCombatHatedTargetsAroundPed(ped, radius, flags, p3);

// by hash
Citizen.invokeNative('0x7BF835BB9E2698C8', ped, radius + 0.0000001, flags, p3);
```

### C#

```csharp
Function.Call((Hash)0x7BF835BB9E2698C8, ped, radius, flags, p3);
```

- 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.*
