Player::taskGoToWhileAimingAt
shootatEntity: If true, peds will shoot at Entity till it is dead. If false, peds will just walk till they reach the entity and will cease shooting.
Syntax
```js player.taskGoToWhileAimingAtEntity(entityToWalkTo, entityToAimAt, speed, shootatEntity, p5, p6, p7, p8, firingPattern); ```
Required Arguments
- entityToWalkTo: Entity handle or object
- entityToAimAt: Entity handle or object
- speed: float
- shootatEntity: Boolean
- p5: float
- p6: float
- p7: Boolean
- p8: Boolean
- firingPattern: Model hash or name
Return value
- Undefined
Example
```js // todo ```