flyby7

Untitled

Mar 6th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 165.83 KB | None | 0 0
  1. comment "----------------------------------------------------------";
  2.  
  3. comment "JAM V1.5A: J-WoLF's Admin Menu Version One (Alpha Release)";
  4.  
  5. comment "----------------------------------------------------------";
  6.  
  7.     SystemChat "JAM V1.5A | Status: Loading...";
  8.     JAM_myName = name player;
  9.     JAM_mySteam64UID = getPlayerUID player;
  10.     SystemChat format ["JAM V1.5A | Status: Activated | Name: %1 | SteamID: %2",
  11.     JAM_myName, JAM_mySteam64UID];
  12.  
  13. comment "----------------------------------------------------------";
  14. comment "--------------------GLOBAL VARIABLES----------------------";
  15. comment "----------------------------------------------------------";
  16.  
  17.     JAM_isLoaded = false;
  18.     JAM_blacklist = []; comment "steamIDs";
  19.     JAM_banList = [];
  20.     JAM_myOwnerID = owner player;
  21.     JAM_myClientID = clientOwner;
  22.     JAM_tColor = [0,0.5,0,0.6];
  23.     JAM_fColor = [0,1,0,1];
  24.     JAM_tColorChanged = false;
  25.     JAM_key_arsenal = "INS";
  26.     JAM_key_mainMenu = "NUM5";
  27.     JAM_key_3DTP = "H";
  28.     JAM_blackListEnabled = false;
  29.  
  30. comment "----------------------------------------------------------";
  31. comment "-----------------INITIATE BLACKLIST-----------------------";
  32. comment "----------------------------------------------------------";
  33.  
  34.     _loopBlacklist = [] spawn {
  35.         waitUntil {JAM_blackListEnabled};
  36.         while {JAM_blackListEnabled} do {
  37.             {
  38.                 If ((getPlayerUID _x) in JAM_blacklist) then {
  39.                     [["BACK-TO-LOBBY"],
  40.                     {
  41.                         ["LOSER",false,0,true] spawn BIS_fnc_endMission;
  42.                     }] remoteExec ["spawn",_x];
  43.                 };
  44.             } forEach (allPlayers select {(str (getPlayerUID _x)) in JAM_blacklist});
  45.         };
  46.     };
  47.  
  48. comment "----------------------------------------------------------";
  49. comment "--------------------INTRO & LOADING-----------------------";
  50. comment "----------------------------------------------------------";
  51.  
  52.     0 = [] spawn {
  53.         playMusic ["LeadTrack01_F_Malden", 2.5];
  54.         sleep 2.5;
  55.         playMusic "";
  56.     };
  57.     typeWriter =
  58.     [
  59.         [
  60.             ["J.A.M","<t align = 'center' ,<br\>,size='10' color='#00FF00'>%1</t><br/>"],
  61.             ["Version 1.5 Alpha Release","<t align = 'center' <br\>,size='2' color='#42D6FC'>%1</t><br/>"],
  62.             ["CLIENT INITIALIZING","<t align = 'center' <br\>,size ,color='#ff5134'= '1'>%1</t>"]
  63.         ]
  64.     ] spawn BIS_fnc_typeText;
  65.     [] spawn {
  66.         hint "W";
  67.         sleep 0.1;
  68.         hint "We";
  69.         sleep 0.1;
  70.         hint "Wel";
  71.         sleep 0.1;
  72.         hint "Welc";
  73.         sleep 0.1;
  74.         hint "Welco";
  75.         sleep 0.1;
  76.         hint "Welcom";
  77.         sleep 0.1;
  78.         hint "Welcome";
  79.         sleep 0.1;
  80.         hint "Welcome ";
  81.         sleep 0.1;
  82.         hint "Welcome t";
  83.         sleep 0.1;
  84.         hint "Welcome to";
  85.         sleep 0.1;
  86.         hint "Welcome to ";
  87.         sleep 0.1;
  88.         hint "Welcome to J";
  89.         sleep 0.1;
  90.         hint "Welcome to J-";
  91.         sleep 0.1;
  92.         hint "Welcome to J-W";
  93.         sleep 0.1;
  94.         hint "Welcome to J-Wo";
  95.         sleep 0.1;
  96.         hint "Welcome to J-WoL";
  97.         sleep 0.1;
  98.         hint "Welcome to J-WoLF";
  99.         sleep 0.1;
  100.         hint "Welcome to J-WoLF'";
  101.         sleep 0.1;
  102.         hint "Welcome to J-WoLF's";
  103.         sleep 0.1;
  104.         hint "Welcome to J-WoLF's ";
  105.         sleep 0.1;
  106.         hint "Welcome to J-WoLF's A";
  107.         sleep 0.1;
  108.         hint "Welcome to J-WoLF's Ad";
  109.         sleep 0.1;
  110.         hint "Welcome to J-WoLF's Adm";
  111.         sleep 0.1;
  112.         hint "Welcome to J-WoLF's Admi";
  113.         sleep 0.1;
  114.         hint "Welcome to J-WoLF's Admin";
  115.         sleep 0.1;
  116.         hint "Welcome to J-WoLF's Admin ";
  117.         sleep 0.1;
  118.         hint "Welcome to J-WoLF's Admin M";
  119.         sleep 0.1;
  120.         hint "Welcome to J-WoLF's Admin Me";
  121.         sleep 0.1;
  122.         hint "Welcome to J-WoLF's Admin Men";
  123.         sleep 0.1;
  124.         hint "Welcome to J-WoLF's Admin Menu";
  125.         sleep 0.3;
  126.         hint "                               ";
  127.         sleep 0.3;
  128.         hint "Welcome to J-WoLF's Admin Menu V";
  129.         sleep 0.3;
  130.         hint "                                 ";
  131.         sleep 0.3;
  132.         hint "Welcome to J-WoLF's Admin Menu V1";
  133.         sleep 0.3;
  134.         hint "                                  ";
  135.         sleep 0.3;
  136.         hint "Welcome to J-WoLF's Admin Menu V1.";
  137.         sleep 0.3;
  138.         hint "                                  ";
  139.         sleep 0.3;
  140.         hint "Welcome to J-WoLF's Admin Menu V1.5";
  141.         sleep 0.3;
  142.         hint "                                    ";
  143.         sleep 0.3;
  144.         hint "Welcome to J-WoLF's Admin Menu V1.5A";
  145.         sleep 0.3;
  146.         hint "                                      ";
  147.         sleep 0.3;
  148.         hint "-----------------------------\nJ.A.M KEYBINDS\n-----------------------------\nNUM 5 - Main Menu\nINS - Arsenal Menu\nH - 3D Teleport\n-----------------------------";
  149.     };
  150.     comment "Post-Process Effects";
  151.     [] spawn {
  152.         _startEffect = ["ChromAberration", 200, [0.1, 0.1, true]] spawn {
  153.             params ["_name", "_priority", "_effect", "_handle"];
  154.             while {
  155.                 _handle = ppEffectCreate [_name, _priority];
  156.                 _handle < 0
  157.             } do {
  158.                 _priority = _priority + 1;
  159.             };
  160.             _handle ppEffectEnable true;
  161.             _handle ppEffectAdjust _effect;
  162.             _handle ppEffectCommit 0.3;
  163.         };
  164.         sleep 0.3;
  165.         _stopEffect = ["ChromAberration", 200, [0, 0, true]] spawn {
  166.             params ["_name", "_priority", "_effect", "_handle"];
  167.             while {
  168.                 _handle = ppEffectCreate [_name, _priority];
  169.                 _handle < 0
  170.             } do {
  171.                 _priority = _priority + 1;
  172.             };
  173.             _handle ppEffectEnable true;
  174.             _handle ppEffectAdjust _effect;
  175.             _handle ppEffectCommit 1;
  176.             waitUntil {ppEffectCommitted _handle};
  177.             _handle ppEffectEnable false;
  178.             ppEffectDestroy _handle;
  179.         };
  180.     };
  181.     [] spawn {
  182.         sleep 0.2;
  183.         0 = ["ColorCorrections", 1500, [1, 1, 0, [0, 0, 0, 0], [1, 1, 1, 0], [0.299, 0.587, 0.114, 0]]] spawn
  184.         {
  185.             params ["_name", "_priority", "_effect", "_handle"];
  186.             while {
  187.                 _handle = ppEffectCreate [_name, _priority];
  188.                 _handle < 0
  189.             } do {
  190.                 _priority = _priority + 1;
  191.             };
  192.             _handle ppEffectEnable true;
  193.             _handle ppEffectAdjust _effect;
  194.             _handle ppEffectCommit 0.4;
  195.         };
  196.         sleep 3.6;
  197.         0 = ["ColorCorrections", 1500, [1, 1, 0, [0, 0, 0, 0], [1, 1, 1, 1], [0.299, 0.587, 0.114, 0]]] spawn
  198.         {
  199.             params ["_name", "_priority", "_effect", "_handle"];
  200.             while {
  201.                 _handle = ppEffectCreate [_name, _priority];
  202.                 _handle < 0
  203.             } do {
  204.                 _priority = _priority + 1;
  205.             };
  206.             _handle ppEffectEnable true;
  207.             _handle ppEffectAdjust _effect;
  208.             _handle ppEffectCommit 7;
  209.             waitUntil {ppEffectCommitted _handle};
  210.             _handle ppEffectEnable false;
  211.             ppEffectDestroy _handle;
  212.         };
  213.     };
  214.     comment "init done message";
  215.     [] spawn {
  216.         waitUntil { scriptDone typeWriter };
  217.         _typeWriter2 =
  218.         [
  219.             [
  220.                 ["INIT COMPLETE","<t align = 'center' <br\>,size ,color='#ff5134'= '1'>%1</t><br/>"],
  221.                 ["Use JAM responsibly.","<t align = 'center' <br\>,size='2' color='#42D6FC'>%1</t>"]
  222.             ]
  223.         ] spawn BIS_fnc_typeText;
  224.         playSound3D ["A3\Sounds_F_patrol\radio\combatPatrol\02_mission_start_a.ogg", player, false];
  225.     };
  226.  
  227. comment "----------------------------------------------------------";
  228. comment "---------------------QUICK SCRIPTS------------------------";
  229. comment "----------------------------------------------------------";
  230.  
  231.     JAM_fnc_mutePlayer =
  232.     {
  233.         params ["_playerName"];
  234.         _playerName = _this select 0;
  235.         {
  236.             if ( ( name _x ) == _playerName ) then
  237.             {
  238.                 _textNotif = format ["JAM: Server-muting %1...", (name _x)];
  239.                 cutText [_textNotif, "PLAIN DOWN", 0, true, false];
  240.                 _x setVariable ["BIS_noCoreConversations", true];
  241.                 _x disableConversation true;
  242.                 [["<t color='#ff0000' size='2'>ADMIN MESSAGE:<br/><t color='#FFFFFF' size='1'>You have been muted [chat, VoN]", "PLAIN", 3, true, true]] remoteExec ["titleText", _x];
  243.                 [[],{
  244.                     for [{_i=0}, {_i<5}, {_i=_i+1}] do
  245.                     {
  246.                         _i enableChannel false;
  247.                     };
  248.                 }] remoteExec ["spawn", _x];
  249.             };
  250.         } forEach allPlayers;
  251.     };
  252.  
  253.     JAM_fnc_unmutePlayer =
  254.     {
  255.         params ["_playerName"];
  256.         _playerName = _this select 0;
  257.         {
  258.             if ( ( name _x ) == _playerName ) then
  259.             {
  260.                 _textNotif = format ["JAM: Un-muting %1...", (name _x)];
  261.                 cutText [_textNotif, "PLAIN DOWN", 0, true, false];
  262.                 _x setVariable ["BIS_noCoreConversations", false];
  263.                 _x disableConversation false;
  264.                 [["<t color='#ff0000' size='2'>ADMIN MESSAGE:<br/><t color='#000FFF' size='1'>You have been un-muted [chat, VoN]", "PLAIN", 3, true, true]] remoteExec ["titleText", _x];
  265.                 [[],{
  266.                     for [{_i=0}, {_i<5}, {_i=_i+1}] do
  267.                     {
  268.                         _i enableChannel true;
  269.                     };
  270.                 }] remoteExec ["spawn", _x];
  271.             };
  272.         } forEach allPlayers;
  273.     };
  274.    
  275.     JAM_fnc_autoKickPlayer =
  276.     {
  277.         nameOfCunt = _this select 0;
  278.         comment "identify target";
  279.         {
  280.             if ((name _x) == nameOfCunt) then
  281.             {
  282.                 banTarget = _x;
  283.             };
  284.         } forEach allPlayers;
  285.         comment "create ban function";
  286.         JAM_banThisCunt = {
  287.             banTarget = _this select 0;
  288.             comment "do not run if there is no target";
  289.             comment "add this player steam ID to banList array";
  290.             JAM_banList pushBackUnique (getPlayerUID banTarget);
  291.             comment "default ban reason";
  292.             if (isNil "banReason") then
  293.             {
  294.                 banReason = "cunt";
  295.             };
  296.             comment "create & run message with unique id of banTarget";
  297.             [[banReason],{
  298.                 banReason = _this select 0;
  299.                 comment "TIMED BAN MESSAGE";
  300.                 titleText [("BAN REASON: " + banReason + "<br/><t color='#ff0000' size='5'>YOU HAVE BEEN BANNED!</t><br/>Courtesy of J-WoLFs Admin Menu,<br/>you will now be kicked and unable to join back."), "BLACK", -1, true, true];
  301.                 disableUserInput true;
  302.                 sleep 5;
  303.                 comment "automatically make admin kick the player, thus effectively banning him";
  304.                 nameOfCunt = name player;
  305.                 steamIDofCunt = getPlayerUID player;
  306.                 [[nameOfCunt, steamIDofCunt],{
  307.                     _nameOfCunt = _this select 0;
  308.                     _UIDofCunt = _this select 1;
  309.                     BANkickCommand = format ["#kick %1", _nameOfCunt];
  310.                     BANtextNotif = format ['JAM: Player %1 has been auto-kicked because he is banned. STEAM ID: %2', _nameOfCunt, _UIDofCunt];
  311.                     disableSerialization;
  312.                     d_autoKicker = (findDisplay 46) createDisplay "RscDisplayEmpty";
  313.                     showChat true;
  314.                     _mouseDetection3 = d_autoKicker ctrlCreate ["RscButton", 7777];
  315.                     _mouseDetection3 ctrlSetBackgroundColor [0,0,0,0];
  316.                     _mouseDetection3 ctrlSetPosition [-0.000156274 * safezoneW + safezoneX,-0.00599999 * safezoneH + safezoneY,1.00547 * safezoneW,1.023 * safezoneH];
  317.                     _mouseDetection3 ctrladdEventHandler ["MouseMoving",
  318.                     "
  319.                         serverCommand BANkickCommand;
  320.                         d_autoKicker closeDisplay 0;
  321.                         BANtextNotif remoteExec ['systemChat',0];
  322.                     "];
  323.                     _mouseDetection3 ctrlCommit 0;
  324.                 }] remoteExec ["spawn", remoteExecutedOwner];
  325.             }] remoteExec ["spawn", banTarget, str (getPlayerUID banTarget)];
  326.         };
  327.         comment "enter ban reason through GUI";
  328.         disableSerialization;
  329.         d_banReason = (findDisplay 46) createDisplay "RscDisplayEmpty";
  330.         showChat true;
  331.         ctrl_GUItitle = d_banReason ctrlCreate ["RscText", 6000];
  332.         ctrl_GUItitle ctrlSetText "JAM: Please enter the reason for banning player.";
  333.         ctrl_GUItitle ctrlSetPosition [0.407187 * safezoneW + safezoneX,0.39 * safezoneH + safezoneY,0.185625 * safezoneW,0.022 * safezoneH];
  334.         ctrl_GUItitle ctrlSetBackgroundColor [-1,-1,-1,1];
  335.         ctrl_GUItitle ctrlCommit 0;
  336.         ctrl_banReason = d_banReason ctrlCreate ["RscEdit", 6001];
  337.         ctrl_banReason ctrlSetPosition [0.407187 * safezoneW + safezoneX,0.423 * safezoneH + safezoneY,0.185625 * safezoneW,0.055 * safezoneH];
  338.         ctrl_banReason ctrlSetBackgroundColor [-1,-1,-1,0.75];
  339.         ctrl_banReason ctrlCommit 0;
  340.         ctrl_GUIban = d_banReason ctrlCreate ["RscButtonMenu", 6002];
  341.         ctrl_GUIban ctrlSetText "BAN";
  342.         ctrl_GUIban ctrlSetPosition [0.407187 * safezoneW + safezoneX,0.489 * safezoneH + safezoneY,0.0464063 * safezoneW,0.022 * safezoneH];
  343.         ctrl_GUIban ctrladdEventHandler ["ButtonClick",
  344.         "
  345.             banReason = ctrlText ctrl_banReason;
  346.             _textNotif = format ['JAM: Banning player %1...', nameOfCunt];
  347.             cutText [_textNotif, 'PLAIN DOWN', 0, true, false];
  348.             [banTarget] spawn JAM_banThisCunt;
  349.             d_banReason closeDisplay 0;
  350.         "];
  351.         ctrl_GUIban ctrlCommit 0;
  352.         ctrl_GUIcancel = d_banReason ctrlCreate ["RscButtonMenu", 6003];
  353.         ctrl_GUIcancel ctrlSetText "CANCEL";
  354.         ctrl_GUIcancel ctrlSetPosition [0.546406 * safezoneW + safezoneX,0.489 * safezoneH + safezoneY,0.0464063 * safezoneW,0.022 * safezoneH];
  355.         ctrl_GUIcancel ctrladdEventHandler ["ButtonClick",
  356.         "
  357.             d_banReason closeDisplay 0;
  358.         "];
  359.         ctrl_GUIcancel ctrlCommit 0;
  360.     };
  361.    
  362.     JAM_fnc_experimentalBan =
  363.     {
  364.         params ["_playerName"];
  365.         _playerName = _this select 0;
  366.         {
  367.             if ( ( name _x ) == _playerName ) then
  368.             {
  369.                 _textNotif = "JAM: Banning player, " + _playerName + "...";
  370.                 [[_textNotif, "PLAIN DOWN", 0, true, false]] remoteExec ["cutText", 0];
  371.                 [[( name _x )],{
  372.                     hint format ["You are now being banned, %1.",(_this select 0)];
  373.                     disableSerialization;
  374.                     _banDisplay = (findDisplay 46) createDisplay "RscDisplayEmpty";
  375.                     _mouseDetection = _banDisplay ctrlCreate ["RscButton", 9999];
  376.                     _mouseDetection ctrlSetBackgroundColor [0,0,0,0];
  377.                     _mouseDetection ctrlSetPosition [-0.000156274 * safezoneW + safezoneX,-0.00599999 * safezoneH + safezoneY,1.00547 * safezoneW,1.023 * safezoneH];
  378.                     _mouseDetection ctrladdEventHandler ["MouseMoving",
  379.                     "
  380.                         serverCommand format ['#Vote Admin %1', (_this select 0)];
  381.                         comment 'rapid vote admin leads to restriction ban';
  382.                         comment 'player will not be able to join until restart';
  383.                     "];
  384.                     _mouseDetection ctrlCommit 0;
  385.                 }] remoteExec ["spawn",_x];
  386.             };
  387.         } forEach allPlayers;
  388.     };
  389.  
  390.     JAM_fnc_blacklistPlayer =
  391.     {
  392.         params["_playerName"];
  393.         _playerName = _this select 0;
  394.         {
  395.             if (_playerName find (name _x) > -1) then {
  396.                 JAM_blacklist pushBackUnique str (getPlayerUID _x);
  397.             };
  398.         } forEach allPlayers;
  399.         _textNotif = format ["JAM: Adding %1 to the blacklist by SteamID...", _playerName];
  400.         [[_textNotif, "PLAIN DOWN", 0, true, false]] remoteExec ["cutText", 0];
  401.     };
  402.  
  403.     JAM_fnc_freezePlayer =
  404.     {
  405.         params["_playerName"];
  406.         _playerName = _this select 0;
  407.         if (_playerName == JAM_myName) exitWith
  408.         {
  409.             hint "JAM: Do not freeze yourself, retard."
  410.         };
  411.         {
  412.             if ( ( name _x ) == _playerName ) then
  413.             {
  414.                 [[( name _x )],
  415.                 {
  416.                     if (!userInputDisabled) then
  417.                     {
  418.                         _textNotif = "JAM: Freezing player, " + (_this select 0) + "...";
  419.                         [[_textNotif, "PLAIN DOWN", 0, true, false]] remoteExec ["cutText", 0];
  420.                         disableUserInput true;
  421.                         hint format ["%1, your input has been disabled by the server Administrator. Standby for unfreeze. If the problem persists, simply ALT+F4.",(_this select 0)];
  422.                     }
  423.                     else
  424.                     {
  425.                         _textNotif = "JAM: Un-freezing player, " + (_this select 0) + "...";
  426.                         [[_textNotif, "PLAIN DOWN", 0, true, false]] remoteExec ["cutText", 0];
  427.                         disableUserInput false;
  428.                         hint format ["%1, your input has been re-enabled by the server Administrator.",(_this select 0)];
  429.                     };
  430.                 }] remoteExec ["spawn",_x];
  431.             };
  432.         } forEach allPlayers;
  433.     };
  434.  
  435.     JAM_fnc_TP_selfToPlayer =
  436.     {
  437.         params["_selectedPlayerName"];
  438.         _selectedPlayerName = _this select 0;
  439.         _startPos = getPos player;
  440.         {
  441.             if ((name _x) == (_selectedPlayerName)) then
  442.             {
  443.                 (vehicle player) setPos (getPos _x);
  444.                 comment "if player is in vehicle, move in";
  445.                 if ((vehicle _x != _x) && (vehicle player == player)) then
  446.                 {
  447.                     player moveInAny (vehicle _x);
  448.                 };
  449.                 _endPos = getPos _x;
  450.             };
  451.         } forEach allPlayers;
  452.         _textNotif = format ["JAM: Teleporting to %1...", _selectedPlayerName];
  453.         cutText [_textNotif, "PLAIN DOWN", 0, true, false];
  454.         (format ["JAM: Player %1 has teleported to %2.",JAM_myName,_selectedPlayerName]) remoteExec ["systemChat",0];
  455.     };
  456.    
  457.     JAM_fnc_TP_playerToSelf =
  458.     {
  459.         params["_selectedPlayerName"];
  460.         _selectedPlayerName = _this select 0;
  461.         {
  462.             if ((name _x) == (_selectedPlayerName)) then
  463.             {
  464.                 _textNotif = format ["JAM: Teleporting to %1...", JAM_myName];
  465.                 cutText [_textNotif, "PLAIN DOWN", 0, true, false];
  466.                 _startPos = getPos _x;
  467.                 moveOut _x;
  468.                 (vehicle _x) setPos (getPos player);
  469.                 comment "if you are in vehicle, move player in";
  470.                 if ((vehicle _x == _x) && (vehicle player != player)) then
  471.                 {
  472.                     _x moveInAny (vehicle player);
  473.                 };
  474.                 _endPos = getPos _x;
  475.             };
  476.         } forEach allPlayers;
  477.         (format ["JAM: Player %1 has teleported to %2.",_selectedPlayerName,JAM_myName]) remoteExec ["systemChat",0];
  478.     };
  479.  
  480.     JAM_fnc_TP_allToSelf =
  481.     {
  482.         _textNotif = format ["JAM: Teleporting all players to %1...", JAM_myName];
  483.         [[_textNotif, "PLAIN DOWN", 0, true, false]] remoteExec ["cutText", 0];
  484.         _countPlayers = 0;
  485.         {
  486.             moveOut _x;
  487.             _x setPos (getPos player);
  488.             _countPlayers = _countPlayers + 1;
  489.             (format ["JAM: Player %1 has teleported to %2.",(name _x), JAM_myName]) remoteExec ["systemChat",0];
  490.         } forEach allPlayers - AllCurators;
  491.         Hint format ["JAM: %1 players have been teleported to your coordinates.", _countPlayers];
  492.     };
  493.  
  494.     JAM_fnc_assignGameMod =
  495.     {
  496.         params["_specifiedPlayerName"];
  497.         _specifiedPlayerName = _this select 0;
  498.         _textNotif = format ["JAM: Assigning Game Moderator to %1...", _specifiedPlayerName];
  499.         [[_textNotif, "PLAIN DOWN", 0, true, false]] remoteExec ["cutText", 0];
  500.         {
  501.             if ((name _x) == _specifiedPlayerName) then
  502.             {
  503.                 VVN_x2 = (vehicleVarName _x);
  504.                 (format ["JAM: Player %1 has been selected as the new Zeus (Game Moderator Slot).",(name _x)]) remoteExec ["systemChat",0];
  505.                 [["<t color='#42D6FC'>YOU ARE NOW ZEUS (Game Moderator)</t><br/><t color='#58D68D'>-Press [Y] to open/close curator interface-</t>", "PLAIN", -1, true, true]] remoteExec ["titleText", _x];
  506.             };
  507.         } forEach allPlayers;
  508.         _text = "[[],{unassignCurator bis_curator_1;}] remoteExec ['spawn',2];[[],{" + VVN_x2 + " assignCurator bis_curator_1;}] remoteExec ['spawn',2];";
  509.         _code = compile _text;
  510.         _result = [] call _code;
  511.     };
  512.  
  513.     JAM_fnc_assignGameMaster =
  514.     {
  515.         params["_specifiedPlayerName"];
  516.         _specifiedPlayerName = _this select 0;
  517.         _textNotif = format ["JAM: Assigning Game Master to %1...", _specifiedPlayerName];
  518.         [[_textNotif, "PLAIN DOWN", 0, true, false]] remoteExec ["cutText", 0];
  519.         {
  520.             if ((name _x) == _specifiedPlayerName) then
  521.             {
  522.                 VVN_x1 = (vehicleVarName _x);
  523.                 (format ["JAM: Player %1 has been selected as the new Zeus (Game Master Slot).",(name _x)]) remoteExec ["systemChat",0];
  524.                 [["<t color='#42D6FC'>YOU ARE NOW ZEUS (Game Master)</t><br/><t color='#58D68D'>-Press [Y] to open/close curator interface-</t>", "PLAIN", -1, true, true]] remoteExec ["titleText", _x];
  525.             };
  526.         } forEach allPlayers;
  527.         _text = "[[],{unassignCurator bis_curator;}] remoteExec ['spawn',2];[[],{" + VVN_x1 + " assignCurator bis_curator;}] remoteExec ['spawn',2];";
  528.         _code = compile _text;
  529.         _result = [] call _code;
  530.     };
  531.  
  532.     JAM_fnc_transferAdmin =
  533.     {
  534.         newAdmin = _this select 0;
  535.         _textNotif = format ["JAM: Transferring administration to %1...", newAdmin];
  536.         [[_textNotif, "PLAIN DOWN", 0, true, false]] remoteExec ["cutText", 0];
  537.         [[newAdmin],
  538.         {
  539.             newAdmin = _this select 0;
  540.             disableSerialization;
  541.             d_adminTransfer = (findDisplay 46) createDisplay "RscDisplayEmpty";
  542.             showChat true;
  543.             _mouseDetection2 = d_adminTransfer ctrlCreate ["RscButton", 8888];
  544.             _mouseDetection2 ctrlSetPosition [-0.000156274 * safezoneW + safezoneX,-0.00599999 * safezoneH + safezoneY,1.00547 * safezoneW,1.023 * safezoneH];
  545.             _mouseDetection2 ctrladdEventHandler ["MouseMoving",
  546.             "
  547.                 serverCommand format ['#Vote Admin %1', newAdmin];
  548.                 d_adminTransfer closeDisplay 0;
  549.             "];
  550.             _mouseDetection2 ctrlSetBackgroundColor [0,0,0,0];
  551.             _mouseDetection2 ctrlCommit 0;
  552.         }] remoteExec ["spawn",-2];
  553.         (format ["JAM: Administration has been passed from %1 to %2.",JAM_myName,_specifiedPlayerName]) remoteExec ["systemChat",0];
  554.     };
  555.  
  556.     JAM_fnc_execLocal =
  557.     {
  558.         _text = ctrlText console_inputBox;
  559.         if(_text isEqualTo "") exitWith
  560.         {
  561.             hint "No code to execute.";
  562.         };
  563.         _code = compile _text;
  564.         _result = "";
  565.         _result = [] call _code;
  566.     };
  567.  
  568.     JAM_fnc_execGlobal =
  569.     {
  570.         _text = ctrlText console_inputBox;
  571.         if (_text isEqualTo "") exitWith
  572.         {
  573.             hint "No code to execute.";
  574.         };
  575.         _code = compile _text;
  576.         _result = _code remoteExec ["bis_fnc_call", 0, false];
  577.     };
  578.  
  579.     JAM_fnc_execServer =
  580.     {
  581.         _text = ctrlText console_inputBox;
  582.         if (_text isEqualTo "") exitWith
  583.         {
  584.             hint "JAM: Console Error: No code to execute.";
  585.         };
  586.         _code = compile _text;
  587.         _result = _code remoteExec ["bis_fnc_call", 2, false];
  588.     };
  589.  
  590.     JAM_fnc_execPlayer =
  591.     {
  592.         params ["_selectedPlayer", "_specifiedName", "_specifiedUID"];
  593.         _selectedPlayer = _this select 0;
  594.         _specifiedName = _this select 1;
  595.         _specifiedUID = _this select 2;
  596.         _text = ctrlText console_inputBox;
  597.         if (_text isEqualTo "") exitWith
  598.         {
  599.             hint "JAM: Console Error: No code to execute.";
  600.         };
  601.         consoleCode1 = compile _text;
  602.         if (!tNameSelected && !tUIDSelected) then
  603.         {
  604.             {
  605.                 if (name _x == _selectedPlayer) then
  606.                 {
  607.                     _textNotif = format ["JAM: Executing code on %1s client...", (name _x)];
  608.                     cutText [_textNotif, "PLAIN DOWN", 0, true, false];
  609.                     _result = consoleCode1 remoteExec ["bis_fnc_call", _x, false];
  610.                 };
  611.             } forEach allPlayers;
  612.         };
  613.         if (tNameSelected) then
  614.         {
  615.             {
  616.                 if (name _x == _specifiedName) then
  617.                 {
  618.                     _textNotif = format ["JAM: Executing code on %1s client...", (name _x)];
  619.                     cutText [_textNotif, "PLAIN DOWN", 0, true, false];
  620.                     _result = consoleCode1 remoteExec ["bis_fnc_call", _x, false];
  621.                 };
  622.             } forEach allPlayers;
  623.         };
  624.  
  625.         if (tUIDSelected) then
  626.         {
  627.             {
  628.                 if (str (getPlayerUID _x) == _specifiedUID) then
  629.                 {
  630.                     _textNotif = format ["JAM: Executing code on %1s client...", (name _x)];
  631.                     cutText [_textNotif, "PLAIN DOWN", 0, true, false];
  632.                     _result = consoleCode1 remoteExec ["bis_fnc_call", _x, false];
  633.                 };
  634.             } forEach allPlayers;
  635.         };
  636.     };
  637.    
  638.     JAM_fnc_giveArsenal =
  639.     {
  640.         params["_playerName"];
  641.         _playerName = _this select 0;
  642.         {
  643.             if ((name _x) == _playerName) then
  644.             {
  645.                 [["Arsenal_Scroll_Option"],
  646.                 {
  647.                     action_openArsenal = player addAction ["JAM: <t color='#42D6FC'>Open Arsenal (1x)</t>",
  648.                     {
  649.                         ["Preload"] call BIS_fnc_arsenal;
  650.                         ["Open",true] spawn BIS_fnc_arsenal;
  651.                         player removeAction action_openArsenal;
  652.                     }];
  653.                 }] remoteExec ["spawn",_x];
  654.             };
  655.         } forEach allPlayers;
  656.     };
  657.  
  658. comment "----------------------------------------------------------";
  659. comment "-------------------GLOBAL FUNCTIONS-----------------------";
  660. comment "----------------------------------------------------------";
  661.  
  662.     JAM_gui_LoadVeh =
  663.     {
  664.         _kind = _this select 0;
  665.         comment "onLBSelChanged  = [] spawn JAM_gui_VehInfo;";
  666.         comment "colorDisabled[] = {1,1,1,0.25};";
  667.         comment "colorScrollbar[] = {1,0,0,0};";
  668.         comment "colorSelect[] = {1,1,1,1};";
  669.         comment "colorSelect2[] = {1,1,1,1};";
  670.         comment "colorSelectBackground[] = {0,0,0,0.5};";
  671.         comment "colorSelectBackground2[] = {0.667,0.714,0.635,1};";
  672.         comment "shadow = 0.75;";
  673.         lbCLear fSM_RscVehList;
  674.         _count =  count (configFile >> "cfgVehicles");
  675.         for "_x" from 0 to (_count-1) do
  676.         {
  677.             _veh = ((configFile >> "cfgVehicles") select _x);
  678.             if (isClass _veh) then
  679.             {  
  680.                 if (getNumber (_veh >> "scope") == 2) then
  681.                 {  
  682.                     _class = configName _veh;
  683.                     if (_class isKindOf _kind) then
  684.                     {
  685.                         _index = fSM_RscVehList lbAdd(getText(configFile >> "cfgVehicles" >> _class>> "displayName"));
  686.                         fSM_RscVehList lbSetData[(lbSize fSM_RscVehList)-1,  _class];
  687.                         _picture = (getText(configFile >> "cfgVehicles" >> _class >> "picture"));
  688.                         fSM_RscVehList lbSetPicture[(lbSize fSM_RscVehList)-1,_picture];
  689.                     };
  690.                 };
  691.             };
  692.         };
  693.     };
  694.    
  695.     JAM_gui_VehInfo =
  696.     {
  697.         private ["_weapArray","_class","_crewCount","_model","_maxSpeed","_invSpace","_armor"];
  698.         _id =  lbCurSel fSM_RscVehList;
  699.         _class = fSM_RscVehList lbData _id;
  700.         _weapons = [];
  701.         _weaponsClass = getArray(configFile >> "cfgVehicles" >> _class >> "weapons");
  702.         {
  703.             _name = getText (configFile >> "cfgWeapons" >> _x >> "displayName");
  704.             _weapons = _weapons + [ _name];
  705.         } forEach _weaponsClass;
  706.         if (isClass (configFile >> "cfgVehicles" >> _class >> "Turrets" >> "M2_Turret")) then
  707.         {
  708.                 _weapArray = getArray(configFile >> "cfgVehicles" >> _class >> "Turrets" >> "M2_Turret" >> "weapons");
  709.         }
  710.         else
  711.         {
  712.             _weapArray = getArray(configFile >> "cfgVehicles" >> _class >> "Turrets" >> "MainTurret" >> "weapons");
  713.             _weapArray = _weapArray + (getArray(configFile >> "cfgVehicles" >> _class >> "Turrets" >> "FrontTurret" >> "weapons"));
  714.             _weapArray = _weapArray + (getArray(configFile >> "cfgVehicles" >> _class >> "Turrets" >> "RearTurret" >> "weapons"));
  715.         };
  716.         {
  717.             _name = getText (configFile >> "cfgWeapons" >> _x >> "displayName");
  718.             _weapons = _weapons + [ _name];
  719.         } forEach _weapArray;
  720.         _crewCount = [_class,true] call BIS_fnc_crewCount;
  721.         _model = getText(configFile >> "cfgVehicles" >> _class >> "model");
  722.         _maxSpeed = getNumber(configFile >> "cfgVehicles" >> _class >> "maxSpeed");
  723.         _invSpace = getNumber(configFile >> "cfgVehicles" >> _class >> "maximumLoad");
  724.         _armor = getNumber(configFile >> "cfgVehicles" >> _class >> "armor");
  725.         comment "shadow = 0.75;";
  726.         comment "size = 0.037;";
  727.         _separator = parseText "-------------------------------------------------------------------------------------";
  728.         fSM_vehStatText ctrlSetStructuredText parseText format
  729.         ["<t align='left' shadow='1' shadowColor='#75000000'>Weapons:</t><br/>
  730.         <t align='left' shadow='1' shadowColor='#75000000'>%1</t>
  731.         <t align='left' shadow='1' shadowColor='#75000000'>%6</t><br/>
  732.         <t align='left' shadow='1' shadowColor='#75000000'>Passengers:</t> <t align='right' shadow='1' shadowColor='#75000000'>%2</t>
  733.         <t align='left' shadow='1' shadowColor='#75000000'>%6</t><br/>
  734.         <t align='left' shadow='1' shadowColor='#75000000'>Max Speed:</t> <t align='right' shadow='1' shadowColor='#75000000'>%3</t>
  735.         <t align='left' shadow='1' shadowColor='#75000000'>%6</t><br/>
  736.         <t align='left' shadow='1' shadowColor='#75000000'>Inventory:</t> <t align='right' shadow='1' shadowColor='#75000000'>%4</t>
  737.         <t align='left' shadow='1' shadowColor='#75000000'>%6</t><br/>
  738.         <t align='left' shadow='1' shadowColor='#75000000'>Armor:</t> <t align='right' shadow='1' shadowColor='#75000000'>%5</t>
  739.         <t align='left' shadow='1' shadowColor='#75000000'>%6</t><br/>",_weapons,_crewCount,_maxSpeed,_invSpace,_armor, _separator];   
  740.     };
  741.    
  742.     JAM_gui_VehCreate =
  743.     {
  744.         _idVeh =  lbCurSel fSM_RscVehList;
  745.         _classVeh = fSM_RscVehList lbData _idVeh;
  746.         _emptyPos = position player findEmptyPosition [5,50,_classVeh];
  747.         if (count _emptyPos == 0) then
  748.         {
  749.             hint "JAM: Error - Either vehicle cannot be spawned due to a lack of space, or you have not selected anything.";
  750.         }
  751.         else
  752.         {  
  753.             _veh = createVehicle [_classVeh, _emptyPos, [], 0,""];
  754.             player moveInAny _veh;
  755.         };
  756.         JAM_d_fullSpawnMenu closeDisplay 0;
  757.     };
  758.  
  759.     JAM_fnc_disableFatigueGlobal =
  760.     {
  761.         if (isNil "fatigueTgglGlobal") then {fatigueTgglGlobal = 1;};
  762.         if (fatigueTgglGlobal == 1) then {
  763.             comment "init start";
  764.             [["InfStam"],
  765.             {
  766.                 JAM_toggle_cardioGlobal = {
  767.                     if (isNil 'cardioTggleGlobal') then {cardioTggleGlobal = 1};
  768.                     if (cardioTggleGlobal == 1) then {
  769.                         cardioTggleGlobal = 0;
  770.                         titleText ["<t color='#42D6FC'>Infinite Stamina </t><t color='#FFFFFF'>[ON]</t>", "PLAIN DOWN", -1, true, true];
  771.                         player enableFatigue false;
  772.                         EH_noFatigue = player addEventHandler ["Respawn", {
  773.                                 player enableFatigue false;
  774.                         }];
  775.                         Hint "JAM: EH added (Fatigue Disabled)."
  776.                     } else {
  777.                         cardioTggleGlobal = 1;
  778.                         player enableFatigue true;
  779.                         titleText ["<t color='#42D6FC'>Infinite Stamina </t><t color='#FFFFFF'>[OFF]</t>", "PLAIN DOWN", -1, true, true];
  780.                         player removeEventHandler ["Respawn", EH_noFatigue];
  781.                         Hint "JAM: EH removed (Fatigue Enabled)."
  782.                     };
  783.                 };
  784.                 [] call JAM_toggle_cardioGlobal;
  785.             }] remoteExec ["spawn", 0, "JAM_CardioJIP"];
  786.             comment "init done";
  787.             fatigueTgglGlobal = 0;
  788.         } else {
  789.             comment "toggle off";
  790.             [[],{
  791.                 [] call JAM_toggle_cardioGlobal;
  792.             }] remoteExec ["spawn", 0];
  793.             comment "over-write JIP message";
  794.             [[],{comment "do nothing";}] remoteExec ["spawn",0,"JAM_CardioJIP"];
  795.             fatigueTgglGlobal = 1;
  796.         };
  797.     };
  798.  
  799.     JAM_fnc_show3DPlayerNames =
  800.     {
  801.         if (isNil "shw3DPlrNmTggl") then {shw3DPlrNmTggl = 1;};
  802.         if (shw3DPlrNmTggl == 1) then {
  803.             comment "init start";
  804.             [["shw3DPlrNmJIP"],
  805.             {
  806.                 JAM_fini_fnc_compile3 =
  807.                 {
  808.                     (with missionNamespace do compile (_this select 0));
  809.                 };
  810.                 JAM_toggle_allPlayers3DESP = {
  811.                     if (isNil 'JAM_tggl_Glbl3DESP') then {JAM_tggl_Glbl3DESP = 1};
  812.                     if (JAM_tggl_Glbl3DESP == 1) then {
  813.                         JAM_tggl_Glbl3DESP = 0;
  814.                         titleText ["<t color='#42D6FC'>ShowPlayerNames </t><t color='#FFFFFF'>[ON]</t>", "PLAIN DOWN", -1, true, true];
  815.                         playSound "Hint";
  816.                         [("
  817.                             MissionEH_3DESP = addMissionEventHandler ['Draw3D',
  818.                             {
  819.                                 {
  820.                                     if (((player distance _x) < 1500) && (_x != player)) then {
  821.                                         drawIcon3D ['', [1, 1, 1, 1], [visiblePosition _x select 0, visiblePosition _x select 1, (getPosATL _x select 2) + 2.3], 1, 1, 45, (format ['%1', name _x]), 2, 0.025, 'PuristaMedium', 'center', false];
  822.                                     };
  823.                                 } forEach allPlayers;
  824.                             }];
  825.                         ")] call jam_fini_fnc_compile3;
  826.                     } else {
  827.                         JAM_tggl_Glbl3DESP = 1;
  828.                         titleText ["<t color='#42D6FC'>ShowPlayerNames </t><t color='#FFFFFF'>[OFF]</t>", "PLAIN DOWN", -1, true, true];
  829.                         playSound "Hint";
  830.                         [("removeMissionEventHandler['Draw3D',MissionEH_3DESP];")] call jam_fini_fnc_compile;
  831.                     };
  832.                 };
  833.                 [] call JAM_toggle_allPlayers3DESP;
  834.             }] remoteExec ["spawn", 0, "shw3DPlrNmJIP"];
  835.             comment "init done";
  836.             shw3DPlrNmTggl = 0;
  837.         } else {
  838.             comment "toggle off";
  839.             [[],{
  840.                 [] call JAM_toggle_allPlayers3DESP;
  841.             }] remoteExec ["spawn", 0];
  842.             comment "over-write JIP message";
  843.             [[],{comment "do nothing";}] remoteExec ["spawn",0,"shw3DPlrNmJIP"];
  844.             shw3DPlrNmTggl = 1;
  845.         };
  846.     };
  847.  
  848.     JAM_fnc_showPlayersOnMap =
  849.     {
  850.         if (isNil "shwPlyrsOnMapTggl") then {shwPlyrsOnMapTggl = 1;};
  851.         if (shwPlyrsOnMapTggl == 1) then {
  852.             comment "init start";
  853.             [["ShwPlyrsOnMapJIP"],
  854.             {
  855.                 JAM_fini_fnc_plrs2 =
  856.                 {
  857.                     _players = [];
  858.                     _all = player nearEntities [['Man','Land','Air','Ship'], 25000];
  859.                     {
  860.                         if ((_x isKindOf "Man") && (getPlayerUID _x != "")) then {
  861.                         _players pushBack _x;
  862.                         } else {
  863.                             if ((count crew _x) != 0) then {
  864.                                 for "_i" from 0 to (count crew _x)-1 do {
  865.                                     _l = (crew _x) select _i;
  866.                                     if (getPlayerUID _l != "") then {
  867.                                         _players pushBack _l;
  868.                                     };
  869.                                 };
  870.                             };
  871.                         };
  872.                     } forEach (_all - allCurators);
  873.                     _players
  874.                 };
  875.                 JAM_fini_fnc_compile2 =
  876.                 {
  877.                     (with missionNamespace do compile (_this select 0));
  878.                 };
  879.                 jam_mesp = {
  880.                     if (isNil "mespTggle") then {mespTggle = 1};
  881.                     if (mespTggle == 1) then {
  882.                         playSound "Hint";
  883.                         titleText ["<t color='#42D6FC'>MAPESP </t><t color='#FFFFFF'>[ON]</t>", "PLAIN DOWN", -1, true, true];
  884.                         mespTggle = 0;
  885.                     } else {
  886.                         playSound "Hint";
  887.                         titleText ["<t color='#42D6FC'>MAPESP </t><t color='#FFFFFF'>[OFF]</t>", "PLAIN DOWN", -1, true, true];
  888.                         mespTggle = 1;
  889.                     };
  890.                     [] spawn {
  891.                         [("
  892.                         while {mespTggle == 0} do {
  893.                         _units = call JAM_fini_fnc_plrs2;
  894.                         _unitCount = count _units;
  895.                         for '_i' from 0 to (_unitCount-1) do {
  896.                         _unit = _units select _i;
  897.                         if (alive _unit) then {
  898.                         deleteMarkerLocal('jam_plr' + (str _i));
  899.                         _namePlayer = name _unit;
  900.                         _mark_player = 'jam_plr' + (str _i);
  901.                         _mark_player = createMarkerLocal[_mark_player, getPos _unit];
  902.                         _mark_player setMarkerTypeLocal 'wayPoint';
  903.                         _mark_player setMarkerPosLocal(getPos _unit);
  904.                         _mark_player setMarkerColorLocal 'ColorBlue';
  905.                         _mark_player setMarkerTextLocal format['%1 - %2', _namePlayer, round(player distance _unit)];
  906.                         };
  907.                         };
  908.                         sleep 0.5;
  909.                         };
  910.                         for '_i' from 0 to 500 do {
  911.                         deleteMarkerLocal('jam_plr' + (str _i));
  912.                         };
  913.                         ")] call JAM_fini_fnc_compile2;
  914.                     };
  915.                 };
  916.                 [] call jam_mesp;
  917.             }] remoteExec ["spawn", 0, "mapEsp"];
  918.             comment "init done";
  919.             playSound "Hint";
  920.             titleText ["<t color='#42D6FC'>MAP-ESP </t><t color='#FFFFFF'>[ON]</t>", "PLAIN DOWN", -1, true, true];
  921.             shwPlyrsOnMapTggl = 0;
  922.         } else {
  923.             comment "toggle off";
  924.             [[],{
  925.                 [] call jam_mesp;
  926.             }] remoteExec ["spawn", 0];
  927.             comment "over-write JIP message";
  928.             [[],{comment "do nothing";}] remoteExec ["spawn",0,"mapEsp"];
  929.             playSound "Hint";
  930.             titleText ["<t color='#42D6FC'>MAP-ESP </t><t color='#FFFFFF'>[OFF]</t>", "PLAIN DOWN", -1, true, true];
  931.             shwPlyrsOnMapTggl = 1;
  932.         };
  933.     };
  934.  
  935.     JAM_open_utils =
  936.     {
  937.         hint "nothing to see here";
  938.     };
  939.  
  940.     JAM_toggle_blackListing =
  941.     {
  942.         if (!JAM_blackListEnabled) then {
  943.             JAM_blackListEnabled = true;
  944.             hint "JAM: Blacklist Enabled.";
  945.         } else {
  946.             JAM_blackListEnabled = false;
  947.             hint "JAM: Blacklist Disabled.";
  948.         };
  949.     };
  950.  
  951.     JAM_fnc_clearDead =
  952.     {
  953.         [["JAM: Deleting dead objects...", "PLAIN DOWN", 0, true, false]] remoteExec ["cutText", 0];
  954.         _countUpTheDead = 0;
  955.         _deadObjects = 0;
  956.         { deleteVehicle _x; _deadObjects = _deadObjects + 1; } forEach allDead;
  957.         { deleteVehicle _x; _countUpTheDead = _countUpTheDead + 1; } forEach allDeadMen;
  958.         (format ["A grim total of %1 dead objects have been removed from the battlefield. Of those, %2 were soldiers.", _deadObjects, _countUpTheDead]) remoteExec ["hint", 0];
  959.     };
  960.  
  961.     JAM_fnc_AASJIP =
  962.     {
  963.         if (isNil "AASJIPTggl") then {AASJIPTggl = 1};
  964.         if (AASJIPTggl == 1) then {
  965.             comment "toggle on";
  966.             [["JAM: Applying respawn-arsenal (JIP)...", "PLAIN DOWN", 0, true, false]] remoteExec ["cutText", 0];
  967.             [[],{
  968.                 EH_AASJIP = player addEventHandler ["Respawn", {
  969.                     [] spawn {
  970.                         action_openArsenal = player addAction ["JAM: <t color='#42D6FC'>Open Arsenal (1x)</t>",
  971.                         {
  972.                             ["Preload"] call BIS_fnc_arsenal;
  973.                             ["Open",true] spawn BIS_fnc_arsenal;
  974.                             titleText ["<t color='#42D6FC'>Arsenal Script <t color='#FFFFFF' size='2'>by</t><t color='#42D6FC'> J-WoLF</t><br/><t color='#58D68D'>-Press ESC to exit Arsenal-</t>", "PLAIN DOWN", -1, true, true];
  975.                             player removeAction action_openArsenal;
  976.                         }];
  977.                         sleep 20;
  978.                         player removeAction action_openArsenal;
  979.                     };
  980.                 }];
  981.             }] remoteExec ["spawn",0,"AASJIP"];
  982.             comment "init done";
  983.             playSound "Hint";
  984.             titleText ["<t color='#42D6FC'>AAS-JIP </t><t color='#FFFFFF'>[ON]</t>", "PLAIN", -1, true, true];
  985.             AASJIPTggl = 0;
  986.         } else {
  987.             comment "toggle off";
  988.             [["JAM: Removing respawn-arsenal (JIP)...", "PLAIN DOWN", 0, true, false]] remoteExec ["cutText", 0];
  989.             [[],{
  990.                 player removeEventHandler ["Respawn", EH_AASJIP];
  991.                 player removeAction action_openArsenal;
  992.             }] remoteExec ["spawn",0];
  993.             [[],{comment "do nothing";}] remoteExec ["spawn",0,"AASJIP"];
  994.             comment "init done";
  995.             playSound "Hint";
  996.             titleText ["<t color='#42D6FC'>AAS-JIP </t><t color='#FFFFFF'>[OFF]</t>", "PLAIN", -1, true, true];
  997.             AASJIPTggl = 1;
  998.         };
  999.     };
  1000.  
  1001.     JAM_fnc_updateZeusObj =
  1002.     {
  1003.         [["JAM: Adding new objects to Zeus interface...", "PLAIN DOWN", 0, true, false]] remoteExec ["cutText", player];
  1004.         [["JAM: Adding new objects to Zeus interface...", "PLAIN DOWN", 0, true, false]] remoteExec ["cutText", allCurators];
  1005.         [[],{
  1006.             {
  1007.                 _x addCuratorEditableObjects [nearestObjects [(position _x), ["All"], 35000],true];
  1008.                 _x addCuratorEditableObjects [allUnits,true];
  1009.                 _x addCuratorEditableObjects [vehicles,true];
  1010.                 _x addCuratorEditableObjects [allPlayers,true];
  1011.             } forEach allCurators;
  1012.         }] remoteExec ["spawn", 2];
  1013.         Hint "JAM: Zeus interface updated with new objects.";
  1014.     };
  1015.  
  1016.     JAM_fnc_viewDistance =
  1017.     {
  1018.         removeAllActions player;
  1019.         player addAction ["JAM: <t color='#BDBDBD'>[CANCEL]</t>", {removeAllActions player;}];
  1020.         player addAction ["JAM: <t color='#BDBDBD'>[RETURN]</t>", {removeAllActions player; [] spawn JAM_open_serverMenu;}];
  1021.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>VD: </t><t color='#82E0AA'>12km</t>", {12000 remoteExec ["setViewDistance",0,"jam_VD"];}];
  1022.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>VD: </t><t color='#82E0AA'>6km</t>", {6000 remoteExec ["setViewDistance",0,"jam_VD"];}];
  1023.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>VD: </t><t color='#82E0AA'>4km</t>", {4000 remoteExec ["setViewDistance",0,"jam_VD"];}];
  1024.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>VD: </t><t color='#82E0AA'>3km</t>", {3000 remoteExec ["setViewDistance",0,"jam_VD"];}];
  1025.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>VD: </t><t color='#82E0AA'>2km</t>", {2000 remoteExec ["setViewDistance",0,"jam_VD"];}];
  1026.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>VD: </t><t color='#82E0AA'>1km</t>", {1000 remoteExec ["setViewDistance",0,"jam_VD"];}];
  1027.         hint "JAM: Scroll wheel to set view distance.";
  1028.     };
  1029.  
  1030.     JAM_fnc_respawnAll =
  1031.     {
  1032.         [["JAM: Re-spawning all players...", "PLAIN DOWN", 0, true, false]] remoteExec ["cutText", 0];
  1033.         _countPlayers = 0;
  1034.         { forceRespawn _x; _countPlayers = (_countPlayers + 1); } forEach (allPlayers - allCurators);
  1035.         Hint format ["[%1] Players have been forced to respawn.", _countPlayers];
  1036.     };
  1037.  
  1038.     JAM_fnc_deleteAll =
  1039.     {
  1040.         [["JAM: Deleting all objects on server...", "PLAIN DOWN", 0, true, false]] remoteExec ["cutText", 0];
  1041.         _countObjects = 0;
  1042.         {
  1043.             if (!(typeOf _x == "ModuleCuratorAddEditingAreaPlayers_F") && !(typeOf _x == "ModuleCurator_F") && !(typeOf _x == "ModuleMPTypeGameMaster_F")) then {
  1044.                 deleteVehicle _x; _countObjects = _countObjects + 1;
  1045.             };
  1046.         } forEach nearestObjects [player, ["all"], 35000] + (allUnits - allPlayers);
  1047.         Hint format ["[%1] objects have been deleted.", _countObjects];
  1048.     };
  1049.    
  1050.     JAM_fnc_3DTP =
  1051.     {
  1052.         (vehicle player) setPos (screenToWorld [0.5, 0.5]);
  1053.     };
  1054.  
  1055.     JAM_open_arsenalMenu =
  1056.     {
  1057.         disableSerialization;
  1058.         d_arsenalMenu = (findDisplay 46) createDisplay "RscDisplayEmpty";
  1059.         showChat true; comment "Fixes Chat Bug";
  1060.        
  1061.         ctrl_arsbckrndMain = d_arsenalMenu ctrlCreate ["RscText", 8765];
  1062.         ctrl_arsbckrndMain ctrlSetPosition [0.443281 * safezoneW + safezoneX,0.379 * safezoneH + safezoneY,0.118594 * safezoneW,0.132 * safezoneH];
  1063.         ctrl_arsbckrndMain ctrlSetBackgroundColor [-1,-1,-1,0.5];
  1064.         ctrl_arsbckrndMain ctrlCommit 0;
  1065.        
  1066.         ctrl_background2 = d_arsenalMenu ctrlCreate ["RscText", 8766];
  1067.         ctrl_background2 ctrlSetPosition [0.443281 * safezoneW + safezoneX,0.379 * safezoneH + safezoneY,0.0928125 * safezoneW,0.033 * safezoneH];
  1068.         ctrl_background2 ctrlSetBackgroundColor [-1,-1,-1,0.5];
  1069.         ctrl_background2 ctrlCommit 0;
  1070.        
  1071.         ctrl_background3 = d_arsenalMenu ctrlCreate ["RscText", 8767];
  1072.         ctrl_background3 ctrlSetPosition [0.469062 * safezoneW + safezoneX,0.379 * safezoneH + safezoneY,0.0670312 * safezoneW,0.033 * safezoneH];
  1073.         ctrl_background3 ctrlSetBackgroundColor [-1,-1,-1,0.5];
  1074.         ctrl_background3 ctrlCommit 0;
  1075.        
  1076.         ctrl_background4 = d_arsenalMenu ctrlCreate ["RscText", 8768];
  1077.         ctrl_background4 ctrlSetPosition [0.443281 * safezoneW + safezoneX,0.489 * safezoneH + safezoneY,0.118594 * safezoneW,0.022 * safezoneH];
  1078.         ctrl_background4 ctrlSetBackgroundColor [-1,-1,-1,0.5];
  1079.         ctrl_background4 ctrlCommit 0;
  1080.        
  1081.         ctrl_cancelClose = d_arsenalMenu ctrlCreate ["RscButtonMenu", 8769];
  1082.         ctrl_cancelClose ctrlSetText "cursorTarget";
  1083.         ctrl_cancelClose ctrlSetPosition [0.479375 * safezoneW + safezoneX,0.489 * safezoneH + safezoneY,0.0464063 * safezoneW,0.022 * safezoneH];
  1084.         ctrl_cancelClose ctrladdEventHandler ["ButtonClick", {
  1085.             d_arsenalMenu closeDisplay 0;
  1086.             onEachFrame {
  1087.                 if (name cursorTarget == "Error: No unit") then
  1088.                 {
  1089.                     drawIcon3D ['A3\ui_f_curator\Data\CfgCurator\entity_disabled_ca.paa', [0,1,1,1], [visiblePosition cursorTarget select 0, visiblePosition cursorTarget select 1, (getPosATL cursorTarget select 2) + 1], 1, 1, 0, typeOf cursorTarget, 2, 0.05, 'PuristaMedium', 'center', false];
  1090.                 }
  1091.                 else
  1092.                 {
  1093.                     drawIcon3D ['A3\ui_f_curator\Data\CfgCurator\entity_disabled_ca.paa', [0,1,1,1], [visiblePosition cursorTarget select 0, visiblePosition cursorTarget select 1, (getPosATL cursorTarget select 2) + 1], 1, 1, 0, name cursorTarget, 2, 0.05, 'PuristaMedium', 'center', false];
  1094.                 };
  1095.             };
  1096.             [] spawn {
  1097.                 waitUntil {!alive player};
  1098.                 onEachFrame {};
  1099.             };
  1100.             removeAllActions player;
  1101.             player addAction ["JAM: <t color='#42D6FC'>Target: </t><t color='#ff6600'>[+]Arsenal</t>", {
  1102.                 ["AmmoboxInit",[cursorTarget,true]] call BIS_fnc_arsenal;
  1103.                 Hint format ["[%1] (%2) is now a full arsenal.", (name cursorTarget), (typeOf cursorTarget)];
  1104.             }];
  1105.             player addAction ["JAM: <t color='#BDBDBD'>[CANCEL]</t>", {
  1106.                 onEachFrame {};
  1107.                 removeAllActions player;
  1108.             }];
  1109.             player addAction ["JAM: <t color='#BDBDBD'>[RETURN]</t>", {
  1110.                 onEachFrame {};
  1111.                 removeAllActions player;
  1112.                 [] spawn JAM_open_arsenalMenu;
  1113.             }];
  1114.             hint "JAM: Arsenal scroll menu activated.";
  1115.         }];
  1116.         ctrl_cancelClose ctrlCommit 0;
  1117.        
  1118.         ctrl_openarsbtn = d_arsenalMenu ctrlCreate ["RscShortcutButton", 8770];
  1119.         ctrl_openarsbtn ctrlSetText "OPEN";
  1120.         ctrl_openarsbtn ctrlSetPosition [0.448438 * safezoneW + safezoneX,0.423 * safezoneH + safezoneY,0.0515625 * safezoneW,0.055 * safezoneH];
  1121.         ctrl_openarsbtn ctrladdEventHandler ["ButtonClick", {[] spawn {
  1122.             ["Preload"] call BIS_fnc_arsenal;
  1123.             d_arsenalMenu closeDisplay 0;
  1124.             ["Open",true] spawn BIS_fnc_arsenal;
  1125.         };}];
  1126.         ctrl_openarsbtn ctrlCommit 0;
  1127.        
  1128.         ctrl_spawnarsbtn = d_arsenalMenu ctrlCreate ["RscShortcutButton", 8771];
  1129.         ctrl_spawnarsbtn ctrlSetText "SPAWN";
  1130.         ctrl_spawnarsbtn ctrlSetPosition [0.505156 * safezoneW + safezoneX,0.423 * safezoneH + safezoneY,0.0515625 * safezoneW,0.055 * safezoneH];
  1131.         ctrl_spawnarsbtn ctrladdEventHandler ["ButtonClick", {d_arsenalMenu closeDisplay 0;
  1132.             [] spawn {
  1133.                 player playMove 'ainvpercmstpsraswrfldnon_putdown_amovpercmstpsraswrfldnon';
  1134.                 _arsenalLocation = createLocation [ "ViewPoint" , getPos player, 10, 10];
  1135.                 _flagpole = createVehicle ["Flag_ARMEX_F",getPos player,[],0,"NONE"];
  1136.                 _flagpole setDir direction player;
  1137.                 _box = createVehicle ["B_supplyCrate_F",getPos player,[],0,"NONE"];
  1138.                 _arsenalLocation attachObject _box;
  1139.                 ["AmmoboxInit",[_box,true]] call BIS_fnc_arsenal;
  1140.                 _box allowDamage false;
  1141.                 _flagpole allowDamage false;
  1142.                 _box setDir direction player;
  1143.                 _box attachTo [_flagpole, [-0.1,-0.4,-3.2]];
  1144.                 _arsenalPosition = mapGridPosition _box;
  1145.                 (format ["____________High Command____________\nArsenal supply box has been airdropped.\n____________GRID: %1____________", _arsenalPosition]) remoteExec ["hint", 0];
  1146.                 _arsenalLocation setText "    Arsenal";
  1147.             };
  1148.         }];
  1149.         ctrl_spawnarsbtn ctrlCommit 0;
  1150.        
  1151.         ctrl_menuTitle = d_arsenalMenu ctrlCreate ["RscText", 8772];
  1152.         ctrl_menuTitle ctrlSetText "JAM       Arsenal Menu           ";
  1153.         ctrl_menuTitle ctrlSetPosition [0.443281 * safezoneW + safezoneX,0.39 * safezoneH + safezoneY,0.118594 * safezoneW,0.011 * safezoneH];
  1154.         ctrl_menuTitle ctrlSetBackgroundColor [-1,-1,-1,0];
  1155.         ctrl_menuTitle ctrlCommit 0;
  1156.        
  1157.         ctrl_xClose = d_arsenalMenu ctrlCreate ["RscButton", 8773];
  1158.         ctrl_xClose ctrlSetText "X";
  1159.         ctrl_xClose ctrlSetPosition [0.536094 * safezoneW + safezoneX,0.379 * safezoneH + safezoneY,0.0257812 * safezoneW,0.033 * safezoneH];
  1160.         ctrl_xClose ctrladdEventHandler ["ButtonClick", {
  1161.             d_arsenalMenu closeDisplay 0;
  1162.         }];
  1163.         ctrl_xClose ctrlCommit 0;
  1164.     };
  1165.    
  1166.     JAM_fini_fnc_plrs =
  1167.     {
  1168.         _players = [];
  1169.         _all = player nearEntities [['Man','Land','Air','Ship'], 25000];
  1170.         {
  1171.             if ((_x isKindOf "Man") && (getPlayerUID _x != "")) then {
  1172.             _players pushBack _x;
  1173.             } else {
  1174.                 if ((count crew _x) != 0) then {
  1175.                     for "_i" from 0 to (count crew _x)-1 do {
  1176.                         _l = (crew _x) select _i;
  1177.                         if (getPlayerUID _l != "") then {
  1178.                             _players pushBack _l;
  1179.                         };
  1180.                     };
  1181.                 };
  1182.             };
  1183.         } forEach _all;
  1184.         _players
  1185.     };
  1186.    
  1187.     jam_fini_fnc_hostileAI =
  1188.     {
  1189.         _hostileai = [];
  1190.         {
  1191.             if ((_x isKindOf "Man") && (side _x != side player)) then {
  1192.                 _hostileai pushBack _x;
  1193.             } else {
  1194.                 if ((count crew _x) != 0) then {
  1195.                     for "_i" from 0 to (count crew _x)-1 do {
  1196.                         _l = (crew _x) select _i;
  1197.                         if (side _l != side player) then {
  1198.                             _hostileai pushBack _l;
  1199.                         };
  1200.                     };
  1201.                 };
  1202.             };
  1203.         } forEach allUnits - allPlayers;
  1204.         _hostileai
  1205.     };
  1206.    
  1207.     JAM_fini_fnc_compile =
  1208.     {
  1209.         (with missionNamespace do compile (_this select 0));
  1210.     };
  1211.    
  1212.     JAM_fnc_unflip =
  1213.     {
  1214.         params ["_vehicle"];
  1215.         _vehicle = _this;
  1216.         _pos = getPosATL _vehicle;
  1217.         _pos set [2, 7];
  1218.         _vehicle setPosATL _pos;
  1219.         _vehicle setVectorUp [0,0,1];
  1220.     };
  1221.  
  1222. comment "----------------------------------------------------------";
  1223. comment "---------------------MAIN MENU GUI------------------------";
  1224. comment "----------------------------------------------------------";
  1225.  
  1226.     JAM_open_mainMenu =
  1227.     {
  1228.         disableSerialization;
  1229.         d_mainMenu = (findDisplay 46) createDisplay "RscDisplayEmpty";
  1230.         showChat true; comment "Fixes Chat Bug";
  1231.        
  1232.         mainFrame_user = d_mainMenu ctrlCreate ["RscFrame", 7005];
  1233.         mainFrame_user ctrlSetText format ["USER: %1", JAM_myName];
  1234.         mainFrame_user ctrlSetTextColor JAM_fColor;
  1235.         mainFrame_user ctrlSetPosition [0.304062 * safezoneW + safezoneX,0.17 * safezoneH + safezoneY,0.391875 * safezoneW,0.088 * safezoneH];
  1236.         mainFrame_user ctrlCommit 0;
  1237.        
  1238.         mainFrame_title = d_mainMenu ctrlCreate ["RscStructuredText", 7006];
  1239.         mainFrame_title ctrlSetStructuredText parseText "<t color='#00ffffff' shadow='2' size='2' align='center' font='PuristaBold'>J-WoLF's Admin Menu <t font='RobotoCondensed'>V<t color='#E0E0E0'>1.5<t color='#FFFFFF'>A</t>";
  1240.         mainFrame_title ctrlSetPosition [0.309219 * safezoneW + safezoneX,0.181 * safezoneH + safezoneY,0.376406 * safezoneW,0.055 * safezoneH];
  1241.         mainFrame_title ctrlSetBackgroundColor [0,0,0,0];
  1242.         mainFrame_title ctrlCommit 0;
  1243.        
  1244.         fadeInTitle1 = [] spawn {
  1245.             for [{_i=1}, {_i<9}, {_i=_i+1}] do
  1246.             {
  1247.                 mainFrame_title ctrlSetStructuredText parseText (format ["<t color='#0%1ffffff' shadow='2' size='2' align='center' font='PuristaBold'>J-WoLF's Admin Menu <t font='RobotoCondensed'>V<t color='#E0E0E0'>1.5<t color='#FFFFFF'>A</t>", _i]);
  1248.                 sleep 0.001;
  1249.             };
  1250.         };
  1251.        
  1252.         fadeInTitle2 = [] spawn {
  1253.             waitUntil { scriptDone fadeInTitle1 };
  1254.             for [{_i=10}, {_i<101}, {_i=_i+1}] do
  1255.             {
  1256.                 mainFrame_title ctrlSetStructuredText parseText (format ["<t color='#%1ffffff' shadow='2' size='2' align='center' font='PuristaBold'>J-WoLF's Admin Menu <t font='RobotoCondensed'>V<t color='#E0E0E0'>1.5<t color='#FFFFFF'>A</t>", _i]);
  1257.                 sleep 0.001;
  1258.             };
  1259.         };
  1260.        
  1261.         mainFrame_backgroundLeft = d_mainMenu ctrlCreate ["RscText", 7007];
  1262.         mainFrame_backgroundLeft ctrlSetPosition [0.304062 * safezoneW + safezoneX,0.269 * safezoneH + safezoneY,0.108281 * safezoneW,0.341 * safezoneH];
  1263.         mainFrame_backgroundLeft ctrlSetBackgroundColor [0,0,0,0.5];
  1264.         mainFrame_backgroundLeft ctrlCommit 0;
  1265.        
  1266.         mainFrame_backgroundMiddle = d_mainMenu ctrlCreate ["RscText", 7008];
  1267.         mainFrame_backgroundMiddle ctrlSetPosition [0.422656 * safezoneW + safezoneX,0.269 * safezoneH + safezoneY,0.154687 * safezoneW,0.341 * safezoneH];
  1268.         mainFrame_backgroundMiddle ctrlSetBackgroundColor [0,0,0,0.5];
  1269.         mainFrame_backgroundMiddle ctrlCommit 0;
  1270.        
  1271.         mainFrame_backgroundRight = d_mainMenu ctrlCreate ["RscText", 7009];
  1272.         mainFrame_backgroundRight ctrlSetPosition [0.587656 * safezoneW + safezoneX,0.269 * safezoneH + safezoneY,0.108281 * safezoneW,0.341 * safezoneH];
  1273.         mainFrame_backgroundRight ctrlSetBackgroundColor [0,0,0,0.5];
  1274.         mainFrame_backgroundRight ctrlCommit 0;
  1275.        
  1276.         playerList_title = d_mainMenu ctrlCreate ["RscStructuredText", 7010];
  1277.         playerList_title ctrlSetStructuredText parseText "<t align='center'>PLAYER LIST</t>";
  1278.         playerList_title ctrlSetPosition [0.304063 * safezoneW + safezoneX,0.236 * safezoneH + safezoneY,0.108281 * safezoneW,0.022 * safezoneH];  
  1279.         playerList_title ctrlSetBackgroundColor JAM_tColor;
  1280.         playerList_title ctrlCommit 0;
  1281.        
  1282.         menuSelection_title = d_mainMenu ctrlCreate ["RscStructuredText", 7011];
  1283.         menuSelection_title ctrlSetStructuredText parseText "<t align='center'>MENU SELECTION</t>";
  1284.         menuSelection_title ctrlSetPosition [0.422656 * safezoneW + safezoneX,0.236 * safezoneH + safezoneY,0.154687 * safezoneW,0.022 * safezoneH];   
  1285.         menuSelection_title ctrlSetBackgroundColor JAM_tColor;
  1286.         menuSelection_title ctrlCommit 0;
  1287.        
  1288.         quickScripts_title = d_mainMenu ctrlCreate ["RscStructuredText", 7012];
  1289.         quickScripts_title ctrlSetStructuredText parseText "<t align='center'>QUICK SCRIPTS</t>";
  1290.         quickScripts_title ctrlSetPosition [0.587656 * safezoneW + safezoneX,0.236 * safezoneH + safezoneY,0.108281 * safezoneW,0.022 * safezoneH];
  1291.         quickScripts_title ctrlSetBackgroundColor JAM_tColor;
  1292.         quickScripts_title ctrlCommit 0;
  1293.        
  1294.         playerList_listBox = d_mainMenu ctrlCreate ["RscListbox", 7013];
  1295.         playerList_listBox ctrlSetPosition [0.309219 * safezoneW + safezoneX,0.28 * safezoneH + safezoneY,0.0979687 * safezoneW,0.319 * safezoneH];
  1296.         { _pL_index = playerList_listBox lbAdd  name _x; } forEach allPlayers;
  1297.         playerList_listBox ctrlCommit 0;
  1298.        
  1299.         menuSelection_listBox = d_mainMenu ctrlCreate ["RscListbox", 7014];
  1300.         menuSelection_listBox ctrlSetPosition [0.427812 * safezoneW + safezoneX,0.28 * safezoneH + safezoneY,0.144375 * safezoneW,0.253 * safezoneH];
  1301.         menuSelection_listBox ctrlCommit 0;
  1302.  
  1303.         MMG_mL_lb_Arsenal        =  menuSelection_listBox lbAdd "ArsenalMenu";
  1304.         MMG_mL_lb_Target         =  menuSelection_listBox lbAdd "TargetMenu";
  1305.         MMG_mL_lb_Player         =  menuSelection_listBox lbAdd "PlayerMenu";
  1306.         MMG_mL_lb_Vehicle        =  menuSelection_listBox lbAdd "VehicleMenu";
  1307.         MMG_mL_lb_CustomVehicles =  menuSelection_listBox lbAdd "CustomVehicles";
  1308.         MMG_mL_lb_Cheat          =  menuSelection_listBox lbAdd "CheatMenu";
  1309.         MMG_mL_lb_Dev            =  menuSelection_listBox lbAdd "DevMenu*";
  1310.         MMG_mL_lb_Server         =  menuSelection_listBox lbAdd "ServerMenu";
  1311.         MMG_mL_lb_SpawnMenu      =  menuSelection_listBox lbAdd "SpawnMenu";
  1312.        
  1313.         menuSelection_listBox lbSetColor [MMG_mL_lb_Arsenal, [1, 1, 1, 1]];
  1314.         menuSelection_listBox lbSetColor [MMG_mL_lb_Target, [1, 1, 1, 1]];
  1315.         menuSelection_listBox lbSetColor [MMG_mL_lb_Player, [1, 1, 1, 1]];
  1316.         menuSelection_listBox lbSetColor [MMG_mL_lb_Vehicle, [1, 1, 1, 1]];
  1317.         menuSelection_listBox lbSetColor [MMG_mL_lb_CustomVehicles, [1, 1, 1, 1]];
  1318.         menuSelection_listBox lbSetColor [MMG_mL_lb_Cheat, [1, 1, 1, 1]];
  1319.         menuSelection_listBox lbSetColor [MMG_mL_lb_Dev, [1, 1, 1, 1]];
  1320.         menuSelection_listBox lbSetColor [MMG_mL_lb_Server, [1, 1, 1, 1]];
  1321.         menuSelection_listBox lbSetColor [MMG_mL_lb_SpawnMenu, [1, 1, 1, 1]];
  1322.        
  1323.         menuSelection_openButton = d_mainMenu ctrlCreate ["RscButton", 7015];
  1324.         menuSelection_openButton ctrlSetText "OPEN";
  1325.         menuSelection_openButton ctrlSetPosition [0.427812 * safezoneW + safezoneX,0.544 * safezoneH + safezoneY,0.144375 * safezoneW,0.055 * safezoneH];
  1326.         menuSelection_openButton ctrlSetBackgroundColor [0, 0, 0, 0.6];
  1327.         menuSelection_openButton ctrlSetEventHandler ["ButtonClick",
  1328.         "
  1329.             If (menuSelection_listBox lbIsSelected MMG_mL_lb_Arsenal) then
  1330.             {
  1331.                 d_mainMenu closeDisplay 0;
  1332.                 [] spawn JAM_open_arsenalMenu;
  1333.             };
  1334.             If (menuSelection_listBox lbIsSelected MMG_mL_lb_Target) then
  1335.             {
  1336.                 d_mainMenu closeDisplay 0;
  1337.                 Hint 'TargetMenu Activated. Scroll for actions.';
  1338.                 [] call JAM_toggle_targetOverlay;
  1339.                 [] call JAM_open_targetMenu;
  1340.             };
  1341.             if (menuSelection_listBox lbIsSelected MMG_mL_lb_Player) then
  1342.             {
  1343.                 d_mainMenu closeDisplay 0;
  1344.                 Hint 'PlayerMenu Activated. Scroll for actions.';
  1345.                 [] call JAM_open_playerMenu;
  1346.             };
  1347.             if (menuSelection_listBox lbIsSelected MMG_mL_lb_Vehicle) then
  1348.             {
  1349.                 d_mainMenu closeDisplay 0;
  1350.                 Hint 'VehicleMenu Activated. Scroll for actions.';
  1351.                 [] call JAM_open_vehicleMenu;
  1352.             };
  1353.             if (menuSelection_listBox lbIsSelected MMG_mL_lb_CustomVehicles) then
  1354.             {
  1355.                 d_mainMenu closeDisplay 0;
  1356.                 Hint 'CustomVehicles Spawn Menu Activated. Scroll for actions.';
  1357.                 [] call JAM_open_CustomVehicles;
  1358.             };
  1359.             if (menuSelection_listBox lbIsSelected MMG_mL_lb_Cheat) then
  1360.             {
  1361.                 d_mainMenu closeDisplay 0;
  1362.                 Hint 'CheatMenu Activated. Scroll for actions.';
  1363.                 [] call JAM_open_cheatMenu;
  1364.             };
  1365.             if (menuSelection_listBox lbIsSelected MMG_mL_lb_Dev) then
  1366.             {
  1367.                 hint 'ERROR: Menu is not yet finished.';
  1368.             };
  1369.             if (menuSelection_listBox lbIsSelected MMG_mL_lb_Server) then
  1370.             {
  1371.                 d_mainMenu closeDisplay 0;
  1372.                 [] spawn JAM_open_serverMenu;
  1373.             };
  1374.             if (menuSelection_listBox lbIsSelected MMG_mL_lb_SpawnMenu) then
  1375.             {
  1376.                 d_mainMenu closeDisplay 0;
  1377.                 [] spawn JAM_fnc_OpenVehUI;
  1378.             };
  1379.         "];
  1380.         menuSelection_openButton ctrlCommit 0;
  1381.        
  1382.         quickScipts_SERVERMUTE = d_mainMenu ctrlCreate ["RscButton", 7500];
  1383.         quickScipts_SERVERMUTE ctrlSetText "MUTE";
  1384.         quickScipts_SERVERMUTE ctrlSetPosition [0.592812 * safezoneW + safezoneX,0.28 * safezoneH + safezoneY,0.0464063 * safezoneW,0.022 * safezoneH];
  1385.         quickScipts_SERVERMUTE ctrladdEventHandler ["ButtonClick",
  1386.         "
  1387.             _selectedItem = lbCurSel playerList_listBox;
  1388.             [playerList_listBox lbText _selectedItem] call JAM_fnc_mutePlayer;
  1389.             d_mainMenu closeDisplay 0;
  1390.         "];
  1391.         quickScipts_SERVERMUTE ctrlSetTooltip "Disable communication of player.";
  1392.         quickScipts_SERVERMUTE ctrlCommit 0;
  1393.        
  1394.         quickScipts_SERVERUNMUTE = d_mainMenu ctrlCreate ["RscButton", 7501];
  1395.         quickScipts_SERVERUNMUTE ctrlSetText "UNMUTE";
  1396.         quickScipts_SERVERUNMUTE ctrlSetPosition [0.639219 * safezoneW + safezoneX,0.28 * safezoneH + safezoneY,0.0515625 * safezoneW,0.022 * safezoneH];
  1397.         quickScipts_SERVERUNMUTE ctrladdEventHandler ["ButtonClick",
  1398.         "
  1399.             _selectedItem = lbCurSel playerList_listBox;
  1400.             [playerList_listBox lbText _selectedItem] call JAM_fnc_unmutePlayer;
  1401.             d_mainMenu closeDisplay 0;
  1402.         "];
  1403.         quickScipts_SERVERUNMUTE ctrlSetTooltip "Enable communication of player.";
  1404.         quickScipts_SERVERUNMUTE ctrlCommit 0;
  1405.        
  1406.         quickScipts_AUTOKICKBAN = d_mainMenu ctrlCreate ["RscButton", 7017];
  1407.         quickScipts_AUTOKICKBAN ctrlSetText "AUTOKICK";
  1408.         quickScipts_AUTOKICKBAN ctrlSetPosition [0.592812 * safezoneW + safezoneX,0.313 * safezoneH + safezoneY,0.0515625 * safezoneW,0.022 * safezoneH];
  1409.         quickScipts_AUTOKICKBAN ctrladdEventHandler ["ButtonClick",
  1410.         {
  1411.             hint "JAM: Error - The auto-kick button has been disabled in this version due to reports of game crashes.\n
  1412.             If you still wish to use it, type this command in the debug console with the desired player name:\n
  1413.             [playerNameInQuotes] call JAM_fnc_autoKickPlayer;\n
  1414.             You can always check back on the steam guide for JAM to see if the latest update fixes this issue.";
  1415.         }];
  1416.         quickScipts_AUTOKICKBAN ctrlSetTooltip "Permanently ban player with message.";
  1417.         quickScipts_AUTOKICKBAN ctrlCommit 0;
  1418.        
  1419.         quickScipts_BAN = d_mainMenu ctrlCreate ["RscButton", 7018];
  1420.         quickScipts_BAN ctrlSetText "BAN";
  1421.         quickScipts_BAN ctrlSetPosition [0.644375 * safezoneW + safezoneX,0.313 * safezoneH + safezoneY,0.0464063 * safezoneW,0.022 * safezoneH];
  1422.         quickScipts_BAN ctrladdEventHandler ["ButtonClick",
  1423.         "
  1424.             _selectedItem = lbCurSel playerList_listBox;
  1425.             [playerList_listBox lbText _selectedItem] call JAM_fnc_experimentalBan;
  1426.         "];
  1427.         quickScipts_BAN ctrlSetTooltip "Trigger ban via BE restriction.";
  1428.         quickScipts_BAN ctrlCommit 0;
  1429.        
  1430.         quickScipts_BLACKLIST = d_mainMenu ctrlCreate ["RscButton", 7019];
  1431.         quickScipts_BLACKLIST ctrlSetText "BLACKLIST PLAYER";
  1432.         quickScipts_BLACKLIST ctrlSetPosition [0.592812 * safezoneW + safezoneX,0.346 * safezoneH + safezoneY,0.0979687 * safezoneW,0.022 * safezoneH];
  1433.         quickScipts_BLACKLIST ctrladdEventHandler ["ButtonClick",
  1434.         "
  1435.             _selectedItem = lbCurSel playerList_listBox;
  1436.             [playerList_listBox lbText _selectedItem] call JAM_fnc_blacklistPlayer;
  1437.         "];
  1438.         quickScipts_BLACKLIST ctrlSetTooltip "Add player to blacklist.";
  1439.         quickScipts_BLACKLIST ctrlCommit 0;
  1440.        
  1441.         quickScipts_FREEZE = d_mainMenu ctrlCreate ["RscButton", 7020];
  1442.         quickScipts_FREEZE ctrlSetText "FREEZE PLAYER";
  1443.         quickScipts_FREEZE ctrlSetPosition [0.592812 * safezoneW + safezoneX,0.379 * safezoneH + safezoneY,0.0979687 * safezoneW,0.022 * safezoneH];
  1444.         quickScipts_FREEZE ctrladdEventHandler ["ButtonClick",
  1445.         "
  1446.             _selectedItem = lbCurSel playerList_listBox;
  1447.             [playerList_listBox lbText _selectedItem] call JAM_fnc_freezePlayer;
  1448.         "];
  1449.         quickScipts_FREEZE ctrlSetTooltip "Disable/Enable player input.";
  1450.         quickScipts_FREEZE ctrlCommit 0;
  1451.        
  1452.         quickScipts_TPSELFTOPLAYER = d_mainMenu ctrlCreate ["RscButton", 7021];
  1453.         quickScipts_TPSELFTOPLAYER ctrlSetText "TP Self-To-Player";
  1454.         quickScipts_TPSELFTOPLAYER ctrlSetPosition [0.592812 * safezoneW + safezoneX,0.412 * safezoneH + safezoneY,0.0979687 * safezoneW,0.022 * safezoneH];
  1455.         quickScipts_TPSELFTOPLAYER ctrladdEventHandler ["ButtonClick",
  1456.         "
  1457.             _selectedItem = lbCurSel playerList_listBox;
  1458.             [playerList_listBox lbText _selectedItem] call JAM_fnc_TP_selfToPlayer;
  1459.         "];
  1460.         quickScipts_TPSELFTOPLAYER ctrlCommit 0;
  1461.        
  1462.         quickScipts_TPPLAYERTOSELF = d_mainMenu ctrlCreate ["RscButton", 7022];
  1463.         quickScipts_TPPLAYERTOSELF ctrlSetText "TP Player-To-Self";
  1464.         quickScipts_TPPLAYERTOSELF ctrlSetPosition [0.592812 * safezoneW + safezoneX,0.445 * safezoneH + safezoneY,0.0979687 * safezoneW,0.022 * safezoneH];
  1465.         quickScipts_TPPLAYERTOSELF ctrladdEventHandler ["ButtonClick",
  1466.         "
  1467.             _selectedItem = lbCurSel playerList_listBox;
  1468.             [playerList_listBox lbText _selectedItem] call JAM_fnc_TP_playerToSelf;
  1469.         "];
  1470.         quickScipts_TPPLAYERTOSELF ctrlCommit 0;
  1471.        
  1472.         quickScipts_GIVEARSENAL = d_mainMenu ctrlCreate ["RscButton", 7023];
  1473.         quickScipts_GIVEARSENAL ctrlSetText "Give Arsenal (1x)";
  1474.         quickScipts_GIVEARSENAL ctrlSetPosition [0.592812 * safezoneW + safezoneX,0.478 * safezoneH + safezoneY,0.0979687 * safezoneW,0.022 * safezoneH];
  1475.         quickScipts_GIVEARSENAL ctrladdEventHandler ["ButtonClick",
  1476.         "
  1477.             _selectedItem = lbCurSel playerList_listBox;
  1478.             [playerList_listBox lbText _selectedItem] call JAM_fnc_giveArsenal;
  1479.         "];
  1480.         quickScipts_GIVEARSENAL ctrlCommit 0;
  1481.        
  1482.         quickScipts_ASSIGNGAMEMASTER = d_mainMenu ctrlCreate ["RscButton", 7024];
  1483.         quickScipts_ASSIGNGAMEMASTER ctrlSetText "ASSIGN GAMEMASTER";
  1484.         quickScipts_ASSIGNGAMEMASTER ctrlSetPosition [0.592812 * safezoneW + safezoneX,0.511 * safezoneH + safezoneY,0.0979687 * safezoneW,0.022 * safezoneH];
  1485.         quickScipts_ASSIGNGAMEMASTER ctrladdEventHandler ["ButtonClick",
  1486.         "
  1487.             _selectedItem = lbCurSel playerList_listBox;
  1488.             [playerList_listBox lbText _selectedItem] call JAM_fnc_assignGameMaster;
  1489.         "];
  1490.         quickScipts_ASSIGNGAMEMASTER ctrlCommit 0;
  1491.        
  1492.         quickScipts_ASSIGNGAMEMOD = d_mainMenu ctrlCreate ["RscButton", 7025];
  1493.         quickScipts_ASSIGNGAMEMOD ctrlSetText "ASSIGN GAMEMOD";
  1494.         quickScipts_ASSIGNGAMEMOD ctrlSetPosition [0.592812 * safezoneW + safezoneX,0.544 * safezoneH + safezoneY,0.0979687 * safezoneW,0.022 * safezoneH];
  1495.         quickScipts_ASSIGNGAMEMOD ctrladdEventHandler ["ButtonClick",
  1496.         "
  1497.             _selectedItem = lbCurSel playerList_listBox;
  1498.             [playerList_listBox lbText _selectedItem] call JAM_fnc_assignGameMod;
  1499.         "];
  1500.         quickScipts_ASSIGNGAMEMOD ctrlCommit 0;
  1501.        
  1502.         quickScipts_TRANSFERADMIN = d_mainMenu ctrlCreate ["RscButton", 7026];
  1503.         quickScipts_TRANSFERADMIN ctrlSetText "TRANSFER ADMIN";
  1504.         quickScipts_TRANSFERADMIN ctrlSetPosition [0.592812 * safezoneW + safezoneX,0.577 * safezoneH + safezoneY,0.0979687 * safezoneW,0.022 * safezoneH];
  1505.         quickScipts_TRANSFERADMIN ctrladdEventHandler ["ButtonClick",
  1506.         "
  1507.             _selectedItem = lbCurSel playerList_listBox;
  1508.             [playerList_listBox lbText _selectedItem] call JAM_fnc_transferAdmin;
  1509.         "];
  1510.         quickScipts_TRANSFERADMIN ctrlCommit 0;
  1511.        
  1512.         scriptTarget_title = d_mainMenu ctrlCreate ["RscStructuredText", 7027];
  1513.         scriptTarget_title ctrlSetStructuredText parseText "<t font='PuristaMedium'>TARGET</t>";
  1514.         scriptTarget_title ctrlSetPosition [0.273125 * safezoneW + safezoneX,0.621 * safezoneH + safezoneY,0.0876563 * safezoneW,0.022 * safezoneH];
  1515.         scriptTarget_title ctrlSetBackgroundColor JAM_tColor;
  1516.         scriptTarget_title ctrlCommit 0;
  1517.        
  1518.         console_title = d_mainMenu ctrlCreate ["RscStructuredText", 7028];
  1519.         console_title ctrlSetStructuredText parseText "<t shadow='0' font='PuristaMedium'>Debug console</t><t align='center'>-</t><t align='right'>created by J-WoLF</t>";
  1520.         console_title ctrlSetPosition [0.365937 * safezoneW + safezoneX,0.621 * safezoneH + safezoneY,0.273281 * safezoneW,0.022 * safezoneH];
  1521.         console_title ctrlSetBackgroundColor JAM_tColor;
  1522.         console_title ctrlCommit 0;
  1523.        
  1524.         console_backgound = d_mainMenu ctrlCreate ["RscText", 7029];
  1525.         console_backgound ctrlSetPosition [0.365937 * safezoneW + safezoneX,0.654 * safezoneH + safezoneY,0.273281 * safezoneW,0.121 * safezoneH];
  1526.         console_backgound ctrlsetbackgroundColor [0,0,0,0.5];
  1527.         console_backgound ctrlCommit 0;
  1528.        
  1529.         console_inputBox = d_mainMenu ctrlCreate ["RscEdit", 7030];
  1530.         console_inputBox ctrlSetPosition [0.371094 * safezoneW + safezoneX,0.676 * safezoneH + safezoneY,0.262969 * safezoneW,0.066 * safezoneH];
  1531.         console_inputBox ctrlSetBackgroundColor [0,0,0,0.3];
  1532.         console_inputBox ctrlSetTooltip "Paste SQF script here.";
  1533.         console_inputBox ctrlCommit 0;
  1534.        
  1535.         console_outputBox = d_mainMenu ctrlCreate ["RscText", 7031];
  1536.         console_outputBox ctrlSetPosition [0.371094 * safezoneW + safezoneX,0.742 * safezoneH + safezoneY,0.262969 * safezoneW,0.022 * safezoneH];
  1537.         console_outputBox ctrlSetBackgroundColor [0,0,0,0.8];
  1538.         console_outputBox ctrlCommit 0;
  1539.        
  1540.         console_executeText = d_mainMenu ctrlCreate ["RscStructuredText", 7032];
  1541.         console_executeText ctrlSetStructuredText parseText "<t size='0.75'>Execute</t>";
  1542.         console_executeText ctrlSetPosition [0.365937 * safezoneW + safezoneX,0.654 * safezoneH + safezoneY,0.0309375 * safezoneW,0.022 * safezoneH];
  1543.         console_executeText ctrlSetBackgroundColor [0,0,0,0];
  1544.         console_executeText ctrlCommit 0;
  1545.        
  1546.         scriptTarget_playerName_edit = d_mainMenu ctrlCreate ["RscEdit", 7033];
  1547.         scriptTarget_playerName_edit ctrlSetPosition [0.273125 * safezoneW + safezoneX,0.687 * safezoneH + safezoneY,0.0876563 * safezoneW,0.022 * safezoneH];
  1548.         scriptTarget_playerName_edit ctrlSetBackgroundColor [0,0,0,0.3];
  1549.         scriptTarget_playerName_edit ctrlSetTooltip "Type target name here.";
  1550.         scriptTarget_playerName_edit ctrlCommit 0;
  1551.        
  1552.         scriptTarget_playerUID_edit = d_mainMenu ctrlCreate ["RscEdit", 7034];
  1553.         scriptTarget_playerUID_edit ctrlSetPosition [0.273125 * safezoneW + safezoneX,0.753 * safezoneH + safezoneY,0.0876563 * safezoneW,0.022 * safezoneH];
  1554.         scriptTarget_playerUID_edit ctrlSetBackgroundColor [0,0,0,0.3];
  1555.         scriptTarget_playerUID_edit ctrlSetTooltip "Type target steamID here.";
  1556.         scriptTarget_playerUID_edit ctrlCommit 0;
  1557.        
  1558.         scriptTarget_playerName = d_mainMenu ctrlCreate ["RscText", 7035];
  1559.         scriptTarget_playerName ctrlSetText "Name:";
  1560.         scriptTarget_playerName ctrlSetPosition [0.273125 * safezoneW + safezoneX,0.654 * safezoneH + safezoneY,0.0876563 * safezoneW,0.022 * safezoneH];
  1561.         scriptTarget_playerName ctrlSetBackgroundColor [0,0,0,0.5];
  1562.         scriptTarget_playerName ctrlCommit 0;
  1563.        
  1564.         scriptTarget_playerUID = d_mainMenu ctrlCreate ["RscText", 7036];
  1565.         scriptTarget_playerUID ctrlSetText "UID:";
  1566.         scriptTarget_playerUID ctrlSetPosition [0.273125 * safezoneW + safezoneX,0.72 * safezoneH + safezoneY,0.0876563 * safezoneW,0.022 * safezoneH];
  1567.         scriptTarget_playerUID ctrlSetBackgroundColor [0,0,0,0.5];
  1568.         scriptTarget_playerUID ctrlCommit 0;
  1569.        
  1570.         scriptTarget_playerName_cb = d_mainMenu ctrlCreate ["RscCheckbox", 7037];
  1571.         scriptTarget_playerName_cb ctrlSetPosition [0.345312 * safezoneW + safezoneX,0.654 * safezoneH + safezoneY,0.0154688 * safezoneW,0.022 * safezoneH];
  1572.         scriptTarget_playerName_cb ctrladdEventHandler ["ButtonClick",
  1573.         "
  1574.             If (!tNameSelected) then {
  1575.                 tNameSelected = true;
  1576.             } else {
  1577.                 tNameSelected = false;
  1578.             };
  1579.         "];
  1580.         scriptTarget_playerName_cb ctrlSetTooltip "Define target by name.";
  1581.         scriptTarget_playerName_cb ctrlCommit 0;
  1582.    
  1583.         scriptTarget_playerUID_cb = d_mainMenu ctrlCreate ["RscCheckbox", 7038];
  1584.         scriptTarget_playerUID_cb ctrlSetPosition [0.345312 * safezoneW + safezoneX,0.72 * safezoneH + safezoneY,0.0154688 * safezoneW,0.022 * safezoneH];
  1585.         scriptTarget_playerUID_cb ctrladdEventHandler ["ButtonClick",
  1586.         "
  1587.             If (!tUIDSelected) then {
  1588.                 tUIDSelected = true;
  1589.             } else {
  1590.                 tUIDSelected = false;
  1591.             };
  1592.         "];
  1593.         scriptTarget_playerUID_cb ctrlSetTooltip "Define target by UID.";
  1594.         scriptTarget_playerUID_cb ctrlCommit 0;
  1595.        
  1596.         console_playerExec = d_mainMenu ctrlCreate ["RscButtonMenu", 7039];
  1597.         console_playerExec ctrlSetText "PLAYER EXEC";
  1598.         console_playerExec ctrlSetPosition [0.273125 * safezoneW + safezoneX,0.786 * safezoneH + safezoneY,0.0876563 * safezoneW,0.022 * safezoneH];
  1599.         console_playerExec ctrladdEventHandler ["ButtonClick",
  1600.         "
  1601.             [playerList_listBox lbText (lbCurSel playerList_listBox),ctrlText scriptTarget_playerName_edit,ctrlText scriptTarget_playerUID_edit] spawn JAM_fnc_execPlayer;
  1602.         "];
  1603.         console_playerExec ctrlCommit 0;
  1604.        
  1605.         console_serverExec = d_mainMenu ctrlCreate ["RscButtonMenu", 7040];
  1606.         console_serverExec ctrlSetText "SERVER EXEC";
  1607.         console_serverExec ctrlSetPosition [0.365937 * safezoneW + safezoneX,0.786 * safezoneH + safezoneY,0.0876563 * safezoneW,0.022 * safezoneH];
  1608.         console_serverExec ctrlSetBackgroundColor [0,0.1,0,0.75];
  1609.         console_serverExec ctrladdEventHandler ["ButtonClick",
  1610.         "
  1611.             [] spawn JAM_fnc_execServer;
  1612.         "];
  1613.         console_serverExec ctrlCommit 0;
  1614.        
  1615.         console_globalExec = d_mainMenu ctrlCreate ["RscButtonMenu", 7041];
  1616.         console_globalExec ctrlSetText "GLOBAL EXEC";
  1617.         console_globalExec ctrlSetPosition [0.45875 * safezoneW + safezoneX,0.786 * safezoneH + safezoneY,0.0876563 * safezoneW,0.022 * safezoneH];
  1618.         console_globalExec ctrlSetBackgroundColor [0.1,0,0,0.75];
  1619.         console_globalExec ctrladdEventHandler ["ButtonClick",
  1620.         "
  1621.             [] spawn JAM_fnc_execGlobal;
  1622.         "];
  1623.         console_globalExec ctrlCommit 0;
  1624.        
  1625.         console_localExec = d_mainMenu ctrlCreate ["RscButtonMenu", 7042];
  1626.         console_localExec ctrlSetText "LOCAL EXEC";
  1627.         console_localExec ctrlSetPosition [0.551563 * safezoneW + safezoneX,0.786 * safezoneH + safezoneY,0.0876563 * safezoneW,0.022 * safezoneH];
  1628.         console_localExec ctrlSetBackgroundColor [0,0,0.1,0.75];
  1629.         console_localExec ctrladdEventHandler ["ButtonClick",
  1630.         "
  1631.             [] spawn JAM_fnc_execLocal;
  1632.         "];
  1633.         console_localExec ctrlCommit 0;
  1634.        
  1635.         configure_title = d_mainMenu ctrlCreate ["RscStructuredText", 7043];
  1636.         configure_title ctrlSetStructuredText parseText "<t font='PuristaMedium'>CONFIGURE</t>";
  1637.         configure_title ctrlSetPosition [0.644375 * safezoneW + safezoneX,0.621 * safezoneH + safezoneY,0.0876563 * safezoneW,0.022 * safezoneH];
  1638.         configure_title ctrlSetBackgroundColor JAM_tColor;
  1639.         configure_title ctrlCommit 0;
  1640.        
  1641.         configure_options = d_mainMenu ctrlCreate ["RscButtonMenu", 7044];
  1642.         configure_options ctrlSetText "OPTIONS";
  1643.         configure_options ctrlSetPosition [0.644375 * safezoneW + safezoneX,0.654 * safezoneH + safezoneY,0.0876563 * safezoneW,0.022 * safezoneH];
  1644.         configure_options ctrladdEventHandler ["ButtonClick",
  1645.         "
  1646.             [] spawn JAM_open_optionsPanel;
  1647.         "];
  1648.         configure_options ctrlCommit 0;
  1649.        
  1650.         configure_playerVehicleVarNameList = d_mainMenu ctrlCreate ["RscButtonMenu", 7045];
  1651.         configure_playerVehicleVarNameList ctrlSetText "vehicleVarName List";
  1652.         configure_playerVehicleVarNameList ctrlSetPosition [0.644375 * safezoneW + safezoneX,0.687 * safezoneH + safezoneY,0.0876563 * safezoneW,0.022 * safezoneH];
  1653.         configure_playerVehicleVarNameList ctrladdEventHandler ["ButtonClick",
  1654.         "
  1655.             [] spawn JAM_open_playerVehicleVarNameList;
  1656.         "];
  1657.         configure_playerVehicleVarNameList ctrlCommit 0;
  1658.        
  1659.         configure_blacklist = d_mainMenu ctrlCreate ["RscButtonMenu", 7046];
  1660.         configure_blacklist ctrlSetText "BLACKLIST";
  1661.         configure_blacklist ctrlSetPosition [0.644375 * safezoneW + safezoneX,0.72 * safezoneH + safezoneY,0.0876563 * safezoneW,0.022 * safezoneH];
  1662.         configure_blacklist ctrladdEventHandler ["ButtonClick",
  1663.         "
  1664.             d_mainMenu closeDisplay 0;
  1665.             [] spawn JAM_open_blacklistMenu;
  1666.         "];
  1667.         configure_blacklist ctrlCommit 0;
  1668.        
  1669.         configure_credits = d_mainMenu ctrlCreate ["RscButtonMenu", 7047];
  1670.         configure_credits ctrlSetText "CREDITS";
  1671.         configure_credits ctrlSetPosition [0.644375 * safezoneW + safezoneX,0.753 * safezoneH + safezoneY,0.0876563 * safezoneW,0.022 * safezoneH];
  1672.         configure_credits ctrladdEventHandler ["ButtonClick",
  1673.         "
  1674.             hint 'This menu (JAM) was created by J-WoLF.';
  1675.         "];
  1676.         configure_credits ctrlCommit 0;
  1677.        
  1678.         configure_close = d_mainMenu ctrlCreate ["RscButtonMenu", 7048];
  1679.         configure_close ctrlSetText "CLOSE";
  1680.         configure_close ctrlSetPosition [0.644375 * safezoneW + safezoneX,0.786 * safezoneH + safezoneY,0.0876563 * safezoneW,0.022 * safezoneH];
  1681.         configure_close ctrladdEventHandler ["ButtonClick",
  1682.         "
  1683.             d_mainMenu closeDisplay 0;
  1684.         "];
  1685.         configure_close ctrlCommit 0;
  1686.        
  1687.         comment "Load Saved States of Controls";
  1688.         if (isNil "tNameSelected") then {tNameSelected = false;};
  1689.         if (tNameSelected) then {scriptTarget_playerName_cb cbSetChecked true;};
  1690.         if (isNil "tUIDSelected") then {tUIDSelected = false;};
  1691.         if (tUIDSelected) then {scriptTarget_playerUID_cb cbSetChecked true;};
  1692.     };
  1693.  
  1694. comment "----------------------------------------------------------";
  1695. comment "--------------------SPAWN MENU GUI------------------------";
  1696. comment "----------------------------------------------------------";
  1697.  
  1698.     JAM_fnc_OpenVehUI =
  1699.     {  
  1700.         private ["_flag"];
  1701.         disableSerialization;
  1702.         player action ["WeaponOnBack", player];
  1703.         JAM_d_fullSpawnMenu = (findDisplay 46) createDisplay "RscDisplayEmpty";
  1704.         showChat true;
  1705.         fSM_vehBack = JAM_d_fullSpawnMenu ctrlCreate ["IGUIBack", 9204];
  1706.         fSM_vehBack ctrlSetPosition [0 * safezoneW + safezoneX,0 * safezoneH + safezoneY,1 * safezoneW,1 * safezoneH];
  1707.         fSM_vehBack ctrlSetBackgroundColor [0,0,0,0.5];
  1708.         fSM_vehBack ctrlCommit 0;
  1709.         fSM_vehFrame = JAM_d_fullSpawnMenu ctrlCreate ["IGUIBack", 9205];
  1710.         fSM_vehFrame ctrlSetPosition [0.25 * safezoneW + safezoneX,0.25 * safezoneH + safezoneY,0.5 * safezoneW,0.5 * safezoneH];
  1711.         fSM_vehFrame ctrlSetBackgroundColor [0.529,0.565,0.49,1];
  1712.         fSM_vehFrame ctrlCommit 0;
  1713.         fSM_RscHeaderBack = JAM_d_fullSpawnMenu ctrlCreate ["IGUIBack", 9206];
  1714.         fSM_RscHeaderBack ctrlSetPosition [0.255 * safezoneW + safezoneX,0.2575 * safezoneH + safezoneY,0.49 * safezoneW,0.05 * safezoneH];
  1715.         fSM_RscHeaderBack ctrlSetBackgroundColor [0.333,0.333,0.333,0.75];
  1716.         fSM_RscHeaderBack ctrlCommit 0;
  1717.         fSM_RscVehBack = JAM_d_fullSpawnMenu ctrlCreate ["IGUIBack", 9207];
  1718.         fSM_RscVehBack ctrlSetPosition [0.255 * safezoneW + safezoneX,0.3125 * safezoneH + safezoneY,0.2425 * safezoneW,0.4275 * safezoneH];
  1719.         fSM_RscVehBack ctrlSetBackgroundColor [0.333,0.333,0.333,0.75];
  1720.         fSM_RscVehBack ctrlCommit 0;
  1721.         fSM_RscVehInfoBack = JAM_d_fullSpawnMenu ctrlCreate ["IGUIBack", 9208];
  1722.         fSM_RscVehInfoBack ctrlSetPosition [0.5025 * safezoneW + safezoneX,0.355 * safezoneH + safezoneY,0.2425 * safezoneW,0.34 * safezoneH];
  1723.         fSM_RscVehInfoBack ctrlSetBackgroundColor [0.333,0.333,0.333,0.75];
  1724.         fSM_RscVehInfoBack ctrlCommit 0;
  1725.         fSM_btnCancel = JAM_d_fullSpawnMenu ctrlCreate ["RscShortcutButton", 9209];
  1726.         fSM_btnCancel ctrlSetText "Cancel";
  1727.         fSM_btnCancel ctrlSetPosition [0.5025 * safezoneW + safezoneX,0.7025 * safezoneH + safezoneY,0.12 * safezoneW,0.0375 * safezoneH];
  1728.         fSM_btnCancel ctrlSetBackgroundColor [0.4,0.4,0.4,1];
  1729.         fSM_btnCancel ctrladdEventHandler ["ButtonClick",
  1730.         {
  1731.             JAM_d_fullSpawnMenu closeDisplay 0;
  1732.         }];
  1733.         fSM_btnCancel ctrlCommit 0;
  1734.         fSM_btnConfirm = JAM_d_fullSpawnMenu ctrlCreate ["RscShortcutButton", 9210];
  1735.         fSM_btnConfirm ctrlSetText "Confirm";
  1736.         fSM_btnConfirm ctrlSetPosition [0.625 * safezoneW + safezoneX,0.7025 * safezoneH + safezoneY,0.12 * safezoneW,0.0375 * safezoneH];
  1737.         fSM_btnConfirm ctrlSetBackgroundColor [0.4,0.4,0.4,1];
  1738.         fSM_btnConfirm ctrladdEventHandler ["ButtonClick",
  1739.         {
  1740.             [] call JAM_gui_VehCreate;
  1741.         }];
  1742.         fSM_btnConfirm ctrlCommit 0;   
  1743.         comment "insertEssentialControls";
  1744.         fSM_RscVehList = JAM_d_fullSpawnMenu ctrlCreate ["RscListBox", 9202];
  1745.         fSM_RscVehList ctrlSetTextColor [1,1,1,1];
  1746.         fSM_RscVehList ctrlSetBackgroundColor [0.667,0.714,0.635,1];
  1747.         fSM_RscVehList ctrlSetPosition [0.26 * safezoneW + safezoneX,0.3225 * safezoneH + safezoneY,0.2325 * safezoneW,0.41 * safezoneH];
  1748.         fSM_RscVehList ctrladdEventHandler ["LBSelChanged",
  1749.         {
  1750.             [] spawn JAM_gui_VehInfo;
  1751.         }];
  1752.         fSM_RscVehList ctrlCommit 0;
  1753.         fSM_vehStatText = JAM_d_fullSpawnMenu ctrlCreate ["RscStructuredText", 9203];
  1754.         fSM_vehStatText ctrlSetTextColor [1,1,1,1];
  1755.         fSM_vehStatText ctrlSetBackgroundColor [0.667,0.714,0.635,1];
  1756.         fSM_vehStatText ctrlSetPosition [0.508 * safezoneW + safezoneX,0.365 * safezoneH + safezoneY,0.2325 * safezoneW,0.32 * safezoneH];
  1757.         fSM_vehStatText ctrlCommit 0;
  1758.         ["Car"] call JAM_gui_LoadVeh;
  1759.         fSM_serverTitleText = JAM_d_fullSpawnMenu ctrlCreate ["RscStructuredText", 9200];
  1760.         fSM_serverTitleText ctrlSetTextColor [1,1,1,1];
  1761.         fSM_serverTitleText ctrlSetBackgroundColor [0,0,0,0];
  1762.         fSM_serverTitleText ctrlSetPosition [0.305 * safezoneW + safezoneX,0.265 * safezoneH + safezoneY,0.435 * safezoneW,0.04 * safezoneH];
  1763.         _plr = profileName;
  1764.         _title = "JAM | FULL VEHICLE SPAWN MENU | <a underline='true' color='#0000FF' hRef='https://www.youtube.com/watch?v=nQygf2qKIU4'>Credit: soolie</a>";
  1765.         fSM_serverTitleText ctrlSetStructuredText parseText format ["<t align='left' shadow='1' shadowColor='#75000000'>%1</t><t align='right'  shadow='1' shadowColor='#75000000'>%2</t>",_plr,_title];
  1766.         fSM_serverTitleText ctrlCommit 0;
  1767.         _plrClass = typeOf player;
  1768.         _side = getNumber(configFile >> "cfgVehicles" >> _plrClass>> "side");
  1769.         fSM_RscPlayerFlagLeft = JAM_d_fullSpawnMenu ctrlCreate ["RscPicture", 9201];
  1770.         fSM_RscPlayerFlagLeft ctrlSetBackgroundColor [0,0,0,1];
  1771.         comment "fSM_RscPlayerFlagLeft | sizeEx = 0.1 (text size is 0.1)";
  1772.         fSM_RscPlayerFlagLeft ctrlSetPosition [0.2575 * safezoneW + safezoneX,0.26 * safezoneH + safezoneY,0.05 * safezoneW,0.045* safezoneH];
  1773.         switch (_side) do
  1774.         {              
  1775.             case 0: {_flag = "\A3\Data_F\Flags\Flag_CSAT_CO.paa";};
  1776.             case 1: {_flag = "\A3\Data_F\Flags\Flag_nato_CO.paa";};
  1777.             case 2: {_flag = "\A3\Data_F\Flags\Flag_AAF_CO.paa";};  
  1778.         };
  1779.         fSM_RscPlayerFlagLeft ctrlSetText _flag;
  1780.         fSM_RscPlayerFlagLeft ctrlCommit 0;
  1781.         fSM_btnLand = JAM_d_fullSpawnMenu ctrlCreate ["RscShortcutButton", 9211];
  1782.         fSM_btnLand ctrlSetText "Land";
  1783.         fSM_btnLand ctrlSetBackgroundColor [0.4,0.4,0.4,1];
  1784.         fSM_btnLand ctrlSetPosition [0.5025 * safezoneW + safezoneX,0.3125 * safezoneH + safezoneY,0.0775 * safezoneW,0.0375 * safezoneH];
  1785.         fSM_btnLand ctrladdEventHandler ["ButtonClick",
  1786.         {
  1787.             ["Car"] call JAM_gui_LoadVeh;
  1788.         }];
  1789.         fSM_btnLand ctrlCommit 0;
  1790.         fSM_btnSea = JAM_d_fullSpawnMenu ctrlCreate ["RscShortcutButton", 9212];
  1791.         fSM_btnSea ctrlSetText "Sea";
  1792.         fSM_btnSea ctrlSetBackgroundColor [0.4,0.4,0.4,1];
  1793.         fSM_btnSea ctrlSetPosition [0.585 * safezoneW + safezoneX,0.3125 * safezoneH + safezoneY,0.0775 * safezoneW,0.0375 * safezoneH];
  1794.         fSM_btnSea ctrladdEventHandler ["ButtonClick",
  1795.         {
  1796.             ["Ship"] call JAM_gui_LoadVeh;
  1797.         }];
  1798.         fSM_btnSea ctrlCommit 0;
  1799.         fSM_btnAir = JAM_d_fullSpawnMenu ctrlCreate ["RscShortcutButton", 9213];
  1800.         fSM_btnAir ctrlSetText "Air";
  1801.         fSM_btnAir ctrlSetBackgroundColor [0.4,0.4,0.4,1];
  1802.         fSM_btnAir ctrlSetPosition [0.6675 * safezoneW + safezoneX,0.3125 * safezoneH + safezoneY,0.0775 * safezoneW,0.0375 * safezoneH];
  1803.         fSM_btnAir ctrladdEventHandler ["ButtonClick",
  1804.         {
  1805.             ["Air"] call JAM_gui_LoadVeh;
  1806.         }];
  1807.         fSM_btnAir ctrlCommit 0;
  1808.     };
  1809.  
  1810. comment "----------------------------------------------------------";
  1811. comment "-------------------OPTIONS PANEL GUI----------------------";
  1812. comment "----------------------------------------------------------";
  1813.  
  1814.     JAM_open_optionsPanel =
  1815.     {
  1816.         comment "GUI START";
  1817.  
  1818.         disableSerialization;
  1819.         d_optionsPanel = (findDisplay 46) createDisplay "RscDisplayEmpty";
  1820.         showChat true; comment "Fixes Chat Bug";
  1821.  
  1822.         comment "Create Controls";
  1823.  
  1824.         optionsPanel_bkrnd = d_optionsPanel ctrlCreate ["RscText", 7049];
  1825.         optionsPanel_bkrnd ctrlSetBackgroundColor [0,0,0,0.5];
  1826.         optionsPanel_bkrnd ctrlSetPosition [0.304062 * safezoneW + safezoneX,0.291 * safezoneH + safezoneY,0.397031 * safezoneW,0.363 * safezoneH];
  1827.         optionsPanel_bkrnd ctrlCommit 0;
  1828.  
  1829.         optionsPanel_title = d_optionsPanel ctrlCreate ["RscText", 7050];
  1830.         optionsPanel_title ctrlSetText "JAM     |     Options Panel";
  1831.         optionsPanel_title ctrlSetBackgroundColor JAM_tColor;
  1832.         optionsPanel_title ctrlSetPosition [0.304062 * safezoneW + safezoneX,0.236 * safezoneH + safezoneY,0.397031 * safezoneW,0.044 * safezoneH];
  1833.         optionsPanel_title ctrlCommit 0;
  1834.        
  1835.         optionsPanel_bkrnd1 = d_optionsPanel ctrlCreate ["RscText", 7051];
  1836.         optionsPanel_bkrnd1 ctrlSetBackgroundColor [0,0,0,0.5];
  1837.         optionsPanel_bkrnd1 ctrlSetPosition [0.319531 * safezoneW + safezoneX,0.313 * safezoneH + safezoneY,0.0773437 * safezoneW,0.077 * safezoneH];
  1838.         optionsPanel_bkrnd1 ctrlCommit 0;
  1839.        
  1840.         optionsPanel_bkrnd2 = d_optionsPanel ctrlCreate ["RscFrame", 7052];
  1841.         optionsPanel_bkrnd2 ctrlSetTextColor [0,0,0,1];
  1842.         optionsPanel_bkrnd2 ctrlSetBackgroundColor [0,0,0,1];
  1843.         optionsPanel_bkrnd2 ctrlSetPosition [0.319531 * safezoneW + safezoneX,0.313 * safezoneH + safezoneY,0.0773437 * safezoneW,0.077 * safezoneH];
  1844.         optionsPanel_bkrnd2 ctrlCommit 0;
  1845.        
  1846.         optionsPanel_bkrnd3 = d_optionsPanel ctrlCreate ["RscText", 7053];
  1847.         optionsPanel_bkrnd3 ctrlSetBackgroundColor [0,0,0,0.3];
  1848.         optionsPanel_bkrnd3 ctrlSetPosition [0.412344 * safezoneW + safezoneX,0.313 * safezoneH + safezoneY,0.0825 * safezoneW,0.077 * safezoneH];
  1849.         optionsPanel_bkrnd3 ctrlCommit 0;
  1850.        
  1851.         optionsPanel_bkrnd4 = d_optionsPanel ctrlCreate ["RscFrame", 7054];
  1852.         optionsPanel_bkrnd4 ctrlSetTextColor [0,0,0,1];
  1853.         optionsPanel_bkrnd4 ctrlSetBackgroundColor [0,0,0,0.5];
  1854.         optionsPanel_bkrnd4 ctrlSetPosition [0.412344 * safezoneW + safezoneX,0.313 * safezoneH + safezoneY,0.0825 * safezoneW,0.077 * safezoneH];
  1855.         optionsPanel_bkrnd4 ctrlCommit 0;
  1856.        
  1857.         optionsPanel_bkrnd5 = d_optionsPanel ctrlCreate ["RscText", 7055];
  1858.         optionsPanel_bkrnd5 ctrlSetBackgroundColor [0,0,0,0.3];
  1859.         optionsPanel_bkrnd5 ctrlSetPosition [0.510312 * safezoneW + safezoneX,0.313 * safezoneH + safezoneY,0.0825 * safezoneW,0.077 * safezoneH];
  1860.         optionsPanel_bkrnd5 ctrlCommit 0;
  1861.        
  1862.         optionsPanel_bkrnd6 = d_optionsPanel ctrlCreate ["RscFrame", 7056];
  1863.         optionsPanel_bkrnd6 ctrlSetTextColor [0,0,0,1];
  1864.         optionsPanel_bkrnd6 ctrlSetBackgroundColor [0,0,0,0.5];
  1865.         optionsPanel_bkrnd6 ctrlSetPosition [0.510312 * safezoneW + safezoneX,0.313 * safezoneH + safezoneY,0.0825 * safezoneW,0.077 * safezoneH];
  1866.         optionsPanel_bkrnd6 ctrlCommit 0;
  1867.        
  1868.         optionsPanel_bkrnd7 = d_optionsPanel ctrlCreate ["RscText", 7057];
  1869.         optionsPanel_bkrnd7 ctrlSetBackgroundColor [0,0,0,0.3];
  1870.         optionsPanel_bkrnd7 ctrlSetPosition [0.608281 * safezoneW + safezoneX,0.313 * safezoneH + safezoneY,0.0773437 * safezoneW,0.077 * safezoneH];
  1871.         optionsPanel_bkrnd7 ctrlCommit 0;
  1872.        
  1873.         optionsPanel_bkrnd8 = d_optionsPanel ctrlCreate ["RscFrame", 7058];
  1874.         optionsPanel_bkrnd8 ctrlSetTextColor [0,0,0,1];
  1875.         optionsPanel_bkrnd8 ctrlSetBackgroundColor [0,0,0,0.5];
  1876.         optionsPanel_bkrnd8 ctrlSetPosition [0.608281 * safezoneW + safezoneX,0.313 * safezoneH + safezoneY,0.0773437 * safezoneW,0.077 * safezoneH];
  1877.         optionsPanel_bkrnd8 ctrlCommit 0;
  1878.        
  1879.         optionsPanel_menuColor = d_optionsPanel ctrlCreate ["RscText", 7059];
  1880.         optionsPanel_menuColor ctrlSetText "Select Menu Color:";
  1881.         optionsPanel_menuColor ctrlSetBackgroundColor [0,0,0,0.5];
  1882.         optionsPanel_menuColor ctrlSetPosition [0.319531 * safezoneW + safezoneX,0.324 * safezoneH + safezoneY,0.0773437 * safezoneW,0.022 * safezoneH];
  1883.         optionsPanel_menuColor ctrlCommit 0;
  1884.        
  1885.         optionsPanel_menuColorRed = d_optionsPanel ctrlCreate ["RscButtonMenu", 7060];
  1886.         optionsPanel_menuColorRed ctrlSetText "R";
  1887.         optionsPanel_menuColorRed ctrlSetBackgroundColor [0.5,0,0,0.6];
  1888.         optionsPanel_menuColorRed ctrlSetPosition [0.335 * safezoneW + safezoneX,0.357 * safezoneH + safezoneY,0.0154688 * safezoneW,0.022 * safezoneH];
  1889.         optionsPanel_menuColorRed ctrladdEventHandler ["ButtonClick",
  1890.         "
  1891.                 JAM_tColor = [0.5,0,0,0.6];
  1892.                 JAM_fColor = [1,0,0,1];
  1893.                 optionsPanel_title ctrlSetBackgroundColor JAM_tColor;
  1894.                 hint 'JAM: Menu colors updated.';
  1895.         "];
  1896.         optionsPanel_menuColorRed ctrlCommit 0;
  1897.        
  1898.        
  1899.         optionsPanel_menuColorGreen = d_optionsPanel ctrlCreate ["RscButtonMenu", 7061];
  1900.         optionsPanel_menuColorGreen ctrlSetText "G";
  1901.         optionsPanel_menuColorGreen ctrlSetBackgroundColor [0,0.5,0,0.6];
  1902.         optionsPanel_menuColorGreen ctrlSetPosition [0.350469 * safezoneW + safezoneX,0.357 * safezoneH + safezoneY,0.0154688 * safezoneW,0.022 * safezoneH];
  1903.         optionsPanel_menuColorGreen ctrladdEventHandler ["ButtonClick",
  1904.         "
  1905.                 JAM_tColor = [0,0.5,0,0.6];
  1906.                 JAM_fColor = [0,1,0,1];
  1907.                 optionsPanel_title ctrlSetBackgroundColor JAM_tColor;
  1908.                 hint 'JAM: Menu colors updated.';
  1909.         "];
  1910.         optionsPanel_menuColorGreen ctrlCommit 0;
  1911.        
  1912.         optionsPanel_menuColorBlue = d_optionsPanel ctrlCreate ["RscButtonMenu", 7062];
  1913.         optionsPanel_menuColorBlue ctrlSetText "B";
  1914.         optionsPanel_menuColorBlue ctrlSetBackgroundColor [0,0,0.5,0.6];
  1915.         optionsPanel_menuColorBlue ctrlSetPosition [0.365937 * safezoneW + safezoneX,0.357 * safezoneH + safezoneY,0.0154688 * safezoneW,0.022 * safezoneH];
  1916.         optionsPanel_menuColorBlue ctrladdEventHandler ["ButtonClick",
  1917.         "
  1918.                 JAM_tColor = [0,0,0.5,0.6];
  1919.                 JAM_fColor = [0,0,1,1];
  1920.                 optionsPanel_title ctrlSetBackgroundColor JAM_tColor;
  1921.                 hint 'JAM: Menu colors have been updated.';
  1922.         "];
  1923.         optionsPanel_menuColorBlue ctrlCommit 0;
  1924.        
  1925.         optionsPanel_keyBind_arsenal = d_optionsPanel ctrlCreate ["RscText", 7063];
  1926.         optionsPanel_keyBind_arsenal ctrlSetText "Arsenal Keybind:";
  1927.         optionsPanel_keyBind_arsenal ctrlSetPosition [0.412344 * safezoneW + safezoneX,0.324 * safezoneH + safezoneY,0.0825 * safezoneW,0.022 * safezoneH];
  1928.         optionsPanel_keyBind_arsenal ctrlSetBackgroundColor [0,0,0,0.5];
  1929.         optionsPanel_keyBind_arsenal ctrlCommit 0;
  1930.        
  1931.         optionsPanel_keyBind_arsenalEdit = d_optionsPanel ctrlCreate ["RscEdit", 7064];
  1932.         optionsPanel_keyBind_arsenalEdit ctrlSetPosition [0.4175 * safezoneW + safezoneX,0.357 * safezoneH + safezoneY,0.0309375 * safezoneW,0.022 * safezoneH];
  1933.         optionsPanel_keyBind_arsenalEdit ctrlSetBackgroundColor [0,0,0,0.5];
  1934.         optionsPanel_keyBind_arsenalEdit ctrlSetText JAM_key_arsenal;
  1935.         optionsPanel_keyBind_arsenalEdit ctrlCommit 0;
  1936.        
  1937.         optionsPanel_keyBind_arsenalApply = d_optionsPanel ctrlCreate ["RscButtonMenu", 7065];
  1938.         optionsPanel_keyBind_arsenalApply ctrlSetText "APPLY";
  1939.         optionsPanel_keyBind_arsenalApply ctrlSetPosition [0.453594 * safezoneW + safezoneX,0.357 * safezoneH + safezoneY,0.0360937 * safezoneW,0.022 * safezoneH];
  1940.         optionsPanel_keyBind_arsenalApply ctrladdEventHandler ["ButtonClick",
  1941.         "
  1942.             JAM_key_Arsenal = (ctrlText optionsPanel_keyBind_arsenalEdit);
  1943.             hint 'JAM: Key has not changed. Wait for future updates.';
  1944.         "];
  1945.         optionsPanel_keyBind_arsenalApply ctrlCommit 0;
  1946.        
  1947.         optionsPanel_keyBind_mainMenu = d_optionsPanel ctrlCreate ["RscText", 7066];
  1948.         optionsPanel_keyBind_mainMenu ctrlSetText "MainMenu Key:";
  1949.         optionsPanel_keyBind_mainMenu ctrlSetPosition [0.510312 * safezoneW + safezoneX,0.324 * safezoneH + safezoneY,0.0825 * safezoneW,0.022 * safezoneH];
  1950.         optionsPanel_keyBind_mainMenu ctrlSetBackgroundColor [0,0,0,0.5];
  1951.         optionsPanel_keyBind_mainMenu ctrlCommit 0;
  1952.        
  1953.         optionsPanel_keyBind_mainMenuEdit = d_optionsPanel ctrlCreate ["RscEdit", 7067];
  1954.         optionsPanel_keyBind_mainMenuEdit ctrlSetPosition [0.515469 * safezoneW + safezoneX,0.357 * safezoneH + safezoneY,0.0309375 * safezoneW,0.022 * safezoneH];
  1955.         optionsPanel_keyBind_mainMenuEdit ctrlSetBackgroundColor [0,0,0,0.5];
  1956.         optionsPanel_keyBind_mainMenuEdit ctrlSetText JAM_key_mainMenu;
  1957.         optionsPanel_keyBind_mainMenuEdit ctrlCommit 0;
  1958.        
  1959.         optionsPanel_keyBind_mainMenuApply = d_optionsPanel ctrlCreate ["RscButtonMenu", 7068];
  1960.         optionsPanel_keyBind_mainMenuApply ctrlSetText "APPLY";
  1961.         optionsPanel_keyBind_mainMenuApply ctrlSetPosition [0.551562 * safezoneW + safezoneX,0.357 * safezoneH + safezoneY,0.0360937 * safezoneW,0.022 * safezoneH];
  1962.         optionsPanel_keyBind_mainMenuApply ctrladdEventHandler ["ButtonClick",
  1963.         "
  1964.             JAM_key_mainMenu = (ctrlText optionsPanel_keyBind_mainMenuEdit);
  1965.             hint 'JAM: Key has not changed. Wait for next update.';
  1966.         "];
  1967.         optionsPanel_keyBind_mainMenuApply ctrlCommit 0;
  1968.        
  1969.         optionsPanel_keyBind_3DTP = d_optionsPanel ctrlCreate ["RscText", 7069];
  1970.         optionsPanel_keyBind_3DTP ctrlSetText "3DTP Key:";
  1971.         optionsPanel_keyBind_3DTP ctrlSetPosition [0.608281 * safezoneW + safezoneX,0.324 * safezoneH + safezoneY,0.0773437 * safezoneW,0.022 * safezoneH];
  1972.         optionsPanel_keyBind_3DTP ctrlSetBackgroundColor [0,0,0,0.5];
  1973.         optionsPanel_keyBind_3DTP ctrlCommit 0;
  1974.        
  1975.         optionsPanel_keyBind_3DTPEdit = d_optionsPanel ctrlCreate ["RscEdit", 7070];
  1976.         optionsPanel_keyBind_3DTPEdit ctrlSetPosition [0.613437 * safezoneW + safezoneX,0.357 * safezoneH + safezoneY,0.0257812 * safezoneW,0.022 * safezoneH];
  1977.         optionsPanel_keyBind_3DTPEdit ctrlSetBackgroundColor [0,0,0,0.5];
  1978.         optionsPanel_keyBind_3DTPEdit ctrlSetText JAM_key_3DTP;
  1979.         optionsPanel_keyBind_3DTPEdit ctrlCommit 0;
  1980.        
  1981.         optionsPanel_keyBind_3DTPApply = d_optionsPanel ctrlCreate ["RscButtonMenu", 7071];
  1982.         optionsPanel_keyBind_3DTPApply ctrlSetText "APPLY";
  1983.         optionsPanel_keyBind_3DTPApply ctrlSetPosition [0.644375 * safezoneW + safezoneX,0.357 * safezoneH + safezoneY,0.0360937 * safezoneW,0.022 * safezoneH];
  1984.         optionsPanel_keyBind_3DTPApply ctrladdEventHandler ["ButtonClick",
  1985.         "
  1986.             JAM_key_3DTP = (ctrlText optionsPanel_keyBind_3DTPEdit);
  1987.             hint 'JAM: Key has not changed. Wait for next update.';
  1988.         "];
  1989.         optionsPanel_keyBind_3DTPApply ctrlCommit 0;
  1990.        
  1991.         optionsPanel_return = d_optionsPanel ctrlCreate ["RscButtonMenu", 7072];
  1992.         optionsPanel_return ctrlSetText "RETURN";
  1993.         optionsPanel_return ctrlSetPosition [0.304062 * safezoneW + safezoneX,0.665 * safezoneH + safezoneY,0.0670312 * safezoneW,0.033 * safezoneH];
  1994.         optionsPanel_return ctrladdEventHandler ["ButtonClick",
  1995.         "
  1996.             d_optionsPanel closeDisplay 0;
  1997.             [] spawn JAM_open_mainMenu;
  1998.         "];
  1999.         optionsPanel_return ctrlCommit 0;
  2000.        
  2001.         optionsPanel_close = d_optionsPanel ctrlCreate ["RscButtonMenu", 7073];
  2002.         optionsPanel_close ctrlSetText "EXIT ALL";
  2003.         optionsPanel_close ctrlSetPosition [0.634062 * safezoneW + safezoneX,0.665 * safezoneH + safezoneY,0.0670312 * safezoneW,0.033 * safezoneH];
  2004.         optionsPanel_close ctrladdEventHandler ["ButtonClick",
  2005.         "
  2006.             d_optionsPanel closeDisplay 0;
  2007.             removeAllActions player;
  2008.             if (not (isNil Overlay_TargetInfo)) then { ctrlDelete Overlay_TargetInfo; };
  2009.         "];
  2010.         optionsPanel_close ctrlCommit 0;
  2011.        
  2012.         optionsPanel_info1 = d_optionsPanel ctrlCreate ["RscText", 7074];
  2013.         optionsPanel_info1 ctrlSetText "Current Version of JAM:";
  2014.         optionsPanel_info1 ctrlSetPosition [0.453594 * safezoneW + safezoneX,0.467 * safezoneH + safezoneY,0.0928125 * safezoneW,0.022 * safezoneH];
  2015.         optionsPanel_info1 ctrlCommit 0;
  2016.        
  2017.         optionsPanel_info2 = d_optionsPanel ctrlCreate ["RscText", 7075];
  2018.         optionsPanel_info2 ctrlSetText "V1.5A";
  2019.         optionsPanel_info2 ctrlSetPosition [0.486 * safezoneW + safezoneX,0.522 * safezoneH + safezoneY,0.0257812 * safezoneW,0.022 * safezoneH];
  2020.         optionsPanel_info2 ctrlCommit 0;
  2021.  
  2022.         optionsPanel_info3 = d_optionsPanel ctrlCreate ["RscText", 7076];
  2023.         optionsPanel_info3 ctrlSetText "More options and settings to come in the future!";
  2024.         optionsPanel_info3 ctrlSetPosition [0.412344 * safezoneW + safezoneX,0.412 * safezoneH + safezoneY,0.180469 * safezoneW,0.033 * safezoneH];
  2025.         optionsPanel_info3 ctrlCommit 0;
  2026.        
  2027.         comment "GUI END";
  2028.     };
  2029.  
  2030. comment "----------------------------------------------------------";
  2031. comment "------------------BLACKLIST CFG GUI-----------------------";
  2032. comment "----------------------------------------------------------";
  2033.  
  2034.     JAM_open_blacklistMenu =
  2035.     {
  2036.         disableSerialization;
  2037.         d_blacklistMenu = (findDisplay 46) createDisplay "RscDisplayEmpty";
  2038.         showChat true;
  2039.        
  2040.         bList_title = d_blacklistMenu ctrlCreate ["RscText", 7077];
  2041.         bList_title ctrlSetText "JAM        |            BLACKLIST CONFIGURATION";
  2042.         bList_title ctrlSetPosition [0.386563 * safezoneW + safezoneX,0.247 * safezoneH + safezoneY,0.221719 * safezoneW,0.022 * safezoneH];
  2043.         bList_title ctrlSetBackgroundColor [-1,-1,-1,0.8];
  2044.         bList_title ctrlCommit 0;
  2045.        
  2046.         bList_bkrnd1 = d_blacklistMenu ctrlCreate ["RscText", 7078];
  2047.         bList_bkrnd1 ctrlSetPosition [0.386562 * safezoneW + safezoneX,0.28 * safezoneH + safezoneY,0.226875 * safezoneW,0.044 * safezoneH];
  2048.         bList_bkrnd1 ctrlSetBackgroundColor [-1,-1,-1,0.5];
  2049.         bList_bkrnd1 ctrlCommit 0;
  2050.        
  2051.         bList_enableT = d_blacklistMenu ctrlCreate ["RscText", 7079];
  2052.         bList_enableT ctrlSetText "Enable Blacklisting";
  2053.         bList_enableT ctrlSetPosition [0.469062 * safezoneW + safezoneX,0.291 * safezoneH + safezoneY,0.0773437 * safezoneW,0.022 * safezoneH];
  2054.         bList_enableT ctrlSetBackgroundColor [-1,-1,-1,0.8];
  2055.         bList_enableT ctrlCommit 0;
  2056.        
  2057.         bList_bkrnd2 = d_blacklistMenu ctrlCreate ["RscText", 7080];
  2058.         bList_bkrnd2 ctrlSetPosition [0.448438 * safezoneW + safezoneX,0.291 * safezoneH + safezoneY,0.0154688 * safezoneW,0.022 * safezoneH];
  2059.         bList_bkrnd2 ctrlSetBackgroundColor [-1,-1,-1,0.5];
  2060.         bList_bkrnd2 ctrlCommit 0;
  2061.        
  2062.         bList_cb = d_blacklistMenu ctrlCreate ["RscCheckbox", 7081];
  2063.         bList_cb ctrlSetPosition [0.448438 * safezoneW + safezoneX,0.291 * safezoneH + safezoneY,0.0154688 * safezoneW,0.022 * safezoneH];
  2064.         bList_cb ctrladdEventHandler ["ButtonClick",
  2065.         "
  2066.             If (!JAM_blackListEnabled) then {
  2067.                 JAM_blackListEnabled = true;
  2068.                 [] call JAM_toggle_blackListing;
  2069.             } else {
  2070.                 JAM_blackListEnabled = false;
  2071.             };
  2072.         "];
  2073.         bList_cb ctrlCommit 0;
  2074.        
  2075.         bList_bkrnd3 = d_blacklistMenu ctrlCreate ["RscText", 7082];
  2076.         bList_bkrnd3 ctrlSetPosition [0.386562 * safezoneW + safezoneX,0.335 * safezoneH + safezoneY,0.226875 * safezoneW,0.22 * safezoneH];
  2077.         bList_bkrnd3 ctrlSetBackgroundColor [-1,-1,-1,0.5];
  2078.         bList_bkrnd3 ctrlCommit 0;
  2079.        
  2080.         bList_list = d_blacklistMenu ctrlCreate ["RscListbox", 7083];
  2081.         bList_list ctrlSetPosition [0.438125 * safezoneW + safezoneX,0.346 * safezoneH + safezoneY,0.12375 * safezoneW,0.165 * safezoneH];
  2082.         { _bL_index = bList_list lbAdd _x; } forEach JAM_blacklist;
  2083.         bList_list ctrlCommit 0;
  2084.        
  2085.         bList_remove = d_blacklistMenu ctrlCreate ["RscButtonMenu", 7084];
  2086.         bList_remove ctrlSetText "REMOVE FROM BLACKLIST";
  2087.         bList_remove ctrlSetPosition [0.438125 * safezoneW + safezoneX,0.522 * safezoneH + safezoneY,0.12375 * safezoneW,0.022 * safezoneH];
  2088.         bList_remove ctrladdEventHandler ["ButtonClick",
  2089.         "
  2090.             JAM_blacklist deleteAt (JAM_blacklist find (bList_list lbText (lbCurSel bList_list)));
  2091.             lbClear bList_list;
  2092.             { _bL_index = bList_list lbAdd _x; } forEach JAM_blacklist;
  2093.         "];
  2094.         bList_remove ctrlCommit 0;
  2095.        
  2096.         bList_permaFuck = d_blacklistMenu ctrlCreate ["RscButtonMenu", 7085];
  2097.         bList_permaFuck ctrlSetText "PERMA FUCK";
  2098.         bList_permaFuck ctrlSetPosition [0.391719 * safezoneW + safezoneX,0.401 * safezoneH + safezoneY,0.04125 * safezoneW,0.055 * safezoneH];
  2099.         bList_permaFuck ctrladdEventHandler ["ButtonClick",
  2100.         "
  2101.             comment 'test';
  2102.             hint 'permanent fuckery is currently not available';
  2103.         "];
  2104.         bList_permaFuck ctrlCommit 0;
  2105.        
  2106.         bList_earRape = d_blacklistMenu ctrlCreate ["RscButtonMenu", 7086];
  2107.         bList_earRape ctrlSetText "EAR RAPE";
  2108.         bList_earRape ctrlSetPosition [0.567031 * safezoneW + safezoneX,0.401 * safezoneH + safezoneY,0.04125 * safezoneW,0.055 * safezoneH];
  2109.         bList_earRape ctrladdEventHandler ["ButtonClick",
  2110.         "
  2111.             comment 'test';
  2112.             hint 'ear rape not available';
  2113.         "];
  2114.         bList_earRape ctrlCommit 0;
  2115.        
  2116.         bList_close = d_blacklistMenu ctrlCreate ["RscButtonMenu", 7087];
  2117.         bList_close ctrlSetText "CLOSE";
  2118.         bList_close ctrlSetPosition [0.572187 * safezoneW + safezoneX,0.566 * safezoneH + safezoneY,0.04125 * safezoneW,0.022 * safezoneH];
  2119.         bList_close ctrladdEventHandler ["ButtonClick",
  2120.         "
  2121.             d_blacklistMenu closeDisplay 0;
  2122.         "];
  2123.         bList_close ctrlCommit 0;  
  2124.  
  2125.         bList_return = d_blacklistMenu ctrlCreate ["RscButtonMenu", 7088];
  2126.         bList_return ctrlSetText "RETURN";
  2127.         bList_return ctrlSetPosition [0.386562 * safezoneW + safezoneX,0.566 * safezoneH + safezoneY,0.04125 * safezoneW,0.022 * safezoneH];
  2128.         bList_return ctrladdEventHandler ["ButtonClick",
  2129.         "
  2130.             d_blacklistMenu closeDisplay 0;
  2131.             [] spawn JAM_open_mainMenu;
  2132.         "];
  2133.         bList_return ctrlCommit 0;
  2134.        
  2135.         comment "Load Saved States of Controls";
  2136.        
  2137.         if (isNil "JAM_blackListEnabled") then {JAM_blackListEnabled = false;};
  2138.         if (JAM_blackListEnabled) then {bList_cb cbSetChecked true;};
  2139.        
  2140.     };
  2141.  
  2142. comment "----------------------------------------------------------";
  2143. comment "----------------PLAYERVehicleVarNameLIST------------------";
  2144. comment "----------------------------------------------------------";
  2145.  
  2146.     JAM_open_playerVehicleVarNameList =
  2147.     {
  2148.         disableSerialization;
  2149.         d_playerVehicleVarNameList = (findDisplay 46) createDisplay "RscDisplayEmpty";
  2150.         showChat true;
  2151.         VVN_listBox = d_playerVehicleVarNameList ctrlCreate ["RscListbox", 7612];
  2152.         VVN_listBox ctrlSetPosition [0.412344 * safezoneW + safezoneX,0.324 * safezoneH + safezoneY,0.154687 * safezoneW,0.209 * safezoneH];
  2153.         { _pL_index = VVN_listBox lbAdd ((name _x) + " | " + (vehicleVarName _x));} forEach allPlayers;
  2154.         VVN_listBox ctrlCommit 0;
  2155.         VVN_titleBar = d_playerVehicleVarNameList ctrlCreate ["RscText", 7613];
  2156.         VVN_titleBar ctrlSetText "JAM     |     Player (VehicleVarName) List";
  2157.         VVN_titleBar ctrlSetBackgroundColor [-1,-1,-1,1];
  2158.         VVN_titleBar ctrlSetPosition [0.412344 * safezoneW + safezoneX,0.291 * safezoneH + safezoneY,0.154687 * safezoneW,0.022 * safezoneH];
  2159.         VVN_titleBar ctrlCommit 0;
  2160.         VVN_return = d_playerVehicleVarNameList ctrlCreate ["RscButtonMenu", 7614];
  2161.         VVN_return ctrlSetText "RETURN";
  2162.         VVN_return ctrlSetPosition [0.412344 * safezoneW + safezoneX,0.544 * safezoneH + safezoneY,0.0464063 * safezoneW,0.044 * safezoneH];
  2163.         VVN_return ctrladdEventHandler ["ButtonClick",
  2164.         "
  2165.             d_playerVehicleVarNameList closeDisplay 0;
  2166.             [] spawn JAM_open_mainMenu;
  2167.         "];
  2168.         VVN_return ctrlCommit 0;
  2169.         VVN_close = d_playerVehicleVarNameList ctrlCreate ["RscButtonMenu", 7615];
  2170.         VVN_close ctrlSetText "CLOSE";
  2171.         VVN_close ctrlSetPosition [0.412344 * safezoneW + safezoneX,0.544 * safezoneH + safezoneY,0.0464063 * safezoneW,0.044 * safezoneH];
  2172.         VVN_close ctrladdEventHandler ["ButtonClick",
  2173.         "
  2174.             d_playerVehicleVarNameList closeDisplay 0;
  2175.         "];
  2176.         VVN_close ctrlCommit 0;
  2177.     };
  2178.  
  2179. comment "----------------------------------------------------------";
  2180. comment "-------------------SERVER MENU GUI------------------------";
  2181. comment "----------------------------------------------------------";
  2182.  
  2183.     JAM_open_serverMenu =
  2184.     {
  2185.         disableSerialization;
  2186.         d_serverMenu = (findDisplay 46) createDisplay "RscDisplayEmpty";
  2187.         showChat true;
  2188.        
  2189.         sM_MainFrame = d_serverMenu ctrlCreate ["RscFrame", 7089];
  2190.         sM_MainFrame ctrlSetText "created by J-WoLF";
  2191.         sM_MainFrame ctrlSetPosition [0.280447 * safezoneW + safezoneX,0.1953 * safezoneH + safezoneY,0.438281 * safezoneW,0.704 * safezoneH];
  2192.         sM_MainFrame ctrlCommit 0;
  2193.        
  2194.         sM_bkgrnd = d_serverMenu ctrlCreate ["RscText", 7090];
  2195.         sM_bkgrnd ctrlSetPosition [0.29375 * safezoneW + safezoneX,0.225 * safezoneH + safezoneY,0.4125 * safezoneW,0.55 * safezoneH];
  2196.         sM_bkgrnd ctrlSetBackgroundColor [0,0,0,0.8];
  2197.         sM_bkgrnd ctrlCommit 0;
  2198.        
  2199.         sM_border1 = d_serverMenu ctrlCreate ["RscText", 7091];
  2200.         sM_border1 ctrlSetPosition [0.29375 * safezoneW + safezoneX,0.225 * safezoneH + safezoneY,0.4125 * safezoneW,0.099 * safezoneH];
  2201.         sM_border1 ctrlSetBackgroundColor [0.4,0,0,1];
  2202.         sM_border1 ctrlCommit 0;
  2203.        
  2204.         sM_border2 = d_serverMenu ctrlCreate ["RscText", 7092];
  2205.         sM_border2 ctrlSetPosition [0.29375 * safezoneW + safezoneX,0.764 * safezoneH + safezoneY,0.4125 * safezoneW,0.011 * safezoneH];
  2206.         sM_border2 ctrlSetBackgroundColor [0.4,0,0,1];
  2207.         sM_border2 ctrlCommit 0;
  2208.        
  2209.         sM_border3 = d_serverMenu ctrlCreate ["RscPicture", 7093];
  2210.         sM_border3 ctrlSetText "#(ARGB,8,8,3)color(0.4,0,0,1)";
  2211.         sM_border3 ctrlSetPosition [0.427812 * safezoneW + safezoneX,0.324 * safezoneH + safezoneY,0.00515625 * safezoneW,0.44 * safezoneH];
  2212.         sM_border3 ctrlCommit 0;
  2213.        
  2214.         sM_border4 = d_serverMenu ctrlCreate ["RscPicture", 7094];
  2215.         sM_border4 ctrlSetText "#(ARGB,8,8,3)color(0.4,0,0,1)";
  2216.         sM_border4 ctrlSetPosition [0.567031 * safezoneW + safezoneX,0.324 * safezoneH + safezoneY,0.00515625 * safezoneW,0.44 * safezoneH];
  2217.         sM_border4 ctrlCommit 0;
  2218.        
  2219.         sM_border5 = d_serverMenu ctrlCreate ["RscPicture", 7095];
  2220.         sM_border5 ctrlSetText "#(ARGB,8,8,3)color(0.4,0,0,1)";
  2221.         sM_border5 ctrlSetPosition [0.29375 * safezoneW + safezoneX,0.324 * safezoneH + safezoneY,0.00515625 * safezoneW,0.44 * safezoneH];
  2222.         sM_border5 ctrlCommit 0;
  2223.        
  2224.         sM_border6 = d_serverMenu ctrlCreate ["RscPicture", 7096];
  2225.         sM_border6 ctrlSetText "#(ARGB,8,8,3)color(0.4,0,0,1)";
  2226.         sM_border6 ctrlSetPosition [0.701094 * safezoneW + safezoneX,0.324 * safezoneH + safezoneY,0.00515625 * safezoneW,0.44 * safezoneH];
  2227.         sM_border6 ctrlCommit 0;
  2228.        
  2229.         sM_return = d_serverMenu ctrlCreate ["RscButton", 7097];
  2230.         sM_return ctrlSetText "Return";
  2231.         sM_return ctrlSetPosition [0.29375 * safezoneW + safezoneX,0.786 * safezoneH + safezoneY,0.407344 * safezoneW,0.044 * safezoneH];
  2232.         sM_return ctrladdEventHandler ["ButtonClick", {
  2233.             d_serverMenu closeDisplay 0;
  2234.             [] spawn JAM_open_mainMenu;
  2235.         }];
  2236.         sM_return ctrlCommit 0;
  2237.        
  2238.         sM_close = d_serverMenu ctrlCreate ["RscButton", 7098];
  2239.         sM_close ctrlSetText "Close";
  2240.         sM_close ctrlSetPosition [0.29375 * safezoneW + safezoneX,0.841 * safezoneH + safezoneY,0.407344 * safezoneW,0.044 * safezoneH];
  2241.         sM_close ctrladdEventHandler ["ButtonClick", {
  2242.             d_serverMenu closeDisplay 0;
  2243.         }];
  2244.         sM_close ctrlCommit 0;
  2245.        
  2246.         sM_labelInfo = d_serverMenu ctrlCreate ["RscStructuredText", 7099];
  2247.         sM_labelInfo ctrlSetStructuredText parseText "<t align='center'>Server Info</t>";
  2248.         sM_labelInfo ctrlSetPosition [0.29375 * safezoneW + safezoneX,0.291 * safezoneH + safezoneY,0.134062 * safezoneW,0.022 * safezoneH];
  2249.         sM_labelInfo ctrlSetBackgroundColor [0,0,0,1];
  2250.         sM_labelInfo ctrlCommit 0;
  2251.        
  2252.         sM_labelServer = d_serverMenu ctrlCreate ["RscStructuredText", 7100];
  2253.         sM_labelServer ctrlSetStructuredText parseText "<t align='center'>Server Scripts</t>";
  2254.         sM_labelServer ctrlSetPosition [0.432968 * safezoneW + safezoneX,0.291 * safezoneH + safezoneY,0.134062 * safezoneW,0.022 * safezoneH];
  2255.         sM_labelServer ctrlSetBackgroundColor [0,0,0,1];
  2256.         sM_labelServer ctrlCommit 0;           
  2257.        
  2258.         sM_labelGlobal = d_serverMenu ctrlCreate ["RscStructuredText", 7101];
  2259.         sM_labelGlobal ctrlSetStructuredText parseText "<t align='center'>Global Scripts</t>";
  2260.         sM_labelGlobal ctrlSetPosition [0.572187 * safezoneW + safezoneX,0.291 * safezoneH + safezoneY,0.134062 * safezoneW,0.022 * safezoneH];
  2261.         sM_labelGlobal ctrlSetBackgroundColor [0,0,0,1];
  2262.         sM_labelGlobal ctrlCommit 0;               
  2263.        
  2264.         sM_serverName = d_serverMenu ctrlCreate ["RscText", 7102];
  2265.         sM_serverName ctrlSetText ("[SERVER] " + serverName);
  2266.         sM_serverName ctrlSetPosition [0.335 * safezoneW + safezoneX,0.236 * safezoneH + safezoneY,0.37125 * safezoneW,0.044 * safezoneH];
  2267.         sM_serverName ctrlSetBackgroundColor [0,0,0,1];
  2268.         sM_serverName ctrlCommit 0;
  2269.        
  2270.         sM_missionName = d_serverMenu ctrlCreate ["RscStructuredText", 7103];
  2271.         sM_missionName ctrlSetStructuredText parseText ("<t size='0.7'>ServerCFG/Path: " + missionName);
  2272.         sM_missionName ctrlSetPosition [0.298906 * safezoneW + safezoneX,0.324 * safezoneH + safezoneY,0.128906 * safezoneW,0.022 * safezoneH];
  2273.         sM_missionName ctrlSetBackgroundColor [0,0,0,0.5];
  2274.         sM_missionName ctrlCommit 0;
  2275.        
  2276.         sM_worldName = d_serverMenu ctrlCreate ["RscStructuredText", 7104];
  2277.         sM_worldName ctrlSetStructuredText parseText ("<t size='0.7'>World: " + worldName);
  2278.         sM_worldName ctrlSetPosition [0.298906 * safezoneW + safezoneX,0.357 * safezoneH + safezoneY,0.128906 * safezoneW,0.022 * safezoneH];
  2279.         sM_worldName ctrlSetBackgroundColor [0,0,0,0.5];
  2280.         sM_worldName ctrlCommit 0;
  2281.        
  2282.         sM_briefingName = d_serverMenu ctrlCreate ["RscStructuredText", 7105];
  2283.         sM_briefingName ctrlSetStructuredText parseText ("<t size='0.7'>Scenario: " + briefingName);
  2284.         sM_briefingName ctrlSetPosition [0.298906 * safezoneW + safezoneX,0.39 * safezoneH + safezoneY,0.128906 * safezoneW,0.022 * safezoneH];
  2285.         sM_briefingName ctrlSetBackgroundColor [0,0,0,0.5];
  2286.         sM_briefingName ctrlCommit 0;
  2287.        
  2288.         sM_worldSize = d_serverMenu ctrlCreate ["RscStructuredText", 7106];
  2289.         sM_worldSize ctrlSetStructuredText parseText ("<t size='0.7'>MapSize: " + str worldSize + " meters");
  2290.         sM_worldSize ctrlSetPosition [0.298906 * safezoneW + safezoneX,0.423 * safezoneH + safezoneY,0.128906 * safezoneW,0.022 * safezoneH];
  2291.         sM_worldSize ctrlSetBackgroundColor [0,0,0,0.5];
  2292.         sM_worldSize ctrlCommit 0;
  2293.        
  2294.         sM_serverTime = d_serverMenu ctrlCreate ["RscStructuredText", 7107];
  2295.         sM_serverTime ctrlSetStructuredText parseText ("<t size='0.7'>Uptime: " + (str serverTime));
  2296.         sM_serverTime ctrlSetPosition [0.298906 * safezoneW + safezoneX,0.456 * safezoneH + safezoneY,0.128906 * safezoneW,0.022 * safezoneH];
  2297.         sM_serverTime ctrlSetBackgroundColor [0,0,0,0.5];
  2298.         sM_serverTime ctrlCommit 0;
  2299.        
  2300.         sM_FPS = d_serverMenu ctrlCreate ["RscStructuredText", 7109];
  2301.         sM_FPS ctrlSetStructuredText parseText ("<t size='0.7'>FPS: " + str diag_fps);
  2302.         sM_FPS ctrlSetPosition [0.298906 * safezoneW + safezoneX,0.489 * safezoneH + safezoneY,0.128906 * safezoneW,0.022 * safezoneH];
  2303.         sM_FPS ctrlSetBackgroundColor [0,0,0,0.5];
  2304.         sM_FPS ctrlCommit 0;
  2305.  
  2306.         sM_btn_clearDead = d_serverMenu ctrlCreate ["RscButton", 7113];
  2307.         sM_btn_clearDead ctrlSetText "Clear-the-Dead";
  2308.         sM_btn_clearDead ctrlSetPosition [0.432969 * safezoneW + safezoneX,0.379 * safezoneH + safezoneY,0.134062 * safezoneW,0.033 * safezoneH];
  2309.         sM_btn_clearDead ctrlSetTextColor [0,1,0,1];
  2310.         sM_btn_clearDead ctrladdEventHandler ["ButtonClick", {
  2311.             [] call JAM_fnc_clearDead;
  2312.         }];
  2313.         sM_btn_clearDead ctrlCommit 0;
  2314.        
  2315.         sM_i_clearDead = d_serverMenu ctrlCreate ["RscStructuredText", 7114];
  2316.         sM_i_clearDead ctrlSetStructuredText parseText "<t size='0.5' align='center'>on Server | deletes anything dead.</t>";
  2317.         sM_i_clearDead ctrlSetPosition [0.432969 * safezoneW + safezoneX,0.412 * safezoneH + safezoneY,0.134062 * safezoneW,0.011 * safezoneH];
  2318.         sM_i_clearDead ctrlSetBackgroundColor [0,0,0,0.6];         
  2319.         sM_i_clearDead ctrlCommit 0;
  2320.        
  2321.         sM_btn_AASJIP = d_serverMenu ctrlCreate ["RscButton", 7115];
  2322.         sM_btn_AASJIP ctrlSetText "Arsenal-At-Spawn (JIP)";
  2323.         sM_btn_AASJIP ctrlSetPosition [0.432969 * safezoneW + safezoneX,0.434 * safezoneH + safezoneY,0.134062 * safezoneW,0.033 * safezoneH];
  2324.         sM_btn_AASJIP ctrlSetTextColor [0,1,0,1];
  2325.         sM_btn_AASJIP ctrladdEventHandler ["ButtonClick", {
  2326.             [] call JAM_fnc_AASJIP;
  2327.         }];
  2328.         sM_btn_AASJIP ctrlCommit 0;
  2329.        
  2330.         sM_i_AASJIP = d_serverMenu ctrlCreate ["RscStructuredText", 7116];
  2331.         sM_i_AASJIP ctrlSetStructuredText parseText "<t size='0.5' align='center'>all clients + new | opens arsenal on respawn.</t>";
  2332.         sM_i_AASJIP ctrlSetPosition [0.432969 * safezoneW + safezoneX,0.467 * safezoneH + safezoneY,0.134062 * safezoneW,0.011 * safezoneH];
  2333.         sM_i_AASJIP ctrlSetBackgroundColor [0,0,0,0.6];    
  2334.         sM_i_AASJIP ctrlCommit 0;
  2335.        
  2336.         sM_btn_updateZeusObj = d_serverMenu ctrlCreate ["RscButton", 7117];
  2337.         sM_btn_updateZeusObj ctrlSetText "Update-Zeus-Obj";
  2338.         sM_btn_updateZeusObj ctrlSetPosition [0.432969 * safezoneW + safezoneX,0.489 * safezoneH + safezoneY,0.134062 * safezoneW,0.033 * safezoneH];
  2339.         sM_btn_updateZeusObj ctrlSetTextColor [0,1,0,1];
  2340.         sM_btn_updateZeusObj ctrladdEventHandler ["ButtonClick", {
  2341.             [] spawn JAM_fnc_updateZeusObj;
  2342.         }];
  2343.         sM_btn_updateZeusObj ctrlCommit 0;
  2344.        
  2345.         sM_i_updateZeusObj = d_serverMenu ctrlCreate ["RscStructuredText", 7118];
  2346.         sM_i_updateZeusObj ctrlSetStructuredText parseText "<t size='0.5' align='center'>on server | enables editing of all objects for curators.</t>";
  2347.         sM_i_updateZeusObj ctrlSetPosition [0.432969 * safezoneW + safezoneX,0.522 * safezoneH + safezoneY,0.134062 * safezoneW,0.011 * safezoneH];
  2348.         sM_i_updateZeusObj ctrlSetBackgroundColor [0,0,0,0.6];
  2349.         sM_i_updateZeusObj ctrlCommit 0;
  2350.        
  2351.         sM_btn_viewDistance = d_serverMenu ctrlCreate ["RscButton", 7119];
  2352.         sM_btn_viewDistance ctrlSetText "Set-ViewDistance (JIP)";
  2353.         sM_btn_viewDistance ctrlSetPosition [0.432969 * safezoneW + safezoneX,0.544 * safezoneH + safezoneY,0.134062 * safezoneW,0.033 * safezoneH];
  2354.         sM_btn_viewDistance ctrlSetTextColor [0,1,0,1];
  2355.         sM_btn_viewDistance ctrladdEventHandler ["ButtonClick", {
  2356.             d_serverMenu closeDisplay 0;
  2357.             [] call JAM_fnc_viewDistance;
  2358.         }];
  2359.         sM_btn_viewDistance ctrlCommit 0;
  2360.  
  2361.         sM_i_viewDistance = d_serverMenu ctrlCreate ["RscStructuredText", 7120];
  2362.         sM_i_viewDistance ctrlSetStructuredText parseText "<t size='0.5' align='center'>on server + new | open VD menu for desired VD.</t>";
  2363.         sM_i_viewDistance ctrlSetPosition [0.432969 * safezoneW + safezoneX,0.577 * safezoneH + safezoneY,0.134062 * safezoneW,0.011 * safezoneH];
  2364.         sM_i_viewDistance ctrlSetBackgroundColor [0,0,0,0.6];
  2365.         sM_i_viewDistance ctrlCommit 0;
  2366.  
  2367.         sM_btn_deleteMenu = d_serverMenu ctrlCreate ["RscButton", 7121];
  2368.         sM_btn_deleteMenu ctrlSetText "Delete Radius";
  2369.         sM_btn_deleteMenu ctrlSetPosition [0.432969 * safezoneW + safezoneX,0.599 * safezoneH + safezoneY,0.134062 * safezoneW,0.033 * safezoneH];
  2370.         sM_btn_deleteMenu ctrlSetTextColor [0,1,0,1];
  2371.         sM_btn_deleteMenu ctrladdEventHandler ["ButtonClick", {
  2372.             d_serverMenu closeDisplay 0;
  2373.             [] call jam_deleteMenu;
  2374.             hint "JAM: Scroll wheel to select delete radius.";
  2375.         }];
  2376.         sM_btn_deleteMenu ctrlCommit 0;
  2377.        
  2378.         sM_btn_wipeMap = d_serverMenu ctrlCreate ["RscButton", 7999];
  2379.         sM_btn_wipeMap ctrlSetText "Delete All Objects";
  2380.         sM_btn_wipeMap ctrlSetPosition [0.432969 * safezoneW + safezoneX,0.654 * safezoneH + safezoneY,0.134062 * safezoneW,0.033 * safezoneH];
  2381.         sM_btn_wipeMap ctrlSetTextColor [0,1,0,1];
  2382.         sM_btn_wipeMap ctrladdEventHandler ["ButtonClick", {
  2383.             [] call JAM_fnc_deleteAll;
  2384.         }];
  2385.         sM_btn_wipeMap ctrlCommit 0;
  2386.        
  2387.         sM_i_wipeMap = d_serverMenu ctrlCreate ["RscStructuredText", 7998];
  2388.         sM_i_wipeMap ctrlSetStructuredText parseText "<t size='0.5' align='center'>on server | delete everything - missionModules.</t>";
  2389.         sM_i_wipeMap ctrlSetPosition [0.432969 * safezoneW + safezoneX,0.687 * safezoneH + safezoneY,0.134062 * safezoneW,0.011 * safezoneH];
  2390.         sM_i_wipeMap ctrlSetBackgroundColor [0,0,0,0.6];
  2391.         sM_i_wipeMap ctrlCommit 0;
  2392.        
  2393.         sM_btn_killRadius = d_serverMenu ctrlCreate ["RscButton", 9201];
  2394.         sM_btn_killRadius ctrlSetText "Kill Radius";
  2395.         sM_btn_killRadius ctrlSetPosition [0.432969 * safezoneW + safezoneX,0.709 * safezoneH + safezoneY,0.134062 * safezoneW,0.033 * safezoneH];
  2396.         sM_btn_killRadius ctrlSetTextColor [0,1,0,1];
  2397.         sM_btn_killRadius ctrladdEventHandler ["ButtonClick", {
  2398.             d_serverMenu closeDisplay 0;
  2399.             [] call jam_killMenu;
  2400.         }];
  2401.         sM_btn_killRadius ctrlCommit 0;
  2402.        
  2403.         sM_i_killRadius = d_serverMenu ctrlCreate ["RscStructuredText", 9200];
  2404.         sM_i_killRadius ctrlSetStructuredText parseText "<t size='0.5' align='center'>on server | delete everything - missionModules.</t>";
  2405.         sM_i_killRadius ctrlSetPosition [0.432969 * safezoneW + safezoneX,0.742 * safezoneH + safezoneY,0.134062 * safezoneW,0.011 * safezoneH];
  2406.         sM_i_killRadius ctrlSetBackgroundColor [0,0,0,0.6];
  2407.         sM_i_killRadius ctrlCommit 0;
  2408.        
  2409.         sM_btn_showPlayersOnMap = d_serverMenu ctrlCreate ["RscButton", 7994];
  2410.         sM_btn_showPlayersOnMap ctrlSetText "ShowPlayersOnMap";
  2411.         sM_btn_showPlayersOnMap ctrlSetPosition [0.432969 * safezoneW + safezoneX,0.324 * safezoneH + safezoneY,0.134062 * safezoneW,0.033 * safezoneH];
  2412.         sM_btn_showPlayersOnMap ctrlSetTextColor [0,1,0,1];
  2413.         sM_btn_showPlayersOnMap ctrladdEventHandler ["ButtonClick", {
  2414.             [] call JAM_fnc_showPlayersOnMap;
  2415.         }];
  2416.         sM_btn_showPlayersOnMap ctrlCommit 0;
  2417.        
  2418.         sM_i_showPlayersOnMap = d_serverMenu ctrlCreate ["RscStructuredText", 7995];
  2419.         sM_i_showPlayersOnMap ctrlSetStructuredText parseText "<t size='0.5' align='center'>on server | delete everything - missionModules.</t>";
  2420.         sM_i_showPlayersOnMap ctrlSetPosition [0.432969 * safezoneW + safezoneX,0.357 * safezoneH + safezoneY,0.134062 * safezoneW,0.011 * safezoneH];
  2421.         sM_i_showPlayersOnMap ctrlSetBackgroundColor [0,0,0,0.6];
  2422.         sM_i_showPlayersOnMap ctrlCommit 0;
  2423.  
  2424.         sM_i_deleteMenu = d_serverMenu ctrlCreate ["RscStructuredText", 7122];
  2425.         sM_i_deleteMenu ctrlSetStructuredText parseText "<t size='0.5' align='center'>on server | deletes objects in radius</t>";
  2426.         sM_i_deleteMenu ctrlSetPosition [0.432969 * safezoneW + safezoneX,0.632 * safezoneH + safezoneY,0.134062 * safezoneW,0.011 * safezoneH];
  2427.         sM_i_deleteMenu ctrlSetBackgroundColor [0,0,0,0.6];
  2428.         sM_i_deleteMenu ctrlCommit 0;
  2429.  
  2430.         sM_btn_optionsMenu = d_serverMenu ctrlCreate ["RscButton", 7123];
  2431.         sM_btn_optionsMenu ctrlSetText "Give-ClientOptions";
  2432.         sM_btn_optionsMenu ctrlSetPosition [0.572187 * safezoneW + safezoneX,0.324 * safezoneH + safezoneY,0.128906 * safezoneW,0.033 * safezoneH];
  2433.         sM_btn_optionsMenu ctrlSetTextColor [0,0,1,1];
  2434.         sM_btn_optionsMenu ctrladdEventHandler ["ButtonClick", {
  2435.             d_serverMenu closeDisplay 0;
  2436.             [] spawn JAM_fnc_clientOptions;
  2437.         }];
  2438.         sM_btn_optionsMenu ctrlCommit 0;
  2439.  
  2440.         sM_i_optionsMenu = d_serverMenu ctrlCreate ["RscStructuredText", 7124];
  2441.         sM_i_optionsMenu ctrlSetStructuredText parseText "<t size='0.5' align='center'>All clients | viewDistance and noFatigue</t>";
  2442.         sM_i_optionsMenu ctrlSetPosition [0.572187 * safezoneW + safezoneX,0.357 * safezoneH + safezoneY,0.128906 * safezoneW,0.011 * safezoneH];
  2443.         sM_i_optionsMenu ctrlSetBackgroundColor [0,0,0,0.6];
  2444.         sM_i_optionsMenu ctrlCommit 0;
  2445.        
  2446.         sM_btn_TP_All_to_Self = d_serverMenu ctrlCreate ["RscButton", 7125];
  2447.         sM_btn_TP_All_to_Self ctrlSetText "TP All (to self)";
  2448.         sM_btn_TP_All_to_Self ctrlSetPosition [0.572187 * safezoneW + safezoneX,0.379 * safezoneH + safezoneY,0.128906 * safezoneW,0.033 * safezoneH];
  2449.         sM_btn_TP_All_to_Self ctrlSetTextColor [0,0,1,1];
  2450.         sM_btn_TP_All_to_Self ctrladdEventHandler ["ButtonClick", {
  2451.             [] call JAM_fnc_TP_allToSelf;
  2452.         }];
  2453.         sM_btn_TP_All_to_Self ctrlCommit 0;
  2454.  
  2455.         sM_i_TP_All_to_Self = d_serverMenu ctrlCreate ["RscStructuredText", 7126];
  2456.         sM_i_TP_All_to_Self ctrlSetStructuredText parseText "<t size='0.5' align='center'>All clients | everyone will transport to you.</t>";
  2457.         sM_i_TP_All_to_Self ctrlSetPosition [0.572187 * safezoneW + safezoneX,0.412 * safezoneH + safezoneY,0.128906 * safezoneW,0.011 * safezoneH];
  2458.         sM_i_TP_All_to_Self ctrlSetBackgroundColor [0,0,0,0.6];
  2459.         sM_i_TP_All_to_Self ctrlCommit 0;
  2460.  
  2461.         sM_btn_respawnAll = d_serverMenu ctrlCreate ["RscButton", 7129];
  2462.         sM_btn_respawnAll ctrlSetText "ForceRespawn-All";
  2463.         sM_btn_respawnAll ctrlSetPosition [0.572187 * safezoneW + safezoneX,0.434 * safezoneH + safezoneY,0.128906 * safezoneW,0.033 * safezoneH];
  2464.         sM_btn_respawnAll ctrlSetTextColor [0,0,1,1];
  2465.         sM_btn_respawnAll ctrladdEventHandler ["ButtonClick", {
  2466.             [] call JAM_fnc_respawnAll;
  2467.         }];
  2468.         sM_btn_respawnAll ctrlCommit 0;
  2469.  
  2470.         sM_i_respawnAll = d_serverMenu ctrlCreate ["RscStructuredText", 7130];
  2471.         sM_i_respawnAll ctrlSetStructuredText parseText "<t size='0.5' align='center'>all clients - Zeus | die without score loss.</t>";
  2472.         sM_i_respawnAll ctrlSetPosition [0.572187 * safezoneW + safezoneX,0.467 * safezoneH + safezoneY,0.128906 * safezoneW,0.011 * safezoneH];
  2473.         sM_i_respawnAll ctrlSetBackgroundColor [0,0,0,0.6];
  2474.         sM_i_respawnAll ctrlCommit 0;
  2475.        
  2476.         sM_btn_shw3DPlrNm = d_serverMenu ctrlCreate ["RscButton", 7770];
  2477.         sM_btn_shw3DPlrNm ctrlSetText "Show3DPlayerNames";
  2478.         sM_btn_shw3DPlrNm ctrlSetPosition [0.572187 * safezoneW + safezoneX,0.489 * safezoneH + safezoneY,0.128906 * safezoneW,0.033 * safezoneH];
  2479.         sM_btn_shw3DPlrNm ctrlSetTextColor [0,0,1,1];
  2480.         sM_btn_shw3DPlrNm ctrladdEventHandler ["ButtonClick", {
  2481.             [] call JAM_fnc_show3DPlayerNames;
  2482.         }];
  2483.         sM_btn_shw3DPlrNm ctrlCommit 0;
  2484.  
  2485.         sM_i_shw3DPlrNm = d_serverMenu ctrlCreate ["RscStructuredText", 7771];
  2486.         sM_i_shw3DPlrNm ctrlSetStructuredText parseText "<t size='0.5' align='center'>allPlayers | everyone sees names over players up to 1500m.</t>";
  2487.         sM_i_shw3DPlrNm ctrlSetPosition [0.572187 * safezoneW + safezoneX,0.522 * safezoneH + safezoneY,0.128906 * safezoneW,0.011 * safezoneH];
  2488.         sM_i_shw3DPlrNm ctrlSetBackgroundColor [0,0,0,0.6];
  2489.         sM_i_shw3DPlrNm ctrlCommit 0;
  2490.        
  2491.         sM_btn_disableFatigue = d_serverMenu ctrlCreate ["RscButton", 7772];
  2492.         sM_btn_disableFatigue ctrlSetText "Infinite Stamina";
  2493.         sM_btn_disableFatigue ctrlSetPosition [0.572187 * safezoneW + safezoneX,0.544 * safezoneH + safezoneY,0.128906 * safezoneW,0.033 * safezoneH];
  2494.         sM_btn_disableFatigue ctrlSetTextColor [0,0,1,1];
  2495.         sM_btn_disableFatigue ctrladdEventHandler ["ButtonClick", {
  2496.             [] call JAM_fnc_disableFatigueGlobal;
  2497.         }];
  2498.         sM_btn_disableFatigue ctrlCommit 0;
  2499.  
  2500.         sM_i_disableFatigue = d_serverMenu ctrlCreate ["RscStructuredText", 7773];
  2501.         sM_i_disableFatigue ctrlSetStructuredText parseText "<t size='0.5' align='center'>allPlayers | click to toggle fatigue off and on.</t>";
  2502.         sM_i_disableFatigue ctrlSetPosition [0.572187 * safezoneW + safezoneX,0.577 * safezoneH + safezoneY,0.128906 * safezoneW,0.011 * safezoneH];
  2503.         sM_i_disableFatigue ctrlSetBackgroundColor [0,0,0,0.6];
  2504.         sM_i_disableFatigue ctrlCommit 0;
  2505.        
  2506.         sM_BIS = d_serverMenu ctrlCreate ["RscPicture", 7131];
  2507.         sM_BIS ctrlSetText "\A3\Data_F\Flags\Flag_bis_CO.paa";
  2508.         sM_BIS ctrlSetPosition [0.29375 * safezoneW + safezoneX,0.236 * safezoneH + safezoneY,0.04125 * safezoneW,0.044 * safezoneH];
  2509.         sM_BIS ctrlCommit 0;
  2510.     };
  2511.  
  2512. comment "----------------------------------------------------------";
  2513. comment "--------------------CLIENT OPTIONS------------------------";
  2514. comment "----------------------------------------------------------";
  2515.  
  2516.     JAM_fnc_clientOptions =
  2517.     {
  2518.         if (isNil "clientOptionsTggl") then {clientOptionsTggl = 1};
  2519.         if (clientOptionsTggl == 1) then {
  2520.             [["Give_Options_To_Players"],{
  2521.                 JAM_open_customOptions =
  2522.                 {
  2523.                     disableSerialization;
  2524.                     display_Options = (findDisplay 46) createDisplay "RscDisplayEmpty";
  2525.                     showChat true;
  2526.  
  2527.                     ctrl_OpTitle = display_Options ctrlCreate ["RscText", 7132];
  2528.                     ctrl_OpTitle ctrlSetText "    JAM      |      Custom Options";
  2529.                     ctrl_OpTitle ctrlSetPosition [0.4175 * safezoneW + safezoneX,0.148 * safezoneH + safezoneY,0.159844 * safezoneW,0.033 * safezoneH];
  2530.                     ctrl_OpTitle ctrlSetTextColor [1,1,1,1];
  2531.                     ctrl_OpTitle ctrlSetBackgroundColor [0.5,-1,-1,1];
  2532.                     ctrl_OpTitle ctrlCommit 0;
  2533.  
  2534.                     ctrl_OpTitleFrame = display_Options ctrlCreate ["RscFrame", 7133];
  2535.                     ctrl_OpTitleFrame ctrlSetText "created by J-WoLF";
  2536.                     ctrl_OpTitleFrame ctrlSetPosition [0.412344 * safezoneW + safezoneX,0.137 * safezoneH + safezoneY,0.170156 * safezoneW,0.055 * safezoneH];
  2537.                     ctrl_OpTitleFrame ctrlCommit 0;
  2538.  
  2539.                     ctrl_OpFrame = display_Options ctrlCreate ["RscFrame", 7134];
  2540.                     ctrl_OpFrame ctrlSetPosition [0.412344 * safezoneW + safezoneX,0.203 * safezoneH + safezoneY,0.170156 * safezoneW,0.176 * safezoneH];
  2541.                     ctrl_OpFrame ctrlCommit 0;
  2542.  
  2543.                     ctrl_OpLeftMenu = display_Options ctrlCreate ["RscText", 7135];
  2544.                     ctrl_OpLeftMenu ctrlSetPosition [0.4175 * safezoneW + safezoneX,0.214 * safezoneH + safezoneY,0.04125 * safezoneW,0.154 * safezoneH];
  2545.                     ctrl_OpLeftMenu ctrlSetBackgroundColor [0,0,0,1];
  2546.                     ctrl_OpLeftMenu ctrlCommit 0;
  2547.  
  2548.                     ctrl_OpRightMenu = display_Options ctrlCreate ["RscText", 7136];
  2549.                     ctrl_OpRightMenu ctrlSetPosition [0.45875 * safezoneW + safezoneX,0.214 * safezoneH + safezoneY,0.118594 * safezoneW,0.154 * safezoneH];
  2550.                     ctrl_OpRightMenu ctrlSetBackgroundColor [0,0,0,0.8];
  2551.                     ctrl_OpRightMenu ctrlCommit 0;
  2552.  
  2553.                     ctrl_OpExit = display_Options ctrlCreate ["RscButton", 7137];
  2554.                     ctrl_OpExit ctrlSetText "X";
  2555.                     ctrl_OpExit ctrlSetPosition [0.556719 * safezoneW + safezoneX,0.148 * safezoneH + safezoneY,0.020625 * safezoneW,0.033 * safezoneH];
  2556.                     ctrl_OpExit ctrlSetBackgroundColor [0,0,0,1];
  2557.                     ctrl_OpExit ctrlSetTooltip "Close";
  2558.                     ctrl_OpExit ctrladdEventHandler ["ButtonClick",
  2559.                     {
  2560.                         display_Options closeDisplay 0;
  2561.                     }];
  2562.                     ctrl_OpExit ctrlCommit 0;
  2563.  
  2564.                     ctrl_OpText1 = display_Options ctrlCreate ["RscText", 7138];
  2565.                     ctrl_OpText1 ctrlSetText ("Welcome, " + (name player) + ".");
  2566.                     ctrl_OpText1 ctrlSetPosition [0.45875 * safezoneW + safezoneX,0.214 * safezoneH + safezoneY,0.118594 * safezoneW,0.055 * safezoneH];
  2567.                     ctrl_OpText1 ctrlCommit 0;
  2568.  
  2569.                     ctrl_OpText2 = display_Options ctrlCreate ["RscText", 7139];
  2570.                     ctrl_OpText2 ctrlSetText "View Distance";
  2571.                     ctrl_OpText2 ctrlSetPosition [0.45875 * safezoneW + safezoneX,0.2635 * safezoneH + safezoneY,0.118594 * safezoneW,0.055 * safezoneH];
  2572.                     ctrl_OpText2 ctrlCommit 0;
  2573.  
  2574.                     ctrl_OpText3 = display_Options ctrlCreate ["RscText", 7140];
  2575.                     ctrl_OpText3 ctrlSetText "Disable Fatigue";
  2576.                     ctrl_OpText3 ctrlSetPosition [0.45875 * safezoneW + safezoneX,0.313 * safezoneH + safezoneY,0.118594 * safezoneW,0.055 * safezoneH];
  2577.                     ctrl_OpText3 ctrlCommit 0;
  2578.  
  2579.                     ctrl_OpLine1 = display_Options ctrlCreate ["RscText", 7141];
  2580.                     ctrl_OpLine1 ctrlSetText "----------------------------------------------------------------------";
  2581.                     ctrl_OpLine1 ctrlSetPosition [0.45875 * safezoneW + safezoneX,0.203 * safezoneH + safezoneY,0.113437 * safezoneW,0.033 * safezoneH];
  2582.                     ctrl_OpLine1 ctrlCommit 0;
  2583.  
  2584.                     ctrl_OpLine2 = display_Options ctrlCreate ["RscText", 7142];
  2585.                     ctrl_OpLine2 ctrlSetText "----------------------------------------------------------------------";
  2586.                     ctrl_OpLine2 ctrlSetPosition [0.45875 * safezoneW + safezoneX,0.346 * safezoneH + safezoneY,0.113437 * safezoneW,0.033 * safezoneH];
  2587.                     ctrl_OpLine2 ctrlCommit 0;
  2588.  
  2589.                     ctrl_OpLine3 = display_Options ctrlCreate ["RscText", 7143];
  2590.                     ctrl_OpLine3 ctrlSetText "----------------------------------------------------------------------";
  2591.                     ctrl_OpLine3 ctrlSetPosition [0.4175 * safezoneW + safezoneX,0.214 * safezoneH + safezoneY,0.0360937 * safezoneW,0.011 * safezoneH];
  2592.                     ctrl_OpLine3 ctrlCommit 0;
  2593.  
  2594.                     ctrl_OpLine4 = display_Options ctrlCreate ["RscText", 7144];
  2595.                     ctrl_OpLine4 ctrlSetText "----------------------------------------------------------------------";
  2596.                     ctrl_OpLine4 ctrlSetPosition [0.4175 * safezoneW + safezoneX,0.357 * safezoneH + safezoneY,0.0360937 * safezoneW,0.011 * safezoneH];
  2597.                     ctrl_OpLine4 ctrlCommit 0;
  2598.  
  2599.                     ctrl_OpHint = display_Options ctrlCreate ["RscText", 7145];
  2600.                     ctrl_OpHint ctrlSetText "[Numpad 7] Re-open this menu.";
  2601.                     ctrl_OpHint ctrlSetPosition [0.438125 * safezoneW + safezoneX,0.39 * safezoneH + safezoneY,0.118594 * safezoneW,0.033 * safezoneH];
  2602.                     ctrl_OpHint ctrlCommit 0;
  2603.  
  2604.                     ctrl_Op_cb_Fatigue = display_Options ctrlCreate ["RscCheckbox", 7147];
  2605.                     ctrl_Op_cb_Fatigue ctrlSetPosition [0.427812 * safezoneW + safezoneX,0.324 * safezoneH + safezoneY,0.020625 * safezoneW,0.033 * safezoneH];
  2606.                     ctrl_Op_cb_Fatigue ctrladdEventHandler ["ButtonClick", {
  2607.                         If (!Fatigue_disabled) then {
  2608.                             Fatigue_disabled = true;
  2609.                         } else {
  2610.                             Fatigue_disabled = false;
  2611.                         };
  2612.                         If (Fatigue_disabled) then {
  2613.                             EH_noFatigue = player addEventHandler ["Respawn", {
  2614.                                 player enableFatigue false;
  2615.                             }];
  2616.                             Hint "EH added (Fatigue Disabled)."
  2617.                         } else {
  2618.                             player removeEventHandler ["Respawn", EH_noFatigue];
  2619.                             Hint "EH removed (Fatigue Enabled)."
  2620.                         };
  2621.                     }];
  2622.                     ctrl_Op_cb_Fatigue ctrlCommit 0;
  2623.  
  2624.                     ctrl_Op_edit_VD = display_Options ctrlCreate ["RscEdit", 7148];
  2625.                     ctrl_Op_edit_VD ctrlSetText str (viewDistance);
  2626.                     ctrl_Op_edit_VD ctrlSetPosition [0.422656 * safezoneW + safezoneX,0.28 * safezoneH + safezoneY,0.0309375 * safezoneW,0.022 * safezoneH];
  2627.                     ctrl_Op_edit_VD ctrlSetBackgroundColor [1,1,1,0.5];
  2628.                     ctrl_Op_edit_VD ctrladdEventHandler ["KeyDown", "if (_this select 1 == 28) then {
  2629.                         newVD = parseNumber (ctrlText ctrl_Op_edit_VD);
  2630.                         setViewDistance newVD;
  2631.                         VD_updated = true;
  2632.                     }"];
  2633.                     ctrl_Op_edit_VD ctrlCommit 0;
  2634.                     comment "Load Saved States of Controls";
  2635.                     If (isNil "Fatigue_disabled") then {Fatigue_disabled = false;};
  2636.                     If (Fatigue_disabled) then {ctrl_Op_cb_Fatigue cbSetChecked true;};
  2637.                    
  2638.                     If (isNil "VD_updated") then {VD_updated = false;};
  2639.                     If (VD_updated) then {ctrl_Op_edit_VD ctrlSetText str newVD;};
  2640.                 };
  2641.                 waitUntil { !(IsNull (findDisplay 46)) };
  2642.                 JAM_bind_customOptions = (findDisplay 46) displayaddEventHandler ["KeyDown", "if (_this select 1 == 71) then {[] spawn JAM_open_customOptions;}"];
  2643.                 hint "JAM: Press Number-pad 7 to open custom options menu.";
  2644.                 waitUntil { not alive player };
  2645.                 waitUntil { alive player };
  2646.                 [] spawn JAM_open_customOptions;
  2647.             }] remoteExec ["spawn",0,"customOptions"];
  2648.             titleText ["<t color='#42D6FC'>clientOptions </t><t color='#FFFFFF'>[ON]</t>", "PLAIN DOWN", -1, true, true];
  2649.             clientOptionsTggl = 0;
  2650.         } else {
  2651.             [[],{
  2652.                 display_Options closeDisplay 0;
  2653.                 systemChat "JAM: CustomOptions display closed.";
  2654.                 player removeEventHandler ["Respawn", EH_noFatigue];
  2655.                 player enableFatigue true;
  2656.                 systemChat "JAM: No-fatigue disabled.";
  2657.             }] remoteExec ["spawn",0];
  2658.             [[],{comment "do nothing at all";}] remoteExec ["spawn",0,"customOptions"];
  2659.             playSound "hint";
  2660.             titleText ["<t color='#42D6FC'>clientOptions </t><t color='#FFFFFF'>[OFF]</t>", "PLAIN DOWN", -1, true, true];
  2661.             clientOptionsTggl = 1;
  2662.         };
  2663.     };
  2664.  
  2665. comment "----------------------------------------------------------";
  2666. comment "---------------------SCROLL MENUS-------------------------";
  2667. comment "----------------------------------------------------------";
  2668.  
  2669. comment "targetMenu";
  2670.  
  2671.     JAM_open_targetMenu = {
  2672.         onEachFrame {
  2673.             if (name cursorTarget == "Error: No unit") then
  2674.             {
  2675.                 drawIcon3D ['A3\ui_f_curator\Data\CfgCurator\entity_disabled_ca.paa', [0,1,1,1], [visiblePosition cursorTarget select 0, visiblePosition cursorTarget select 1, (getPosATL cursorTarget select 2) + 1], 1, 1, 0, typeOf cursorTarget, 2, 0.05, 'PuristaMedium', 'center', false];
  2676.             }
  2677.             else
  2678.             {
  2679.                 drawIcon3D ['A3\ui_f_curator\Data\CfgCurator\entity_disabled_ca.paa', [0,1,1,1], [visiblePosition cursorTarget select 0, visiblePosition cursorTarget select 1, (getPosATL cursorTarget select 2) + 1], 1, 1, 0, name cursorTarget, 2, 0.05, 'PuristaMedium', 'center', false];
  2680.             };
  2681.         };
  2682.         [] spawn {
  2683.             waitUntil {!alive player};
  2684.             onEachFrame {};
  2685.         };
  2686.         removeAllActions player;
  2687.         player addAction ["JAM: <t color='#BDBDBD'>[CANCEL]</t>", {removeAllActions player;onEachFrame {};}];
  2688.         player addAction ["JAM: <t color='#BDBDBD'>[RETURN]</t>", {removeAllActions player; [] spawn JAM_open_mainMenu; onEachFrame {};}];
  2689.         player addAction ["JAM: <t color='#42D6FC'>Target: </t><t color='#ff6600'>Unflip Object</t>", {cursorTarget call JAM_fnc_unflip;}];
  2690.         player addAction ["JAM: <t color='#42D6FC'>Target: </t><t color='#ff6600'>Attach-To-Self</t>", {call jam_targetAttach}];
  2691.         player addAction ["JAM: <t color='#42D6FC'>Target: </t><t color='#ff6600'>Detach Object</t>", {call jam_targetDetach}];
  2692.         player addAction ["JAM: <t color='#42D6FC'>Target: </t><t color='#ff6600'>Delete Object</t>", {call jam_targetDelete}];
  2693.         player addAction ["JAM: <t color='#42D6FC'>Target: </t><t color='#ff6600'>Repair (Heal)</t>", {call jam_targetRepair}];
  2694.         player addAction ["JAM: <t color='#42D6FC'>Target: </t><t color='#ff6600'>Destroy (Kill)</t>", {call jam_targetDestroy}];
  2695.         player addAction ["JAM: <t color='#42D6FC'>Target: </t><t color='#ff6600'>Refuel (Stamina)</t>", {call jam_targetRefuel}];
  2696.         player addAction ["JAM: <t color='#42D6FC'>Target: </t><t color='#ff6600'>Empty Fuel</t>", {call jam_targetEmptyFuel}];
  2697.         player addAction ["JAM: <t color='#42D6FC'>Target: </t><t color='#ff6600'>[+]Arsenal</t>", {call jam_targetAddArsenal}];
  2698.         player addAction ["JAM: <t color='#42D6FC'>Target: </t><t color='#ff6600'>Strip Gear</t>", {call jam_targetStripGear}];
  2699.         player addAction ["JAM: <t color='#42D6FC'>Target: </t><t color='#ff6600'>Give GodMode</t>", {call jam_targetGodON}];
  2700.         player addAction ["JAM: <t color='#42D6FC'>Target: </t><t color='#ff6600'>Remove GodMode</t>", {call jam_targetGodOFF}];
  2701.         player addAction ["JAM: <t color='#42D6FC'>Target: </t><t color='#ff6600'>Add AI-Ignore</t>", {call jam_targetCaptiveON}];
  2702.         player addAction ["JAM: <t color='#42D6FC'>Target: </t><t color='#ff6600'>Remove AI-Ignore</t>", {call jam_targetCaptiveOFF}];
  2703.         player addAction ["JAM: <t color='#42D6FC'>Target: </t><t color='#ff6600'>Add USA Flag</t>", {call jam_targetAddFlag}];
  2704.         player addAction ["JAM: <t color='#42D6FC'>Target: </t><t color='#ff6600'>Remove USA Flag</t>", {call jam_targetRemoveFlag}];
  2705.         player addAction ["JAM: <t color='#42D6FC'>Target: </t><t color='#ff6600'>Lock Vehicle</t>", {cursorTarget lock true;}];
  2706.         player addAction ["JAM: <t color='#42D6FC'>Target: </t><t color='#ff6600'>Unlock Vehicle</t>", {cursorTarget lock false;}];
  2707.     };
  2708.  
  2709.     jam_targetAttach = {
  2710.         cursorTarget attachTo [player,[0.2,1.5,0]];
  2711.         Hint format ["[%1] has been attached to you.", (name cursorTarget)];
  2712.     };
  2713.  
  2714.     jam_targetDetach = {
  2715.         detach cursorTarget;
  2716.         Hint format ["[%1] has been detached from you.", (name cursorTarget)];
  2717.     };
  2718.  
  2719.     jam_targetDelete = {
  2720.         Hint format ["[%1] has been deleted.", (name cursorTarget)];
  2721.         deleteVehicle cursorTarget;
  2722.     };
  2723.  
  2724.     jam_targetGodON = {
  2725.         cursorTarget allowDamage false;
  2726.         Hint format ["[%1] now has damage turned off.", (name cursorTarget)];
  2727.     };
  2728.  
  2729.     jam_targetGodOFF = {
  2730.         cursorTarget allowDamage true;
  2731.         Hint format ["[%1] now has damage turned on.", (name cursorTarget)];
  2732.     };
  2733.  
  2734.     jam_targetCaptiveON = {
  2735.         cursorTarget setCaptive true;
  2736.         Hint format ["[%1] will now be ignored by AI.", (name cursorTarget)];
  2737.     };
  2738.  
  2739.     jam_targetCaptiveOFF = {
  2740.         cursorTarget setCaptive false;
  2741.         Hint format ["[%1] will now be noticed by AI.", (name cursorTarget)];
  2742.     };
  2743.  
  2744.     jam_targetDestroy = {
  2745.         if (cursorTarget in allPlayers) then {
  2746.             forceRespawn cursorTarget;
  2747.             Hint format ["[%1] has been force-respawned.", (name cursorTarget)];
  2748.         } else {
  2749.             cursorTarget setDamage 1;
  2750.             Hint format ["[%1] (%2) has been destroyed.", (name cursorTarget), (typeOf cursorTarget)];
  2751.         };
  2752.     };
  2753.  
  2754.     jam_targetRepair = {
  2755.         cursorTarget setDamage 0;
  2756.         Hint format ["[%1] has been fully repaired.", (name cursorTarget)];
  2757.     };
  2758.  
  2759.     jam_targetEmptyFuel = {
  2760.         cursorTarget setFuel 0;
  2761.         Hint format ["[%1] has been depleted of fuel.", (name cursorTarget)];
  2762.     };
  2763.  
  2764.     jam_targetRefuel = {
  2765.         if (cursorTarget in allPlayers) then {
  2766.             cursorTarget setFatigue 0;
  2767.             [["Your stamina has been recharged."],{
  2768.                 player setFatigue 0;
  2769.             }] remoteExec ["spawn",cursorTarget];
  2770.             Hint format ["[%1] had his stamina recharged.", (name cursorTarget)];
  2771.         } else {
  2772.             cursorTarget setFuel 1;
  2773.             Hint format ["[%1] (%2) has been refueled.", (name cursorTarget), (typeOf cursorTarget)];
  2774.         };
  2775.     };
  2776.  
  2777.     jam_targetAddArsenal = {
  2778.         ["AmmoboxInit",[cursorTarget,true]] call BIS_fnc_arsenal;
  2779.         Hint format ["[%1] is now a full arsenal.", (name cursorTarget)];
  2780.     };
  2781.  
  2782.     jam_targetAddFlag = {
  2783.         cursorTarget forceFlagTexture "\A3\Data_F\Flags\Flag_us_CO.paa";
  2784.         Hint format ["[%1] has become patriotic.", (name cursorTarget)];
  2785.     };
  2786.  
  2787.     jam_targetRemoveFlag = {
  2788.         cursorTarget forceFlagTexture "";
  2789.         Hint format ["[%1] no longer has a flag.", (name cursorTarget)];
  2790.     };
  2791.  
  2792.     jam_targetStripGear = {
  2793.         removeAllWeapons cursorTarget;
  2794.         removeAllAssignedItems cursorTarget;
  2795.         removeAllContainers cursorTarget;
  2796.         removeHeadgear cursorTarget;
  2797.         removeGoggles cursorTarget;
  2798.         removeAllItems cursorTarget;
  2799.         removeVest cursorTarget;
  2800.         removeBackpack cursorTarget;
  2801.         Hint format ["[%1] has been stripped of his gear.", (name cursorTarget)];
  2802.     };
  2803.  
  2804. comment "playerMenu";
  2805.  
  2806.     JAM_open_playerMenu = {
  2807.         removeAllActions player;
  2808.         player addAction ["JAM: <t color='#BDBDBD'>[CANCEL]</t>", {removeAllActions player;}];
  2809.         player addAction ["JAM: <t color='#BDBDBD'>[RETURN]</t>", {removeAllActions player; []spawn JAM_open_mainMenu;}];
  2810.         player addAction ["JAM: <t color='#42D6FC'>Player: </t><t color='#ff6600'>GetIn</t>", {player moveInAny cursorTarget;playSound "Hint";}];
  2811.         player addAction ["JAM: <t color='#42D6FC'>Player: </t><t color='#ff6600'>GetOut</t>", {moveOut player;playSound "Hint";}];
  2812.         player addAction ["JAM: <t color='#42D6FC'>Player: </t><t color='#ff6600'>Heal</t>", {player setDamage 0;playSound "Hint";}];
  2813.         player addAction ["JAM: <t color='#42D6FC'>Player: </t><t color='#ff6600'>Suicide</t>", {player setDamage 1;playSound "Hint";}];
  2814.         player addAction ["JAM: <t color='#42D6FC'>Player: </t><t color='#ff6600'>Attach</t>", {player attachTo [cursorTarget, [0,0,0]];playSound "Hint";}];
  2815.         player addAction ["JAM: <t color='#42D6FC'>Player: </t><t color='#ff6600'>Detach</t>", {detach player;playSound "Hint";}];
  2816.         player addAction ["JAM: <t color='#42D6FC'>Player: </t><t color='#ff6600'>God [ON]</t>", {player allowDamage false;playSound "Hint";}];
  2817.         player addAction ["JAM: <t color='#42D6FC'>Player: </t><t color='#ff6600'>God [OFF]</t>", {player allowDamage true;playSound "Hint";}];
  2818.         player addAction ["JAM: <t color='#42D6FC'>Player: </t><t color='#ff6600'>Ignore [ON]</t>", {player setCaptive true;playSound "Hint";}];
  2819.         player addAction ["JAM: <t color='#42D6FC'>Player: </t><t color='#ff6600'>Ignore [OFF]</t>", {player setCaptive false;playSound "Hint";}];
  2820.         player addAction ["JAM: <t color='#42D6FC'>Player: </t><t color='#ff6600'>[+] Arsenal</t>", {call jam_playerAddArsenal}];
  2821.         player addAction ["JAM: <t color='#42D6FC'>Player: </t><t color='#ff6600'>[+] Flag</t>", {call jam_playerAddFlag}];
  2822.         player addAction ["JAM: <t color='#42D6FC'>Player: </t><t color='#ff6600'>[-] Flag</t>", {call jam_playerRemoveFlag}];
  2823.     };
  2824.  
  2825.     jam_playerAddArsenal = {
  2826.         ["AmmoboxInit",[player,true]] call BIS_fnc_arsenal;
  2827.         playSound "Hint";
  2828.     };
  2829.  
  2830.     jam_playerAddFlag = {
  2831.         player forceFlagTexture "\A3\Data_F\Flags\Flag_us_CO.paa";
  2832.         playSound "Hint";
  2833.     };
  2834.  
  2835.     jam_playerRemoveFlag = {
  2836.         player forceFlagTexture "";
  2837.         playSound "Hint";
  2838.     };
  2839.  
  2840. comment "vehicleMenu";
  2841.  
  2842.     JAM_open_vehicleMenu = {
  2843.         removeAllActions player;
  2844.         player addAction ["JAM: <t color='#BDBDBD'>[CANCEL]</t>", {removeAllActions player;}];
  2845.         player addAction ["JAM: <t color='#BDBDBD'>[RETURN]</t>", {removeAllActions player; []spawn JAM_open_mainMenu;}];
  2846.         player addAction ["JAM: <t color='#42D6FC'>Vehicle: </t><t color='#ff6600'>[+] USATrail</t>", {call jam_addUSASmokeTrail}];
  2847.         player addAction ["JAM: <t color='#42D6FC'>Vehicle: </t><t color='#ff6600'>Repair</t>", {vehicle player setDamage 0;playSound "Hint";}];
  2848.         player addAction ["JAM: <t color='#42D6FC'>Vehicle: </t><t color='#ff6600'>Destroy</t>", {vehicle player setDamage 1;playSound "Hint";}];
  2849.         player addAction ["JAM: <t color='#42D6FC'>Vehicle: </t><t color='#ff6600'>Refuel</t>", {vehicle player setFuel 1;playSound "Hint";}];
  2850.         player addAction ["JAM: <t color='#42D6FC'>Vehicle: </t><t color='#ff6600'>Nofuel</t>", {vehicle player setFuel 0;playSound "Hint";}];
  2851.         player addAction ["JAM: <t color='#42D6FC'>Vehicle: </t><t color='#ff6600'>Attach</t>", {vehicle player attachTo [cursorTarget, [0,0,0]];playSound "Hint";}];
  2852.         player addAction ["JAM: <t color='#42D6FC'>Vehicle: </t><t color='#ff6600'>Detach</t>", {detach vehicle player;playSound "Hint";}];
  2853.         player addAction ["JAM: <t color='#42D6FC'>Vehicle: </t><t color='#ff6600'>God [ON]</t>", {vehicle player allowDamage false;playSound "Hint";}];
  2854.         player addAction ["JAM: <t color='#42D6FC'>Vehicle: </t><t color='#ff6600'>God [OFF]</t>", {vehicle player allowDamage true;playSound "Hint";}];
  2855.         player addAction ["JAM: <t color='#42D6FC'>Vehicle: </t><t color='#ff6600'>[+] Arsenal</t>", {call jam_vehicleAddArsenal}];
  2856.         player addAction ["JAM: <t color='#42D6FC'>Vehicle: </t><t color='#ff6600'>[+] Flag</t>", {call jam_vehicleAddFlag}];
  2857.         player addAction ["JAM: <t color='#42D6FC'>Vehicle: </t><t color='#ff6600'>[-] Flag</t>", {call jam_vehicleRemoveFlag}];
  2858.         player addAction ["JAM: <t color='#42D6FC'>Vehicle: </t><t color='#ff6600'>Lock</t>", {vehicle player lock true;Hint "locked";}];
  2859.         player addAction ["JAM: <t color='#42D6FC'>Vehicle: </t><t color='#ff6600'>Unlock</t>", {vehicle player lock false;Hint "unlocked";}];
  2860.     };
  2861.  
  2862.     jam_addUSASmokeTrail = {
  2863.         _expl1 = "G_40mm_SmokeRed" createVehicle position vehicle player;
  2864.         _expl1 attachTo [vehicle player, [-0.1, 0.1, 0.15], "Pelvis"];
  2865.         _expl1 setVectorDirAndUp [ [0.5, 0.5, 0], [-0.5, 0.5, 0] ];
  2866.         _expl2 = "G_40mm_Smoke" createVehicle position vehicle player;
  2867.         _expl2 attachTo [vehicle player, [0, 0.15, 0.15], "Pelvis"];
  2868.         _expl2 setVectorDirAndUp [ [1, 0, 0], [0, 1, 0] ];
  2869.         _expl3 = "G_40mm_SmokeBlue" createVehicle position vehicle player;
  2870.         _expl3 attachTo [vehicle player, [0.1, 0.1, 0.15], "Pelvis"];
  2871.         _expl3 setVectorDirAndUp [ [0.5, -0.5, 0], [0.5, 0.5, 0] ];
  2872.         Hint "God, bless the United States of America.";
  2873.     };
  2874.  
  2875.     jam_vehicleAddArsenal = {
  2876.         ["AmmoboxInit",[vehicle player,true]] call BIS_fnc_arsenal;
  2877.         Hint format ["[%1] is now a full arsenal.", (name (vehicle player))];
  2878.     };
  2879.  
  2880.     jam_vehicleAddFlag = {
  2881.         vehicle player forceFlagTexture "\A3\Data_F\Flags\Flag_us_CO.paa";
  2882.         Hint "Serving with pride.";
  2883.     };
  2884.  
  2885.     jam_vehicleRemoveFlag = {
  2886.         vehicle player forceFlagTexture "";
  2887.         playSound "Hint";
  2888.     };
  2889.  
  2890. comment "spawnMenu";
  2891.  
  2892.     JAM_open_CustomVehicles = {
  2893.         removeAllActions player;
  2894.         player addAction ["JAM: <t color='#BDBDBD'>[CANCEL]</t>", {removeAllActions player;}];
  2895.         player addAction ["JAM: <t color='#BDBDBD'>[RETURN]</t>", {removeAllActions player; []spawn JAM_open_mainMenu;}];
  2896.         player addAction ["JAM: <t color='#FF8080'>Delete: </t><t color='#BDBDBD'>Vehicle</t>", {deleteVehicle vehicle player;}];
  2897.         player addAction ["JAM: <t color='#42D6FC'>Spawn: </t><t color='#ff6600'>AmmoBox</t>", {call jam_spawnVAmmoBox}];
  2898.         player addAction ["JAM: <t color='#42D6FC'>Spawn: </t><t color='#ff6600'>Arsenal</t>", {call jam_spawnArsenal}];
  2899.         player addAction ["JAM: <t color='#42D6FC'>Spawn: </t><t color='#ff6600'>Quad Bike (BOMB)</t>", {call jam_spawnQuadBomb}];
  2900.         player addAction ["JAM: <t color='#42D6FC'>Spawn: </t><t color='#ff6600'>Quad Bike (GMG)</t>", {call jam_spawnQuadGMG}];
  2901.         player addAction ["JAM: <t color='#42D6FC'>Spawn: </t><t color='#ff6600'>Quad Bike (HMG)</t>", {call jam_spawnQuadHMG}];
  2902.         player addAction ["JAM: <t color='#42D6FC'>Spawn: </t><t color='#ff6600'>MH-9 Hummingbird</t>", {call jam_spawnHummingbird}];
  2903.         player addAction ["JAM: <t color='#42D6FC'>Spawn: </t><t color='#ff6600'>AH-9 Pawnee</t>", {call jam_spawnPawnee}];
  2904.         player addAction ["JAM: <t color='#42D6FC'>Spawn: </t><t color='#ff6600'>Prowler (Armed)</t>", {call jam_spawnProwler}];
  2905.         player addAction ["JAM: <t color='#42D6FC'>Spawn: </t><t color='#ff6600'>Offroad (Mk6)</t>", {call jam_spawnOffroadMortar}];
  2906.         player addAction ["JAM: <t color='#42D6FC'>Spawn: </t><t color='#ff6600'>Offroad (GMG)</t>", {call jam_spawnOffroadGMG}];
  2907.         player addAction ["JAM: <t color='#42D6FC'>Spawn: </t><t color='#ff6600'>Offroad (HMG)</t>", {call jam_spawnOffroadHMG}];
  2908.         player addAction ["JAM: <t color='#42D6FC'>Spawn: </t><t color='#ff6600'>RHIB (GMG)</t>", {call jam_spawnRHIBgmg}];
  2909.         player addAction ["JAM: <t color='#42D6FC'>Spawn: </t><t color='#ff6600'>RHIB (HMG)</t>", {call jam_spawnRHIBhmg}];
  2910.         player addAction ["JAM: <t color='#42D6FC'>Spawn: </t><t color='#ff6600'>Caesar BTT (Racing)</t>", {call jam_spawnCaesarBTTRacing}];
  2911.         player addAction ["JAM: <t color='#42D6FC'>Spawn: </t><t color='#ff6600'>F/A-181 Black Wasp II</t>", {call jam_spawnBlackWasp}];
  2912.         player addAction ["JAM: <t color='#42D6FC'>Spawn: </t><t color='#ff6600'>BoatCar</t>", {call jam_spawnBoatCar}];
  2913.         player addAction ["JAM: <t color='#42D6FC'>Spawn: </t><t color='#ff6600'>UCAV Sentinel</t>", {call jam_spawnUCAV}];
  2914.         player addAction ["JAM: <t color='#42D6FC'>Spawn: </t><t color='#ff6600'>InvisiDrone</t>", {call jam_spawnInvisiDrone}];
  2915.     };
  2916.  
  2917.     jam_spawnQuadBomb = {
  2918.         _quad = createVehicle ["B_G_Quadbike_01_F",getPosATL player,[],0,"CAN_COLLIDE"];
  2919.         _turret = createVehicle ["B_GMG_01_F",getPosATL player,[],0,"CAN_COLLIDE"];
  2920.         _turret attachTo [_quad, [0.1,0,0.6]];
  2921.         _charge1 = "ModuleExplosive_DemoCharge_F" createVehicle position _quad;
  2922.         _charge1 attachTo [_quad, [-0.3, 0.63, -0.53]];
  2923.         _charge2 = "ModuleExplosive_DemoCharge_F" createVehicle position _quad;
  2924.         _charge2 attachTo [_quad, [-0.3, 0.74, -0.53]];
  2925.         _charge3 = "ModuleExplosive_DemoCharge_F" createVehicle position _quad;
  2926.         _charge3 attachTo [_quad, [-0.3, 0.85, -0.53]];
  2927.         _charge4 = "ModuleExplosive_DemoCharge_F" createVehicle position _quad;
  2928.         _charge4 attachTo [_quad, [0.3, 0.63, -0.53]];
  2929.         _charge4 setDir 180;
  2930.         _charge5 = "ModuleExplosive_DemoCharge_F" createVehicle position _quad;
  2931.         _charge5 attachTo [_quad, [0.3, 0.74, -0.53]];
  2932.         _charge5 setDir 180;
  2933.         _charge6 = "ModuleExplosive_DemoCharge_F" createVehicle position _quad;
  2934.         _charge6 attachTo [_quad, [0.3, 0.85, -0.53]];
  2935.         _charge6 setDir 180;
  2936.         _charge7 = "ModuleExplosive_SatchelCharge_F" createVehicle position _quad;
  2937.         _charge7 attachTo [_quad, [-0.35, -0.85, -0.45]];
  2938.         _charge8 = "ModuleExplosive_SatchelCharge_F" createVehicle position _quad;
  2939.         _charge8 attachTo [_quad, [0.38, -0.84, -0.45]];
  2940.         _detonater = _quad addAction ["<t color='#B40404'>Detonate Quadbike</t>",
  2941.         "{_x setDamage 1;} forEach nearestObjects [vehicle player, ['all'], 20];createVehicle ['Bo_GBU12_LGB',getPosATL vehicle player,[],0,'CAN_COLLIDE'];"];
  2942.         player moveInDriver _quad;
  2943.         playSound "Hint";
  2944.         systemChat "Quad (BOMB) Spawned.";
  2945.     };
  2946.  
  2947.     jam_spawnInvisiDrone = {
  2948.         [] spawn {
  2949.             InvisiDrone = [getPosATL player, 0, "B_UAV_06_medical_F", west] call BIS_fnc_spawnVehicle;
  2950.             createVehicleCrew (InvisiDrone select 0);
  2951.             InvisiDrone allowDamage false;
  2952.             InvisiDrone setObjectTextureGlobal [0,'\A3\nonExistantFile.paa'];
  2953.             sleep 1;
  2954.             InvisiDrone addWeaponTurret ["missiles_titan_static", [-1]];
  2955.             InvisiDrone addMagazineTurret ["1Rnd_GAT_missiles", [-1]];
  2956.             InvisiDrone addMagazineTurret ["1Rnd_GAA_missiles", [-1]];
  2957.         };
  2958.     };
  2959.  
  2960.     jam_spawnUCAV = {
  2961.         _uav = [getPosATL player, 0, "B_uav_05_F", west] call BIS_fnc_spawnVehicle;
  2962.         createVehicleCrew (_uav select 0);
  2963.         [_uav] joinSilent group player;
  2964.     };
  2965.  
  2966.     jam_spawnBoatCar = {
  2967.         [] spawn {
  2968.             player setVelocity [0,0,10];
  2969.             sleep 0.5;
  2970.             _quad = createVehicle ["B_G_Quadbike_01_F",getPosATL player,[],0,"CAN_COLLIDE"];
  2971.             _quad setDir direction player;
  2972.             _rhib = createVehicle ["B_G_Boat_Transport_02_F",getPosATL player,[],0,"CAN_COLLIDE"];
  2973.             _rhib attachTo [_quad, [0, 0, 0]];
  2974.             _hmg = createVehicle ["B_HMG_01_high_F",getPosATL player,[],0,"CAN_COLLIDE"];
  2975.             _hmg attachTo [_rhib, [0.25,1.5,1]];
  2976.             player moveInDriver _quad;
  2977.             playSound "Hint";
  2978.             systemChat "BoatCar Spawned.";
  2979.         };
  2980.     };
  2981.  
  2982.     jam_spawnVAmmoBox = {
  2983.         _box = createVehicle ["Land_Ammobox_rounds_F",getPos player,[],0,"CAN_COLLIDE"];
  2984.         _box attachTo [player, [0, 1.5, 1.2]];
  2985.         detach _box;
  2986.         _box setDir direction player;
  2987.         ["AmmoboxInit",[_box,true]] call BIS_fnc_arsenal;
  2988.         player playMove "ainvpercmstpsraswrfldnon_putdown_amovpercmstpsraswrfldnon";
  2989.         playSound "Hint";
  2990.         systemChat "Arsenal Spawned.";
  2991.     };
  2992.  
  2993.     jam_spawnArsenal = {
  2994.         _flagpole = createVehicle ["Flag_ARMEX_F",getPos player,[],0,"CAN_COLLIDE"];
  2995.         _arsenal = createVehicle ["B_supplyCrate_F",getPos player,[],0,"CAN_COLLIDE"];
  2996.         _flagpole setDir direction player;
  2997.         _arsenal setDir direction player;
  2998.         _arsenal attachTo [_flagpole, [-0.1,-0.4,-3.2]];
  2999.         ["AmmoboxInit",[_arsenal,true]] call BIS_fnc_arsenal;
  3000.         _flagpole allowDamage false;
  3001.         _arsenal allowDamage false;
  3002.         playSound "Hint";
  3003.         systemChat "Arsenal Spawned.";
  3004.     };
  3005.  
  3006.     jam_spawnPawnee = {
  3007.         _pawnee = createVehicle ["B_Heli_Light_01_armed_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3008.         _pawnee setDir direction player;
  3009.         player moveInDriver _pawnee;
  3010.         playSound "Hint";
  3011.         systemChat "Vehicle Spawned.";
  3012.     };
  3013.  
  3014.     jam_spawnHummingbird = {
  3015.         _bird = createVehicle ["B_Heli_Light_01_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3016.         _bird setDir direction player;
  3017.         player moveInDriver _bird;
  3018.         playSound "Hint";
  3019.         systemChat "Vehicle Spawned.";
  3020.     };
  3021.        
  3022.     jam_spawnRHIBhmg = {
  3023.         _rhib = createVehicle ["B_G_Boat_Transport_02_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3024.         _hmg = createVehicle ["B_HMG_01_high_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3025.         _hmg attachTo [_rhib, [0.25,1.5,1]];
  3026.         _rhib setDir direction player;
  3027.         player moveInDriver _rhib;
  3028.         playSound "Hint";
  3029.         SystemChat "Vehicle Spawned.";
  3030.     };
  3031.  
  3032.     jam_spawnRHIBgmg = {
  3033.         _rhib = createVehicle ["B_G_Boat_Transport_02_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3034.         _hmg = createVehicle ["B_GMG_01_high_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3035.         _hmg attachTo [_rhib, [0.25,1.5,1]];
  3036.         _rhib setDir direction player;
  3037.         player moveInDriver _rhib;
  3038.         playSound "Hint";
  3039.         SystemChat "Vehicle Spawned."; 
  3040.     };
  3041.        
  3042.     jam_spawnProwler = {
  3043.         _prowler = createVehicle ["B_LSV_01_armed_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3044.         _arsenal = createVehicle ["B_supplyCrate_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3045.         _arsenal attachTo [_prowler, [0,-1.45,0]];
  3046.         _prowler setDir direction player;
  3047.         player moveInDriver _prowler;
  3048.         playSound "Hint";
  3049.         systemChat "Vehicle Spawned.";
  3050.     };
  3051.  
  3052.     jam_spawnQuadGMG = {
  3053.         _quad = createVehicle ["B_G_Quadbike_01_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3054.         _turret = createVehicle ["B_GMG_01_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3055.         _turret attachTo [_quad, [0.1,0,0.6]];
  3056.         _ammoBox1 = createVehicle ["Land_Ammobox_rounds_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3057.         _ammoBox1 attachTo [_quad, [0.40,-0.937,-0.35]];
  3058.         _ammoBox1 setDir 90;
  3059.         _ammoBox2 = createVehicle ["Land_Ammobox_rounds_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3060.         _ammoBox2 attachTo [_quad, [-0.42,-0.937,-0.35]];
  3061.         _ammoBox2 setDir 90;
  3062.         _quad setDir direction player;
  3063.         player moveInDriver _quad;
  3064.         playSound "Hint";
  3065.         systemChat "Vehicle Spawned.";
  3066.     };
  3067.  
  3068.     jam_spawnQuadHMG = {
  3069.         _quad = createVehicle ["B_G_Quadbike_01_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3070.         _turret = createVehicle ["B_HMG_01_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3071.         _turret attachTo [_quad, [0.1,0,0.6]];
  3072.         _ammoBox1 = createVehicle ["Land_Ammobox_rounds_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3073.         _ammoBox1 attachTo [_quad, [0.40,-0.937,-0.35]];
  3074.         _ammoBox1 setDir 90;
  3075.         _ammoBox2 = createVehicle ["Land_Ammobox_rounds_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3076.         _ammoBox2 attachTo [_quad, [-0.42,-0.937,-0.35]];
  3077.         _ammoBox2 setDir 90;
  3078.         _quad setDir direction player;
  3079.         player moveInDriver _quad;
  3080.         playSound "Hint";
  3081.         systemChat "Vehicle Spawned.";
  3082.     };
  3083.  
  3084.     jam_spawnOffroadMortar = {
  3085.         _offroad = createVehicle ["B_G_Offroad_01_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3086.         _offroad setObjectTextureGlobal [0, "#(ARGB,8,8,3)color(0.33,0.31,0.24,0.3)"];
  3087.         _mortar = createVehicle ["B_T_Mortar_01_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3088.         _mortar attachTo [_offroad, [0,-2,0]];
  3089.         _offroad setDir direction player;
  3090.         player moveInDriver _offroad;
  3091.         playSound "Hint";
  3092.         systemChat "Vehicle Spawned.";
  3093.     };
  3094.  
  3095.     jam_spawnOffroadHMG = {
  3096.         _offroad = createVehicle ["B_G_Offroad_01_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3097.         _offroad setObjectTextureGlobal [0, "#(ARGB,8,8,3)color(0.33,0.31,0.24,0.3)"];
  3098.         _hmgturret = createVehicle ["B_HMG_01_high_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3099.         _hmgturret attachTo [_offroad, [0.2,-2,1]];
  3100.         _offroad setDir direction player;
  3101.         player moveInDriver _offroad;
  3102.         playSound "Hint";
  3103.         systemChat "Vehicle Spawned.";
  3104.     };
  3105.  
  3106.     jam_spawnOffroadGMG = {
  3107.         _offroad = createVehicle ["B_G_Offroad_01_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3108.         _offroad setObjectTextureGlobal [0, "#(ARGB,8,8,3)color(0.33,0.31,0.24,0.3)"];
  3109.         _gmgturret = createVehicle ["B_GMG_01_high_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3110.         _gmgturret attachTo [_offroad, [0.2,-2,1]];
  3111.         _offroad setDir direction player;
  3112.         player moveInDriver _offroad;
  3113.         playSound "Hint";
  3114.         systemChat "Vehicle Spawned.";
  3115.     };
  3116.  
  3117.     jam_spawnHunterAT = {
  3118.         _hunter = createVehicle ["B_MRAP_01_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3119.         _titanAT = createVehicle ["B_static_AT_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3120.         _titanAT attachTo [_hunter, [0,-2.65,1.6]];
  3121.         _hunter setDir direction player;
  3122.         player moveInDriver _hunter;
  3123.         playSound "Hint";
  3124.         systemChat "Vehicle Spawned.";
  3125.     };
  3126.  
  3127.     jam_spawnHunterAA = {
  3128.         _hunter = createVehicle ["B_MRAP_01_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3129.         _titanAA = createVehicle ["B_static_AA_F",getPosATL player,[],0,"CAN_COLLIDE"];
  3130.         _titanAA attachTo [_hunter, [0,-2.65,1.6]];
  3131.         _hunter setDir direction player;
  3132.         player moveInDriver _hunter;
  3133.         playSound "Hint";
  3134.         systemChat "Vehicle Spawned.";
  3135.     };
  3136.  
  3137.     jam_spawnCaesarBTTRacing = {
  3138.         _plane = createVehicle ["C_Plane_Civil_01_racing_F",getPosATL player,[],0,"FLY"];
  3139.         _plane setDir direction player;
  3140.         _pos = getPosATL player; _pos set [2, 500]; _plane setPosATL _pos;
  3141.         _plane setVelocity [150, 0, 0];
  3142.         player moveInDriver _plane;
  3143.         playSound "Hint";
  3144.         systemChat "Vehicle Spawned.";
  3145.     };
  3146.  
  3147.     jam_spawnBlackWasp = {
  3148.         _plane = createVehicle ["B_Plane_Fighter_01_F",getPosATL player,[],0,"FLY"];
  3149.         _plane setDir direction player;
  3150.         _pos = getPosATL player; _pos set [2, 500]; _plane setPosATL _pos;
  3151.         _plane setVelocity [250, 0, 0];
  3152.         player moveInDriver _plane;
  3153.         playSound "Hint";
  3154.         systemChat "Vehicle Spawned.";
  3155.     };
  3156.  
  3157. comment "cheatMenu";
  3158.  
  3159.     JAM_open_cheatMenu = {
  3160.         removeAllActions player;
  3161.         player addAction ["JAM: <t color='#BDBDBD'>[CANCEL]</t>", {removeAllActions player;}];
  3162.         player addAction ["JAM: <t color='#BDBDBD'>[RETURN]</t>", {removeAllActions player; []spawn JAM_open_mainMenu;}];
  3163.         player addAction ["JAM: <t color='#42D6FC'>Cheats: </t><t color='#ff6600'>Bullet-Changer</t>", {[] call JAM_open_ammoSelectMenu;}];
  3164.         player addAction ["JAM: <t color='#42D6FC'>Cheats: </t><t color='#ff6600'>GodMode</t>", {[] call jam_god;}];
  3165.         player addAction ["JAM: <t color='#42D6FC'>Cheats: </t><t color='#ff6600'>InfAmmo</t>", {[] call jam_infAmmo;}];
  3166.         player addAction ["JAM: <t color='#42D6FC'>Cheats: </t><t color='#ff6600'>InfAmmoGroup</t>", {[] call jam_infAmmoGroup;}];
  3167.         player addAction ["JAM: <t color='#42D6FC'>Cheats: </t><t color='#ff6600'>InfStamina</t>", {[] call jam_infStamina;}];
  3168.         player addAction ["JAM: <t color='#42D6FC'>Cheats: </t><t color='#ff6600'>3D-ESP | Friendly Players</t>", {[] call jam_esp;}];
  3169.         player addAction ["JAM: <t color='#42D6FC'>Cheats: </t><t color='#ff6600'>Map-ESP| Friendly Players</t>", {[] call jam_mesp;}];
  3170.         player addAction ["JAM: <t color='#42D6FC'>Cheats: </t><t color='#ff6600'>3D-ESP | Enemy AI</t>", {[] call jam_hostileAIEsp;}];
  3171.     };
  3172.  
  3173.     jam_god = {
  3174.         if (isNil "GodTggle") then {GodTggle = 1};
  3175.         if (GodTggle == 1) then {
  3176.             GodTggle = 0;
  3177.             player setCaptive true;
  3178.             player allowDamage false;
  3179.             vehicle player allowDamage false;
  3180.             EH_godMode = player addEventHandler ["Respawn", {
  3181.                 player setCaptive true;
  3182.                 player allowDamage false;
  3183.                 (vehicle player) allowDamage false;
  3184.             }];
  3185.             titleText ["<t color='#42D6FC'>GOD </t><t color='#FFFFFF'>[ON]</t>", "PLAIN DOWN", -1, true, true];
  3186.             playSound "Hint";
  3187.         } else {
  3188.             GodTggle = 1;
  3189.             player setCaptive false;
  3190.             player allowDamage true;
  3191.             vehicle player allowDamage true;
  3192.             player removeEventHandler ["Respawn", EH_godMode];
  3193.             titleText ["<t color='#42D6FC'>GOD </t><t color='#FFFFFF'>[OFF]</t>", "PLAIN DOWN", -1, true, true];
  3194.             playSound "Hint";
  3195.         };
  3196.     };
  3197.  
  3198.     jam_infAmmo = {
  3199.         if (isNil "infAmmoTggle") then {infAmmoTggle = 1};
  3200.         if (infAmmoTggle == 1) then {
  3201.             infAmmoTggle = 0;
  3202.             titleText ["<t color='#42D6FC'>INFAMMO </t><t color='#FFFFFF'>[ON]</t>", "PLAIN DOWN", -1, true, true];
  3203.             playSound "Hint";
  3204.             [] spawn {
  3205.                 while {infAmmoTggle == 0} do {
  3206.                     player setVehicleAmmo 1;
  3207.                     vehicle player setVehicleAmmo 1;
  3208.                     sleep 0.5;
  3209.                 };
  3210.             };
  3211.         } else {
  3212.             infAmmoTggle = 1;
  3213.             titleText ["<t color='#42D6FC'>INFAMMO </t><t color='#FFFFFF'>[OFF]</t>", "PLAIN DOWN", -1, true, true];
  3214.             playSound "Hint";
  3215.         };
  3216.     };
  3217.  
  3218.     jam_infAmmoGroup = {
  3219.         if (isNil "infAmmoGroupTggle") then {infAmmoGroupTggle = 1};
  3220.         if (infAmmoGroupTggle == 1) then {
  3221.             infAmmoGroupTggle = 0;
  3222.             titleText ["<t color='#42D6FC'>INFAMMOGroup </t><t color='#FFFFFF'>[ON]</t>", "PLAIN DOWN", -1, true, true];
  3223.             playSound "Hint";
  3224.             [] spawn {
  3225.                 while {infAmmoGroupTggle == 0} do {
  3226.                     {
  3227.                         _x setVehicleAmmo 1;
  3228.                         vehicle _x setVehicleAmmo 1;
  3229.                     } forEach units group player;
  3230.                     sleep 0.5;
  3231.                 };
  3232.             };
  3233.         } else {
  3234.             infAmmoGroupTggle = 1;
  3235.             titleText ["<t color='#42D6FC'>INFAMMO </t><t color='#FFFFFF'>[OFF]</t>", "PLAIN DOWN", -1, true, true];
  3236.             playSound "Hint";
  3237.         };
  3238.     };
  3239.  
  3240.     jam_infStamina = {
  3241.         if (isNil "infStaminaTggle") then {infStaminaTggle = 1};
  3242.         if (infStaminaTggle == 1) then {
  3243.             infStaminaTggle = 0;
  3244.             player enableFatigue false;
  3245.             EH_cardio = player addEventHandler ["Respawn", {player enableFatigue false;}];
  3246.             titleText ["<t color='#42D6FC'>CARDIO </t><t color='#FFFFFF'>[ON]</t>", "PLAIN DOWN", -1, true, true];
  3247.             playSound "Hint";
  3248.         } else {
  3249.             infStaminaTggle = 1;
  3250.             player enableFatigue true;
  3251.             player removeEventHandler ["Respawn", EH_cardio];
  3252.             titleText ["<t color='#42D6FC'>CARDIO </t><t color='#FFFFFF'>[OFF]</t>", "PLAIN DOWN", -1, true, true];
  3253.             playSound "Hint";
  3254.         };
  3255.     };
  3256.  
  3257.     jam_esp = {
  3258.         if (isNil 'jamESPTggle') then {jamESPTggle = 1};
  3259.         if (jamESPTggle == 1) then {
  3260.             jamESPTggle = 0;
  3261.             titleText ["<t color='#42D6FC'>ESP </t><t color='#FFFFFF'>[ON]</t>", "PLAIN DOWN", -1, true, true];
  3262.             playSound "Hint";
  3263.             [("
  3264.             jamEsp = addMi"+"ssionEve"+"ntHandler ['Dr"+"aw"+"3D',{
  3265.             {
  3266.             if ((side _x != side player) && (getPlayerUID _x != '') && ((player distance _x) < 1500)) then {
  3267.             dr"+"awIcon"+"3D['', [0, 0, 1, 1], [visi"+"blePosi"+"tion _x select 0, visi"+"blePo"+"sition _x select 1, (getPosATL _x select 2) + 2], 0.1, 0.1, 45, (format['%1 - %2m', name _x, round(player distance _x)]), 1, 0.04];
  3268.             } else {
  3269.             if ((getPlayerUID _x != '') && ((player distance _x) < 1500) && (name _x != name player)) then {
  3270.             d"+"rawIc"+"on3D['', [0, 0.2, 1, 1], [visi"+"blePos"+"ition _x select 0, visib"+"lePosi"+"tion _x select 1, (getPosATL _x select 2) + 2], 0.1, 0.1, 45, (format['%1 - %2m', name _x, round(player distance _x)]), 1, 0.04];
  3271.             };
  3272.             };
  3273.             } foreach call jam_fini_fnc_plrs;
  3274.             }];
  3275.             ")] call jam_fini_fnc_compile;
  3276.         } else {
  3277.             jamESPTggle = 1;
  3278.             titleText ["<t color='#42D6FC'>ESP </t><t color='#FFFFFF'>[OFF]</t>", "PLAIN DOWN", -1, true, true];
  3279.             playSound "Hint";
  3280.             [("re"+"moveMiss"+"ionEven"+"tHandler['Dr"+"a"+"w3D',jamEsp];")] call jam_fini_fnc_compile;
  3281.         };
  3282.     };
  3283.  
  3284.     jam_mesp = {
  3285.         if (isNil "mespTggle") then {mespTggle = 1};
  3286.         if (mespTggle == 1) then {
  3287.             playSound "Hint";
  3288.             titleText ["<t color='#42D6FC'>MAPESP </t><t color='#FFFFFF'>[ON]</t>", "PLAIN DOWN", -1, true, true];
  3289.             mespTggle = 0;
  3290.         } else {
  3291.             playSound "Hint";
  3292.             titleText ["<t color='#42D6FC'>MAPESP </t><t color='#FFFFFF'>[OFF]</t>", "PLAIN DOWN", -1, true, true];
  3293.             mespTggle = 1;
  3294.         };
  3295.         [] spawn {
  3296.             [("
  3297.             while {mespTggle == 0} do {
  3298.             _units = call jam_fini_fnc_plrs;
  3299.             _unitCount = count _units;
  3300.             for '_i' from 0 to (_unitCount-1) do {
  3301.             _unit = _units select _i;
  3302.             if (alive _unit) then {
  3303.             del"+"eteMar"+"kerL"+"ocal('jam_plr' + (str _i));
  3304.             _namePlayer = name _unit;
  3305.             _mark_player = 'jam_plr' + (str _i);
  3306.             _mark_player = crea"+"teM"+"arker"+"Loc"+"al[_mark_player, getPos _unit];
  3307.             _mark_player setM"+"ark"+"er"+"Type"+"Local 'wa"+"ypo"+"int';
  3308.             _mark_player set"+"Ma"+"rk"+"erPo"+"sLoc"+"al(getPos _unit);
  3309.             _mark_player set"+"Marker"+"Col"+"orLo"+"cal 'Co"+"lorB"+"lue';
  3310.             _mark_player setM"+"ark"+"erT"+"ext"+"Loc"+"al format['%1 - %2', _namePlayer, round(player di"+"st"+"ance _unit)];
  3311.             };
  3312.             };
  3313.             sleep 0.5;
  3314.             };
  3315.             for '_i' from 0 to 500 do {
  3316.             de"+"l"+"ete"+"Ma"+"rkerLo"+"cal('jam_plr' + (str _i));
  3317.             };
  3318.             ")] call jam_fini_fnc_compile;
  3319.         };
  3320.     };
  3321.  
  3322.     jam_hostileAIEsp =
  3323.     {
  3324.         if (isNil 'jamhostileAIESPTggle') then {jamhostileAIESPTggle = 1};
  3325.         if (jamhostileAIESPTggle == 1) then {
  3326.             jamhostileAIESPTggle = 0;
  3327.             titleText ["<t color='#42D6FC'>ENEMY AI ESP </t><t color='#FFFFFF'>[ON]</t>", "PLAIN DOWN", -1, true, true];
  3328.             playSound "Hint";
  3329.            
  3330.             jamhostileAIEsp = addMissionEventHandler ['Draw3D',{
  3331.                 {
  3332.                     if ((side _x != side player) && ((player distance _x) < 1500)) then {
  3333.                         drawIcon3D["", [1, 0, 0, 1], [visiblePosition _x select 0, visiblePosition _x select 1, 2], 0.1, 0.1, 45, (format["%2 : %1m", round(player distance _x), name _x]), 1, 0.04, "EtelkaNarrowMediumPro"];
  3334.                     } else {
  3335.                         if (((player distance _x) < 1500) && (name _x != name player)) then {
  3336.                             drawIcon3D["", [0, 0.5, 1, 1], [visiblePosition _x select 0, visiblePosition _x select 1, 2], 0.1, 0.1, 45, (format["%2 : %1m", round(player distance _x), name _x]), 1, 0.04, "EtelkaNarrowMediumPro"];
  3337.                         };
  3338.                     };
  3339.                 } forEach call jam_fini_fnc_hostileAI;
  3340.             }];
  3341.            
  3342.         } else {
  3343.             jamhostileAIESPTggle = 1;
  3344.             titleText ["<t color='#42D6FC'>ENEMY AI ESP </t><t color='#FFFFFF'>[OFF]</t>", "PLAIN DOWN", -1, true, true];
  3345.             playSound "Hint";
  3346.             removeMissionEventHandler['Draw3D',jamhostileAIEsp];
  3347.         };
  3348.     };
  3349.  
  3350. comment "ammoSelectMenu";
  3351.  
  3352.     JAM_open_ammoSelectMenu = {
  3353.         removeAllActions player;
  3354.         player addAction ["JAM: <t color='#BDBDBD'>[CANCEL]</t>", {removeAllActions player;}];
  3355.         player addAction ["JAM: <t color='#BDBDBD'>[RETURN]</t>", {removeAllActions player; [] spawn JAM_open_cheatMenu;}];
  3356.         player addAction ["JAM: <t color='#42D6FC'>ChangeAmmo: </t><t color='#ff6600'>Dragon's Breath</t>", {
  3357.             if (!isNil "FEH_missile") then {player removeEventHandler["fired", FEH_missile];};
  3358.             removeAllActions player;
  3359.             player addAction ["<t color='#FF0000'>Extinguish Fire</t>", {
  3360.                 {
  3361.                     if (typeOf _x == "test_EmptyObjectForFireBig") then {
  3362.                         deleteVehicle _x;
  3363.                     };
  3364.                 } forEach nearestObjects [player, ["all"], 35000] - allUnits;
  3365.             }];
  3366.             FEH_missile = player addEventHandler ["fired", {
  3367.                 dragonBullet = nearestObject [_this select 0,_this select 4];
  3368.                 dragonBulletPos = getPosASL dragonBullet;
  3369.                 fireBall = createVehicle ["test_EmptyObjectForFireBig",dragonBulletPos,[],0,"CAN_COLLIDE"];
  3370.                 if (!(cursorTarget == ObjNull)) then {
  3371.                     bigFire = createVehicle ["test_EmptyObjectForFireBig",dragonBulletPos,[],0,"CAN_COLLIDE"];
  3372.                     bigFire attachTo [dragonBullet,[0,0,0]];
  3373.                 };
  3374.                 [] spawn {
  3375.                     _weapdir = player weaponDirection currentWeapon player;
  3376.                     _dist = 11;
  3377.                     fireBall setPosASL [
  3378.                         (dragonBulletPos select 0) + (_weapdir select 0)*_dist,
  3379.                         (dragonBulletPos select 1) + (_weapdir select 1)*_dist,
  3380.                         (dragonBulletPos select 2) + (_weapdir select 2)*_dist
  3381.                     ];
  3382.                     _up = vectorUp dragonBullet;
  3383.                     fireBall setVectorDirAndUp[_weapdir,_up];
  3384.                     fireBall setVelocity velocity dragonBullet;
  3385.                     sleep 3.5;
  3386.                     deleteVehicle fireBall;
  3387.                 };
  3388.                 [] spawn {
  3389.                     sleep 0.1;
  3390.                     detach bigFire;
  3391.                     bigFire attachTo [cursorTarget,[0,0,0]];
  3392.                     sleep 3.5;
  3393.                     deleteVehicle bigFire;
  3394.                 };
  3395.             }];
  3396.             playSound "hint";
  3397.             systemChat "Fire balls Loaded into Magazine xD.";
  3398.             systemChat "JAM: Special ammo will be automatically removed upon death.";
  3399.         }];
  3400.         player addAction ["JAM: <t color='#42D6FC'>ChangeAmmo: </t><t color='#ff6600'>82mm HE Mortar Shells</t>", {
  3401.             if (!isNil "FEH_missile") then {player removeEventHandler["fired", FEH_missile];};
  3402.             FEH_missile = player addEventHandler ["fired", {
  3403.             _bullet = nearestObject [_this select 0,_this select 4];
  3404.             _bulletpos = getPosASL _bullet;
  3405.             _o = "Sh_82mm_AMOS_LG" createVehicle _bulletpos;
  3406.             _weapdir = player weaponDirection currentWeapon player;
  3407.             _dist = 11;
  3408.             _o setPosASL [
  3409.             (_bulletpos select 0) + (_weapdir select 0)*_dist,
  3410.             (_bulletpos select 1) + (_weapdir select 1)*_dist,
  3411.             (_bulletpos select 2) + (_weapdir select 2)*_dist
  3412.             ];
  3413.             _up = vectorUp _bullet;
  3414.             _o setVectorDirAndUp[_weapdir,_up];
  3415.             _o setVelocity velocity _bullet;
  3416.             }];
  3417.             playSound "hint";
  3418.             systemChat "82mm HE Mortar Shells Loaded into Magazine xD.";
  3419.             systemChat "JAM: Special ammo will be automatically removed upon death.";
  3420.         }];
  3421.         player addAction ["JAM: <t color='#42D6FC'>ChangeAmmo: </t><t color='#ff6600'>GBU-12</t>", {
  3422.             if (!isNil "FEH_missile") then {player removeEventHandler["fired", FEH_missile];};
  3423.             FEH_missile = player addEventHandler ["fired", {
  3424.             _bullet = nearestObject [_this select 0,_this select 4];
  3425.             _bulletpos = getPosASL _bullet;
  3426.             _o = "Bo_GBU12_LGB" createVehicle _bulletpos;
  3427.             _weapdir = player weaponDirection currentWeapon player;
  3428.             _dist = 11;
  3429.             _o setPosASL [
  3430.             (_bulletpos select 0) + (_weapdir select 0)*_dist,
  3431.             (_bulletpos select 1) + (_weapdir select 1)*_dist,
  3432.             (_bulletpos select 2) + (_weapdir select 2)*_dist
  3433.             ];
  3434.             _up = vectorUp _bullet;
  3435.             _o setVectorDirAndUp[_weapdir,_up];
  3436.             _o setVelocity velocity _bullet;
  3437.             }];
  3438.             playSound "hint";
  3439.             systemChat "GBU-12 Loaded into Magazine xD.";
  3440.             systemChat "JAM: Special ammo will be automatically removed upon death.";
  3441.         }];
  3442.         player addAction ["JAM: <t color='#42D6FC'>ChangeAmmo: </t><t color='#ff6600'>12.7x108 mm Russian</t>", {
  3443.             if (!isNil "FEH_missile") then {player removeEventHandler["fired", FEH_missile];};
  3444.             FEH_missile = player addEventHandler ["fired", {
  3445.             _bullet = nearestObject [_this select 0,_this select 4];
  3446.             _bulletpos = getPosASL _bullet;
  3447.             _o = "B_127x108_Ball" createVehicle _bulletpos;
  3448.             _weapdir = player weaponDirection currentWeapon player;
  3449.             _dist = 11;
  3450.             _o setPosASL [
  3451.             (_bulletpos select 0) + (_weapdir select 0)*_dist,
  3452.             (_bulletpos select 1) + (_weapdir select 1)*_dist,
  3453.             (_bulletpos select 2) + (_weapdir select 2)*_dist
  3454.             ];
  3455.             _up = vectorUp _bullet;
  3456.             _o setVectorDirAndUp[_weapdir,_up];
  3457.             _o setVelocity velocity _bullet;
  3458.             }];
  3459.             playSound "hint";
  3460.             systemChat "12.7x108mm Russian Loaded.";
  3461.             systemChat "JAM: Special ammo will be automatically removed upon death.";
  3462.         }];
  3463.         player addAction ["JAM: <t color='#42D6FC'>ChangeAmmo: </t><t color='#ff6600'>40 mm APFSDS</t>", {
  3464.             if (!isNil "FEH_missile") then {player removeEventHandler["fired", FEH_missile];};
  3465.             FEH_missile = player addEventHandler ["fired", {
  3466.             _bullet = nearestObject [_this select 0,_this select 4];
  3467.             _bulletpos = getPosASL _bullet;
  3468.             _o = "B_40mm_APFSDS" createVehicle _bulletpos;
  3469.             _weapdir = player weaponDirection currentWeapon player;
  3470.             _dist = 11;
  3471.             _o setPosASL [
  3472.             (_bulletpos select 0) + (_weapdir select 0)*_dist,
  3473.             (_bulletpos select 1) + (_weapdir select 1)*_dist,
  3474.             (_bulletpos select 2) + (_weapdir select 2)*_dist
  3475.             ];
  3476.             _up = vectorUp _bullet;
  3477.             _o setVectorDirAndUp[_weapdir,_up];
  3478.             _o setVelocity velocity _bullet;
  3479.             }];
  3480.             playSound "hint";
  3481.             systemChat "40 mm APFSDS Loaded.";
  3482.             systemChat "JAM: Special ammo will be automatically removed upon death.";
  3483.         }];
  3484.         player addAction ["JAM: <t color='#42D6FC'>ChangeAmmo: </t><t color='#ff6600'>40 mm GPR</t>", {
  3485.             if (!isNil "FEH_missile") then {player removeEventHandler["fired", FEH_missile];};
  3486.             FEH_missile = player addEventHandler ["fired", {
  3487.             _bullet = nearestObject [_this select 0,_this select 4];
  3488.             _bulletpos = getPosASL _bullet;
  3489.             _o = "B_40mm_GPR" createVehicle _bulletpos;
  3490.             _weapdir = player weaponDirection currentWeapon player;
  3491.             _dist = 11;
  3492.             _o setPosASL [
  3493.             (_bulletpos select 0) + (_weapdir select 0)*_dist,
  3494.             (_bulletpos select 1) + (_weapdir select 1)*_dist,
  3495.             (_bulletpos select 2) + (_weapdir select 2)*_dist
  3496.             ];
  3497.             _up = vectorUp _bullet;
  3498.             _o setVectorDirAndUp[_weapdir,_up];
  3499.             _o setVelocity velocity _bullet;
  3500.             }];
  3501.             playSound "hint";
  3502.             systemChat "40 mm GPR Loaded.";
  3503.             systemChat "JAM: Special ammo will be automatically removed upon death.";
  3504.         }];
  3505.         player addAction ["JAM: <t color='#42D6FC'>ChangeAmmo: </t><t color='#FF8080'>Destroyer</t>", {
  3506.             if (!isNil "FEH_missile") then {player removeEventHandler["fired", FEH_missile];};
  3507.             FEH_missile = player addEventHandler ["fired", {cursorTarget setDamage 1;}];
  3508.             playSound "hint";
  3509.             systemChat "Destroyer Loaded.";
  3510.             systemChat "JAM: Special ammo will be automatically removed upon death.";
  3511.         }];
  3512.         player addAction ["JAM: <t color='#42D6FC'>ChangeAmmo: </t><t color='#7CFF7E'>Fixer</t>", {
  3513.             if (!isNil "FEH_missile") then {player removeEventHandler["fired", FEH_missile];};
  3514.             FEH_missile = player addEventHandler ["fired", {cursorTarget setDamage 0; cursorTarget setFuel 1;}];
  3515.             playSound "hint";
  3516.             systemChat "Fixer Loaded.";
  3517.             systemChat "JAM: Special ammo will be automatically removed upon death.";
  3518.         }];
  3519.         player addAction ["JAM: <t color='#42D6FC'>ChangeAmmo: </t><t color='#FF8080'>Deleter</t>", {
  3520.             if (!isNil "FEH_missile") then {player removeEventHandler["fired", FEH_missile];};
  3521.             FEH_missile = player addEventHandler ["fired", {deleteVehicle cursorTarget;}];
  3522.             playSound "hint";
  3523.             systemChat "Deleter Loaded.";
  3524.             systemChat "JAM: Special ammo will be automatically removed upon death.";
  3525.         }];
  3526.         player addAction ["JAM: <t color='#42D6FC'>ChangeAmmo: </t><t color='#7CFF7E'>Default</t>", {
  3527.             player removeAllEventHandlers "Fired";
  3528.             playSound "hint";
  3529.             systemChat "Default Ammo Loaded. Event handlers under [Fired] have been removed.";
  3530.         }];
  3531.     };
  3532.  
  3533. comment "serverMenu OLD";
  3534.  
  3535.     jam_deleteMenu = {
  3536.         removeAllActions player;
  3537.         _dR = 0;
  3538.         player addAction ["JAM: <t color='#BDBDBD'>[CANCEL]</t>", {removeAllActions player;}];
  3539.         player addAction ["JAM: <t color='#BDBDBD'>[RETURN]</t>", {removeAllActions player; [] spawn JAM_open_serverMenu;}];
  3540.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>DM: </t><t color='#82E0AA'>12000m</t>", {_dR = 12000; call jam_deleteRadius;}];
  3541.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>DM: </t><t color='#82E0AA'>6000m</t>", {_dR = 6000; call jam_deleteRadius;}];
  3542.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>DM: </t><t color='#82E0AA'>1280m</t>", {_dR = 1280; call jam_deleteRadius;}];
  3543.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>DM: </t><t color='#82E0AA'>640m</t>", {_dR = 640; call jam_deleteRadius;}];
  3544.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>DM: </t><t color='#82E0AA'>320m</t>", {_dR = 320; call jam_deleteRadius;}];
  3545.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>DM: </t><t color='#82E0AA'>160m</t>", {_dR = 160; call jam_deleteRadius;}];
  3546.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>DM: </t><t color='#82E0AA'>80m</t>", {_dR = 80; call jam_deleteRadius;}];
  3547.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>DM: </t><t color='#82E0AA'>40m</t>", {_dR = 40; call jam_deleteRadius;}];
  3548.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>DM: </t><t color='#82E0AA'>20m</t>", {_dR = 20; call jam_deleteRadius;}];
  3549.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>DM: </t><t color='#82E0AA'>10m</t>", {_dR = 10; call jam_deleteRadius;}];
  3550.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>DM: </t><t color='#82E0AA'>5m</t>", {_dR = 5; call jam_deleteRadius;}];
  3551.     };
  3552.  
  3553.     jam_deleteRadius = {
  3554.         {deleteVehicle _x;} forEach nearestObjects [player, ["all"], _dR];
  3555.         playSound "Hint";
  3556.     };
  3557.  
  3558.     jam_killMenu = {
  3559.         removeAllActions player;
  3560.         _kR = 0;
  3561.         player addAction ["JAM: <t color='#BDBDBD'>[CANCEL]</t>", {removeAllActions player;}];
  3562.         player addAction ["JAM: <t color='#BDBDBD'>[RETURN]</t>", {removeAllActions player; [] spawn JAM_open_serverMenu;}];
  3563.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>KM: </t><t color='#82E0AA'>All</t>", {call jam_killAll}];
  3564.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>KM: </t><t color='#82E0AA'>6000m</t>", {_kR = 6000; call jam_killRadius;}];
  3565.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>KM: </t><t color='#82E0AA'>1280m</t>", {_kR = 1280; call jam_killRadius;}];
  3566.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>KM: </t><t color='#82E0AA'>640m</t>", {_kR = 640; call jam_killRadius;}];
  3567.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>KM: </t><t color='#82E0AA'>320m</t>", {_kR = 320; call jam_killRadius;}];
  3568.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>KM: </t><t color='#82E0AA'>160m</t>", {_kR = 160; call jam_killRadius;}];
  3569.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>KM: </t><t color='#82E0AA'>80m</t>", {_kR = 80; call jam_killRadius;}];
  3570.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>KM: </t><t color='#82E0AA'>40m</t>", {_kR = 40; call jam_killRadius;}];
  3571.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>KM: </t><t color='#82E0AA'>20m</t>", {_kR = 20; call jam_killRadius;}];
  3572.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>KM: </t><t color='#82E0AA'>10m</t>", {_kR = 10; call jam_killRadius;}];
  3573.         player addAction ["JAM: <t color='#42D6FC'>Server: </t><t color='#ff6600'>KM: </t><t color='#82E0AA'>5m</t>", {_kR = 5; call jam_killRadius;}];
  3574.     };
  3575.  
  3576.     jam_killRadius = {
  3577.         { _x setDamage 1; } forEach nearestObjects [player, ["man"], _kR];
  3578.         playSound "Hint";
  3579.     };
  3580.  
  3581.     jam_killAll = {
  3582.         private["i","v","_case","_pos","_vechList","_vechCount"];
  3583.         _vechList = allPlayers;
  3584.         _vechCount = count _vechList;
  3585.         i = 0;
  3586.         for "i" from 0 to _vechCount do
  3587.         {
  3588.             v = _vechList select i;
  3589.             v setDamage 1;
  3590.         };
  3591.         playSound "Hint";
  3592.     };
  3593.  
  3594. comment "----------------------------------------------------------";
  3595. comment "-------------------ASSIGN KEYBINDS------------------------";
  3596. comment "----------------------------------------------------------";
  3597.  
  3598.     _keybinds = [] spawn {
  3599.         waitUntil { !(IsNull (findDisplay 46)) };
  3600.         JAM_fnc_mapTP = {if (!_shift and _alt) then {(vehicle player) setPos _pos;};};
  3601.         JAM_bind_mapTP = ["JAMfncMapTP", "onMapSingleClick", JAM_fnc_MapTP] call BIS_fnc_addStackedEventHandler;
  3602.         JAM_bind_mainMenu = (findDisplay 46) displayaddEventHandler ["KeyDown", "if (_this select 1 == 76)  then {[] spawn JAM_open_mainMenu;}"];
  3603.         JAM_bind_3DTP = (findDisplay 46) displayaddEventHandler ["KeyDown",     "if (_this select 1 == 35)  then {[] spawn JAM_fnc_3DTP;}"];
  3604.         JAM_bind_arsenal = (findDisplay 46) displayaddEventHandler ["KeyDown",  "if (_this select 1 == 210) then {[] spawn JAM_open_arsenalMenu;}"];
  3605.         SystemChat "JAM: Default Key-binds loaded.";
  3606.     };
  3607.    
  3608.     _escMenu = [] spawn {
  3609.         while {true} do
  3610.         {
  3611.             waitUntil { not (isNull (findDisplay 49)) };
  3612.             ((findDisplay 49) displayCtrl 2) ctrlSetText "OPEN JAM V1.5A";
  3613.             ((findDisplay 49) displayCtrl 103) ctrlSetText "Created by J-WoLF";
  3614.             ((findDisplay 49) displayCtrl 2) ctrladdEventHandler ["ButtonClick",
  3615.             {
  3616.                 [] spawn JAM_open_mainMenu;
  3617.             }];
  3618.             waitUntil { (isNull (findDisplay 49)) };
  3619.         };
  3620.     };
  3621.  
  3622. comment "----------------------------------------------------------";
  3623. comment "---------------------LOAD COMPLETE------------------------";
  3624. comment "----------------------------------------------------------";
  3625.  
  3626.     JAM_isLoaded = true;
  3627.     if (JAM_isLoaded) then
  3628.     {
  3629.         ["TaskSucceeded",["","JAM: <t color='#42D6FC'>Initialization Complete.</t>"]] call BIS_fnc_showNotification;
  3630.     };
  3631.  
  3632. comment "----------------------------------------------------------";
  3633.  
  3634. comment "JAM V1.5A: J-WoLF's Admin Menu Version One (Alpha Release)";
  3635.  
  3636. comment "----------------------------------------------------------";
Add Comment
Please, Sign In to add comment