# TASK::TASK_SMART_FLEE_COORD

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

## Signature

```c
void TASK_SMART_FLEE_COORD(Ped ped, float x, float y, float z, float distance, int time, int fleeType, float fleeSpeed);
```

## Parameters

- `ped` (`Ped`)
- `x` (`float`)
- `y` (`float`)
- `z` (`float`)
- `distance` (`float`)
- `time` (`int`)
- `fleeType` (`int`)
- `fleeSpeed` (`float`)

## Returns

`void`

## Description

Makes the specified ped flee the specified distance from the specified position.
fleeType: see TASK_FLEE_COORD

## Usage

### Lua

```lua
TaskSmartFleeCoord(ped, x, y, z, distance, time, fleeType, fleeSpeed)

-- always available, by hash
Citizen.InvokeNative(0x94587F17E9C365D5, ped, x, y, z, distance, time, fleeType, fleeSpeed)
```

### JavaScript

```js
TaskSmartFleeCoord(ped, x, y, z, distance, time, fleeType, fleeSpeed);

// by hash
Citizen.invokeNative('0x94587F17E9C365D5', ped, x + 0.0000001, y + 0.0000001, z + 0.0000001, distance + 0.0000001, time, fleeType, fleeSpeed + 0.0000001);
```

### C#

```csharp
Function.Call((Hash)0x94587F17E9C365D5, ped, x, y, z, distance, time, fleeType, fleeSpeed);
```

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

## Related enums

- [eFleeStyle](https://natives.borderlinerp.com/enums/eFleeStyle.md) — 13 values

*Sources: alloc8or RDR3 NativeDB.*
