aussie battler 94 Posted August 26, 2022 Is there a way to add an eventhandler to disallow player ai getting into gunner? Players are taking advantage of the ai targeting sytem. They fly a chopper with ai in gunner. Ai will target a player (but wont fire), players then switch to gunner & let hell rain. I am wondering if ther is some sort of event handler to ban an ai getting in the chopper's gunner seat? // in the spawn ai code: while {true} do { if vehicle player isKindOf "helicopter"; [_soldier1] allowGetIn false; }; Share this post Link to post Share on other sites
pierremgi 4850 Posted August 26, 2022 in initPlayerLocal.sqf player addEventHandler ["SeatSwitchedMan", { params ["_unit1", "_unit2", "_vehicle"]; systemChat str [_unit1,_unit2, assignedVehicleRole _unit1, assignedVehicleRole _unit2]; if (_vehicle isKindOf "helicopter") then { if (toLowerANSI getText (configFile / "cfgWeapons" / (_vehicle currentWeaponTurret (_vehicle unitTurret _unit1))/ "nameSound") in ["mgun","cannon"]) then { hint "You can't switch to this seat!"; }; }; }]; Do what you want for kick or ban player... I don't have this kind of script. 2 Share this post Link to post Share on other sites
aussie battler 94 Posted August 27, 2022 @pierremgi you are a legend, that is perfect. Thanks for the fast reply. Share this post Link to post Share on other sites