{"name":"UAVControl","operator":null,"title":"UAVControl","type":"command","url":"https://community.bistudio.com/wiki/UAVControl","revid":378036,"updated":"2026-01-27T09:56:36Z","groups":["Remote Control"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.00"}],"since":{"game":"arma3","name":"Arma 3","version":"1.00"},"arma3_since":"1.00","branch":null,"locality":{"argument":"global","effect":null,"server_exec":false},"exec":null,"description":"Returns array with current operator of UAV and his vehicle role in UAV.\nIf nobody is controlling the UAV, the command tries to find if player has terminal connected to this UAV.\nIf nobody is connected, objNull is used as returned operator (see #Example 2).\nThe possible outputs are:\n\n- [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\n- [somePlayer1, \"DRIVER\"] - some player (could be remote) is a pilot, the gunner seat is empty\n- [somePlayer2, \"GUNNER\"] - some player (could be remote) is a gunner, the pilot seat is empty\n- [somePlayer1, \"DRIVER\", somePlayer2, \"GUNNER\"] - some players (could be remote) control both the pilot and the gunner seats\n- [player, \"\"] - local player has terminal connected to this UAV\n\nThe UAV terminals are local to the players so only local terminal connections are returned.\n\n> [!NOTE]\n> This command works only for vehicles, to get a unit remote-controlling a unit, see remoteControlled and remoteControl#Example 4.\n>\n> 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.","syntaxes":[{"syntax":"UAVControl uav","since":null,"effect":null,"exec":null,"params":[{"name":"uav","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"uav: Object"}],"returns":{"type":"- Array with [unit, vehicleRole]","types":["Array"],"description":"unit: Object - UAV operator - vehicleRole: String - vehicle role of the operator in UAV. Can be \"DRIVER\", \"GUNNER\" or \"\" (not in control) - Arma 3 v1.96 Array with [unit, vehicleRole, unit2, vehicleRole2] (see #Example 2) - unit: Object - UAV operator - vehicleRole: String - vehicle role of the operator in UAV. Can be \"DRIVER\", \"GUNNER\" or \"\" (not in control) - unit2: Object - see #Example 2 - vehicleRole2: Can be \"DRIVER\", \"GUNNER\", or \"\". (see #Example 2)","text":"- Array with [unit, vehicleRole]\n  - unit: Object - UAV operator\n  - vehicleRole: String - vehicle role of the operator in UAV. Can be \"DRIVER\", \"GUNNER\" or \"\" (not in control)\n- Arma 3 v1.96 Array with [unit, vehicleRole, unit2, vehicleRole2] (see #Example 2)\n  - unit: Object - UAV operator\n  - vehicleRole: String - vehicle role of the operator in UAV. Can be \"DRIVER\", \"GUNNER\" or \"\" (not in control)\n  - unit2: Object - see #Example 2\n  - vehicleRole2: Can be \"DRIVER\", \"GUNNER\", or \"\". (see #Example 2)"},"form":"unary","operator":null,"left":null,"right":{"text":"uav","types":["Object"]}},{"syntax":"UAVControl [uav, option]","since":"arma3 2.22","effect":null,"exec":null,"params":[{"name":"uav","type":"Object","optional":false,"default":null,"description":"uav vehicle","types":["Object"],"since":null,"text":"uav: Object - uav vehicle"},{"name":"option","type":"String","optional":false,"default":null,"description":"output option, could be one of the following:\n\n- \"driver\" - player controlling UAV pilot\n- \"gunner\" - player controlling UAV gunner\n- \"crew\" - both driver and gunner in that order\n- \"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))\n- \"allbutcrew\" - same as \"all\" but excluding driver and pilot\n- \"allbutdead\" - same as \"all\" but excluding dead players","types":["String"],"since":null,"text":"option: String - output option, could be one of the following:\n\n- \"driver\" - player controlling UAV pilot\n- \"gunner\" - player controlling UAV gunner\n- \"crew\" - both driver and gunner in that order\n- \"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))\n- \"allbutcrew\" - same as \"all\" but excluding driver and pilot\n- \"allbutdead\" - same as \"all\" but excluding dead players"}],"returns":{"type":"Array","types":["Array"],"description":"[player1], [player1, player2] or [player1, player2,...playerN]","text":"Array - [player1], [player1, player2] or [player1, player2,...playerN]"},"form":"unary","operator":null,"left":null,"right":{"text":"[uav, option]","types":["Array"]}}],"examples":[{"text":"```sqf\nprivate _result = UAVControl _myUAV;\n```","code":["private _result = UAVControl _myUAV;"]},{"text":"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:\n\n```sqf\n[player1, \"DRIVER\"]; // player1 is controlling the UAV and is the pilot\n[player2, \"GUNNER\"]; // player2 is controlling the UAV and is the gunner\n[player1, \"DRIVER\", player2, \"GUNNER\"]; // player1 is controlling the UAV as the pilot, player2 is controlling the UAV as the gunner\n[player3, \"\"]; // no one is controlling the UAV, player3 is connected to the UAV via terminal, but not controlling it yet\n[objNull, \"\"]; // nobody is controlling but there maybe an abandoned terminal connected to the UAV, \n               // which will auto-disconnect when a new connection to the UAV is made\n```","code":["[player1, \"DRIVER\"]; // player1 is controlling the UAV and is the pilot\n[player2, \"GUNNER\"]; // player2 is controlling the UAV and is the gunner\n[player1, \"DRIVER\", player2, \"GUNNER\"]; // player1 is controlling the UAV as the pilot, player2 is controlling the UAV as the gunner\n[player3, \"\"]; // no one is controlling the UAV, player3 is connected to the UAV via terminal, but not controlling it yet\n[objNull, \"\"]; // nobody is controlling but there maybe an abandoned terminal connected to the UAV, \n               // which will auto-disconnect when a new connection to the UAV is made"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["showUAVFeed","shownUAVFeed","allUnitsUAV","getConnectedUAV","connectTerminalToUAV","isUAVConnected","remoteControl","currentPilot","isRemoteControlling","remoteControlled"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Remote Control","Introduced with Arma 3 version 1.00","Scripting Commands"]}