Hold fire : )Â found a way around this... see below:
used
instead
used
Code:
_unit action ["getOut", _vehicle];
Code:
{
  _x addEventHandler ["GetIn",
  {
    _vehicle = _this select 0;
    _position = _this select 1;
    _unit = _this select 2;
   Â
    _sUnitInCopilot = format["%1",_vehicle turretUnit [0]];
    _sUnitName = format["%1",_unit];
 Â
  //this would be ideal... but doesnt seem to pick up if unit is in this positionÂ
  //if (_position == "driver" || _unit in _vehicle turretUnit [0]) then {Â
 Â
  //Use this if you dont want to allow copilot or gunner
  //if (_position == "driver" || _position == "gunner") then {Â
 Â
  //this works for just pilot or copilot
    if (_position == "driver" || _sUnitInCopilot == _sUnitName) then {
 Â
     if (_sUnitName != "eng1" && _sUnitName != "eng2" && _sUnitName != "eng3" && _sUnitName != "eng4") then {
        _unit action ["getOut", _vehicle];
        hint "You are not qualified to operate this vehicle";
      };
    };
  }];
} forEach [tank1, tank2, chopper1, chopper2];
];