This is a very good Arma 3 pilot restriction script. This will limit only players who are pilots to get into the pilot or gunner seats of a vehicle.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | player addEventhandler ["GetInMan", { params ["_unit", "", "_vehicle"]; if (_vehicle isKindOf "Air" && { !(_vehicle isKindOf "ParachuteBase") && { !((vehicle _unit getCargoIndex _unit)>=0) && { !((toUpper typeOf _unit find toUpper "Pilot") > -1)} } }) then { _unit moveOut _vehicle; }; }]; player addEventhandler ["SeatSwitchedMan", { params ["_unit", "", "_vehicle"]; if (_vehicle isKindOf "Air" && { !(_vehicle isKindOf "ParachuteBase") && { !((vehicle _unit getCargoIndex _unit)>=0) && { !((toUpper typeOf _unit find toUpper "Pilot") > -1)} } }) then { _unit moveOut _vehicle; }; }]; |
Put this script in the initPlayerLocal.sqf file.
This really does work very well. This blocks the Copilot seat as well, which is tricky in an Arma 3 script. But this one performs that function as well. This checks that a player is a pilot, so Pilots and Jet Pilots will both work.
This simple script will apply an IDAP insignia to a player that is a Medic.
if ((toUpper typeOf player find toUpper "Medic") > -1) then { [Player,"IDAP"] call bis_fnc_setUnitInsignia; }; |
Very useful script for a unit.
And the code below will create a custom pause screen, with extra content on the bar at the bottom and a custom Esc menu.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | [missionNamespace,"OnGameInterrupt", { _this spawn { params ["_display"]; _display displayCtrl 2 ctrlShow false; _display displayCtrl 103 ctrlShow false; _display displayCtrl 115099 ctrlShow false; _display displayCtrl 523 ctrlShow false; _display displayCtrl 104 ctrlSetText "Quit current mission..."; _display displayCtrl 2 ctrlSetBackgroundColor [0.7, 0.3, 0.9, 1]; _display displayCtrl 1005 ctrlSetText format ["ZGM83 Afghan war. %1 : Arma 3 v%2.%3!", "1.90", (productVersion select 2), (productVersion select 3)]; _display displayCtrl 120 ctrlSetText "Enemy insurgents have invaded Aghanistan. Destroy their assets and remove all enemies to free this suffering nation. This must be carried out in a humanitarian way, minimising damage to civilian assets."; _display displayCtrl 6455 ctrlShow true; _display displayCtrl 6455 ctrlSetText format ["%1", playerName]; }; }] call BIS_fnc_addScriptedEventHandler; |
Great way to customize the Esc menu for your unit.
Here is a better version of the pilot restriction script. Put this in the initPlayerLocal.sqf file.
1 2 3 4 5 | inGameUISetEventHandler ["Action", " if (!((_this select 0) getVariable ['disableGetIn',false]) && ((_this select 0) isKindOf 'Air') && (_this select 3) in ['GetInDriver','GetInPilot','GetInGunner','GetInCommander','TakeVehicleControl','UnlockVehicleControl']) then { true } "]; |
This script blocks the Pilot seat and the “Take Controls” option but allows a non-pilot into the co-pilot seat.