# TASK::TASK_GOTO_ENTITY_AIMING

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

## Signature

```c
void TASK_GOTO_ENTITY_AIMING(Ped ped, Entity target, float distanceToStopAt, float StartAimingDist);
```

## Parameters

- `ped` (`Ped`)
- `target` (`Entity`)
- `distanceToStopAt` (`float`)
- `StartAimingDist` (`float`)

## Returns

`void`

## Description

ped = Ped you want to perform this task.
target = the Entity they should aim at.
distanceToStopAt = distance from the target, where the ped should stop to aim.
StartAimingDist = distance where the ped should start to aim.

## Usage

### Lua

```lua
TaskGotoEntityAiming(ped, target, distanceToStopAt, StartAimingDist)

-- always available, by hash
Citizen.InvokeNative(0xA9DA48FAB8A76C12, ped, target, distanceToStopAt, StartAimingDist)
```

### JavaScript

```js
TaskGotoEntityAiming(ped, target, distanceToStopAt, StartAimingDist);

// by hash
Citizen.invokeNative('0xA9DA48FAB8A76C12', ped, target, distanceToStopAt + 0.0000001, StartAimingDist + 0.0000001);
```

### C#

```csharp
Function.Call((Hash)0xA9DA48FAB8A76C12, ped, target, distanceToStopAt, StartAimingDist);
```

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