# TASK::TASK_GO_TO_COORD_AND_AIM_AT_HATED_ENTITIES_NEAR_COORD

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

## Signature

```c
void TASK_GO_TO_COORD_AND_AIM_AT_HATED_ENTITIES_NEAR_COORD(Ped ped, float goToLocationX, float goToLocationY, float goToLocationZ, float focusLocationX, float focusLocationY, float focusLocationZ, float speed, BOOL shootAtEnemies, float distanceToStopAt, float noRoadsDistance, BOOL unkTrue, int unkFlag, int aimingFlag, Hash firingPattern);
```

## Parameters

- `ped` (`Ped`)
- `goToLocationX` (`float`)
- `goToLocationY` (`float`)
- `goToLocationZ` (`float`)
- `focusLocationX` (`float`)
- `focusLocationY` (`float`)
- `focusLocationZ` (`float`)
- `speed` (`float`)
- `shootAtEnemies` (`BOOL`)
- `distanceToStopAt` (`float`)
- `noRoadsDistance` (`float`)
- `unkTrue` (`BOOL`)
- `unkFlag` (`int`)
- `aimingFlag` (`int`)
- `firingPattern` (`Hash`)

## Returns

`void`

## Usage

### Lua

```lua
TaskGoToCoordAndAimAtHatedEntitiesNearCoord(ped, goToLocationX, goToLocationY, goToLocationZ, focusLocationX, focusLocationY, focusLocationZ, speed, shootAtEnemies, distanceToStopAt, noRoadsDistance, unkTrue, unkFlag, aimingFlag, firingPattern)

-- always available, by hash
Citizen.InvokeNative(0xA55547801EB331FC, ped, goToLocationX, goToLocationY, goToLocationZ, focusLocationX, focusLocationY, focusLocationZ, speed, shootAtEnemies, distanceToStopAt, noRoadsDistance, unkTrue, unkFlag, aimingFlag, firingPattern)
```

### JavaScript

```js
TaskGoToCoordAndAimAtHatedEntitiesNearCoord(ped, goToLocationX, goToLocationY, goToLocationZ, focusLocationX, focusLocationY, focusLocationZ, speed, shootAtEnemies, distanceToStopAt, noRoadsDistance, unkTrue, unkFlag, aimingFlag, firingPattern);

// by hash
Citizen.invokeNative('0xA55547801EB331FC', ped, goToLocationX + 0.0000001, goToLocationY + 0.0000001, goToLocationZ + 0.0000001, focusLocationX + 0.0000001, focusLocationY + 0.0000001, focusLocationZ + 0.0000001, speed + 0.0000001, shootAtEnemies, distanceToStopAt + 0.0000001, noRoadsDistance + 0.0000001, unkTrue, unkFlag, aimingFlag, firingPattern);
```

### C#

```csharp
Function.Call((Hash)0xA55547801EB331FC, ped, goToLocationX, goToLocationY, goToLocationZ, focusLocationX, focusLocationY, focusLocationZ, speed, shootAtEnemies, distanceToStopAt, noRoadsDistance, unkTrue, unkFlag, aimingFlag, firingPattern);
```

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