GioLabo 2 Posted March 21, 2017 Greets guys (and girls if there are any) ! I need a script bu which only pilots can use choppers and planes. Can anyone explain how to do that? Thanks Share this post Link to post Share on other sites
Devastator_cm 434 Posted March 21, 2017 https://community.bistudio.com/wiki/getUnitTrait I didn't test but this can return the pilot trait. If not you can check the class of the unit if it is pilot or not via https://community.bistudio.com/wiki/isKindOf classes are here https://community.bistudio.com/wiki/Arma_3_CfgVehicles_WEST then you can use event handler get in on the vehicle which you want the restriction https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#GetIn and in case unit is not pilot youc an kick him out via https://community.bistudio.com/wiki/moveOut This is what I would do as aproach. Didn't tested it so cannot guarantee if it will achieve your desired result (KillzoneKid protection sentence :P ) Share this post Link to post Share on other sites
HallyG 239 Posted March 21, 2017 Give this a go. Assumes that you want to the pilot and copilot to be a pilot-type soldier. Doesn't handle switch seats. player addEventhandler ["GetInMan", { params ["_unit", "", "_vehicle"]; if (_vehicle isKindOf "Air" && {!(_vehicle isKindOf "ParachuteBase") && {assignedVehicleRole _unit in [['driver'], ['Turret', [0]]] && {!((toUpper typeOf _unit find toUpper "Pilot") > -1)}}}) then { moveOut _unit; hint "YOU ARE NOT A PILOT; THOUT SHALL NOT ENTER"; }; }]; Share this post Link to post Share on other sites
Lucas Andre (Lunga Gamer) 3 Posted February 10, 2023 On 3/21/2017 at 5:27 PM, HallyG said: Give this a go. Assumes that you want to the pilot and copilot to be a pilot-type soldier. Doesn't handle switch seats. player addEventhandler ["GetInMan", { params ["_unit", "", "_vehicle"]; if (_vehicle isKindOf "Air" && {!(_vehicle isKindOf "ParachuteBase") && {assignedVehicleRole _unit in [['driver'], ['Turret', [0]]] && {!((toUpper typeOf _unit find toUpper "Pilot") > -1)}}}) then { moveOut _unit; hint "YOU ARE NOT A PILOT; THOUT SHALL NOT ENTER"; }; }]; For the pilot it worked, but the copilot still takes the controls. Is there a way to lock the copilot controls? Share this post Link to post Share on other sites