# TASK::_TASK_FORCE_FIRE_AT_ENTITY_WHILE_AIMING

- **Hash:** `0x2416EC2F31F75266`
- **Namespace:** TASK
- **Runtime name (Lua/JS):** `TaskForceFireAtEntityWhileAiming`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described
- **Since game build:** 1207
- **Other names:** `_TASK_FORCE_THROWABLE_AT_ENTITY_WHILE_AIMING`
- **URL:** https://natives.borderlinerp.com/natives/TASK/_TASK_FORCE_FIRE_AT_ENTITY_WHILE_AIMING

## Signature

```c
void _TASK_FORCE_FIRE_AT_ENTITY_WHILE_AIMING(Ped ped, Entity targetEntity, int durationMs, Any p3, BOOL p4);
```

## Parameters

- `ped` (`Ped`)
- `targetEntity` (`Entity`)
- `durationMs` (`int`)
- `p3` (`Any`)
- `p4` (`BOOL`)

## Returns

`void`

## Description

*Source: alloc8or RDR3 NativeDB*

Makes a ped that is already aiming keep firing at `targetEntity` for `durationMs`.
Uses projectile logic if holding a throwable/bow, otherwise gun logic. `p3` unused; `p4` is an extra mode flag (observed 0/1).
_TASK_FORCE_M*

*Source: VORPCORE RDR3natives*

Forces a ped to attack a target with throwable or projectile weapons (like bows, throwing knives, tomahawks, dynamite) for a specified duration while aiming
With a bow: the ped keeps firing arrows continuously until durationMs expires (as long as the aiming condition is maintained).With other throwables: throws are generally single-use (one per animation cycle).Excluded weapons: lasso and bolas

## Usage

### Lua

```lua
TaskForceFireAtEntityWhileAiming(ped, targetEntity, durationMs, p3, p4)

-- always available, by hash
Citizen.InvokeNative(0x2416EC2F31F75266, ped, targetEntity, durationMs, p3, p4)
```

### JavaScript

```js
TaskForceFireAtEntityWhileAiming(ped, targetEntity, durationMs, p3, p4);

// by hash
Citizen.invokeNative('0x2416EC2F31F75266', ped, targetEntity, durationMs, p3, p4);
```

### C#

```csharp
Function.Call((Hash)0x2416EC2F31F75266, ped, targetEntity, durationMs, p3, p4);
```

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