What about use a getIn EventHandler, add this to the init of vehicle's in question.
this addeventhandler ["getin", {_this execVM "pilotcheck.sqf"}];
pilotcheck.sqf
_vehicle = _this select 0;
_position = _this select 1;
_unit = _this select 2;
if (not(_position == "driver")) exitWith {hint "you are a passenger";};
if(_unit iskindOf "SoldierWPilot") then
{
Hint "you are the pilot";
}
else
{
hint "you are not a Pilot, get out";
unassignVehicle _unit;
[_unit] orderGetIn false;
_unit action ["EJECT", _vehicle];
};
I hope that helps
Odin