# TASK::TASK_SHOOT_AT_ENTITY

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

## Signature

```c
void TASK_SHOOT_AT_ENTITY(Entity entity, Entity targetEntity, int duration, Hash firingPattern, BOOL affectCockedState);
```

## Parameters

- `entity` (`Entity`)
- `targetEntity` (`Entity`)
- `duration` (`int`)
- `firingPattern` (`Hash`)
- `affectCockedState` (`BOOL`)

## Returns

`void`

## Usage

### Lua

```lua
TaskShootAtEntity(entity, targetEntity, duration, firingPattern, affectCockedState)

-- always available, by hash
Citizen.InvokeNative(0x08DA95E8298AE772, entity, targetEntity, duration, firingPattern, affectCockedState)
```

### JavaScript

```js
TaskShootAtEntity(entity, targetEntity, duration, firingPattern, affectCockedState);

// by hash
Citizen.invokeNative('0x08DA95E8298AE772', entity, targetEntity, duration, firingPattern, affectCockedState);
```

### C#

```csharp
Function.Call((Hash)0x08DA95E8298AE772, entity, targetEntity, duration, firingPattern, affectCockedState);
```

- Hash parameters: the named function also accepts a string and hashes it for you; `Citizen.InvokeNative` needs the number — pass `joaat("name")` or a backtick literal like `` `name` ``.

*Sources: alloc8or RDR3 NativeDB.*
