# PLAYER::SET_ALL_RANDOM_PEDS_FLEE

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

## Signature

```c
void SET_ALL_RANDOM_PEDS_FLEE(Player player, BOOL toggle);
```

## Parameters

- `player` (`Player`)
- `toggle` (`BOOL`)

## Returns

`void`

## Description

Sets whether all random peds will run away from player if they are agitated (threatened) (bool=true), or some peds can stand up for themselves (bool=false).

## Usage

### Lua

```lua
SetAllRandomPedsFlee(player, toggle)

-- always available, by hash
Citizen.InvokeNative(0xE705309B8C6445A4, player, toggle)
```

### JavaScript

```js
SetAllRandomPedsFlee(player, toggle);

// by hash
Citizen.invokeNative('0xE705309B8C6445A4', player, toggle);
```

### C#

```csharp
Function.Call((Hash)0xE705309B8C6445A4, player, toggle);
```

*Sources: alloc8or RDR3 NativeDB.*
