---
name: "BIS_fnc_EGSpectator"
type: function
status: ok
groups: ["Spectator"]
arma3_since: "1.54"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_EGSpectator
revid: 348958
updated: 2023-11-08T14:45:39Z
---

# BIS_fnc_EGSpectator

*Function · Spectator · Arma 3 v1.54*

## Description

Spectator instance.

## Syntax

```sqf
[mode, [spectator, whitelistedSides, allowAi, allowFreeCamera, allow3PPCamera, showFocusInfo, showCameraButtons, showControlsHelper, showHeader, showLists]] call BIS_fnc_EGSpectator
```

**Parameters:**

- `mode`: [String](../topics/String.md) - function mode, can be:
  - "Initialize"
  - "Terminate"
  **See the in-game Functions Viewer to see all the possible values. The following parameters are for "Initialize".**
- `spectator`: [Object](../topics/Object.md) - player
- `whitelistedSides`: [Array](../topics/Array.md) - (Optional, default: []) sides that can be spectated
- `allowAi`: [Boolean](../topics/Boolean.md) - (Optional, default: [false](../commands/false.md)) whether AI can be viewed by the spectator
- `allowFreeCamera`: [Boolean](../topics/Boolean.md) - (Optional, default: [true](../commands/true.md)) whether free camera mode is available
- `allow3PPCamera`: [Boolean](../topics/Boolean.md) - (Optional, default: [true](../commands/true.md)) whether 3rd Person camera mode is available
- `showFocusInfo`: [Boolean](../topics/Boolean.md) - (Optional, default: [true](../commands/true.md)) whether to show Focus Info stats widget
- `showCameraButtons`: [Boolean](../topics/Boolean.md) - (Optional, default: [true](../commands/true.md)) whether or not to show camera buttons widget
- `showControlsHelper`: [Boolean](../topics/Boolean.md) - (Optional, default: [true](../commands/true.md)) whether to show controls helper widget
- `showHeader`: [Boolean](../topics/Boolean.md) - (Optional, default: [true](../commands/true.md)) whether to show header widget
- `showLists`: [Boolean](../topics/Boolean.md) - (Optional, default: [true](../commands/true.md)) whether to show entities / locations lists

**Returns:** [Boolean](../topics/Boolean.md) - the return value depends on the mode. For "Initialize" and "Terminate" a [Boolean](../topics/Boolean.md) indicating successful execution is returned.

## Examples

### Example 1

```sqf
["Initialize", [player]] call BIS_fnc_EGSpectator;
```

## See also

Arma 3: End Game Spectator Mode

<sub>Source: [BI Community Wiki — BIS fnc EGSpectator](https://community.bistudio.com/wiki/BIS_fnc_EGSpectator) (revision 348958).</sub>
