---
name: "UAVControl"
type: command
status: ok
groups: ["Remote Control"]
arma3_since: "1.00"
locality: {"argument": "global", "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/UAVControl
revid: 378036
updated: 2026-01-27T09:56:36Z
---

# UAVControl

*Command · Remote Control · Arma 3 v1.00*

Locality: arguments **global**

## Description

Returns array with current operator of UAV and his vehicle role in UAV.
If nobody is controlling the UAV, the command tries to find if [player](../commands/player.md) has terminal connected to this UAV.
If nobody is connected, [objNull](../commands/objNull.md) is used as returned operator (see [#Example 2](../commands/UAVControl.md#example-2)).
The possible outputs are:

- [objNull, ""] - nobody is controlling UAV but there maybe an abandoned terminal connected to the UAV, which will auto-disconnect when a new connection to the UAV is made
- [somePlayer1, "DRIVER"] - some player (could be remote) is a pilot, the gunner seat is empty
- [somePlayer2, "GUNNER"] - some player (could be remote) is a gunner, the pilot seat is empty
- [somePlayer1, "DRIVER", somePlayer2, "GUNNER"] - some players (could be remote) control both the pilot and the gunner seats
- [player, ""] - [local](../commands/local.md) [player](../commands/player.md) has terminal connected to this UAV

The UAV terminals are [local](../commands/local.md) to the [player](../commands/player.md)s so only [local](../commands/local.md) terminal connections are returned.

> [!NOTE]
> This command works only for vehicles, to get a unit remote-controlling a unit, see [remoteControlled](../commands/remoteControlled.md) and [remoteControl#Example 4](../commands/remoteControl.md#example-4).
>
> While main syntax can only return remote players when they are controlling either pilot or gunner, the alternative syntax can also return all remote players connected with terminals to given UAV.

## Syntax

### Syntax 1

```sqf
UAVControl uav
```

**Parameters:**

- `uav`: [Object](../topics/Object.md)

**Returns:** - [Array](../topics/Array.md) with [unit, vehicleRole]
  - unit: [Object](../topics/Object.md) - UAV operator
  - vehicleRole: [String](../topics/String.md) - vehicle role of the operator in UAV. Can be "DRIVER", "GUNNER" or "" (not in control)
- Arma 3 v1.96 [Array](../topics/Array.md) with [unit, vehicleRole, unit2, vehicleRole2] (see [#Example 2](../commands/UAVControl.md#example-2))
  - unit: [Object](../topics/Object.md) - UAV operator
  - vehicleRole: [String](../topics/String.md) - vehicle role of the operator in UAV. Can be "DRIVER", "GUNNER" or "" (not in control)
  - unit2: [Object](../topics/Object.md) - see [#Example 2](../commands/UAVControl.md#example-2)
  - vehicleRole2: Can be "DRIVER", "GUNNER", or "". (see [#Example 2](../commands/UAVControl.md#example-2))

### Syntax 2

*since arma3 2.22*

```sqf
UAVControl [uav, option]
```

**Parameters:**

- `uav`: [Object](../topics/Object.md) - uav vehicle
- `option`: [String](../topics/String.md) - output option, could be one of the following:

  - "driver" - player controlling UAV pilot
  - "gunner" - player controlling UAV gunner
  - "crew" - both driver and gunner in that order
  - "all" - all the players currently connected to the UAV with their terminals (dead players will show up until they are completely braindead (respawned for example))
  - "allbutcrew" - same as "all" but excluding driver and pilot
  - "allbutdead" - same as "all" but excluding dead players

**Returns:** [Array](../topics/Array.md) - [player1], [player1, player2] or [player1, player2,...playerN]

## Examples

### Example 1

```sqf
private _result = UAVControl _myUAV;
```

### Example 2

Since Arma 3 v1.96 this command returns both driver and gunner units if the UAV is controlled by 2 players. Here is the list of all expected outputs:

```sqf
[player1, "DRIVER"]; // player1 is controlling the UAV and is the pilot
[player2, "GUNNER"]; // player2 is controlling the UAV and is the gunner
[player1, "DRIVER", player2, "GUNNER"]; // player1 is controlling the UAV as the pilot, player2 is controlling the UAV as the gunner
[player3, ""]; // no one is controlling the UAV, player3 is connected to the UAV via terminal, but not controlling it yet
[objNull, ""]; // nobody is controlling but there maybe an abandoned terminal connected to the UAV, 
               // which will auto-disconnect when a new connection to the UAV is made
```

## See also

[showUAVFeed](../commands/showUAVFeed.md) · [shownUAVFeed](../commands/shownUAVFeed.md) · [allUnitsUAV](../commands/allUnitsUAV.md) · [getConnectedUAV](../commands/getConnectedUAV.md) · [connectTerminalToUAV](../commands/connectTerminalToUAV.md) · [isUAVConnected](../commands/isUAVConnected.md) · [remoteControl](../commands/remoteControl.md) · [currentPilot](../commands/currentPilot.md) · [isRemoteControlling](../commands/isRemoteControlling.md) · [remoteControlled](../commands/remoteControlled.md)

<sub>Source: [BI Community Wiki — UAVControl](https://community.bistudio.com/wiki/UAVControl) (revision 378036).</sub>
