{"name":"currentPilot","title":"currentPilot","type":"command","url":"https://community.bistudio.com/wiki/currentPilot","revid":309146,"updated":"2022-05-03T14:07:26Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.96"},"since":"arma3 1.96","arma3_since":"1.96","description":"Returns the person piloting the vehicle. If co-pilot is piloting, co-pilot is returned. If you need current pilot of a UAV or UGV, see UAVControl command.","syntaxes":[{"syntax":"currentPilot vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object","description":"piloting unit or objNull"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"text":"```sqf\nif (currentPilot _vehicle != driver _vehicle) then\n{\n    hint \"The pilot is not piloting!\";\n};\n```","code":["if (currentPilot _vehicle != driver _vehicle) then\n{\n\thint \"The pilot is not piloting!\";\n};"]}],"see_also":["driver","gunner","commander","effectiveCommander","turretUnit","UAVControl","enableCopilot"],"notes":[{"user":"Killzone_Kid","date":"2019-08-20T23:15:00Z","text":"To return co-pilot units:\n\n```sqf\nprivate _fnc_getCoPilots =\n{\n    private _copilotTurrets = allTurrets _this select { getNumber ([_this, _x] call BIS_fnc_turretConfig >> \"isCopilot\") > 0 };\n    private _copilots = _copilotTurrets apply { _this turretUnit _x };\n    _copilots;\n};\n\nhint str (heli call _fnc_getCoPilots);\n```"}]}