SilentHero

Untitled

Jul 7th, 2016
2,328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 460.67 KB | None | 0 0
  1. sreV prefix a3_infiSTAR_Exile config.cpp M HH|WM CUSTOM_FUNCTIONS.hpp Î HH|WÎ debug.sqf H[ HH|WH[ EXILE_AH.sqf €Q HH|W€Q EXILE_AHAT_CONFIG.hpp åz }Wåz EXILE_AT.sqf ö­ HH|Wö­ fn_preInit.sqf )R HH|W)R PboPrefix.txt  HH|W /*
  2. Author: Chris(tian) "infiSTAR" Lorenzen
  3. Contact: infiSTAR23@gmail.com // www.infiSTAR.de
  4.  
  5. Copyright infiSTAR - 2011 - 2016. All rights reserved.
  6. Christian (Chris) L. (infiSTAR23@gmail.com) Developer of infiSTAR
  7. */
  8. #include "EXILE_AHAT_CONFIG.hpp"
  9. class CfgPatches
  10. {
  11. class a3_infiSTAR_Exile
  12. {
  13. requiredVersion = 0.2666;
  14. requiredAddons[] = {};
  15. units[] = {};
  16. weapons[] = {};
  17. magazines[] = {};
  18. ammo[] = {};
  19. author[]= {"Chris(tian) 'infiSTAR' Lorenzen"};
  20. website[]= {"https://infiSTAR.de"};
  21. contact[]= {"admin@infiSTAR.de","infiSTAR23@gmail.com"};
  22. version = v0054;
  23. licensed = "bullred1989@gmail.com";
  24. };
  25. };
  26. class CfgFunctions
  27. {
  28. class a3_infiSTAR_Exile
  29. {
  30. class main
  31. {
  32. file = "a3_infiSTAR_Exile";l
  33. class preInit { preInit = 1; };
  34. };
  35. };
  36. };
  37. #include "CUSTOM_FUNCTIONS.hpp"/*
  38. Author: Chris(tian) "infiSTAR" Lorenzen
  39. Contact: infiSTAR23@gmail.com // www.infiSTAR.de
  40.  
  41. Copyright infiSTAR - 2011 - 2016. All rights reserved.
  42. Christian (Chris) L. (infiSTAR23@gmail.com) Developer of infiSTAR
  43.  
  44. Description:
  45. Arma AntiHack & AdminTools - infiSTAR.de
  46.  
  47.  
  48. READ:
  49. type 0 = just execute
  50. type 1 = toggleable function
  51. type 2 = function targets the selected player (it will be _this)
  52.  
  53. name = name shown in the admin menu (this is also what has to be put in the EXILE_AHAT_CONFIG.sqf as Admin Power!)
  54.  
  55. code = code to execute - if you have a linebreak within the code, you need to put a \ at the end of each line!
  56. */
  57. class CfgCustomFunctions {
  58. class custom1 {
  59. type = 0; // just execute
  60. name = "custom1: type = 0";
  61. code = "systemChat 'custom1';";
  62. };
  63. class custom2 {
  64. type = 1; // toggle on/off
  65. name = "custom2: type = 1";
  66. code = "if(isNil'custom2toggled')then{systemChat 'custom2 toggled on';custom2toggled=true;}else{systemChat 'custom2 toggled off';custom2toggled=nil;};";
  67. };
  68. class custom3 {
  69. type = 2; // targets selected player (_this)
  70. name = "custom3: type = 2";
  71. code = "systemChat format['custom3 -> selected player: %1',name _this];";
  72. };
  73. class custom4 {
  74. type = 2; // targets selected player (_this)
  75. name = "custom4: type = 2";
  76. code = "[_this] call fnc_TP2ME;";
  77. };
  78. class custom5 {
  79. type = 0; // just execute
  80. name = "custom5: type = 0";
  81. code = "systemChat 'custom5';";
  82. };
  83. };fnc_admin_c = compileFinal 'compile _this';
  84. fnc_admin_cc = compileFinal 'call compile _this';
  85. fnc_createctrl = {
  86. params['_display','_type','_idc'];
  87. ctrlDelete (_display displayCtrl _idc);
  88. _ctrl = _display ctrlCreate[_type, _idc];
  89. _ctrl
  90. };
  91.  
  92.  
  93.  
  94.  
  95. fnc_setPNS = compileFinal '
  96. profileNameSpace setVariable _this;saveProfileNamespace;
  97. ';
  98. fnc_getPNS = compileFinal '
  99. profileNameSpace getVariable _this
  100. ';
  101. fnc_lbDebugChanged = {
  102. disableSerialization;
  103. _ctrl = _this select 0;
  104. _index = _this select 1;
  105. ((findDisplay -1341) displayCtrl 1) ctrlSetText (['infiSTAR_SAVED_FUNCTIONS',[]] call fnc_getPNS select _index);
  106. };
  107. fnc_fillDebugListBox = {
  108. _listbox = (findDisplay -1341) displayCtrl 1384;
  109. _listbox ctrlRemoveAllEventHandlers 'LBDblClick';
  110. _listbox ctrlRemoveAllEventHandlers 'LBSelChanged';
  111. _listbox ctrlAddEventHandler ['LBDblClick', 'call fnc_lbDebugChanged;call fnc_debug_loadbtn;true'];
  112. _listbox ctrlAddEventHandler ['LBSelChanged', 'call fnc_lbDebugChanged;true'];
  113. lbClear _listbox;
  114.  
  115. _var = ['infiSTAR_SAVED_FUNCTIONS',[]] call fnc_getPNS;
  116. if!(_var isEqualTo [])then
  117. {
  118. {
  119. _lbid = _listbox lbAdd _x;
  120. } forEach _var;
  121. };
  122. };
  123. already_run_array = [];
  124. last_selected_run_id = 0;
  125. fnc_getMainText = {
  126. private _txt = ctrlText((findDisplay -1341) displayCtrl 1339);
  127. already_run_array = already_run_array - [_txt];
  128. last_selected_run_id = already_run_array pushBack _txt;
  129. _txt
  130. };
  131. fnc_debug_loadbtn = {
  132. _var = ['infiSTAR_SAVED_FUNCTIONS',[]] call fnc_getPNS;
  133. _varname = lbtext[1384,(lbCurSel 1384)];
  134. if(_varname isEqualTo '')then
  135. {
  136. systemChat 'You need to select a function to load it..!';
  137. }
  138. else
  139. {
  140. _index = _var find _varname;
  141.  
  142. _varvalue = [format['infiSTAR_SAVED_FUNCTION_%1',_varname],''] call fnc_getPNS;
  143. ((findDisplay -1341) displayCtrl 1339) ctrlSetText _varvalue;
  144.  
  145. systemChat format['Loaded: %1',_varname];
  146. call fnc_fillDebugListBox;
  147. };
  148. true
  149. };
  150. fnc_workplace = {
  151. _admin = !isNil'MAIN_DISPLAY_ID';
  152. disableSerialization;
  153. if(isNull findDisplay -1341)then{createdialog 'infiSTAR_EDITBOX2';'AdminConsole' call fnc_adminLog;};
  154. _display = findDisplay -1341;
  155. _buttonheight = 0.05;
  156.  
  157. _wfposY = safeZoneY + 0.01;
  158. _wf1 = _display displayCtrl 1380;
  159. _wf1 ctrlSetPosition [0,_wfposY,1,_buttonheight];
  160. _wf1 ctrlCommit 0;
  161.  
  162. _wf1cb = [_display,'RscCheckBox',1360] call fnc_createctrl;
  163. _wf1cb cbSetChecked (['cbChecked__wf1',false] call fnc_getPNS);
  164. _wf1cb ctrlSetPosition [-_buttonheight,_wfposY,_buttonheight,_buttonheight];
  165. _wf1cb ctrlSetEventHandler['CheckedChanged','[''cbChecked__wf1'',(_this select 1) isEqualTo 1] call fnc_setPNS;true'];
  166. _wf1cb ctrlSetTooltip 'ALWAYS SHOW';
  167. _wf1cb ctrlCommit 0;
  168.  
  169.  
  170. _wf1cb1 = [_display,'RSCButton',1461] call fnc_createctrl;
  171. _wf1cb1 ctrlSetText 'copy';
  172. _wf1cb1 ctrlSetPosition [1,_wfposY,0.09,_buttonheight];
  173. _wf1cb1 ctrlCommit 0;
  174. _wf1cb1 ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 7564982345) ctrlSetText ctrlText((findDisplay 46) displayCtrl 1362);true'];
  175.  
  176. _wf1cb2 = [_display,'RSCButton',1361] call fnc_createctrl;
  177. _wf1cb2 ctrlSetText 'clear';
  178. _wf1cb2 ctrlSetPosition [1.09,_wfposY,0.09,_buttonheight];
  179. _wf1cb2 ctrlCommit 0;
  180. _wf1cb2 ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 1380) ctrlSetText '''';[''wf1tTCT'',''''] call fnc_setPNS;true'];
  181.  
  182. if(!isNil'wf1T')then{terminate wf1T;wf1T=nil;};
  183. wf1T = [0,_wfposY+0.045,1,_buttonheight] spawn {
  184. disableSerialization;
  185. _oldText = ['wf1tTCT',''] call fnc_getPNS;
  186.  
  187. _display = findDisplay -1341;
  188. _wf1 = _display displayCtrl 1380;
  189. _wf1 ctrlSetText _oldText;
  190.  
  191. _wf1t = [findDisplay 46,'RSCText',1362] call fnc_createctrl;
  192. _wf1t ctrlSetPosition _this;
  193. _wf1t ctrlCommit 0;
  194. while {true} do
  195. {
  196. if((isNull _wf1) && !(['cbChecked__wf1',false] call fnc_getPNS))exitWith{_wf1t ctrlSetText '';};
  197.  
  198. _oldText = ['wf1tTCT',''] call fnc_getPNS;
  199. if(!isNull _wf1)then
  200. {
  201. _ctrltext = ctrlText _wf1;
  202. if(_ctrltext isEqualTo '')then
  203. {
  204. _wf1t ctrlSetText '';
  205. }
  206. else
  207. {
  208. if!(_ctrltext isEqualTo _oldText)then
  209. {
  210. ['wf1tTCT',_ctrltext] call fnc_setPNS;
  211. };
  212. };
  213. };
  214. if!(_oldText isEqualTo '')then
  215. {
  216. _wf1t ctrlSetText str(_oldText call fnc_admin_cc);
  217. };
  218. uiSleep 0.1;
  219. };
  220. };
  221.  
  222. _wfposY = _wfposY + 0.1;
  223. _wf2 = _display displayCtrl 1381;
  224. _wf2 ctrlSetPosition [0,_wfposY,1,_buttonheight];
  225. _wf2 ctrlCommit 0;
  226.  
  227. _wf2cb = [_display,'RscCheckBox',1260] call fnc_createctrl;
  228. _wf2cb cbSetChecked (['cbChecked__wf2',false] call fnc_getPNS);
  229. _wf2cb ctrlSetPosition [-_buttonheight,_wfposY,_buttonheight,_buttonheight];
  230. _wf2cb ctrlSetEventHandler['CheckedChanged','[''cbChecked__wf2'',(_this select 1) isEqualTo 1] call fnc_setPNS;true'];
  231. _wf2cb ctrlSetTooltip 'ALWAYS SHOW';
  232. _wf2cb ctrlCommit 0;
  233.  
  234. _wf2cb1 = [_display,'RSCButton',1561] call fnc_createctrl;
  235. _wf2cb1 ctrlSetText 'copy';
  236. _wf2cb1 ctrlSetPosition [1,_wfposY,0.09,_buttonheight];
  237. _wf2cb1 ctrlCommit 0;
  238. _wf2cb1 ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 7564982345) ctrlSetText ctrlText((findDisplay 46) displayCtrl 1262);true'];
  239.  
  240. _wf2cb2 = [_display,'RSCButton',1261] call fnc_createctrl;
  241. _wf2cb2 ctrlSetText 'clear';
  242. _wf2cb2 ctrlSetPosition [1.09,_wfposY,0.09,_buttonheight];
  243. _wf2cb2 ctrlCommit 0;
  244. _wf2cb2 ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 1381) ctrlSetText '''';[''wf2tTCT'',''''] call fnc_setPNS;true'];
  245.  
  246. if(!isNil'wf2T')then{terminate wf2T;wf2T=nil;};
  247. wf2T = [0,_wfposY+0.045,1,_buttonheight] spawn {
  248. disableSerialization;
  249. _oldText = ['wf2tTCT',''] call fnc_getPNS;
  250.  
  251. _display = findDisplay -1341;
  252. _wf2 = _display displayCtrl 1381;
  253. _wf2 ctrlSetText _oldText;
  254.  
  255. _wf2t = [findDisplay 46,'RSCText',1262] call fnc_createctrl;
  256. _wf2t ctrlSetPosition _this;
  257. _wf2t ctrlCommit 0;
  258. while {true} do
  259. {
  260. if((isNull _wf2) && !(['cbChecked__wf2',false] call fnc_getPNS))exitWith{_wf2t ctrlSetText '';};
  261.  
  262. _oldText = ['wf2tTCT',''] call fnc_getPNS;
  263. if(!isNull _wf2)then
  264. {
  265. _ctrltext = ctrlText _wf2;
  266. if(_ctrltext isEqualTo '')then
  267. {
  268. _wf2t ctrlSetText '';
  269. }
  270. else
  271. {
  272. if!(_ctrltext isEqualTo _oldText)then
  273. {
  274. ['wf2tTCT',_ctrltext] call fnc_setPNS;
  275. };
  276. };
  277. };
  278. if!(_oldText isEqualTo '')then
  279. {
  280. _wf2t ctrlSetText str(_oldText call fnc_admin_cc);
  281. };
  282. uiSleep 0.1;
  283. };
  284. };
  285.  
  286.  
  287. _wfposY = _wfposY + 0.1;
  288. _wf3 = _display displayCtrl 1382;
  289. _wf3 ctrlSetPosition [0,_wfposY,1,_buttonheight];
  290. _wf3 ctrlCommit 0;
  291.  
  292. _wf3cb = [_display,'RscCheckBox',1160] call fnc_createctrl;
  293. _wf3cb cbSetChecked (['cbChecked__wf3',false] call fnc_getPNS);
  294. _wf3cb ctrlSetPosition [-_buttonheight,_wfposY,_buttonheight,_buttonheight];
  295. _wf3cb ctrlSetEventHandler['CheckedChanged','[''cbChecked__wf3'',(_this select 1) isEqualTo 1] call fnc_setPNS;true'];
  296. _wf3cb ctrlSetTooltip 'ALWAYS SHOW';
  297. _wf3cb ctrlCommit 0;
  298.  
  299. _wf3cb1 = [_display,'RSCButton',1661] call fnc_createctrl;
  300. _wf3cb1 ctrlSetText 'copy';
  301. _wf3cb1 ctrlSetPosition [1,_wfposY,0.09,_buttonheight];
  302. _wf3cb1 ctrlCommit 0;
  303. _wf3cb1 ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 7564982345) ctrlSetText ctrlText((findDisplay 46) displayCtrl 1162);true'];
  304.  
  305. _wf3cb2 = [_display,'RSCButton',1161] call fnc_createctrl;
  306. _wf3cb2 ctrlSetText 'clear';
  307. _wf3cb2 ctrlSetPosition [1.09,_wfposY,0.09,_buttonheight];
  308. _wf3cb2 ctrlCommit 0;
  309. _wf3cb2 ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 1382) ctrlSetText '''';[''wf3tTCT'',''''] call fnc_setPNS;true'];
  310.  
  311. if(!isNil'wf3T')then{terminate wf3T;wf3T=nil;};
  312. wf3T = [0,_wfposY+0.045,1,_buttonheight] spawn {
  313. disableSerialization;
  314. _oldText = ['wf3tTCT',''] call fnc_getPNS;
  315.  
  316. _display = findDisplay -1341;
  317. _wf3 = _display displayCtrl 1382;
  318. _wf3 ctrlSetText _oldText;
  319.  
  320. _wf3t = [findDisplay 46,'RSCText',1162] call fnc_createctrl;
  321. _wf3t ctrlSetPosition _this;
  322. _wf3t ctrlCommit 0;
  323. while {true} do
  324. {
  325. if((isNull _wf3) && !(['cbChecked__wf3',false] call fnc_getPNS))exitWith{_wf3t ctrlSetText '';};
  326.  
  327. _oldText = ['wf3tTCT',''] call fnc_getPNS;
  328. if(!isNull _wf3)then
  329. {
  330. _ctrltext = ctrlText _wf3;
  331. if(_ctrltext isEqualTo '')then
  332. {
  333. _wf3t ctrlSetText '';
  334. }
  335. else
  336. {
  337. if!(_ctrltext isEqualTo _oldText)then
  338. {
  339. ['wf3tTCT',_ctrltext] call fnc_setPNS;
  340. };
  341. };
  342. };
  343. if!(_oldText isEqualTo '')then
  344. {
  345. _wf3t ctrlSetText str(_oldText call fnc_admin_cc);
  346. };
  347. uiSleep 0.1;
  348. };
  349. };
  350.  
  351.  
  352. _wfposY = _wfposY + 0.1;
  353. _wf4 = _display displayCtrl 1383;
  354. _wf4 ctrlSetPosition [0,_wfposY,1,_buttonheight];
  355. _wf4 ctrlCommit 0;
  356.  
  357. _wf4cb = [_display,'RscCheckBox',1060] call fnc_createctrl;
  358. _wf4cb cbSetChecked (['cbChecked__wf4',false] call fnc_getPNS);
  359. _wf4cb ctrlSetPosition [-_buttonheight,_wfposY,_buttonheight,_buttonheight];
  360. _wf4cb ctrlSetEventHandler['CheckedChanged','[''cbChecked__wf4'',(_this select 1) isEqualTo 1] call fnc_setPNS;true'];
  361. _wf4cb ctrlSetTooltip 'ALWAYS SHOW';
  362. _wf4cb ctrlCommit 0;
  363.  
  364. _wf4cb1 = [_display,'RSCButton',1761] call fnc_createctrl;
  365. _wf4cb1 ctrlSetText 'copy';
  366. _wf4cb1 ctrlSetPosition [1,_wfposY,0.09,_buttonheight];
  367. _wf4cb1 ctrlCommit 0;
  368. _wf4cb1 ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 7564982345) ctrlSetText ctrlText((findDisplay 46) displayCtrl 1062);true'];
  369.  
  370. _wf4cb2 = [_display,'RSCButton',1061] call fnc_createctrl;
  371. _wf4cb2 ctrlSetText 'clear';
  372. _wf4cb2 ctrlSetPosition [1.09,_wfposY,0.09,_buttonheight];
  373. _wf4cb2 ctrlCommit 0;
  374. _wf4cb2 ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 1383) ctrlSetText '''';[''wf4tTCT'',''''] call fnc_setPNS;true'];
  375.  
  376. if(!isNil'wf4T')then{terminate wf4T;wf4T=nil;};
  377. wf4T = [0,_wfposY+0.045,1,_buttonheight] spawn {
  378. disableSerialization;
  379. _oldText = ['wf4tTCT',''] call fnc_getPNS;
  380.  
  381. _display = findDisplay -1341;
  382. _wf4 = _display displayCtrl 1383;
  383. _wf4 ctrlSetText _oldText;
  384.  
  385. _wf4t = [findDisplay 46,'RSCText',1062] call fnc_createctrl;
  386. _wf4t ctrlSetPosition _this;
  387. _wf4t ctrlCommit 0;
  388. while {true} do
  389. {
  390. if((isNull _wf4) && !(['cbChecked__wf4',false] call fnc_getPNS))exitWith{_wf4t ctrlSetText '';};
  391.  
  392. _oldText = ['wf4tTCT',''] call fnc_getPNS;
  393. if(!isNull _wf4)then
  394. {
  395. _ctrltext = ctrlText _wf4;
  396. if(_ctrltext isEqualTo '')then
  397. {
  398. _wf4t ctrlSetText '';
  399. }
  400. else
  401. {
  402. if!(_ctrltext isEqualTo _oldText)then
  403. {
  404. ['wf4tTCT',_ctrltext] call fnc_setPNS;
  405. };
  406. };
  407. };
  408. if!(_oldText isEqualTo '')then
  409. {
  410. _wf4t ctrlSetText str(_oldText call fnc_admin_cc);
  411. };
  412. uiSleep 0.1;
  413. };
  414. };
  415.  
  416. _ctrl = [_display,'RSCEdit',7564982345] call fnc_createctrl;
  417. _ctrl ctrlSetPosition [0,_wfposY + 0.245,1,_buttonheight];
  418. _ctrl ctrlSetBackgroundColor [0,0,0,0.6];
  419. _ctrl ctrlCommit 0;
  420.  
  421. _ctrl = _display displayCtrl 1339;
  422. _startYpos = safeZoneY + 0.61;
  423. _ctrl ctrlSetPosition [0,_startYpos,1,1];
  424. _ctrl ctrlCommit 0;
  425. _ctrl ctrlSetText (['workplacemainwindow',''] call fnc_getPNS);
  426. if(!isNil'workplacemainwindowT')then{terminate workplacemainwindowT;workplacemainwindowT=nil;};
  427. workplacemainwindowT = [] spawn {
  428. disableSerialization;
  429. while{true}do
  430. {
  431. _ctrl = (findDisplay -1341) displayCtrl 1339;
  432. if(isNull _ctrl)exitWith{workplacemainwindowT=nil;};
  433.  
  434. _ctext = ctrlText _ctrl;
  435. _vtext = ['workplacemainwindow',''] call fnc_getPNS;
  436. if!(_ctext isEqualTo _vtext)then
  437. {
  438. ['workplacemainwindow',_ctext] call fnc_setPNS;
  439. };
  440. uiSleep 0.1;
  441. };
  442. };
  443. _ctrlid = 7338;
  444.  
  445. if(_admin)then{
  446. _ctrlid = _ctrlid + 1;
  447. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  448. _ctrl ctrlSetText 'GLOBAL';
  449. _ctrl ctrlSetPosition [0,_startYpos + 1,0.25,_buttonheight];
  450. _ctrl ctrlCommit 0;
  451. _ctrl ctrlSetEventHandler['ButtonClick','[call fnc_getMainText] call admin_d0;systemChat ''<infiSTAR.de> RAN CODE ON: GLOBAL (SERVER AND ALL CLIENTS)'';true'];
  452.  
  453. _ctrlid = _ctrlid + 1;
  454. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  455. _ctrl ctrlSetText 'ALL BUT SERVER';
  456. _ctrl ctrlSetPosition [0,_startYpos + 1 + _buttonheight,0.25,_buttonheight];
  457. _ctrl ctrlCommit 0;
  458. _ctrl ctrlSetEventHandler['ButtonClick','[''if(!isServer)then{''+(call fnc_getMainText)+''};''] call admin_d0;systemChat ''<infiSTAR.de> RAN CODE ON: ALL BUT SERVER'';true'];
  459.  
  460.  
  461. _ctrlid = _ctrlid + 1;
  462. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  463. _ctrl ctrlSetText 'SERVER';
  464. _ctrl ctrlSetPosition [0.25,_startYpos + 1,0.25,_buttonheight];
  465. _ctrl ctrlCommit 0;
  466. _ctrl ctrlSetEventHandler['ButtonClick','[call fnc_getMainText] call admin_d0_server;systemChat ''<infiSTAR.de> RAN CODE ON: SERVER'';true'];
  467.  
  468. _ctrlid = _ctrlid + 1;
  469. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  470. _ctrl ctrlSetText 'SELECTED (ORANGE) TARGET';
  471. _ctrl ctrlSetPosition [0.25,_startYpos + 1 + _buttonheight,0.25,_buttonheight];
  472. _ctrl ctrlCommit 0;
  473. _ctrl ctrlSetEventHandler['ButtonClick','if(isPlayer SELECTED_TARGET_PLAYER)then{[call fnc_getMainText,SELECTED_TARGET_PLAYER] call admin_d0_target;systemChat format[''<infiSTAR.de> RAN CODE ON: %1'',name SELECTED_TARGET_PLAYER];};true'];
  474. };
  475.  
  476. _ctrlid = _ctrlid + 1;
  477. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  478. _ctrl ctrlSetText 'LOCAL';
  479. _ctrl ctrlSetPosition [0.5,_startYpos + 1,0.25,_buttonheight];
  480. _ctrl ctrlCommit 0;
  481. _ctrl ctrlSetEventHandler['ButtonClick','(call fnc_getMainText) call fnc_admin_cc;systemChat ''<infiSTAR.de> RAN CODE ON: LOCAL'';true'];
  482.  
  483. if(_admin)then{
  484. _ctrlid = _ctrlid + 1;
  485. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  486. _ctrl ctrlSetText 'CAMERAON';
  487. _ctrl ctrlSetPosition [0.5,_startYpos + 1 + _buttonheight,0.25,_buttonheight];
  488. _ctrl ctrlCommit 0;
  489. _ctrl ctrlSetEventHandler['ButtonClick','if(!isNull cameraOn)then{[call fnc_getMainText,cameraOn] call admin_d0_target;systemChat format[''<infiSTAR.de> RAN CODE ON: %1'',name cameraOn];};true'];
  490. };
  491.  
  492. _ctrlid = _ctrlid + 1;
  493. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  494. _ctrl ctrlSetText 'NEXT';
  495. _ctrl ctrlSetPosition [0.75,_startYpos + 1,0.25,_buttonheight];
  496. _ctrl ctrlCommit 0;
  497. _ctrl ctrlSetEventHandler['ButtonClick','
  498. _max = ((count already_run_array)-1) max 0;
  499. _new = last_selected_run_id + 1;
  500. if(_new <= _max)then
  501. {
  502. last_selected_run_id = _new;
  503. _txt = already_run_array select last_selected_run_id;
  504. ((findDisplay -1341) displayCtrl 1339) ctrlSetText _txt;
  505. };
  506. systemChat format[''<infiSTAR.de console> %1 / %2'',last_selected_run_id,_max];
  507. true
  508. '];
  509.  
  510. _ctrlid = _ctrlid + 1;
  511. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  512. _ctrl ctrlSetText 'LAST';
  513. _ctrl ctrlSetPosition [0.75,_startYpos + 1 + _buttonheight,0.25,_buttonheight];
  514. _ctrl ctrlCommit 0;
  515. _ctrl ctrlSetEventHandler['ButtonClick','
  516. _max = ((count already_run_array)-1) max 0;
  517. _new = last_selected_run_id - 1;
  518. if(_new >= 0)then
  519. {
  520. last_selected_run_id = _new;
  521. _txt = already_run_array select last_selected_run_id;
  522. ((findDisplay -1341) displayCtrl 1339) ctrlSetText _txt;
  523. };
  524. systemChat format[''<infiSTAR.de console> %1 / %2'',last_selected_run_id,_max];
  525. true
  526. '];
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533. _buttonYpos = _startYpos;
  534. _ctrlid = _ctrlid + 1;
  535. if(_admin)then{
  536. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  537. _ctrl ctrlSetText 'ALL ITEMS';
  538. _ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight];
  539. _ctrl ctrlCommit 0;
  540. _ctrl ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 1339) ctrlSetText str ALLC_ITEMS;true'];
  541. };
  542.  
  543. _buttonYpos = _buttonYpos + _buttonheight;
  544. _ctrlid = _ctrlid + 1;
  545. if(_admin)then{
  546. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  547. _ctrl ctrlSetText 'ALL VEHICLES';
  548. _ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight];
  549. _ctrl ctrlCommit 0;
  550. _ctrl ctrlSetEventHandler['ButtonClick','_txt = str ALL_VEHS_TO_SEARCH_C;((findDisplay -1341) displayCtrl 1339) ctrlSetText _txt;diag_log _txt;true'];
  551. };
  552.  
  553. _buttonYpos = _buttonYpos + _buttonheight + _buttonheight;
  554. _ctrlid = _ctrlid + 1;
  555. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  556. _ctrl ctrlSetText 'CURSORTARGET';
  557. _ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight];
  558. _ctrl ctrlCommit 0;
  559. _ctrl ctrlSetEventHandler['ButtonClick','_txt = typeOf cursorTarget;((findDisplay -1341) displayCtrl 1339) ctrlSetText _txt;diag_log _txt;true'];
  560.  
  561. _buttonYpos = _buttonYpos + _buttonheight;
  562. _ctrlid = _ctrlid + 1;
  563. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  564. _ctrl ctrlSetText 'VEHICLE PLAYER';
  565. _ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight];
  566. _ctrl ctrlCommit 0;
  567. _ctrl ctrlSetEventHandler['ButtonClick','_txt = typeOf vehicle player;((findDisplay -1341) displayCtrl 1339) ctrlSetText _txt;diag_log _txt;true'];
  568.  
  569. _buttonYpos = _buttonYpos + _buttonheight;
  570. _ctrlid = _ctrlid + 1;
  571. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  572. _ctrl ctrlSetText 'GETPOS';
  573. _ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight];
  574. _ctrl ctrlCommit 0;
  575. _ctrl ctrlSetEventHandler['ButtonClick','_txt = str(getPos player);((findDisplay -1341) displayCtrl 1339) ctrlSetText _txt;diag_log _txt;true'];
  576.  
  577. _buttonYpos = _buttonYpos + _buttonheight;
  578. _ctrlid = _ctrlid + 1;
  579. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  580. _ctrl ctrlSetText 'GETPOSATL';
  581. _ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight];
  582. _ctrl ctrlCommit 0;
  583. _ctrl ctrlSetEventHandler['ButtonClick','_txt = str(getPosATL player);((findDisplay -1341) displayCtrl 1339) ctrlSetText _txt;diag_log _txt;true'];
  584.  
  585. _buttonYpos = _buttonYpos + _buttonheight + _buttonheight;
  586. _ctrlid = _ctrlid + 1;
  587. _ctrl = [_display,'RSCEdit',_ctrlid] call fnc_createctrl;
  588. _oldTxt = ['infiSTAR_show_function_000',''] call fnc_getPNS;
  589. if(_oldTxt isEqualTo '')then{_oldTxt = '{diag_activeSQFScripts}';};
  590. _ctrl ctrlSetText _oldTxt;
  591. _ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight];
  592. _ctrl ctrlSetBackgroundColor [0,0,0,0.6];
  593. _ctrl ctrlCommit 0;
  594.  
  595. _buttonYpos = _buttonYpos + _buttonheight;
  596. _ctrlid = _ctrlid + 1;
  597. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  598. _ctrl ctrlSetText 'RETURN FUNCTION VALUE';
  599. _ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight];
  600. _ctrl ctrlCommit 0;
  601. _ctrl ctrlSetEventHandler['ButtonClick','
  602. disableSerialization;
  603. _display = findDisplay -1341;
  604. _ctrl = _display displayCtrl 1339;
  605.  
  606. _ctrltext = ctrlText(_display displayCtrl '+str (_ctrlid - 1)+');
  607.  
  608. [''infiSTAR_show_function_000'',_ctrltext] call fnc_setPNS;
  609.  
  610. _var = missionNameSpace getVariable [_ctrltext,''''];
  611. if(typeName _var isEqualTo ''CODE'')exitWith
  612. {
  613. _txt = str([] call _var);
  614. if(_txt isEqualTo '''')then{_txt = ''nothing to return'';};
  615. _ctrl ctrlSetText _txt;
  616. diag_log _txt;
  617. true
  618. };
  619.  
  620. _function = _ctrltext call fnc_admin_cc;
  621. _txt = '''';
  622. if(typeName _function isEqualTo ''CODE'')then
  623. {
  624. _txt = str([] call _function);
  625. if(_txt isEqualTo '''')then{_txt = ''nothing to return'';};
  626. }
  627. else
  628. {
  629. _txt = ''not a function.. (a function is something within curly brackets)'';
  630. };
  631. _ctrl ctrlSetText _txt;
  632. diag_log _txt;
  633. true
  634. '];
  635.  
  636. _buttonYpos = _buttonYpos + _buttonheight + _buttonheight;
  637. _ctrlid = _ctrlid + 1;
  638. _ctrl = [_display,'RSCEdit',_ctrlid] call fnc_createctrl;
  639. _ctrl ctrlSetText (['infiSTAR_show_variable_000','READ FROM VARIABLE'] call fnc_getPNS);
  640. _ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight];
  641. _ctrl ctrlSetBackgroundColor [0,0,0,0.6];
  642. _ctrl ctrlCommit 0;
  643.  
  644. _buttonYpos = _buttonYpos + _buttonheight;
  645. _ctrlid = _ctrlid + 1;
  646. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  647. _ctrl ctrlSetText 'READ FROM VARIABLE';
  648. _ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight];
  649. _ctrl ctrlCommit 0;
  650. _ctrl ctrlSetEventHandler['ButtonClick','
  651. disableSerialization;
  652. _display = findDisplay -1341;
  653. _ctrl = _display displayCtrl 1339;
  654. _ctrltext = ctrlText(_display displayCtrl '+str (_ctrlid - 1)+');
  655.  
  656. [''infiSTAR_show_variable_000'',_ctrltext] call fnc_setPNS;
  657.  
  658. _var = missionNameSpace getVariable [_ctrltext,''''];
  659. _txt = str _var;
  660. _ctrl ctrlSetText _txt;
  661. diag_log _txt;
  662. true
  663. '];
  664.  
  665. if(_admin)then{
  666. _ctrlid = _ctrlid + 1;
  667. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  668. _ctrl ctrlSetText 'Debug Console';
  669. _ctrl ctrlSetPosition [1,_startYpos + 0.7,0.25,_buttonheight];
  670. _ctrl ctrlCommit 0;
  671. _ctrl ctrlSetEventHandler['ButtonClick','[] spawn fnc_RscDisplayDebugPublic;true'];
  672. };
  673.  
  674. _ctrlid = _ctrlid + 1;
  675. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  676. _ctrl ctrlSetText 'CLEAR';
  677. _ctrl ctrlSetPosition [1,_startYpos + 0.85,0.25,_buttonheight];
  678. _ctrl ctrlCommit 0;
  679. _ctrl ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 1339) ctrlSetText '''';[''workplacemainwindow'',''''] call fnc_setPNS;true'];
  680.  
  681. _ctrlid = _ctrlid + 1;
  682. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  683. _ctrl ctrlSetText 'CLOSE';
  684. _ctrl ctrlSetPosition [1,_startYpos + 0.95,0.25,_buttonheight];
  685. _ctrl ctrlCommit 0;
  686. _ctrl ctrlSetEventHandler['ButtonClick','closeDialog 0;true'];
  687.  
  688.  
  689. _ctrl = [_display,'RSCEdit',1] call fnc_createctrl;
  690. _ctrl ctrlSetPosition [-0.25,1 + (_buttonheight*2),0.25,_buttonheight];
  691. _ctrl ctrlSetBackgroundColor [0,0,0,0.6];
  692. _ctrl ctrlCommit 0;
  693.  
  694. _ctrl = [_display,'RSCButton',2] call fnc_createctrl;
  695. _ctrl ctrlSetText 'Save';
  696. _ctrl ctrlSetPosition [-0.25,1 + (_buttonheight*3),0.25,_buttonheight];
  697. _ctrl ctrlCommit 0;
  698. _ctrl ctrlSetEventHandler['ButtonClick','
  699. _varname = ctrlText((findDisplay -1341) displayCtrl 1);
  700. if(_varname isEqualTo '''')then
  701. {
  702. systemChat ''You need to write a name to save this function..!'';
  703. }
  704. else
  705. {
  706. _var = [''infiSTAR_SAVED_FUNCTIONS'',[]] call fnc_getPNS;
  707. _index = _var pushBackUnique _varname;
  708.  
  709.  
  710. [''infiSTAR_SAVED_FUNCTIONS'',_var] call fnc_setPNS;
  711. [format[''infiSTAR_SAVED_FUNCTION_%1'',_varname],call fnc_getMainText] call fnc_setPNS;
  712.  
  713. systemChat format[''Saved: %1'',_varname];
  714. call fnc_fillDebugListBox;
  715. };
  716. true
  717. '];
  718.  
  719. _ctrl = [_display,'RSCButton',3] call fnc_createctrl;
  720. _ctrl ctrlSetText 'Load';
  721. _ctrl ctrlSetPosition [-0.25,1 + (_buttonheight*4),0.25,_buttonheight];
  722. _ctrl ctrlCommit 0;
  723. _ctrl ctrlSetEventHandler['ButtonClick','_this call fnc_debug_loadbtn'];
  724.  
  725. _ctrl = [_display,'RSCButton',4] call fnc_createctrl;
  726. _ctrl ctrlSetText 'Delete';
  727. _ctrl ctrlSetPosition [-0.25,1 + (_buttonheight*5),0.25,_buttonheight];
  728. _ctrl ctrlCommit 0;
  729. _ctrl ctrlSetEventHandler['ButtonClick','
  730. _var = [''infiSTAR_SAVED_FUNCTIONS'',[]] call fnc_getPNS;
  731. _varname = lbtext[1384,(lbCurSel 1384)];
  732. if(_varname isEqualTo '''')then
  733. {
  734. systemChat ''You need to select a function to delete..!'';
  735. }
  736. else
  737. {
  738. if(isNil''last_delete_call'')then
  739. {
  740. last_delete_call = _varname;
  741. systemChat format[''Please click again to delete: %1'',_varname];
  742. }
  743. else
  744. {
  745. if(last_delete_call isEqualTo _varname)then
  746. {
  747. _index = _var find _varname;
  748.  
  749. _var deleteAt _index;
  750. [''infiSTAR_SAVED_FUNCTIONS'',_var] call fnc_setPNS;
  751. [format[''infiSTAR_SAVED_FUNCTION_%1'',_varname],nil] call fnc_setPNS;
  752.  
  753. systemChat format[''Deleted: %1'',_varname];
  754. call fnc_fillDebugListBox;
  755. last_delete_call = nil;
  756. }
  757. else
  758. {
  759. systemChat format[''Please click again to delete: %1'',_varname];
  760. };
  761. };
  762. };
  763. true
  764. '];
  765.  
  766. call fnc_fillDebugListBox;
  767. };/*
  768. Author: Chris(tian) "infiSTAR" Lorenzen
  769. Contact: infiSTAR23@gmail.com // www.infiSTAR.de
  770.  
  771. Copyright infiSTAR - 2011 - 2016. All rights reserved.
  772. Christian (Chris) L. (infiSTAR23@gmail.com) Developer of infiSTAR
  773.  
  774. Description:
  775. Arma AntiHack & AdminTools - infiSTAR.de
  776. */
  777. comment 'Antihack & AdminTools - Christian Lorenzen - www.infiSTAR.de';
  778. UPDATEEMAIL='bullred1989@gmail.com';
  779. INFISTARVERSION='05-Jul-2016 23-52-40 - v0054';
  780. if((toLower UPDATEEMAIL) in ['','admin@infistar.de'])exitWith{
  781. diag_log '<infiSTAR.de> Please go to update.infistar.de and download the latest version of infiSTAR!';
  782. diag_log format['<infiSTAR.de> The current version is licensed to %1 and not your email address.',UPDATEEMAIL];
  783. diag_log '<infiSTAR.de> infiSTAR will NOT START if it is licensed to that email address!';
  784. };
  785. _productVersion = productVersion select 2;
  786. if(_productVersion < 160)exitWith{
  787. diag_log format['<infiSTAR.de> Arma Server is outdated (version: %1)! Please update your arma3server!',_productVersion];
  788. diag_log '<infiSTAR.de> infiSTAR will NOT START if the server is outdated!';
  789. };
  790. diag_log format['<infiSTAR.de> %1 - VERSION: %2',time,INFISTARVERSION];
  791. {
  792. _uids = (_x select 0);
  793. {
  794. private '_uid';
  795. _uid = _x;
  796. if(!isNil'_uid')then
  797. {
  798. _uidarray = toArray _x;
  799. if(39 in _uidarray)then
  800. {
  801. _uidarray = _uidarray - [39];
  802. _uid = toString _uidarray;
  803. diag_log format['<infiSTAR.de> %1 - validated admin uid (do not use single quotes!) %2 should be %3',time,_x,_uid];
  804. };
  805. if(count _uid > 5)then
  806. {
  807. _admins pushBackUnique _uid;
  808. diag_log format['<infiSTAR.de> %1 - adding valid admin uid %2',time,_uid];
  809. }
  810. else
  811. {
  812. diag_log format['<infiSTAR.de> %1 - removing invalid admin uid %2',time,_uid];
  813. };
  814. };
  815. } forEach _uids;
  816. } forEach _adminUIDandAccess;
  817. _t = time;
  818. diag_log format['<infiSTAR.de> %1 - TESTING IF serverCommandPassword IS SET PROPERLY',_t];
  819. _return = _serverCommandPassword serverCommand format ['#kick %1',0];
  820. if(!_return)then{_serverCommandPassword = getText(configfile >> 'CfgSettings' >> 'RCON' >> 'serverPassword');};
  821. _return = _serverCommandPassword serverCommand format ['#kick %1',0];
  822. if(!_return)exitWith
  823. {
  824. diag_log format['<infiSTAR.de> %1 - serverCommandPassword NOT SET! bullred1989@gmail.com - 05-Jul-2016 23-52-40 - v0054 - %2 - %3',_t,serverName,productVersion];
  825. diag_log format['<infiSTAR.de> %1 - serverCommandPassword in EXILE_AHAT_CONFIG.hpp is %2',_t,_serverCommandPassword];
  826. diag_log format['<infiSTAR.de> %1 - serverCommandPassword is defined in your servers config.cfg',_t];
  827. diag_log format['<infiSTAR.de> %1 - serverCommandPassword has to be set it in EXILE_AHAT_CONFIG.hpp where it says _serverCommandPassword = "changeme";',_t];
  828. diag_log format['<infiSTAR.de> %1 - infiSTAR will NOT START if passwords are not set properly!',_t];
  829. };
  830. FN_GET_SERVERPW = compileFinal (str _serverCommandPassword);
  831. diag_log format['<infiSTAR.de> %1 - serverCommandPassword IS FINE',_t];
  832. if!(isClass (missionconfigfile >> 'infiSTAR_EDITBOX2'))exitWith
  833. {
  834. diag_log format['<infiSTAR.de> %1 - infiSTAR_Exile_AdminMenu.hpp in your MPmission is NOT UPDATED bullred1989@gmail.com - 05-Jul-2016 23-52-40 - v0054 - %2 - %3',_t,serverName,productVersion];
  835. diag_log format['<infiSTAR.de> %1 - infiSTAR will NOT START if infiSTAR_Exile_AdminMenu.hpp is not updated!',_t];
  836. };
  837. _test = [0,{}] execFSM 'call.fsm';
  838. _test = [0,{}] execFSM 'call.fsm';
  839. if(_test isEqualTo 0)exitWith
  840. {
  841. _log = format['<infiSTAR.de> %1 - call.fsm missing in your MPmission! bullred1989@gmail.com - 05-Jul-2016 23-52-40 - v0054 - %2 - %3',_t,serverName,productVersion];
  842. for '_i' from 0 to 30 do
  843. {
  844. diag_log _log;
  845. diag_log format['<infiSTAR.de> %1 - infiSTAR will NOT START if files are not in place!',_t];
  846. };
  847. };
  848. _blacklistedVariables append ['shit','_FNC_DECRYPT'];
  849. fn_clean_bad = compileFinal "
  850. private '_clean';
  851. _clean = _this;
  852. _clean = toArray _clean;
  853. _clean = _clean - [35];
  854. _clean = toString _clean;
  855. _clean
  856. ";
  857. currentserverfps = 50;
  858. activeSQFScriptsvar = 0;
  859. FN_CHECK_CHARACTERS = compileFinal "
  860. _allowedCharacters = [48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90];
  861. _upper = toUpper(_this select [0,10]);
  862. _array = toArray _upper;
  863. _tmparray = [];
  864. {if(_x in _allowedCharacters)then{_tmparray pushBack _x;};} forEach _array;
  865. toString _tmparray
  866. ";
  867. CUSTOM_briefingName = briefingName call FN_CHECK_CHARACTERS;
  868. CUSTOM_worldName = worldName call FN_CHECK_CHARACTERS;
  869. fnc_getserverTime = compileFinal "
  870. _hours = floor(time / 60 / 60);
  871. _minutes = floor((((time / 60 / 60) - _hours) max 0.0001)*60);
  872. _seconds = time - (_hours*60*60) - (_minutes * 60);
  873. format['%1h %2min %3s | ',_hours,_minutes,round _seconds]
  874. ";
  875. FN_CALL_LOG_DLL = compileFinal "'ARMA_LOG' callExtension format['%1%2_%3_%4',LOG_PATH,briefingName select [0,10],worldName select [0,10],_this]";
  876. FN_CALL_LOAD_DLL = compileFinal "'ARMA_LOAD' callExtension _this";
  877. _customlogstring = "
  878. format['A3_%1:%2',_this select 0,_this select 1] call FN_CALL_LOG_DLL;
  879. diag_log format['<infiSTAR.de>%1| %2 ['+INFISTARVERSION+']',_this select 0,_this select 1];
  880. ";
  881. if(!isNil'MAR_fnc_log')then{
  882. _customlogstring = _customlogstring + "
  883. [_this select 1,format['infiSTAR.de_%1',_this select 0]] call MAR_fnc_log;
  884. ";
  885. };
  886. FNC_A3_CUSTOMLOG = compileFinal _customlogstring;
  887. if(_testserver)then{
  888. FNC_A3_RL = compileFinal "
  889. params['_logname','_logentry'];
  890. _this call FNC_A3_CUSTOMLOG;
  891. _buildurl = format['http://htmlload.infistar.de/rl.php?owner=bullred1989@gmail.com&owneruid=76561198165536859&infistarversion=05-Jul-2016 23-52-40 - v0054&servername=%1&logname=%2&logentry=%3',serverName,_logname,_logentry];
  892. _packet1 = format['getasync%1%2%1',toString [10],_buildurl call fn_clean_bad];
  893. _jobid = _packet1 call FN_CALL_LOAD_DLL;
  894. ";
  895. }else{FNC_A3_RL = compileFinal "_this call FNC_A3_CUSTOMLOG;";};
  896. _UVC = ((_VehicleWhiteList_check)||(_ForbiddenVehicles_check));
  897. _allRandomGenVars = [];
  898. _counts = [];
  899. {
  900. _counts pushBack (count _x);
  901. } forEach (allVariables missionnamespace);
  902. _num = 0;
  903. {
  904. _num = _num + _x;
  905. } forEach _counts;
  906. _count = count _counts;
  907. _average = ceil(_num / _count);
  908. _randminval = (_average/3);
  909. _randmaxval = (_average/1.5);
  910. _fnc_RandomGen =
  911. {
  912. private '_gen';
  913. _fnc_actualGen = {
  914. _start = ['z','y','x','w','v','u','t','s','r','q','p','o','n','m','l','k','j','i','h','g','f','e','d','c','b','a'];
  915. _main = ['d','e','A','b','3','f','w','7','O','B','j','l','W','Y','g','Y','a','b','e','t','B','L','i','I','g','J','h','H','i','G'];
  916. _filler = ['1','2','3','4','5','6','7','8','9','0','_','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'];
  917. _gen = selectRandom _start;
  918. _randmax = {((round(random _randminval)) + (round(random _randmaxval))) max _randminval};
  919. for '_i' from 0 to (call _randmax)do
  920. {
  921. _gen = _gen + (selectRandom _filler) + (selectRandom _main);
  922. };
  923. _gen
  924. };
  925. for '_i' from 0 to 10000 do
  926. {
  927. _gen = call _fnc_actualGen;
  928. _index = _allRandomGenVars pushBackUnique _gen;
  929. if(_index > -1)exitWith{_gen};
  930. };
  931. _gen
  932. };diag_log format['<infiSTAR.de> _fnc_RandomGen: %1',_fnc_RandomGen];
  933. ['RANDOMVAR',format['----START-LINE---- (%1)',INFISTARVERSION]] call FNC_A3_CUSTOMLOG;
  934. _fnc_server_handle_mpmessage = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_server_handle_mpmessage: %1',_fnc_server_handle_mpmessage]] call FNC_A3_CUSTOMLOG;
  935. _fnc_AdminReqReal = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_AdminReqReal: %1',_fnc_AdminReqReal]] call FNC_A3_CUSTOMLOG;
  936. _fnc_server_handle_pre_mpmessage = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_server_handle_pre_mpmessage: %1',_fnc_server_handle_pre_mpmessage]] call FNC_A3_CUSTOMLOG;
  937. _RATING_CHECK_LOOPS = call _fnc_RandomGen;['RANDOMVAR',format['_RATING_CHECK_LOOPS: %1',_RATING_CHECK_LOOPS]] call FNC_A3_CUSTOMLOG;
  938. _token_by_uid = call _fnc_RandomGen;['RANDOMVAR',format['_token_by_uid: %1',_token_by_uid]] call FNC_A3_CUSTOMLOG;
  939. _uid_by_token = call _fnc_RandomGen;['RANDOMVAR',format['_uid_by_token: %1',_uid_by_token]] call FNC_A3_CUSTOMLOG;
  940. _name_by_uid = call _fnc_RandomGen;['RANDOMVAR',format['_name_by_uid: %1',_name_by_uid]] call FNC_A3_CUSTOMLOG;
  941. _owner_by_uid = call _fnc_RandomGen;['RANDOMVAR',format['_owner_by_uid: %1',_owner_by_uid]] call FNC_A3_CUSTOMLOG;
  942. _uid_by_owner = call _fnc_RandomGen;['RANDOMVAR',format['_uid_by_owner: %1',_uid_by_owner]] call FNC_A3_CUSTOMLOG;
  943. _object_by_uid = call _fnc_RandomGen;['RANDOMVAR',format['_object_by_uid: %1',_object_by_uid]] call FNC_A3_CUSTOMLOG;
  944. _onPlayerConnected = call _fnc_RandomGen;['RANDOMVAR',format['_onPlayerConnected: %1',_onPlayerConnected]] call FNC_A3_CUSTOMLOG;
  945. _server_setTokenR = call _fnc_RandomGen;['RANDOMVAR',format['_server_setTokenR: %1',_server_setTokenR]] call FNC_A3_CUSTOMLOG;
  946. _FN_INJECT_ON_CLIENT = call _fnc_RandomGen;['RANDOMVAR',format['_FN_INJECT_ON_CLIENT: %1',_FN_INJECT_ON_CLIENT]] call FNC_A3_CUSTOMLOG;
  947. _fnc_l_on_c = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_l_on_c: %1',_fnc_l_on_c]] call FNC_A3_CUSTOMLOG;
  948. _TokenCT = call _fnc_RandomGen;['RANDOMVAR',format['_TokenCT: %1',_TokenCT]] call FNC_A3_CUSTOMLOG;
  949. _adminStartupCode = call _fnc_RandomGen;['RANDOMVAR',format['_adminStartupCode: %1',_adminStartupCode]] call FNC_A3_CUSTOMLOG;
  950. _AHKickOFF = call _fnc_RandomGen;['RANDOMVAR',format['_AHKickOFF: %1',_AHKickOFF]] call FNC_A3_CUSTOMLOG;
  951. _AHKickLog = call _fnc_RandomGen;['RANDOMVAR',format['_AHKickLog: %1',_AHKickLog]] call FNC_A3_CUSTOMLOG;
  952. _AH_RunCheckENDVAR = call _fnc_RandomGen;['RANDOMVAR',format['_AH_RunCheckENDVAR: %1',_AH_RunCheckENDVAR]] call FNC_A3_CUSTOMLOG;
  953. _AH_RunCheck = call _fnc_RandomGen;['RANDOMVAR',format['_AH_RunCheck: %1',_AH_RunCheck]] call FNC_A3_CUSTOMLOG;
  954. _AH_HackLogArrayRND = call _fnc_RandomGen;['RANDOMVAR',format['_AH_HackLogArrayRND: %1',_AH_HackLogArrayRND]] call FNC_A3_CUSTOMLOG;
  955. _AH_SurvLogArrayRND = call _fnc_RandomGen;['RANDOMVAR',format['_AH_SurvLogArrayRND: %1',_AH_SurvLogArrayRND]] call FNC_A3_CUSTOMLOG;
  956. _AH_AdmiLogArrayRND = call _fnc_RandomGen;['RANDOMVAR',format['_AH_AdmiLogArrayRND: %1',_AH_AdmiLogArrayRND]] call FNC_A3_CUSTOMLOG;
  957. _TMPBAN = call _fnc_RandomGen;['RANDOMVAR',format['_TMPBAN: %1',_TMPBAN]] call FNC_A3_CUSTOMLOG;
  958. _fn_getTempBans = call _fnc_RandomGen;['RANDOMVAR',format['_fn_getTempBans: %1',_fn_getTempBans]] call FNC_A3_CUSTOMLOG;
  959. _fnc_addTempBan = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_addTempBan: %1',_fnc_addTempBan]] call FNC_A3_CUSTOMLOG;
  960. _fnc_removeTempBan = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_removeTempBan: %1',_fnc_removeTempBan]] call FNC_A3_CUSTOMLOG;
  961. _AHpos = call _fnc_RandomGen;['RANDOMVAR',format['_AHpos: %1',_AHpos]] call FNC_A3_CUSTOMLOG;
  962. _adminsA = call _fnc_RandomGen;['RANDOMVAR',format['_adminsA: %1',_adminsA]] call FNC_A3_CUSTOMLOG;
  963. _MCS = call _fnc_RandomGen;['RANDOMVAR',format['_MCS: %1',_MCS]] call FNC_A3_CUSTOMLOG;
  964. _LogicVariable = call _fnc_RandomGen;['RANDOMVAR',format['_LogicVariable: %1',_LogicVariable]] call FNC_A3_CUSTOMLOG;
  965. _vehicle_needs_check = call _fnc_RandomGen;['RANDOMVAR',format['_vehicle_needs_check: %1',_vehicle_needs_check]] call FNC_A3_CUSTOMLOG;
  966. _fnc_infiSTAR_PlayerLog = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_infiSTAR_PlayerLog: %1',_fnc_infiSTAR_PlayerLog]] call FNC_A3_CUSTOMLOG;
  967. _antidupePVResVar = call _fnc_RandomGen;['RANDOMVAR',format['_antidupePVResVar: %1',_antidupePVResVar]] call FNC_A3_CUSTOMLOG;
  968. _runcheck_thread = call _fnc_RandomGen;['RANDOMVAR',format['_runcheck_thread: %1',_runcheck_thread]] call FNC_A3_CUSTOMLOG;
  969. _timealive = call _fnc_RandomGen;['RANDOMVAR',format['_timealive: %1',_timealive]] call FNC_A3_CUSTOMLOG;
  970. _fnc_check_type_allowed = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_check_type_allowed: %1',_fnc_check_type_allowed]] call FNC_A3_CUSTOMLOG;
  971. _fnc_remove_badvehicle = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_remove_badvehicle: %1',_fnc_remove_badvehicle]] call FNC_A3_CUSTOMLOG;
  972. _fnc_vehicle_check = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_vehicle_check: %1',_fnc_vehicle_check]] call FNC_A3_CUSTOMLOG;
  973. ['RANDOMVAR',format['----END-LINE---- (%1)',INFISTARVERSION]] call FNC_A3_CUSTOMLOG;
  974. _badChatTMP = _badChat;_badChat = ["nigger","get cancer","infishit"];{_badChat pushBackUnique (toLower _x);}forEach _badChatTMP;
  975. _badNamesFullTMP = _badNamesFull;_badNamesFull = [];{_badNamesFull pushBackUnique (toLower _x);}forEach _badNamesFullTMP;
  976. _badNamesPartialTMP = _badNamesPartial;_badNamesPartial = [];{_badNamesPartial pushBackUnique (toLower _x);}forEach _badNamesPartialTMP;
  977. _badGroupNamesTMP = _badGroupNames;_badGroupNames = [];{_badGroupNames pushBackUnique (toLower _x);}forEach _badGroupNamesTMP;
  978. _variable1 = toString[105,115,114,117,110,110,105,110,103];
  979. diag_log format['<infiSTAR.de> %1 - loading AntiHack..',time];
  980.  
  981. _verybadStrings =
  982. [
  983. 'menu loaded','kill target','no recoil','rapid fire','explode all','teleportall',
  984. 'destroyall','destroy all','g-e-f','box-esp','god on','god mode','unlimited mags',
  985. 'infishit','cheatmenu','in54nity','infinite ammo','player markers',' is god'
  986. ];
  987. _blacklistedAdminVariables =
  988. [
  989. 'fnc_admin_c','fnc_admin_cc','fnc_debugbox_new','fnc_workplace',
  990. 'AH_HackLogArray','AH_SurvLogArray','AH_AdmiLogArray','babecore_escM_mousepos',
  991. 'fnc_infiAdminKeyDown','MAIN_DISPLAY_ID','fnc_Disconnect_selected','fnc_adminLog','go_in_nearestvehicle_callmevar','noRecoilRun',
  992. 'FNC_CUSTOM_fn_loadInventory','ADMIN_LOCAL_MARKER','ALLOW_ME_THIS_KEYBIND','freeFlightCam','fnc_ButtonClick_44466','fnc_LBSelChanged_LEFT','unlimAmmRun',
  993. 'fnc_infiSTAR_A3noRecoil','VEHBOOST_FUNCTION','fnc_infiSTAR_get_LeftClicks','fnc_AdminReq','infiSTAR_MAIN_CODE','fnc_get_plr'
  994. ];
  995.  
  996.  
  997. _tofindvar =
  998. [
  999. 'xxx_','k3ybinds','jme_','infistatus',
  1000. 'godmode','speedhack','no grass','remote menu',
  1001. 'currentmenu',' is god','_m0de','fuck_','m3nu'
  1002. ];
  1003. _tofindcontent =
  1004. [
  1005. '+ _code +','infiesp'
  1006. ];
  1007. _tofindboth =
  1008. [
  1009. '_g0d_'
  1010. ];
  1011.  
  1012. _findObjectVar =
  1013. [
  1014. 'gtog','currenttarget','explodepos','nfttog','currentindex',
  1015. 'exbtog','explodeobj','spawnunit','pfftog','fstog','menuvars',
  1016. 'shbtog','pnftog','launch','itog','ndtog','ifbtog','cursore'
  1017. ];
  1018. _findObjectVarContent =
  1019. [
  1020. 'systemchat'
  1021. ];
  1022.  
  1023. _allowedMarkers = ['TreasureMarker','ExilePartyMarker','ExileSupplyBox','Death','[',']'];
  1024. _VehicleWhiteListTEMP = _VehicleWhiteList;_VehicleWhiteList = [];{_VehicleWhiteList pushBackUnique (toLower _x);} forEach _VehicleWhiteListTEMP;_VehicleWhiteListTEMP=nil;
  1025. _ForbiddenVehiclesTEMP = _ForbiddenVehicles;_ForbiddenVehicles = [];{_ForbiddenVehicles pushBackUnique (toLower _x);} forEach _ForbiddenVehiclesTEMP;_ForbiddenVehiclesTEMP=nil;
  1026. if(_UMW)then{_allowedMarkers append _aLocalM;};
  1027. _chatCommandsL = [];
  1028. {
  1029. _chatCommandsL pushBackUnique [toLower(_x select 0),(_x select 1)];
  1030. } forEach _chatCommands;
  1031. _chatCommandsPL = [];
  1032. {
  1033. _chatCommandsPL pushBackUnique [toLower(_x select 0),(_x select 1)];
  1034. } forEach _chatCommandsP;
  1035.  
  1036.  
  1037. if(_HTML_LOAD_URL != "")then{HTML_LOAD_URL3 = _HTML_LOAD_URL;publicVariable "HTML_LOAD_URL3";};
  1038. if(isNil'CUSTOM_FUNCTION_ARRAY')then{CUSTOM_FUNCTION_ARRAY = [];};
  1039. CUSTOM_FUNCTION_EXTENDED = compileFinal "
  1040. if(CUSTOM_FUNCTION_ARRAY isEqualTo [])exitWith{false};
  1041. _option = _this select 0;
  1042. _input = _this select 1;
  1043. _return = _input call (CUSTOM_FUNCTION_ARRAY select _option);
  1044. _return
  1045. ";
  1046. if(_ENABLE_PRIVATE_CHAT_MENU)then{
  1047. _privchat = {
  1048. _senderNetId = _this select 0;
  1049. _receiverNetId = _this select 1;
  1050. _time = _this select 2;
  1051. _text = _this select 3;
  1052. _senderObj = objectFromNetId _senderNetId;
  1053. _receiverObj = objectFromNetId _receiverNetId;
  1054. if(!isNull _senderObj && !isNull _receiverObj)then
  1055. {
  1056. _senderName = _senderObj getVariable['ExileName',name _senderObj];
  1057. _receiverName = _receiverObj getVariable['ExileName',name _receiverObj];
  1058.  
  1059. ['CHAT',format['(%1) %2(%3) -> %4: %5',_time,_senderName,getPlayerUID _senderObj,_receiverName,_text]] call FNC_A3_CUSTOMLOG;
  1060.  
  1061. [
  1062. [_senderName,_receiverName,_time,_text,_senderObj],
  1063. {
  1064. params['_senderName','_receiverName','_time','_text','_senderObj'];
  1065. CHAT_HISTORY_ARRAY pushBack [_senderName,_receiverName,_time,_text];
  1066.  
  1067. ACTIVE_CHATS = ACTIVE_CHATS - [_senderObj];
  1068. ACTIVE_CHATS pushBackUnique _senderObj;
  1069.  
  1070. systemChat format['%1 (%2): %3',_senderName,_time,_text];
  1071. playsound 'AddItemOK';
  1072.  
  1073. call fnc_fill_chat_history;
  1074. call fnc_fill_chat_playerlist;
  1075.  
  1076. ['SuccessTitleAndText', ['Private Message', format ['from %1: %2', _senderName,_text]]] call ExileClient_gui_toaster_addTemplateToast;
  1077. },
  1078. owner _receiverObj,
  1079. false
  1080. ] call FN_infiSTAR_S;
  1081. };
  1082. };
  1083. CUSTOM_FUNCTION_ARRAY set[4,_privchat];
  1084. };
  1085. call compile ("
  1086. FNC_OWNER_BY_UID = compileFinal ""
  1087. params[['_uid','']];
  1088. _owner = missionNameSpace getVariable[format['"+_owner_by_uid+"%1',_uid],-10];
  1089. if(_owner isEqualTo -10)then
  1090. {
  1091. _clientObject = missionNameSpace getVariable[format['"+_object_by_uid+"%1',_uid],objNull];
  1092. if(!isNull _clientObject)then
  1093. {
  1094. if(isPlayer _clientObject)then
  1095. {
  1096. _owner = owner _clientObject;
  1097. };
  1098. };
  1099. };
  1100. if(_owner > 2)then{_owner}else{-10}
  1101. "";
  1102. fnc_AdminReq = compileFinal '
  1103. _inputOption = _this select 0;
  1104. _inputParams = _this select 1;
  1105. if(_inputOption isEqualTo 0)exitWith{_inputParams call "+_fnc_AdminReqReal+";true};
  1106. if(_inputOption isEqualTo 1)exitWith{_inputParams call "+_fnc_server_handle_pre_mpmessage+";true};
  1107. if(_inputOption isEqualTo 2)exitWith{if(!isNil''CUSTOM_FUNCTION'')then{_inputParams call CUSTOM_FUNCTION;};true};
  1108. if(_inputOption isEqualTo 3)exitWith{_inputParams call CUSTOM_FUNCTION_EXTENDED;true};
  1109. ';
  1110. fnc_do_adminTP = compileFinal '
  1111. params[''_unit'',''_pos''];
  1112. private _AHpos = uiNameSpace getVariable ''"+_AHpos+"'';
  1113. if(isNil''_AHpos'')then{(vehicle _unit) setPosATL _pos;}else{uiNameSpace setVariable[''"+_AHpos+"'',_pos];};
  1114. ';
  1115. publicVariable'fnc_do_adminTP';
  1116. ");
  1117. FN_infiSTAR_CS = compileFinal "_this remoteExecCall ['fnc_AdminReq', 2, false]";publicVariable"FN_infiSTAR_CS";
  1118. FN_infiSTAR_F = compileFinal "missionNameSpace setVariable[(_this select 0),compileFinal(_this select 1)]";publicVariable"FN_infiSTAR_F";
  1119. FN_infiSTAR_C = compileFinal "(_this select 0) call (_this select 1)";publicVariable"FN_infiSTAR_C";
  1120. FN_infiSTAR_S = compileFinal "
  1121. params [['_input',''],['_code',{}],['_target',-10],['_jip',false]];
  1122. if(typename _code isEqualTo 'STRING')then{_code=compile _code;};
  1123. if((_target isEqualTo 0)||(_target isEqualTo -10))exitWith{};
  1124. if(_target isEqualTo 2)exitWith{_input call _code};
  1125. [_input,_code] remoteExecCall ['FN_infiSTAR_C',_target,_jip]
  1126. ";
  1127. fnc_call_ARMALOAD = compileFinal "
  1128. private['_option','_input','_url','_packet1','_jobid','_packet2','_res','_timeout'];
  1129. _option = _this select 0;
  1130. _input = _this select 1;
  1131. _url = _this select 2;
  1132.  
  1133. _packet1 = format['getasync%1%2%1',toString [10],_url];
  1134. _jobid = _packet1 call FN_CALL_LOAD_DLL;
  1135. _packet2 = format['response%1%2%1',toString [10],_jobid];
  1136. _timeout = diag_tickTime + 80;
  1137. _res = 'WAIT';
  1138. _bad = ['','WAIT','ERROR','URLERROR'];
  1139. waitUntil{
  1140. uiSleep 3;
  1141. _res = _packet2 call FN_CALL_LOAD_DLL;
  1142. (!(_res in _bad) && ((toLower _res) find 'wrapper is disabled' isEqualTo -1)) || diag_tickTime > _timeout
  1143. };
  1144. if(_res in _bad)exitWith{};if((toLower _res) find 'wrapper is disabled' != -1)exitWith{};
  1145. if(_option isEqualTo 0)exitWith
  1146. {
  1147. if(isNil'ARMALOAD_urlARRAY')then{ARMALOAD_urlARRAY=[];};
  1148. if(_url in ARMALOAD_urlARRAY)exitWith{diag_log '<infiSTAR.de> terminated double LOAD call';};
  1149. ARMALOAD_urlARRAY pushBack _url;
  1150.  
  1151. private['_name','_puid','_clientID'];
  1152. _name = _input select 0;
  1153. _puid = _input select 1;
  1154. missionNameSpace setVariable[format['STEAM_NAME_%1',_puid],_res];
  1155.  
  1156. if(count _input == 3)then
  1157. {
  1158. _clientID = _input select 2;
  1159. _code = {
  1160. params['_name','_uid',['_steamname','']];
  1161. _log = format['<infiSTAR.de> %1(%2) SteamName is: %3',_name,_uid,_steamname];
  1162. format['%1 -> %2',_name,_steamname] call FN_SHOW_LOG;
  1163. systemchat _log;
  1164. diag_log _log;
  1165. };
  1166. [[_name,_puid,_res],_code,_clientID,false] call FN_infiSTAR_S;
  1167. ['STEAM_NAME_LOG',format['%1(%2) is %3',_name,_puid,_res]] call FNC_A3_RL;
  1168. };
  1169. };
  1170. ";
  1171. FN_GET_OBJ_BY_OWNER = compileFinal "
  1172. _playerObj = objNull;{if(owner _x isEqualTo _owner)exitWith{_playerObj=_x};} forEach allPlayers;_playerObj
  1173. ";
  1174. fnc_resolveSteamName = compileFinal "
  1175. private['_name','_puid','_clientID','_inputToForward','_steamName'];
  1176. _name = _this select 0;
  1177. _puid = _this select 1;
  1178. _inputToForward = [_name,_puid];
  1179. if(count _this == 3)then
  1180. {
  1181. _clientID = _this select 2;
  1182. _inputToForward = [_name,_puid,_clientID];
  1183. };
  1184. _steamName = missionNameSpace getVariable[format['STEAM_NAME_%1',_puid],''];
  1185. if(_steamName isEqualTo '')then
  1186. {
  1187. if(isNil 'STEAM_NAME_ARRAY_Q')then{STEAM_NAME_ARRAY_Q = [];};
  1188. if!(_puid in STEAM_NAME_ARRAY_Q)then
  1189. {
  1190. STEAM_NAME_ARRAY_Q pushBack _puid;
  1191. if(isNil'STEAM_NAME_URL')then{STEAM_NAME_URL = 'http://htmlload.infistar.de/steamname.php?steamuid=';};
  1192. [0,_inputToForward,format['%1%2',STEAM_NAME_URL,_puid]] spawn fnc_call_ARMALOAD;
  1193. };
  1194. };
  1195. _steamName
  1196. ";
  1197. fnc_getSteamNameIfSaved = compileFinal "
  1198. _steamName = missionNameSpace getVariable[format['STEAM_NAME_%1',_uid],''];
  1199. _steamName
  1200. ";
  1201. call compile ("
  1202. "+_fn_getTempBans+" = compileFinal ""
  1203. if(isNil'"+_TMPBAN+"')then{"+_TMPBAN+"=[];}else{if!("+_TMPBAN+" isEqualType [])then{"+_TMPBAN+"=[];};};_tempbans = "+_TMPBAN+";"+_TMPBAN+"
  1204. "";
  1205. "+_fnc_addTempBan+" = compileFinal ""
  1206. "+_TMPBAN+" pushBackUnique _this;
  1207. PVAH_AHTMPBAN = "+_TMPBAN+";
  1208. 'PVAH_AHTMPBAN' call fnc_variable_to_admins;
  1209. call "+_fn_getTempBans+"
  1210. "";
  1211. "+_fnc_removeTempBan+" = compileFinal ""
  1212. _bantime = missionNameSpace getVariable [format['BANTIME_%1',_this],0];
  1213. if!(_bantime isEqualTo 0)then{missionNameSpace setVariable [format['BANTIME_%1',_this],nil];};
  1214. "+_TMPBAN+" = "+_TMPBAN+" - [_this];
  1215. PVAH_AHTMPBAN = "+_TMPBAN+";
  1216. 'PVAH_AHTMPBAN' call fnc_variable_to_admins;
  1217. call "+_fn_getTempBans+"
  1218. "";
  1219. ");
  1220. fnc_remove_billboard = compileFinal "
  1221. _vehicleID = _this getVariable ['ExileDatabaseID', -1];if(_vehicleID > -1)then{format ['deleteVehicle:%1', _vehicleID] call ExileServer_system_database_query_fireAndForget;};
  1222. ";
  1223. fnc_deleteObject = compileFinal "
  1224. _objToDelete = _this;
  1225. if(_objToDelete isKindOf 'Exile_Construction_Flag_Static')then
  1226. {
  1227. _objectID = _objToDelete getVariable['ExileDatabaseID',-1];
  1228. if(_objectID != -1)then
  1229. {
  1230. _pos = getPosATL _objToDelete;
  1231. _holder = createVehicle ['groundWeaponHolder', _pos, [], 0, 'CAN_COLLIDE'];
  1232. _pos set[2,(_pos select 2)+0.1];
  1233. _holder setPosATL _pos;
  1234. _holder addItemCargoGlobal ['Exile_Item_Flag',1];
  1235.  
  1236. format['deleteTerritory:%1', _objectID] call ExileServer_system_database_query_fireAndForget;
  1237. };
  1238. };
  1239. _type = typeOf _objToDelete;
  1240. if(_objToDelete isKindOf 'AbstractConstruction')then
  1241. {
  1242. if(isNumber(configFile >> 'CfgVehicles' >> _type >> 'exileContainer'))then
  1243. {
  1244. _objToDelete call ExileServer_object_container_packContainer;
  1245. }
  1246. else
  1247. {
  1248. _objToDelete call ExileServer_object_construction_database_delete;
  1249. _config = ('(getText(_x >> ''staticObject'') isEqualTo _type)' configClasses (configFile >> 'CfgConstruction')) select 0;
  1250. _config = getText (_config >> 'kitMagazine');
  1251.  
  1252. _pos = getPosATL _objToDelete;
  1253. _holder = createVehicle ['groundWeaponHolder', _pos, [], 0, 'CAN_COLLIDE'];
  1254. _pos set[2,(_pos select 2)+0.1];
  1255. _holder setPosATL _pos;
  1256. _holder addItemCargoGlobal [_config,1];
  1257. };
  1258. };
  1259. if(_objToDelete isKindOf 'Exile_Construction_Abstract_Static')then
  1260. {
  1261. if!(_objToDelete isKindOf 'Exile_Construction_Abstract_Physics')then
  1262. {
  1263. _objectID = _objToDelete getVariable['ExileDatabaseID',-1];
  1264. if(_objectID != -1)then
  1265. {
  1266. _objToDelete call ExileServer_object_construction_database_delete;
  1267. _config = ('(getText(_x >> ''staticObject'') isEqualTo _type)||(getText(_x >> ''upgradeObject'') isEqualTo _type)' configClasses (configFile >> 'CfgConstruction')) select 0;
  1268. _config = getText (_config >> 'kitMagazine');
  1269.  
  1270. _pos = getPosATL _objToDelete;
  1271. _holder = createVehicle ['groundWeaponHolder', _pos, [], 0, 'CAN_COLLIDE'];
  1272. _pos set[2,(_pos select 2)+0.1];
  1273. _holder setPosATL _pos;
  1274. _holder addItemCargoGlobal [_config,1];
  1275. };
  1276. };
  1277. };
  1278. if(_objToDelete isKindOf 'Exile_Sign_TraderCity')then
  1279. {
  1280. _objToDelete call fnc_remove_billboard;
  1281. };
  1282. if(!isNull _objToDelete)then
  1283. {
  1284. _objToDelete setDamage 1;
  1285. {deleteVehicle _x;} forEach (attachedObjects _objToDelete);
  1286. deleteVehicle _objToDelete;
  1287. };
  1288. ";
  1289. fnc_serverMassMessage = compileFinal "
  1290. private['_msg','_clientID'];
  1291. _msg = _this select 0;
  1292. if(typename _msg isEqualTo 'STRING')then{_msg = [_this select 0,0,0.7,10,0];};
  1293. _clientID = _this select 1;
  1294. _code = {_this spawn bis_fnc_dynamictext;};
  1295. [_msg,_code,_clientID,false] call FN_infiSTAR_S;
  1296. ";
  1297. diag_log format['<infiSTAR.de> %1 - Thread MAIN: none-threaded code compiled and/or sent!',time];
  1298. if(_DayNightVote)then{
  1299. VOTETIME_MRV = _MRV;
  1300. VOTETIME_MVP = _MVP;
  1301. VOTETIME_VCT = _VCT;
  1302. VOTETIME_LVT = 0;
  1303. VOTETIME_ARR = [];
  1304. fnc_VoteTimeServer = compileFinal "
  1305. _clientUID = _this select 0;
  1306. _vote = _this select 1;
  1307. if((VOTETIME_VCT + VOTETIME_LVT) < time)then
  1308. {
  1309.  
  1310. if!(_clientUID in VOTETIME_ARR)then
  1311. {
  1312. _players = allPlayers;
  1313. VOTETIME_ARR pushBack _clientUID;
  1314. VOTETIME_ARR pushBack _vote;
  1315. _cntAll = count _players;
  1316. _cntVoted = {getPlayerUID _x in VOTETIME_ARR} count _players;
  1317. if((_cntAll > 0) && (_cntVoted > 0))then
  1318. {
  1319. _cntday = 0;
  1320. _cntnight = 0;
  1321. _rateAll = _cntVoted / _cntAll;
  1322. _rateAllShown = format['%1',_rateAll*100];
  1323. _rateAllShown = format['%1',_rateAllShown select [0,4]];
  1324. _rateAllShown = _rateAllShown + '%';
  1325. if(_rateAll >= VOTETIME_MVP)then
  1326. {
  1327. _oUIDs = [];
  1328. {
  1329. _xUID = getPlayerUID _x;
  1330. if(_xUID != '')then
  1331. {
  1332. _oUIDs pushBack _xUID;
  1333. };
  1334. } forEach _players;
  1335. for '_i' from 0 to (count VOTETIME_ARR)-1 step 2 do
  1336. {
  1337. _cUID = VOTETIME_ARR select _i;
  1338. _cVOTE = VOTETIME_ARR select (_i+1);
  1339. if(_cUID in _oUIDs)then
  1340. {
  1341. if(_cVOTE == 'DAY')then{_cntday = _cntday + 1;};
  1342. if(_cVOTE == 'NIGHT')then{_cntnight = _cntnight + 1;};
  1343. };
  1344. };
  1345.  
  1346. _date = date;
  1347. _changeTime = false;
  1348. if!(_cntday isEqualTo _cntnight)then
  1349. {
  1350. if(_cntday > _cntnight)then
  1351. {
  1352. _rateDay = if(_cntday isEqualTo 0)then{0}else{_cntday / _cntAll};
  1353. if(_rateDay >= VOTETIME_MRV)then
  1354. {
  1355. _date set [3,11];
  1356. _changeTime = true;
  1357. };
  1358. }
  1359. else
  1360. {
  1361. _rateNight = if(_cntnight isEqualTo 0)then{0}else{_cntnight / _cntAll};
  1362. if(_rateNight >= VOTETIME_MRV)then
  1363. {
  1364. _date set [3,23];
  1365. _changeTime = true;
  1366. };
  1367. };
  1368. };
  1369.  
  1370. if(_changeTime)then
  1371. {
  1372. setDate _date;
  1373. VOTETIME_ARR = [];
  1374. VOTETIME_LVT = time;
  1375. };
  1376.  
  1377. _txt = format['%1 of %2 (%3) Players voted - %4 for Day and %5 for Night',_cntVoted,_cntAll,_rateAllShown,_cntday,_cntnight];
  1378. _msg = ['<t size=''0.55'' font =''OrbitronLight'' color=''#00B1CC''>'+(_txt)+'</t>',safeZoneXAbs/safeZoneWAbs/4,SafeZoneY+0.02,10,0,0,3079];
  1379. [_msg,-2] call fnc_serverMassMessage;
  1380. }
  1381. else
  1382. {
  1383. _txt = format['%1 of %2 (%3) Players voted (in chat type /vote day or /vote night)',_cntVoted,_cntAll,_rateAllShown];
  1384. _msg = ['<t size=''0.55'' font =''OrbitronLight'' color=''#00B1CC''>'+(_txt)+'</t>',safeZoneXAbs/safeZoneWAbs/4,SafeZoneY+0.02,10,0,0,3079];
  1385. [_msg,-2] call fnc_serverMassMessage;
  1386. };
  1387. };
  1388. };
  1389. }
  1390. else
  1391. {
  1392. _txt = format['Wait %1s more until next day/night vote can be made',round((VOTETIME_VCT + VOTETIME_LVT) - time)];
  1393. _msg = ['<t size=''0.55'' font =''OrbitronLight'' color=''#00B1CC''>'+(_txt)+'</t>',safeZoneXAbs/safeZoneWAbs/4,SafeZoneY+0.02,10,0,0,3079];
  1394. [_msg,-2] call fnc_serverMassMessage;
  1395. };
  1396. ";
  1397. diag_log format['<infiSTAR.de> %1 - VoteTimeServer compiled',time];
  1398. };
  1399. _tmpstartAsNormal = _startAsNormal;
  1400. _startAsNormal = [];
  1401. {
  1402. if(count _x > 5)then
  1403. {
  1404. _startAsNormal pushBackUnique _x;
  1405. };
  1406. } forEach _tmpstartAsNormal;
  1407. diag_log format['<infiSTAR.de> %1 - Thread BEFORE MAIN: adding to main string..',time];
  1408. _A3AHstring = "
  1409. diag_log format['<infiSTAR.de> %1 - Thread BEFORE MAIN: still compiling...',time];
  1410. _admins = "+str _admins+";"+_adminsA+" = _admins;if!("+str _startAsNormal+" isEqualTo [])then{{"+_adminsA+" = "+_adminsA+" - [_x];} forEach "+str _startAsNormal+";};
  1411. if(isNil '"+_AH_HackLogArrayRND+"')then{"+_AH_HackLogArrayRND+" = [];};
  1412. if(isNil '"+_AH_SurvLogArrayRND+"')then{"+_AH_SurvLogArrayRND+" = [];};
  1413. if(isNil '"+_AH_AdmiLogArrayRND+"')then{"+_AH_AdmiLogArrayRND+" = [];};
  1414. fnc_variable_to_admins = compileFinal '
  1415. _fn_send = {
  1416. {
  1417. _owner = _x call FNC_OWNER_BY_UID;
  1418. if!(_owner isEqualTo -10)then
  1419. {
  1420. _owner publicVariableClient _this;
  1421. };
  1422. } forEach "+str _admins+";
  1423. };
  1424. if(typeName _this isEqualTo ''STRING'')then
  1425. {
  1426. _this call _fn_send;
  1427. }
  1428. else
  1429. {
  1430. {_x call _fn_send;} forEach _this;
  1431. };
  1432. ';
  1433. _FN_INJECT_ON_CLIENT = {
  1434. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  1435. _blacklistedAdminVariables = "+str _blacklistedAdminVariables+";
  1436. _badIDDsToKickPre = "+str _badIDDsToKick+";
  1437. _badIDDsToKick = [];
  1438. {_badIDDsToKick pushBackUnique format['Display #%1',_x];} forEach _badIDDsToKickPre;
  1439. _badIDDsToClosePre = "+str _badIDDsToClose+";
  1440. _badIDDsToClose = [];
  1441. {_badIDDsToClose pushBackUnique format['Display #%1',_x];} forEach _badIDDsToClosePre;
  1442. "; if(_UDW)then{ _A3AHstring = _A3AHstring + "
  1443. _allowedIddsPre = "+str _allowedIDDs+";
  1444. _allowedIDDs = ['No display'];
  1445. {_allowedIDDs pushBackUnique format['Display #%1',_x];} forEach _allowedIddsPre;
  1446. "; }; _A3AHstring = _A3AHstring + "
  1447. "; }; _A3AHstring = _A3AHstring + "
  1448. _49code = {
  1449. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  1450. if(_isNormal)then
  1451. {
  1452. if(_vct < diag_tickTime)then
  1453. {
  1454. _vct = diag_tickTime + 6;
  1455. if(!_admin)then
  1456. {
  1457. {
  1458. _av = missionNamespace getVariable _x;
  1459. if(!isNil '_av')then
  1460. {
  1461. _log = format['AdminVariable in missionNamespace: %1 - %2',_x,_av];
  1462. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  1463. [] call _AHKickOFF;
  1464. };
  1465. } forEach _blacklistedAdminVariables;
  1466. };
  1467. "; if(_useBlacklistedVariableCheck)then{ _A3AHstring = _A3AHstring + "
  1468. {
  1469. _bv = nil;_bv = missionNamespace getVariable _x;
  1470. if(!isNil '_bv')then
  1471. {
  1472. _log = format['BadVariable in missionNamespace: %1 - %2',_x,_bv];
  1473. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  1474. [] call _AHKickOFF;
  1475. };
  1476. _bv = nil;_bv = uiNamespace getVariable _x;
  1477. if(!isNil '_bv')then
  1478. {
  1479. _log = format['BadVariable in uiNamespace: %1 - %2 (these variables can be set in the editor)',_x,_bv];
  1480. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  1481. [] call _AHKickOFF;
  1482. };
  1483. _bv = nil;_bv = profileNamespace getVariable _x;
  1484. if(!isNil '_bv')then
  1485. {
  1486. _log = format['BadVariable in profileNamespace: %1 - %2',_x,_bv];
  1487. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  1488. [] call _AHKickOFF;
  1489. };
  1490. _bv = nil;_bv = parsingNamespace getVariable _x;
  1491. if(!isNil '_bv')then
  1492. {
  1493. _log = format['BadVariable in parsingNamespace: %1 - %2',_x,_bv];
  1494. [_name,_puid,'TMPBAN',toArray(_log)] call _AHKickLog;
  1495. [] call _AHKickOFF;
  1496. };
  1497. _bv = nil;_bv = player getVariable _x;
  1498. if(!isNil '_bv')then
  1499. {
  1500. _log = format['BadVariable in objectNamespace (player): %1 - %2',_x,_bv];
  1501. [_name,_puid,'TMPBAN',toArray(_log)] call _AHKickLog;
  1502. [] call _AHKickOFF;
  1503. };
  1504. } forEach _blacklistedVariables;
  1505. "; }; _A3AHstring = _A3AHstring + "
  1506. {
  1507. _magName = _x select 0;
  1508. _magSize = _x select 1;
  1509. _config = configFile >> 'cfgMagazines' >> _magName;
  1510. if(isClass _config)then
  1511. {
  1512. _max = getNumber(_config >> 'count');
  1513. if(_max > 0)then
  1514. {
  1515. if(_magSize > (_max+10))exitWith
  1516. {
  1517. _log = format['Maximum magazine size is %1, player value was: %2 - magazine: %3',_max,_magSize,_magName];
  1518. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  1519. [] call _AHKickOFF;
  1520. };
  1521. };
  1522. };
  1523. } forEach (magazinesAmmoFull player);
  1524. };
  1525. if(_vctd < diag_tickTime)then
  1526. {
  1527. _vctd = diag_tickTime + 30;
  1528.  
  1529. {
  1530. _index = _white pushBackUnique _x;
  1531. if(_index > -1)then
  1532. {
  1533. [
  1534. [
  1535. _name,
  1536. _puid,
  1537. _AHKickLog,
  1538. _AHKickOFF,
  1539. _x
  1540. ],
  1541. _fnc_finddeeper
  1542. ] execFSM 'call.fsm';
  1543. };
  1544. } forEach (allVariables missionNamespace);
  1545. };
  1546. };
  1547. if(_vctoo < diag_tickTime)then
  1548. {
  1549. _vctoo = diag_tickTime + 60;
  1550.  
  1551. {
  1552. _building = _x;
  1553. {
  1554. _index = _white2 pushBackUnique _x;
  1555. if(_index > -1)then
  1556. {
  1557. [
  1558. [
  1559. _name,
  1560. _puid,
  1561. _AHKickLog,
  1562. _AHKickOFF,
  1563. _x,
  1564. _building
  1565. ],
  1566. _fnc_finddeeperObj
  1567. ] execFSM 'call.fsm';
  1568. };
  1569. } forEach (allVariables _building);
  1570. } forEach _buildings;
  1571. };
  1572. "; if(_check_doors_n_gates)then{ _A3AHstring = _A3AHstring + "
  1573. {
  1574. _lockstate = _x getvariable ['ExileIsLocked',9];
  1575. _animationPhase1 = _x animationPhase 'DoorRotation';
  1576. _animationPhase2 = _x animationPhase 'DoorRotationLeft';
  1577. _animationPhase3 = _x animationPhase 'DoorRotationRight';
  1578. if((_lockstate isEqualTo -1)&&(1 in [_animationPhase1,_animationPhase2,_animationPhase3]))exitWith
  1579. {
  1580. _x animate ['DoorRotation',0];
  1581. _x animate ['DoorRotationLeft',0];
  1582. _x animate ['DoorRotationRight',0];
  1583. };
  1584. } forEach (nearestObjects [player,_checkthesedoorgates, 12]);
  1585. "; }; _A3AHstring = _A3AHstring + "
  1586. "; }; _A3AHstring = _A3AHstring + "
  1587. _display49 = findDisplay 49;
  1588. if(isNull _display49)then
  1589. {
  1590. _escapefound = false;
  1591. }
  1592. else
  1593. {
  1594. "; if(_disconnect_dupe_check && !_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  1595. if(!_escapefound)then
  1596. {
  1597. _escapefound = true;
  1598. if(!_DCHECKrunning)then
  1599. {
  1600. _DCHECKrunning = true;
  1601. "+_antidupePVResVar+" = nil;
  1602. [_name,_puid,'DCHECK'] call _AHKickLog;
  1603. _startDCHECK = time + 5;
  1604. };
  1605. };
  1606. if(_DCHECKrunning)then
  1607. {
  1608. if(time > _startDCHECK || !isNil '"+_antidupePVResVar+"')then
  1609. {
  1610. if(isNil '"+_antidupePVResVar+"')then
  1611. {
  1612. _log = format['may have tried to disconnect dupe @%1',mapGridPosition player];
  1613. [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog;
  1614. (findDisplay 49) closeDisplay 0;
  1615. };
  1616. _DCHECKrunning = false;
  1617. };
  1618. };
  1619. "; }; _A3AHstring = _A3AHstring + "
  1620.  
  1621. "; if(!_HIDE_FROM_PLAYERS)then{ _A3AHstring = _A3AHstring + "
  1622. if!(serverCommandAvailable '#logout')then
  1623. {
  1624. (_display49 displayCtrl 2) ctrlEnable false;
  1625. (_display49 displayCtrl 2) ctrlSetText "+str _ESCMNUTOP+";
  1626. (_display49 displayCtrl 103) ctrlEnable false;
  1627. (_display49 displayCtrl 103) ctrlSetText "+str _ESCMNUBOT+";
  1628. (_display49 displayCtrl 523) ctrlSetText _name;
  1629. (_display49 displayCtrl 109) ctrlSetText _puid;
  1630. (_display49 displayCtrl 122) ctrlEnable false;
  1631. (_display49 displayCtrl 122) ctrlShow false;
  1632. };
  1633. "; if(!_BRIEFING_MSG)then{ _A3AHstring = _A3AHstring + "
  1634. (_display49 displayCtrl 120) ctrlSetText 'infiSTAR.de AntiHack & AdminsTools - [Author: infiSTAR, Contact: infiSTAR23@gmail.com]';
  1635. "; }else{ _A3AHstring = _A3AHstring + "
  1636. (_display49 displayCtrl 115025) ctrlSetText 'AntiHack & AdminsTools';
  1637. (_display49 displayCtrl 115035) ctrlSetText 'by infiSTAR.de';
  1638. "; }; _A3AHstring = _A3AHstring + "
  1639. "; }; _A3AHstring = _A3AHstring + "
  1640. };
  1641. if(!isNull (findDisplay 24))then
  1642. {
  1643. {
  1644. if(!isNull ((findDisplay 24) displayCtrl _x))then
  1645. {
  1646. _log = format['MenuBasedHack :: 24 :: %1',_x];
  1647. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  1648. [] call _AHKickOFF;
  1649. };
  1650. } forEach [2406,2407,2408,2409,2410,2411,2412,2443,2442,2441];
  1651. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  1652. _idKeydown24 = 9001;
  1653. _randomNumber = (floor(random 8))+1;
  1654. for '_i' from 0 to _randomNumber do
  1655. {
  1656. _idKeydown24 = (findDisplay 24) displayAddEventHandler ['KeyDown',{false}];
  1657. };
  1658. if!(_idKeydown24 isEqualTo _randomNumber)then
  1659. {
  1660. if(_idKeydown24 isEqualTo -1)exitWith{};
  1661. for '_i' from 0 to 3 do{(findDisplay 24) closeDisplay 0;};
  1662. };
  1663. "; }; _A3AHstring = _A3AHstring + "
  1664. if(!isNull (findDisplay 24))then
  1665. {
  1666. (findDisplay 24) displayRemoveAllEventHandlers 'KeyDown';
  1667. _chat = (findDisplay 24) displayCtrl 101;
  1668. _txt = ctrlText _chat;
  1669. if(_txt != '')then
  1670. {
  1671. _txt = toLower _txt;
  1672. if(_admin)then
  1673. {
  1674. if(_txt isEqualTo '!admin')exitWith
  1675. {
  1676. waitUntil {(findDisplay 24) closeDisplay 0;isNull findDisplay 24};
  1677. [_name,_puid,'AC',toArray(_txt)] call _AHKickLog;
  1678. (findDisplay 46)closeDisplay 0;
  1679. };
  1680. };
  1681. {
  1682. _x0 = _x select 0;
  1683. if(_txt isEqualTo _x0)exitWith
  1684. {
  1685. _x1 = _x select 1;
  1686. waitUntil {(findDisplay 24) closeDisplay 0;isNull findDisplay 24};
  1687. [parseText format['<t color=''#2784D6'' size=''1'' font =''OrbitronMedium''>%1</t>',_x1],0,0,5,0] spawn bis_fnc_dynamictext;
  1688. systemChat _x1;
  1689. };
  1690. } forEach "+str _chatCommandsL+";
  1691. {
  1692. _x0 = _x select 0;
  1693. if(_txt find _x0 != -1)exitWith
  1694. {
  1695. _x1 = _x select 1;
  1696. waitUntil {(findDisplay 24) closeDisplay 0;isNull findDisplay 24};
  1697. [parseText format['<t color=''#2784D6'' size=''1'' font =''OrbitronMedium''>%1</t>',_x1],0,0,5,0] spawn bis_fnc_dynamictext;
  1698. systemChat _x1;
  1699. };
  1700. } forEach "+str _chatCommandsPL+";
  1701. {
  1702. if(_txt find _x > -1)exitWith{
  1703. waitUntil {(findDisplay 24) closeDisplay 0;isNull findDisplay 24};
  1704. _log = format['BadText on Chat: %1 [%2]',_txt,_x];
  1705. [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog;
  1706. };
  1707. } forEach "+str _badChat+";
  1708. call {
  1709. "; if(_DayNightVote)then{ _A3AHstring = _A3AHstring + "
  1710. if((_txt select [0,8] isEqualTo 'vote day')||(_txt select [1,8] isEqualTo 'vote day'))exitWith
  1711. {
  1712. waitUntil {(findDisplay 24) closeDisplay 0;isNull findDisplay 24};
  1713. [_name,_puid,'VOTE',toArray 'DAY'] call _AHKickLog;
  1714. };
  1715. if((_txt select [0,10] isEqualTo 'vote night')||(_txt select [1,10] isEqualTo 'vote night'))exitWith
  1716. {
  1717. waitUntil {(findDisplay 24) closeDisplay 0;isNull findDisplay 24};
  1718. [_name,_puid,'VOTE',toArray 'NIGHT'] call _AHKickLog;
  1719. };
  1720. "; }; _A3AHstring = _A3AHstring + "
  1721. if(_txt isEqualTo '!chat')exitWith
  1722. {
  1723. waitUntil {(findDisplay 24) closeDisplay 0;isNull findDisplay 24};
  1724. if(!isNil'fnc_chat_send')then{if(isNull (findDisplay -1340))then{createdialog 'infiSTAR_CHAT';};};
  1725. };
  1726. _arr = ['fixgear','fixme','fixuniform','fixvest'];
  1727. _txt1 = _txt select [1,15];
  1728. if(_txt in _arr || _txt1 in _arr)exitWith
  1729. {
  1730. waitUntil {(findDisplay 24) closeDisplay 0;isNull findDisplay 24};
  1731. ['',''] spawn fnc_check_uniform_n_vest;
  1732. };
  1733. };
  1734. };
  1735. };
  1736. };
  1737. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  1738. onEachFrame {};
  1739. onMapSingleClick '';
  1740. "; if(_checkFilePatchingEnabled)then{ _A3AHstring = _A3AHstring + "
  1741. if(isFilePatchingEnabled)then
  1742. {
  1743. _log = format['Filepatching enabled.. player had game running for %1 seconds. Tempbanned for 10 minutes!',diag_tickTime];
  1744. [_name,_puid,'TMPBAN',toArray(_log),time + 600] call _AHKickLog;
  1745. [] call _AHKickOFF;
  1746. };
  1747. "; }; _A3AHstring = _A3AHstring + "
  1748. inGameUISetEventHandler ['PrevAction','false'];
  1749. inGameUISetEventHandler ['NextAction','false'];
  1750. inGameUISetEventHandler ['Action','false'];
  1751. "; }; _A3AHstring = _A3AHstring + "
  1752.  
  1753.  
  1754. "; if(_stopSafeGlitchAndCorpseDupe)then{ _A3AHstring = _A3AHstring + "
  1755. player removeAllEventHandlers 'InventoryOpened';
  1756. player addEventHandler ['InventoryOpened', { _this call fn_onInventoryOpened }];
  1757. "; }; _A3AHstring = _A3AHstring + "
  1758.  
  1759. player removeAllEventhandlers 'Take';
  1760. player addEventHandler ['Take', { _this call fn_onPlayerTake }];
  1761.  
  1762.  
  1763. uiSleep .1;
  1764. if(rating player < 999999)then{player addRating 9999999;};
  1765. if!(player getVariable["+str _variable1+",false])then{player setVariable["+str _variable1+",true,true];};
  1766. };
  1767. _bigInputArray =
  1768. [
  1769. [
  1770. [_name,_uid,_AHKickOFF,_AHKickLog,_admins,_admin,_isNormal],
  1771. {
  1772. scriptName '1';
  1773. "+_AH_RunCheck+" = time;
  1774. _name = _this select 0;
  1775. _puid = _this select 1;
  1776. _AHKickOFF = _this select 2;
  1777. _AHKickLog = _this select 3;
  1778. _admins = _this select 4;
  1779. _admin = _this select 5;
  1780. _isNormal = _this select 6;
  1781.  
  1782. _pid = profileNamespace getVariable ['ExilePlayerUID', _puid];
  1783. if!(_pid isEqualTo _puid)then
  1784. {
  1785. _log = format['Player changed Steam Accounts! old PlayerUID: %1',_pid];
  1786. [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog;
  1787. };
  1788. _ExilePlayerCnt = profileNamespace getVariable ['ExilePlayerCnt',0];
  1789. if(_ExilePlayerCnt > 0)then
  1790. {
  1791. _log = format['Banned %1 times before..',_ExilePlayerCnt];
  1792. if(_ExilePlayerCnt > 10)exitWith {
  1793. [_name,_puid,'HLOG',toArray(_log)] call _AHKickLog;
  1794. };
  1795. [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog;
  1796. };
  1797. _pidi = profileNamespace getVariable ['ExilePlayerUIDI', _puid];
  1798. if!(_pidi isEqualTo _puid)then
  1799. {
  1800. _log = format['Player changed Steam Accounts! old infiSTAR PlayerUID: %1',_pidi];
  1801. [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog;
  1802. profileNamespace setVariable ['ExilePlayerUIDI', _puid];
  1803. saveprofileNamespace;
  1804. };
  1805. _dbcode = '';
  1806. if(!_admin)then
  1807. {
  1808. _var = 'rscdebugconsole_expression';
  1809. _dbcode = profileNamespace getVariable [_var,''];
  1810. profileNamespace setVariable [_var,''];
  1811. saveprofileNamespace;
  1812. };
  1813. [_name,_puid,'CLIENT_PING',netId player,toArray(profileNameSteam),_pid,_pidi,toArray(_dbcode)] call _AHKickLog;
  1814. if(!isNull (findDisplay 316000))exitWith
  1815. {
  1816. _log = format['Found Debug Console: %1',ctrlText ((findDisplay 316000) displayCtrl 12284)];
  1817. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  1818. (findDisplay 46)closeDisplay 0;
  1819. };
  1820. ['"+_AHKickOFF+"',[_AHKickOFF] call fnc_CompilableString] call FN_infiSTAR_F;
  1821. if(isNil'"+_AHKickOFF+"')exitWith
  1822. {
  1823. _log = 'KICK FUNCTION IS NIL!';
  1824. [_name,_puid,'SLOG_SKICK',toArray(_log)] call _AHKickLog;
  1825. (findDisplay 46)closeDisplay 0;
  1826. };
  1827. if!((str _AHKickOFF) isEqualTo (str "+_AHKickOFF+"))exitWith
  1828. {
  1829. _log = 'KICK FUNCTION IS BROKEN!';
  1830. [_name,_puid,'SLOG_SKICK',toArray(_log)] call _AHKickLog;
  1831. (findDisplay 46)closeDisplay 0;
  1832. };
  1833. ['"+_AHKickLog+"',[_AHKickLog] call fnc_CompilableString] call FN_infiSTAR_F;
  1834. if(isNil'"+_AHKickLog+"')exitWith
  1835. {
  1836. _log = 'KICKLOG FUNCTION IS NILLED!';
  1837. [_name,_puid,'SLOG_SKICK',toArray(_log)] call _AHKickLog;
  1838. (findDisplay 46)closeDisplay 0;
  1839. };
  1840. if!((str _AHKickLog) isEqualTo (str "+_AHKickLog+"))exitWith
  1841. {
  1842. _log = 'KICKLOG FUNCTION IS BROKEN!';
  1843. [_name,_puid,'SLOG_SKICK',toArray(_log)] call _AHKickLog;
  1844. (findDisplay 46)closeDisplay 0;
  1845. };
  1846. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  1847. if(_isNormal)then {
  1848. _badClasses = ['a3_m3editor','devcon','life_server','loki_lost_key','pooploop','rscrazzler','rsclistboxvg','vgdialog'];
  1849. _activatedAddons = [];
  1850. {_activatedAddons pushBack (toLower _x)} forEach activatedAddons;
  1851. {
  1852. _addon = _x;
  1853. {
  1854. if(_addon find (toLower _x) != -1)then
  1855. {
  1856. _log = format['Bad Addon found: %1 (%2)',_addon,_x];
  1857. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  1858. [] call _AHKickOFF;
  1859. };
  1860. } forEach _badClasses;
  1861. } forEach _activatedAddons;
  1862.  
  1863. _cfgPatches = configFile >> 'CfgPatches';
  1864. for '_i' from 0 to (count _cfgPatches - 1) do
  1865. {
  1866. _patchClass = _cfgPatches select _i;
  1867. if(isClass _patchClass && {(toLower configName _patchClass) in _badClasses})then
  1868. {
  1869. _log = format['Bad Addon found in CfgPatches: %1',configName _patchClass];
  1870. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  1871. [] call _AHKickOFF;
  1872. };
  1873. };
  1874. };
  1875. "; }; _A3AHstring = _A3AHstring + "
  1876. if!(_puid isEqualTo (getPlayerUID player))exitWith
  1877. {
  1878. _log = format['Server PUID not equal to player PUID (%1 != %2) (kicked)',_puid,getPlayerUID player];
  1879. [_name,_puid,'SLOG_SKICK',toArray(_log)] call _AHKickLog;
  1880. [] call _AHKickOFF;
  1881. };
  1882. }
  1883. ],
  1884. [
  1885. [_name,_uid,_AHKickOFF,_AHKickLog,_admin,_isNormal,_49code,_blacklistedAdminVariables,"+str _blacklistedVariables+"],
  1886. {
  1887. waitUntil{getClientStateNumber >= 10};
  1888. waituntil{!isNull findDisplay 46};
  1889. scriptName ""<spawn> "";
  1890. disableSerialization;
  1891. _name = _this select 0;
  1892. _puid = _this select 1;
  1893. _AHKickOFF = _this select 2;
  1894. _AHKickLog = _this select 3;
  1895. _admin = _this select 4;
  1896. _isNormal = _this select 5;
  1897. _escapefound = false;
  1898. _startDCHECK = 0;
  1899. _DCHECKrunning = false;
  1900.  
  1901. _keyUpfnc = {
  1902. _keyCode = _this select 1;
  1903. _handle = false;
  1904. if(_keyCode in (actionKeys 'TacticalView'))exitWith{true};
  1905. if(_keyCode in (actionKeys 'User3'))exitWith{if(!isNil'fnc_chat_send')then{if(isNull (findDisplay -1340))then{createdialog 'infiSTAR_CHAT';};};true};
  1906. if(_keyCode isEqualTo 0x3D)exitWith{if(!isNil'fnc_workplace')then{[] call fnc_workplace;};true};
  1907. _handle
  1908. };
  1909. (finddisplay 46) displayAddEventHandler ['KeyUp',_keyUpfnc];
  1910. _keyDownfnc = {
  1911. _keyCode = _this select 1;
  1912. _handle = false;
  1913. if(_keyCode in (actionKeys 'TacticalView'))exitWith{true};
  1914. _handle
  1915. };
  1916. (finddisplay 46) displayAddEventHandler ['KeyDown',_keyDownfnc];
  1917. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  1918. _vct = 5;
  1919. _vctd = diag_tickTime + 30;
  1920. _white = [
  1921. 'bis_fnc_modulemptypegroundsupportbase','bis_fnc_spawngroup','bis_fnc_moduleammo','bis_fnc_moduletracers','bis_fnc_spawnenemy','bis_fnc_createmenu',
  1922. 'avs_fnc_rearmturret','av8b_loadout_service','exileclient_system_trading_network_purchasevehicleresponse','rhs_fnc_sight_kobra'
  1923. ];
  1924.  
  1925. {
  1926. if(isNil _x)then
  1927. {
  1928. [_x,'no'] call FN_infiSTAR_F;
  1929. };
  1930. } forEach _white;
  1931. _white append "+str _allRandomGenVars+";
  1932. _blacklistedAdminVariables = _this select 7;
  1933. _blacklistedVariables = _this select 8;
  1934. _fnc_finddeeper =
  1935. {
  1936. params[['_name',''],['_puid',''],['_AHKickLog',{(findDisplay 46)closeDisplay 0;}],['_AHKickOFF',{(findDisplay 46)closeDisplay 0;}],['_var','']];
  1937. if(_var isEqualTo '')exitWith{};
  1938. _lvar = toLower _var;
  1939. _bv = missionNamespace getVariable _var;
  1940. if(!isNil '_bv')then
  1941. {
  1942. _strbv = toLower(str(_bv));
  1943.  
  1944. _tofindvar = "+str _tofindvar+";
  1945. if!(_tofindvar isEqualTo [])then
  1946. {
  1947. {
  1948. if(_lvar find _x != -1)then
  1949. {
  1950. _log = format['BadVariable in missionNamespace: [%1] found [%2] varcontent [%3]',_var,_x,_strbv];
  1951. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  1952. [] call _AHKickOFF;
  1953. };
  1954. } forEach _tofindvar;
  1955. };
  1956.  
  1957. _tofindcontent = "+str _tofindcontent+";
  1958. if!(_tofindcontent isEqualTo [])then
  1959. {
  1960. {
  1961. if(_strbv find _x != -1)then
  1962. {
  1963. _log = format['BadVariableContent in missionNamespace: [%1] found [%2] varcontent [%3]',_var,_x,_strbv];
  1964. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  1965. [] call _AHKickOFF;
  1966. };
  1967. } forEach _tofindcontent;
  1968. };
  1969.  
  1970. _tofindboth = "+str _tofindboth+";
  1971. if!(_tofindboth isEqualTo [])then
  1972. {
  1973. {
  1974. if(_lvar find _x != -1)then
  1975. {
  1976. _log = format['BadVariable in missionNamespace: [%1] found [%2] varcontent [%3]',_var,_x,_strbv];
  1977. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  1978. [] call _AHKickOFF;
  1979. }
  1980. else
  1981. {
  1982. if(_strbv find _x != -1)then
  1983. {
  1984. _log = format['BadVariableContent in missionNamespace: [%1] found [%2] varcontent [%3]',_var,_x,_strbv];
  1985. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  1986. [] call _AHKickOFF;
  1987. };
  1988. };
  1989. } forEach _tofindboth;
  1990. };
  1991. };
  1992. };
  1993. _fnc_finddeeperObj =
  1994. {
  1995. params[['_name',''],['_puid',''],['_AHKickLog',{(findDisplay 46)closeDisplay 0;}],['_AHKickOFF',{(findDisplay 46)closeDisplay 0;}],['_var',''],['_obj',objNull]];
  1996. if(_var isEqualTo '')exitWith{};
  1997. if(isNull _obj)exitWith{};
  1998. _lvar = toLower _var;
  1999. _bv = _obj getVariable _var;
  2000. if(!isNil '_bv')then
  2001. {
  2002. _strbv = toLower(str(_bv));
  2003.  
  2004. _findObjectVar = "+str _findObjectVar+";
  2005. if!(_findObjectVar isEqualTo [])then
  2006. {
  2007. {
  2008. if(_lvar find _x != -1)then
  2009. {
  2010. _log = format['BadVariable on object: [%1] found [%2] in [%3] varcontent [%4]',_obj,_var,_x,_strbv];
  2011. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2012. [] call _AHKickOFF;
  2013. };
  2014. } forEach _findObjectVar;
  2015. };
  2016.  
  2017. _findObjectVarContent = "+str _findObjectVarContent+";
  2018. if!(_findObjectVarContent isEqualTo [])then
  2019. {
  2020. {
  2021. if(_strbv find _x != -1)then
  2022. {
  2023. _log = format['BadVariableContent on object: [%1] found [%2] in [%3] varcontent [%4]',_obj,_var,_x,_strbv];
  2024. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2025. [] call _AHKickOFF;
  2026. };
  2027. } forEach _findObjectVarContent;
  2028. };
  2029. };
  2030. };
  2031. _white2 = [];
  2032. _vctoo = diag_tickTime + 180;
  2033. _posbuildings = [worldSize/2,worldSize/2];
  2034. _buildings = _posbuildings nearObjects ['Building',worldSize];
  2035. "; if(_check_doors_n_gates)then{ _A3AHstring = _A3AHstring + "
  2036. _checkthesedoorgates =
  2037. [
  2038. 'Exile_Construction_ConcreteDoor_Static','Exile_Construction_ConcreteGate_Static',
  2039. 'Exile_Construction_WoodDoor_Static','Exile_Construction_WoodDoor_Reinforced_Static',
  2040. 'Exile_Construction_WoodGate_Static','Exile_Construction_WoodGate_Reinforced_Static'
  2041. ];
  2042. "; }; _A3AHstring = _A3AHstring + "
  2043. "; }; _A3AHstring = _A3AHstring + "
  2044. _myvest = '';
  2045. _myuniform = '';
  2046. if(_admin)then{profileNamespace setVariable ['ExilePlayerCnt',nil];saveprofileNamespace;};
  2047. while{true}do{call (_this select 6);};
  2048. }
  2049. ]
  2050. ];
  2051. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  2052. "; if((_wall_look)||(_wall_glitch_object)||(_wall_glitch_vehicle))then{ _A3AHstring = _A3AHstring + "
  2053. _glitchcode = {
  2054. if((alive player)&&(player isEqualTo (vehicle player)))then
  2055. {
  2056. "; if(_wall_look)then{ _A3AHstring = _A3AHstring + "
  2057. _intersectsWith = [];
  2058. _eyeDir = eyedirection player;
  2059. _curWep = currentweapon player;
  2060. _wepDir = player weapondirection _curWep;
  2061. _vectorDiff = _eyeDir vectorDiff _wepDir;
  2062. if((inputAction 'EvasiveLeft' > 0)||(inputAction 'EvasiveRight' > 0)||(_eyeDir select 2 > 0.5)||((abs(_vectorDiff select 0) > 0.55)&&!(_curWep isEqualTo '')))then
  2063. {
  2064. _eyePos = eyepos player;
  2065. _dir_weapon_r = (((_wepDir) select 0) atan2 ((_wepDir) select 1))+45;
  2066. _dir_weapon_l = (((_wepDir) select 0) atan2 ((_wepDir) select 1))-25;
  2067.  
  2068. _intersectsWith = lineintersectswith [[(_eyePos select 0) + (_eyeDir select 0)*_dis_head,(_eyePos select 1) + (_eyeDir select 1)*_dis_head,(_eyePos select 2) + (_eyeDir select 2)*_dis_head], _eyePos, player];
  2069. _intersectsWith append lineintersectswith [[(_eyePos select 0) + _dis_weapon_r*sin _dir_weapon_r,(_eyePos select 1) + _dis_weapon_r*cos _dir_weapon_r,(_eyePos select 2)], _eyePos, player];
  2070. _intersectsWith append lineintersectswith [[(_eyePos select 0) + _dis_weapon_l*sin _dir_weapon_l,(_eyePos select 1) + _dis_weapon_l*cos _dir_weapon_l,(_eyePos select 2)], _eyePos, player];
  2071.  
  2072. _plrPosVisual = ATLtoASL (player modelToWorldVisual [0,0,0]);
  2073. _intersectsWith append lineIntersectsWith [_eyePos, _plrPosVisual];
  2074. };
  2075. if(_intersectsWith isEqualTo [])then
  2076. {
  2077. if(_faded)then{_faded=false;TitleText ['','PLAIN DOWN'];};
  2078. }
  2079. else
  2080. {
  2081. {
  2082. if(_x isKindOf 'Exile_Construction_Abstract_Static')exitWith
  2083. {
  2084. _faded = true;
  2085. player switchMove '';
  2086. if(call _fn_check_allowed_build)then
  2087. {
  2088. TitleText ['!!!\nDO NOT LOOK THROUGH WALLS\n!!!\n\n\n\nAntiHack by infiSTAR.de','BLACK FADED'];
  2089. if(time > _fadeTimer)then
  2090. {
  2091. _fadeTimer = time + 15;
  2092. _log = format['WALL LOOK CHECK (looked through %1) - @%2 %3',typeOf _x,mapGridPosition _x,getPosATL _x];
  2093. [_name,_puid,'SLOG_GLITCH',toArray(_log)] call _AHKickLog;
  2094. };
  2095. };
  2096. };
  2097. } forEach _intersectsWith;
  2098. };
  2099. "; }; _A3AHstring = _A3AHstring + "
  2100. "; if(_wall_glitch_object)then{ _A3AHstring = _A3AHstring + "
  2101. if(call _fn_check_allowed_build)then
  2102. {
  2103. _posASL = getPosASL player;
  2104. _lineIntersectsObjs = lineIntersectsObjs [_posASL, _posASL];
  2105. _eyePos = eyePos player;
  2106. _lineIntersectsObjs append lineIntersectsObjs [_eyePos, _eyePos];
  2107. _lineIntersectsObjs append lineIntersectsObjs [getPos player, getPos player vectorAdd (player selectionPosition 'legs')];
  2108. {
  2109. if(_x isKindOf 'Exile_Construction_Abstract_Static')then
  2110. {
  2111. _type = typeOf _x;
  2112. _floor = true;
  2113. if(call _fn_check_object)then
  2114. {
  2115. if(_floor)then
  2116. {
  2117. cutText ['Do not glitch through floors!', 'PLAIN'];
  2118. if(time > _floorGlitchReported)then
  2119. {
  2120. _floorGlitchReported = time + 3;
  2121. _log = format['FLOOR GLITCH ATTEMPT (attempted breach of %1) - @%2 %3',_type,mapGridPosition _x,getPos _x];
  2122. [_name,_puid,'SLOG_GLITCH',toArray(_log)] call _AHKickLog;
  2123. };
  2124. }
  2125. else
  2126. {
  2127. cutText ['Do not glitch through walls!', 'PLAIN'];
  2128. if(time > _wallGlitchReported)then
  2129. {
  2130. _wallGlitchReported = time + 3;
  2131. _log = format['WALL GLITCH ATTEMPT (attempted breach of %1) - @%2 %3',_type,mapGridPosition _x,getPos _x];
  2132. call _fn_punish_glitch;
  2133. };
  2134. player switchMove '';
  2135. call _fn_push_back;
  2136. };
  2137. };
  2138. };
  2139. } forEach _lineIntersectsObjs;
  2140. };
  2141. "; }; _A3AHstring = _A3AHstring + "
  2142. "; if(_wall_glitch_vehicle)then{ _A3AHstring = _A3AHstring + "
  2143. player removeAllEventHandlers 'GetOutMan';
  2144. player addEventHandler ['GetOutMan', _GetOutMan];
  2145. "; }; _A3AHstring = _A3AHstring + "
  2146. };
  2147. uiSleep .15;
  2148. };
  2149. "; }; _A3AHstring = _A3AHstring + "
  2150. "; if(_UAT)then{ _A3AHstring = _A3AHstring + "
  2151. _atLoopCode = {
  2152. if(isTouchingGround player)then{_touchedground = true;};
  2153. _curVehicle = vehicle player;
  2154. _type = typeOf _curVehicle;
  2155. _curnetId = netId _curVehicle;
  2156. if(isNull objectParent player)then
  2157. {
  2158. if!(_type isEqualTo 'Exile_Unit_GhostPlayer')then
  2159. {
  2160. if!(_curnetId select [0,2] isEqualTo '2:')then
  2161. {
  2162. _log = format['ANTI-TP FOUND not local PlayerObject: %1 with netId %2 @%3',_type,_curnetId,_curVehicle call _fn_getPos];
  2163. deleteVehicle _curVehicle;
  2164. [_name,_puid,'TMPBAN',toArray(_log),time + 600] call _AHKickLog;
  2165. [] call _AHKickOFF;
  2166. };
  2167. };
  2168. }
  2169. else
  2170. {
  2171. if(_curnetId isEqualTo '0:0')then
  2172. {
  2173. _log = format['ANTI-TP FOUND LocalVehicle: %1 with netId 0:0 @%2',_type,_curVehicle call _fn_getPos];
  2174. deleteVehicle _curVehicle;
  2175. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  2176. [] call _AHKickOFF;
  2177. };
  2178. };
  2179. _AHpos = uiNameSpace getVariable['"+_AHpos+"',[0,0,0]];
  2180. uiNameSpace setVariable['"+_AHpos+"',[0,0,0]];
  2181. if(_AHpos isEqualTo [0,0,0])then
  2182. {
  2183. _curpos = (vehicle player) call _fn_getPos;
  2184. if((!isNull player)&&{alive player}&&{((typeOf player) isEqualTo 'Exile_Unit_Player')})then
  2185. {
  2186. _distance = _lastpos distance2D _curpos;
  2187. if(_distance > 1)then
  2188. {
  2189. if(_lastpos distance _firstPos < 100 && !_firstPosTPUSED)exitWith{_firstPosTPUSED=true;};
  2190.  
  2191. _exitHere = false;
  2192. _ropeAttachedToObj = ropeAttachedTo _curVehicle;
  2193. if(!isNull _ropeAttachedToObj)then
  2194. {
  2195. _driverRopeAttachedTo = driver _ropeAttachedToObj;
  2196. if(isNull _driverRopeAttachedTo)then
  2197. {
  2198. {ropeDestroy _x;} forEach (ropes _ropeAttachedToObj);
  2199. {ropeDestroy _x;} forEach (ropes _curVehicle);
  2200. }
  2201. else
  2202. {
  2203. if((getPlayerUID _driverRopeAttachedTo) isEqualTo '')then
  2204. {
  2205. if(local _driver)then
  2206. {
  2207. deleteVehicle _driver;
  2208. player moveInDriver _curVehicle;
  2209. };
  2210. _log = format[
  2211. 'TP with AI as driver.. Moved %1m (from %2 to %3) in %4 slingloaded to AI.. - Player FPS: %5.',
  2212. round _distance,_lastpos,_curpos,_type,diag_fps
  2213. ];
  2214. [_name,_puid,'HLOG',toArray(_log)] call _AHKickLog;
  2215. {ropeDestroy _x;} forEach (ropes _ropeAttachedToObj);
  2216. {ropeDestroy _x;} forEach (ropes _curVehicle);
  2217. }
  2218. else
  2219. {
  2220. _exitHere = true;
  2221. };
  2222. };
  2223. };
  2224. if(_exitHere)exitWith{};
  2225.  
  2226. _speed = round(abs(speed player));
  2227. _difftime = diag_tickTime - _lasttime;
  2228. _speedcalc = (_distance / _difftime)*3.6;
  2229. _speedcalc = _speedcalc max _speed;
  2230.  
  2231. _topSpeedcalcOLD = _topSpeedcalc;
  2232. _topSpeed = (getNumber(configFile >> 'CfgVehicles' >> _type >> 'maxSpeed')) max 20;
  2233. _factor = if(_type isKindOf 'Air')then{2.35}else{1.8};
  2234. _topSpeedcalc = _topSpeed * _factor;
  2235.  
  2236. if(isNull _oldVehicle)then{_topSpeedcalcOLD = _topSpeedcalc;};
  2237. if(_speedcalc > _topSpeedcalc)then
  2238. {
  2239. if(_speedcalc > _topSpeedcalcOLD)then
  2240. {
  2241. _inTrader = call _fn_inTradeZone;
  2242. if(!_inTrader)then
  2243. {
  2244. if(local _curVehicle)then
  2245. {
  2246. if(!_touchedground)then{
  2247. "; if((getNumber(configFile >> 'CfgSettings' >> 'BambiSettings' >> 'parachuteSpawning')) isEqualTo 1)then{ _A3AHstring = _A3AHstring + "
  2248. if((_speedcalc < 301)&&(!isTouchingGround player)&&(_curVehicle isKindOf 'ParachuteBase'))exitWith{_exitPlease = true;};
  2249. "; }; _A3AHstring = _A3AHstring + "
  2250. "; if((getNumber(configFile >> 'CfgSettings' >> 'BambiSettings' >> 'haloJump')) isEqualTo 1)then{ _A3AHstring = _A3AHstring + "
  2251. if((_speedcalc < 99)&&(!isTouchingGround player)&&(player isEqualTo _curVehicle))exitWith{_exitPlease = true;};
  2252. "; }; _A3AHstring = _A3AHstring + "
  2253. };
  2254. if(_exitPlease)exitWith{};
  2255. if((_speedcalc < 100)&&(_type isEqualTo 'Exile_Bike_MountainBike'))exitWith{};
  2256.  
  2257. if(_distance > 30)then
  2258. {
  2259. if(time - _revertcounterlastcount > 20)then{_revertcounter = 0;};_revertcounterlastcount=time;
  2260. _revertcounter = _revertcounter + 1;
  2261. _log = format[
  2262. 'POTENTIAL-TP-REVERTED1: Moved %1m in %2s (from %3 to %4). TopSpeed of %5 is %6 speed was %7. Player FPS: %8. Alive for %9s%10',
  2263. round _distance,_difftime,_lastpos,_curpos,_type,_topSpeed,_speedcalc,diag_fps,diag_tickTime - _livestarted,if(_inTrader)then{' - In Trader!'}else{''}
  2264. ];
  2265. if(_revertcounter > 2)then
  2266. {
  2267. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2268. [] call _AHKickOFF;
  2269. }
  2270. else
  2271. {
  2272. [_name,_puid,'ANTI_TP',toArray(_log)] call _AHKickLog;
  2273. };
  2274. };
  2275. _curvel = velocity _curVehicle;
  2276. [_curVehicle,_lastpos] call _fn_setPos;
  2277. _curVehicle setVelocity _curvel;
  2278. }
  2279. else
  2280. {
  2281. if!(_oldVehicle isEqualTo _curVehicle)then
  2282. {
  2283. if(_distance > 30)then
  2284. {
  2285. _log = format[
  2286. 'POTENTIAL-TP-REVERTED2: Moved %1m in %2s (from %3 to %4). TopSpeed of %5 is %6 speed was %7. Player FPS: %8%9',
  2287. round _distance,_difftime,_lastpos,_curpos,_type,_topSpeed,_speedcalc,diag_fps,if(_inTrader)then{' - In Trader!'}else{''}
  2288. ];
  2289. [_name,_puid,'ANTI_TP',toArray(_log)] call _AHKickLog;
  2290.  
  2291. [player,_lastpos] call _fn_setPos;
  2292. };
  2293. };
  2294. _driver = driver _curVehicle;
  2295. if(!isNull _driver)then
  2296. {
  2297. if!(_driver in allPlayers)then
  2298. {
  2299. if(!alive _driver)exitWith
  2300. {
  2301. _driver action ['eject',_curVehicle];
  2302. if(local _driver)then{deleteVehicle _driver;};
  2303. };
  2304. player moveInDriver _curVehicle;
  2305.  
  2306. _log = format[
  2307. 'TP with AI as driver.. Moved %1m in %2s (from %3 to %4). TopSpeed of %5 is %6 speed was %7. Player FPS: %8.',
  2308. round _distance,_difftime,_lastpos,_curpos,_type,_topSpeed,_speedcalc,diag_fps
  2309. ];
  2310. [_name,_puid,'HLOG',toArray(_log)] call _AHKickLog;
  2311. };
  2312. };
  2313. };
  2314. };
  2315. };
  2316. };
  2317. };
  2318. _lastpos = (vehicle player) call _fn_getPos;
  2319. }
  2320. else
  2321. {
  2322. _firstPosTPUSED = false;
  2323. _firstPos = player call _fn_getPos;
  2324. _curVehicle = vehicle player;
  2325. _oldVehicle = _curVehicle;
  2326. _curpos = _curVehicle call _fn_getPos;
  2327. _lastpos = _curVehicle call _fn_getPos;
  2328. _type = typeOf _curVehicle;
  2329. _topSpeedcalc = 0;
  2330. _topSpeedcalcOLD = 0;
  2331. _livestarted = diag_tickTime;
  2332. _touchedground = false;
  2333. _exitPlease = false;
  2334. _revertcounter = 0;
  2335. _revertcounterlastcount = 0;
  2336. };
  2337. }
  2338. else
  2339. {
  2340. if(typename _AHpos isEqualTo 'ARRAY')then
  2341. {
  2342. _veh = vehicle player;
  2343. if(local _veh)then
  2344. {
  2345. _veh setVelocity [0,0,0];
  2346. _veh setVectorUp [0,0,1];
  2347. _veh setPosATL _AHpos;
  2348. _lastpos = _veh call _fn_getPos;
  2349. };
  2350. }
  2351. else
  2352. {
  2353. _log = format['Admin Teleport Variable highjacked! %1 (%2)',_AHpos,typename _AHpos];
  2354. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2355. [] call _AHKickOFF;
  2356. };
  2357. };
  2358. _lasttime = diag_tickTime;
  2359. _oldVehicle = _curVehicle;
  2360. uiSleep 0.3;
  2361. };
  2362. "; }; _A3AHstring = _A3AHstring + "
  2363. _iddchecks = {
  2364. if(!isNull ((findDisplay 73) displayCtrl 302))then
  2365. {
  2366. _log = 'MenuBasedHack :: 73 :: 302';
  2367. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2368. [] call _AHKickOFF;
  2369. };
  2370. if(diag_tickTime - _lastEmpty > 45)then
  2371. {
  2372. _lastEmpty = diag_tickTime;
  2373. _checked = [];
  2374. };
  2375. if(_wasclosed)then
  2376. {
  2377. closeDialog 0;closeDialog 0;closeDialog 0;
  2378. _wasclosed = false;
  2379. };
  2380.  
  2381. if(!isNull ((findDisplay 46) displayCtrl -2))then
  2382. {
  2383. _log = 'MenuBasedHack :: 46 :: -2';
  2384. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  2385. [] call _AHKickOFF;
  2386. };
  2387.  
  2388. {
  2389. _display = findDisplay _x;
  2390. if(!isNull _display)then
  2391. {
  2392. _txts = _display call _fn_get_texts;
  2393. _log = format['MenuBasedHack: %1 CTRLS: %2',_x,_txts];
  2394. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  2395. [] call _AHKickOFF;
  2396. };
  2397. } forEach [-1338,-1337,17,19,30,32,45,56,59,62,64,69,71,110,125,132,155,156,165,166,167,312,1320,1321,2727,2928,2929,3030,316000,9899,0110];
  2398.  
  2399. {
  2400. _control = _x;
  2401. _ctrlTxt = ctrlText _control;
  2402. _lowerctrlTxt = toLower _ctrlTxt;
  2403. {
  2404. if(_lowerctrlTxt find _x > -1)then
  2405. {
  2406. _log = format['BadCtrlText: %1 on %2 %3 - %4',_x,_display,_control,_ctrlTxt];
  2407. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2408. [] call _AHKickOFF;
  2409. };
  2410. } forEach _verybadStrings;
  2411. } forEach [((findDisplay 49) displayCtrl 2),((findDisplay 49) displayCtrl 103)];
  2412.  
  2413. {
  2414. _cc1 = uiNamespace getVariable _x;
  2415. if(!isNil '_cc1')then
  2416. {
  2417. _formatedcc1 = format['%1',_cc1];
  2418. if(_formatedcc1 != '<null>')then
  2419. {
  2420. if(_formatedcc1 != 'No display')then
  2421. {
  2422. _log = format['Hacked: %1 - %2',_x,_cc1];
  2423. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  2424. [] call _AHKickOFF;
  2425. }
  2426. else
  2427. {
  2428. uiNamespace setVariable[_x,nil];
  2429. _log = format['Hacked: %1 - %2',_x,_cc1];
  2430. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  2431. [] call _AHKickOFF;
  2432. };
  2433. };
  2434. };
  2435. } forEach ['RscDisplayRemoteMissions','RscDisplayDebugPublic','RscDisplayMovieInterrupt','RscDisplayArsenal'];
  2436.  
  2437. if(!isNull (uiNamespace getVariable['BIS_fnc_camera_display',displaynull]))then
  2438. {
  2439. _log = format['Hacked: BIS_fnc_camera_display -> %1',(uiNamespace getVariable['BIS_fnc_camera_display',displaynull])];
  2440. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  2441. [] call _AHKickOFF;
  2442. };
  2443.  
  2444. _c101txt = ctrlText 101;
  2445. if!(_c101txt in ['','ITEM','\A3\Data_F_Mark\Logos\arma3_Mark_logo_ca.paa','\A3\Data_F_Kart\Logos\arma3_karts_logo_ca.paa'])then
  2446. {
  2447. _log = format['ctrlText 101: %1',_c101txt];
  2448. [_name,_puid,'SLOG_SKICK',toArray(_log)] call _AHKickLog;
  2449. (findDisplay 46)closeDisplay 0;
  2450. };
  2451.  
  2452. {
  2453. if(!isNull _x)then
  2454. {
  2455. _display = _x;
  2456. _strdisplay = str _x;
  2457. if(_strdisplay in _badIDDsToKick)then
  2458. {
  2459. _txts = _display call _fn_get_texts;
  2460. _log = format['BadDisplayID: %1 CTRLS: %2',_display,_txts];
  2461. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2462. [] call _AHKickOFF;
  2463. }
  2464. else
  2465. {
  2466. if(_strdisplay in _badIDDsToClose)then
  2467. {
  2468. systemChat format['<infiSTAR.de> %1 has been closed.',_strdisplay];
  2469. _display closeDisplay 0;
  2470. closeDialog 0;closeDialog 0;closeDialog 0;
  2471. _wasclosed = true;
  2472. }
  2473. else
  2474. {
  2475. "; if(_UDW)then{ _A3AHstring = _A3AHstring + "
  2476. if!(_strdisplay in _allowedIDDs)then
  2477. {
  2478. _index = _announceDisplayIddOnce pushBackUnique _strdisplay;
  2479. if(_index > -1)then
  2480. {
  2481. _txts = _display call _fn_get_texts;
  2482.  
  2483. _strl = count _strdisplay;
  2484. _numbegin = (_strdisplay find '#') + 1;
  2485. _numend = _strl - _numbegin;
  2486. _idd = _strdisplay select [_numbegin,_numend];
  2487.  
  2488. _log = format['Not Allowed Display with idd: %1',_idd];
  2489. [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog;
  2490.  
  2491. _log = format['Controls: %2',_txts];
  2492. [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog;
  2493. };
  2494. _display closeDisplay 0;
  2495. closeDialog 0;closeDialog 0;closeDialog 0;
  2496. };
  2497. "; }; _A3AHstring = _A3AHstring + "
  2498. };
  2499. };
  2500. if(!isNull _display)then
  2501. {
  2502. {
  2503. if(!isNull (_display displayCtrl _x))then
  2504. {
  2505. _log = format['MenuBasedHack :: %1 :: %2',_display,_x];
  2506. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  2507. [] call _AHKickOFF;
  2508. };
  2509. } forEach [24010,16030,13163,989187,99991,16100];
  2510.  
  2511. {
  2512. _control = _x;
  2513. _checkifIn = format['%1%2',_display,_control];
  2514. _index = _checked pushBackUnique _checkifIn;
  2515. if(_index > -1)then
  2516. {
  2517. _controltype = ctrlType _control;
  2518. if(_controltype isEqualTo 5)then
  2519. {
  2520. _size = lbSize _control;
  2521. if(_size > 0)then
  2522. {
  2523. for '_i' from 0 to (_size-1) do
  2524. {
  2525. _lbtxt = _control lbText _i;
  2526. _lowerlbtxt = toLower _lbtxt;
  2527. {
  2528. if(_lowerlbtxt find _x > -1)then
  2529. {
  2530. _log = format['BadlbText: %1 FOUND [%2] ON %3 %4',_lbtxt,_x,_display,_control];
  2531. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2532. [] call _AHKickOFF;
  2533. };
  2534. } forEach _verybadStrings;
  2535. };
  2536. };
  2537. }
  2538. else
  2539. {
  2540. if(_controltype isEqualTo 12)then
  2541. {
  2542. _curTV = tvCurSel _control;
  2543. _tvtxt = _control tvText _curTV;
  2544. _lowertvtxt = toLower _tvtxt;
  2545. {
  2546. if(_lowertvtxt find _x > -1)then
  2547. {
  2548. _log = format['BadtvText: %1 FOUND [%2] ON %3 %4',_tvtxt,_x,_display,_control];
  2549. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2550. [] call _AHKickOFF;
  2551. };
  2552. } forEach _verybadStrings;
  2553. }
  2554. else
  2555. {
  2556. if!(_controltype in [3,4,8,9,15,42,81,101,102])then
  2557. {
  2558. _ctrlTxt = ctrlText _control;
  2559. _lowerctrlTxt = toLower _ctrlTxt;
  2560. {
  2561. if(_lowerctrlTxt find _x > -1)then
  2562. {
  2563. _log = format['BadCtrlText: %1 FOUND [%2] ON %3 %4',_ctrlTxt,_x,_display,_control];
  2564. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2565. [] call _AHKickOFF;
  2566. };
  2567. } forEach _verybadStrings;
  2568. };
  2569. };
  2570. };
  2571. };
  2572. } forEach (allControls _display);
  2573. };
  2574. };
  2575. } forEach allDisplays;
  2576. "; if(_check_Notifications)then{ _A3AHstring = _A3AHstring + "
  2577. if(!isNil 'BIS_fnc_showNotification_queue')then
  2578. {
  2579. if(typeName BIS_fnc_showNotification_queue isEqualTo 'ARRAY')then
  2580. {
  2581. {
  2582. if(!isNil'_x')then
  2583. {
  2584. if(typeName _x isEqualTo 'ARRAY')then
  2585. {
  2586. {
  2587. _array = nil;
  2588. _array = _x select 9;
  2589. if(!isNil'_array')then
  2590. {
  2591. {
  2592. if!(_x isEqualTo '')then
  2593. {
  2594. _log = format['Hacked: showNotification - %1',_x];
  2595. [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog;
  2596. BIS_fnc_showNotification_queue = [];
  2597. };
  2598. } forEach _array;
  2599. };
  2600. } forEach _x;
  2601. };
  2602. };
  2603. } forEach BIS_fnc_showNotification_queue;
  2604. }
  2605. else
  2606. {
  2607. _log = format['Hacked: showNotification type changed to %1',typeName BIS_fnc_showNotification_queue,BIS_fnc_showNotification_queue];
  2608. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  2609. [] call _AHKickOFF;
  2610. };
  2611. };
  2612. "; }; _A3AHstring = _A3AHstring + "
  2613. _uiNamespace_dynamicText = uiNamespace getVariable 'BIS_dynamicText';
  2614. if(!isNil '_uiNamespace_dynamicText')then
  2615. {
  2616. _allCtrls = allControls _uiNamespace_dynamicText;
  2617. _whiteListed = ['','Debug Mode Enabled'];
  2618. {if(getPlayerUID _x != '')then{_whiteListed pushBack (name _x);};} forEach playableUnits;
  2619. {
  2620. _ctrl = _x;
  2621. _txt = ctrlText _ctrl;
  2622. if(_txt != _lastText)then
  2623. {
  2624. if!(_txt in _whiteListed)then
  2625. {
  2626. _lastText = _txt;
  2627. _ltxt = toLower _txt;
  2628. {
  2629. if(_ltxt find _x != -1)then
  2630. {
  2631. _log = format['BadText on %1: %2 - %3',_ctrl,_x,_txt];
  2632. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2633. (findDisplay 46)closeDisplay 0;
  2634. };
  2635. } forEach _verybadStrings;
  2636. };
  2637. };
  2638. } forEach _allCtrls;
  2639. };
  2640.  
  2641. "; if(_CMC)then{ _A3AHstring = _A3AHstring + "
  2642. _cmdm = commandingMenu;
  2643. if(_cmdm != '')then
  2644. {
  2645. _cmdm = toLower _cmdm;
  2646. if(_cmdm in _find1)then
  2647. {
  2648. showCommandingMenu '';
  2649. }
  2650. else
  2651. {
  2652. if!(_cmdm in _find2)then
  2653. {
  2654. if(_cmdm select [0,6] isEqualTo '#user:')then
  2655. {
  2656. _log = format['BadCommandingMenu: %1',_cmdm];
  2657. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2658. (findDisplay 46)closeDisplay 0;
  2659. }
  2660. else
  2661. {
  2662. showCommandingMenu '';
  2663. systemChat format['<infiSTAR.de> commandingMenu: %1 - not Allowed. Please ask your Servers Admin for more Information..!',_cmdm];
  2664. };
  2665. };
  2666. };
  2667. "; if(_KCM)then{ _A3AHstring = _A3AHstring + "
  2668. showCommandingMenu '';
  2669. "; }; _A3AHstring = _A3AHstring + "
  2670. };
  2671. "; }else{ _A3AHstring = _A3AHstring + "
  2672. "; if(_KCM)then{ _A3AHstring = _A3AHstring + "
  2673. showCommandingMenu '';
  2674. "; }; _A3AHstring = _A3AHstring + "
  2675. "; }; _A3AHstring = _A3AHstring + "
  2676. "; if(_CMM)then{ _A3AHstring = _A3AHstring + "
  2677. _display12 = findDisplay 12;
  2678. if(!isNull _display12)then
  2679. {
  2680. _selected = lbSelection (_display12 displayCtrl 1001);
  2681. if(!(_selected isEqualTo [2])&&!(_selected isEqualTo [3]))then
  2682. {
  2683. _control1 = _display12 displayCtrl 1002;
  2684. _size = lbSize _control1;
  2685. if(_size > 2)then
  2686. {
  2687. _texts = [];
  2688. for '_i' from 0 to (_size-1) do
  2689. {
  2690. _lbtxt = _control1 lbText _i;
  2691. _texts pushBack _lbtxt;
  2692. };
  2693. _log = format['Map Sub-Menu %1 size has been changed to %2. Found: %3',_selected,_size,_texts];
  2694. [_name,_puid,'SLOG_SKICK',toArray(_log)] call _AHKickLog;
  2695. (findDisplay 46)closeDisplay 0;
  2696. lbClear _control1;
  2697. };
  2698. };
  2699. _control2 = _display12 displayCtrl 1001;
  2700. _lsize = lbSize _control2;
  2701. if(_lsize > "+str _maxMapMenuEntries+")then
  2702. {
  2703. if(!_mapMenuLogged)then
  2704. {
  2705. _mapMenuLogged = true;
  2706.  
  2707. _texts = [];
  2708. for '_i' from 0 to (_lsize-1) do
  2709. {
  2710. _lbtxt = _control2 lbText _i;
  2711. _texts pushBack _lbtxt;
  2712. };
  2713. _log = format['Map Menu has been changed %1 entries found - Texts: %2',_lsize,_texts];
  2714. [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog;
  2715. };
  2716. for '_i' from ("+str _maxMapMenuEntries+")+1 to _lsize do
  2717. {
  2718. _control2 lbDelete _i;
  2719. };
  2720. };
  2721. };
  2722. "; }; _A3AHstring = _A3AHstring + "
  2723.  
  2724. if(isNull player)then{(findDisplay 46)closeDisplay 0;};
  2725. _type = typeOf player;
  2726. if!(_type isEqualTo 'Exile_Unit_Player')then
  2727. {
  2728. if((currentWeapon player != '')||(player != vehicle player))then
  2729. {
  2730. if((getPos player) distance2D _start_player_pos > 500)then
  2731. {
  2732. _log = format['Player is BADTYPE (invisible hack?): %1 - %2 %3 @%4 %5(KICKED)',_type,player,vehicle player,getPos player,mapGridPosition player];
  2733. [_name,_puid,'SLOG_SKICK',toArray(_log)] call _AHKickLog;
  2734. (findDisplay 46)closeDisplay 0;
  2735. };
  2736. };
  2737. };
  2738. "; if(_URC)then{ _A3AHstring = _A3AHstring + "
  2739. _unit = player;
  2740. if((!isNull _unit)&&{alive _unit})then
  2741. {
  2742. _curecoil = unitRecoilCoefficient _unit;
  2743. if(_curecoil != 1)then
  2744. {
  2745. _log = format['BadRecoil %1 | %2 %3 %4',_curecoil,typeOf _unit,typeOf (vehicle _unit),currentWeapon _unit];
  2746. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2747. (findDisplay 46)closeDisplay 0;
  2748. };
  2749. };
  2750. "; }; _A3AHstring = _A3AHstring + "
  2751. _veh = vehicle player;
  2752. if(isNull objectParent player)then
  2753. {
  2754. "; if((_LVC)&&(!_UAT))then{ _A3AHstring = _A3AHstring + "
  2755. _type = typeOf player;
  2756. if!(_type isEqualTo 'Exile_Unit_GhostPlayer')then
  2757. {
  2758. _netId = netId player;
  2759. if!(_netId select [0,2] isEqualTo '2:')then
  2760. {
  2761. _log = format['Not Local PlayerObject: %1 with netId %2 @%3',typeOf player,_netId,getPos player];
  2762. deleteVehicle player;
  2763. [_name,_puid,'TMPBAN',toArray(_log),time + 600] call _AHKickLog;
  2764. [] call _AHKickOFF;
  2765. };
  2766. };
  2767. "; }; _A3AHstring = _A3AHstring + "
  2768. }
  2769. else
  2770. {
  2771. "; if((_LVC)&&(!_UAT))then{ _A3AHstring = _A3AHstring + "
  2772. _netId = netId player;
  2773. if(_netId isEqualTo '0:0')then
  2774. {
  2775. _type = typeOf _veh;
  2776. _log = format['LocalVehicle: %1 with netId 0:0 @%2',_type,getPosATL _veh];
  2777. deleteVehicle _veh;
  2778. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  2779. };
  2780. "; }; _A3AHstring = _A3AHstring + "
  2781. _ropeAttachedObjects = ropeAttachedObjects _veh;
  2782. if!(_ropeAttachedObjects isEqualTo [])then
  2783. {
  2784. if(!isNull _x)then
  2785. {
  2786. if(locked _x isEqualTo 2)exitWith
  2787. {
  2788. {ropeDestroy _x;} forEach (ropes _veh);
  2789. {ropeDestroy _x;} forEach (ropes _x);
  2790.  
  2791. _log = 'You can not SlingLoad / Rope Attach a locked vehicle!';
  2792. systemChat ('<infiSTAR.de> '+_log);
  2793. cutText [_log, 'PLAIN'];
  2794.  
  2795. _log = format['Slingloaded / Rope Attached a locked vehicle: %1',_x];
  2796. [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog;
  2797. };
  2798. if(!ropeAttachEnabled _x)exitWith
  2799. {
  2800. {ropeDestroy _x;} forEach (ropes _veh);
  2801. {ropeDestroy _x;} forEach (ropes _x);
  2802.  
  2803. _log = 'You can not SlingLoad / Rope Attach this vehicle!';
  2804. systemChat ('<infiSTAR.de> '+_log);
  2805. cutText [_log, 'PLAIN'];
  2806.  
  2807. _log = format['Slingloaded / Rope Attached a vehicle that has ropeAttach disabled!: %1',_x];
  2808. [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog;
  2809. };
  2810. "; if(_slingload_check)then{ _A3AHstring = _A3AHstring + "
  2811. if!(crew _x isEqualTo [])exitWith
  2812. {
  2813. {ropeDestroy _x;} forEach (ropes _veh);
  2814. {ropeDestroy _x;} forEach (ropes _x);
  2815.  
  2816. _log = 'You can not SlingLoad / Rope Attach a vehicle with a crew!';
  2817. systemChat ('<infiSTAR.de> '+_log);
  2818. cutText [_log, 'PLAIN'];
  2819. };
  2820. "; }; _A3AHstring = _A3AHstring + "
  2821. };
  2822. };
  2823. };
  2824.  
  2825. {
  2826. _obj = agent _x;
  2827. if(local _obj)then
  2828. {
  2829. _weapons = weapons _obj;
  2830. _magazines = magazines _obj;
  2831. _items = items _obj;
  2832. if(count _weapons > 0 || count _magazines > 0 || count _items > 0)then
  2833. {
  2834. deleteVehicle _obj;
  2835. _log = format['Loadout Bot found @%1 %2 with [%3,%4,%5]',position _obj,mapGridPosition _obj,_weapons,_magazines,_items];
  2836. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2837. [] call _AHKickOFF;
  2838. };
  2839. };
  2840. } forEach agents;
  2841. "; if(_attach_to_check)then{ _A3AHstring = _A3AHstring + "
  2842. if(diag_tickTime > _checkedclose)then
  2843. {
  2844. _checkedclose = diag_tickTime + 10;
  2845. _veh = vehicle player;
  2846. _closeveh = [_veh];
  2847. _closeveh append (_veh nearEntities ['AllVehicles',100]);
  2848. {
  2849. if(!isNull _x)then
  2850. {
  2851. _xobj = _x;
  2852. if(!isNull _xobj)then
  2853. {
  2854. _attcheXdobjects = attachedObjects _x;
  2855. if!(_attcheXdobjects isEqualTo [])then
  2856. {
  2857. _cntQd = {(toLower (typeOf _x)) find 'quad' != -1} count _attcheXdobjects;
  2858. if(_cntQd > 5)then
  2859. {
  2860. detach _xobj;
  2861. {detach _x;} forEach _attcheXdobjects;
  2862. if(_xobj isEqualTo _veh)then
  2863. {
  2864. _log = format['x attached to vehicle player: %1 - %2 @%3 %4',typeOf _xobj,_attcheXdobjects,position player,mapGridPosition player];
  2865. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2866. [] call _AHKickOFF;
  2867. }
  2868. else
  2869. {
  2870. _log = format['Attached Objects found: %1 - %2 @%3 %4',typeOf _xobj,_attcheXdobjects,position _xobj,mapGridPosition _xobj];
  2871. [_name,_puid,'HLOG',toArray(_log)] call _AHKickLog;
  2872. };
  2873. };
  2874. if(_veh in _attcheXdobjects)then
  2875. {
  2876. detach _veh;
  2877. _log = format['vehicle player attached to x: %1 - %2 @%3 %4',typeOf _xobj,_attcheXdobjects,position player,mapGridPosition player];
  2878. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2879. [] call _AHKickOFF;
  2880. };
  2881. };
  2882. };
  2883. };
  2884. } forEach _closeveh;
  2885. };
  2886. "; }; _A3AHstring = _A3AHstring + "
  2887. if((groupIconsVisible isEqualTo [true,false])||(groupIconsVisible isEqualTo [false,true]))then
  2888. {
  2889. _log = format['ESP/MAP-HACK (groupIcons): %1',groupIconsVisible];
  2890. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  2891. [] call _AHKickOFF;
  2892. };
  2893. uiSleep .75;
  2894. };
  2895. _slowloop = {
  2896. if!((str _randvar3) isEqualTo (str ('test'+str _random)))then
  2897. {
  2898. _log = format['_randvar3 has been changed to %1',_randvar3];
  2899. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  2900. [] call _AHKickOFF;
  2901. };
  2902. "; if(_CAP)then{ _A3AHstring = _A3AHstring + "
  2903. if(player isEqualTo _object)then[{_acnt = _acnt + 1},{_object = player;_acnt = 0}];
  2904. _actionid = player addAction ['', '', [], -5, false, true, '', 'false'];player removeAction _actionid;
  2905. if(_actionid > _acnt + 1)then
  2906. {
  2907. removeAllActions player;removeAllActions (vehicle player);
  2908. _acnt = _actionid;
  2909. };
  2910. "; }; _A3AHstring = _A3AHstring + "
  2911. "; if(_UFI||_UIW)then{ _A3AHstring = _A3AHstring + "
  2912. _inventory = [];
  2913. {_inventory pushBack _x;} forEach (assignedItems player);
  2914. {_inventory pushBack _x;} forEach (magazines player);
  2915. {_inventory pushBack _x;} forEach (weapons player);
  2916. {_inventory pushBack _x;} forEach (primaryWeaponItems player);
  2917. {_inventory pushBack _x;} forEach (secondaryWeaponItems player);
  2918. _inventory pushBack (primaryWeapon player);
  2919. _inventory pushBack (secondaryWeapon player);
  2920. _inventory pushBack (uniform player);
  2921. _inventory pushBack (vest player);
  2922. _inventory pushBack (backpack player);
  2923. _inventory pushBack (headgear player);
  2924. _inventory pushBack (goggles player);
  2925. if!(_inventory isEqualTo [])then
  2926. {
  2927. {
  2928. if(_x != '')then
  2929. {
  2930. if((_x in "+str _ForbiddenItems+") || (("+str _UIW+") && !(_x in "+str _ItemWhiteList+")))then
  2931. {
  2932. player removeItem _x;
  2933. player removeWeapon _x;
  2934. player removeMagazine _x;
  2935. if((uniform player) == _x)then{removeUniform player;};
  2936. if((vest player) == _x)then{removeVest player;};
  2937. if((backpack player) == _x)then{removeBackpack player;};
  2938. if((headgear player) == _x)then{removeHeadgear player;};
  2939. if((goggles player) == _x)then{removeGoggles player;};
  2940. player removePrimaryWeaponItem _x;
  2941. player removeSecondaryWeaponItem _x;
  2942. player unlinkItem _x;
  2943. _log = format['BadItem: %1 (might have been from an admin!)',_x];
  2944. [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog;
  2945. };
  2946. };
  2947. } forEach _inventory;
  2948. };
  2949. "; }; _A3AHstring = _A3AHstring + "
  2950. "; if(_checkHiddenObjects)then{ _A3AHstring = _A3AHstring + "
  2951. _pos = getPos player;
  2952. _objects = nearestObjects [_pos, ['Exile_Construction_Abstract_Static','AbstractConstruction','Exile_Construction_Flag_Static'], 250];
  2953. {
  2954. if(isObjectHidden _x)then
  2955. {
  2956. _log = format['Invisible OBJECT: %1 @%2 %3',typeOf _x,getPos _x,mapGridPosition _x];
  2957. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2958. [] call _AHKickOFF;
  2959. };
  2960. } forEach _objects;
  2961. "; }; _A3AHstring = _A3AHstring + "
  2962. uiSleep 5;
  2963. };
  2964.  
  2965. "; if((_wall_look)||(_wall_glitch_object)||(_wall_glitch_vehicle))then{ _A3AHstring = _A3AHstring + "
  2966. _bigInputArray pushBack [
  2967. [_name,_uid,_AHKickOFF,_AHKickLog,_glitchcode],
  2968. {
  2969. scriptName '2';
  2970. _name = _this select 0;
  2971. _puid = _this select 1;
  2972. _AHKickOFF = _this select 2;
  2973. _AHKickLog = _this select 3;
  2974.  
  2975. _fn_check_allowed_build = {
  2976. _flags = player nearObjects ['Exile_Construction_Flag_Static', 50];
  2977. if(_flags isEqualTo [])exitWith{false};
  2978.  
  2979. _val = true;
  2980. {
  2981. _radius = _x getVariable['ExileTerritorySize', -1];
  2982. if((player distance2D _x) < _radius)then
  2983. {
  2984. _buildRights = _x getVariable['ExileTerritoryBuildRights', []];
  2985. {
  2986. if((getPlayerUID _x) in _buildRights)exitWith
  2987. {
  2988. _val = false;
  2989. };
  2990. } forEach (units(group player));
  2991. };
  2992. if(!_val)exitWith{};
  2993. } forEach _flags;
  2994. _val
  2995. };
  2996. "; if(_wall_look)then{ _A3AHstring = _A3AHstring + "
  2997. _faded = false;
  2998. _fadeTimer = time;
  2999. _dis_head = 0.20;
  3000. _dis_weapon_l = 0.20;
  3001. _dis_weapon_r = 0.30;
  3002. _dir_weapon_r = 0;
  3003. _dir_weapon_l = 0;
  3004. "; }; _A3AHstring = _A3AHstring + "
  3005. "; if(_wall_glitch_object)then{ _A3AHstring = _A3AHstring + "
  3006. _floorGlitchReported = time;
  3007. _wallGlitchReported = time;
  3008. _fn_push_back = {
  3009. _vel = velocity player;
  3010. _dir = getDirVisual player;
  3011. _speed = -15;
  3012. player setVelocity [
  3013. (_vel select 0) + (sin _dir * _speed),
  3014. (_vel select 1) + (cos _dir * _speed),
  3015. -1
  3016. ];
  3017. };
  3018. _fn_check_object = {
  3019. if(_type isEqualTo 'Exile_Construction_ConcreteFloor_Static')exitWith{true};
  3020. if(_type isEqualTo 'Exile_Construction_WoodFloor_Static')exitWith{true};
  3021. if(_type isEqualTo 'Exile_Construction_WoodFloor_Reinforced_Static')exitWith{true};
  3022.  
  3023. _floor = false;
  3024. if(_type isEqualTo 'Exile_Construction_ConcreteWall_Static')exitWith{true};
  3025. if(_type isEqualTo 'Exile_Construction_WoodWall_Static')exitWith{true};
  3026. if(_type isEqualTo 'Exile_Construction_WoodWall_Reinforced_Static')exitWith{true};
  3027. if(_type isEqualTo 'Exile_Construction_WoodWallHalf_Static')exitWith{true};
  3028. if(_type isEqualTo 'Exile_Construction_WoodWallHalf_Reinforced_Static')exitWith{true};
  3029.  
  3030. if(_type isEqualTo 'Exile_Construction_ConcreteWindow_Static')exitWith{true};
  3031. if(_type isEqualTo 'Exile_Construction_ConcreteWindowHatch_Static')exitWith{true};
  3032. if(_type isEqualTo 'Exile_Construction_WoodWindow_Static')exitWith{true};
  3033. if(_type isEqualTo 'Exile_Construction_WoodWindow_Reinforced_Static')exitWith{true};
  3034.  
  3035. if((_type isEqualTo 'Exile_Construction_ConcreteDoor_Static')&&(_x animationPhase 'DoorRotation' isEqualTo 0))exitWith{true};
  3036. if((_type isEqualTo 'Exile_Construction_WoodDoor_Static')&&(_x animationPhase 'DoorRotation' isEqualTo 0))exitWith{true};
  3037. if((_type isEqualTo 'Exile_Construction_WoodDoor_Reinforced_Static')&&(_x animationPhase 'DoorRotation' isEqualTo 0))exitWith{true};
  3038.  
  3039. if((_type isEqualTo 'Exile_Construction_ConcreteGate_Static')&&(_x animationPhase 'DoorRotationLeft' isEqualTo 0))exitWith{true};
  3040. if((_type isEqualTo 'Exile_Construction_WoodGate_Static')&&(_x animationPhase 'DoorRotationLeft' isEqualTo 0))exitWith{true};
  3041. if((_type isEqualTo 'Exile_Construction_WoodGate_Reinforced_Static')&&(_x animationPhase 'DoorRotationLeft' isEqualTo 0))exitWith{true};
  3042. false
  3043. };
  3044. "; }; _A3AHstring = _A3AHstring + "
  3045. "; if(_wall_glitch_object)then{ _A3AHstring = _A3AHstring + "
  3046. _glitchcounter = 0;
  3047. _lastglitch = time;
  3048. _fn_punish_glitch = {
  3049. if(time - _lastglitch > 180)then{_glitchcounter = 0;};
  3050. _lastglitch = time;
  3051. call {
  3052. if(_glitchcounter >= 3)exitWith
  3053. {
  3054. [_name,_puid,'TMPBAN',toArray(_log),time + 300] call _AHKickLog;
  3055. [] call _AHKickOFF;
  3056. };
  3057. if(_glitchcounter >= 2)exitWith
  3058. {
  3059. [_name,_puid,'SLOG_GLITCH',toArray(_log),player,clientOwner] call _AHKickLog;
  3060. };
  3061. if(_glitchcounter >= 1)exitWith
  3062. {
  3063. [_name,_puid,'SLOG_GLITCH',toArray(_log)] call _AHKickLog;
  3064. player action ['TOUCHOFF',player];
  3065. };
  3066. };
  3067. _glitchcounter = _glitchcounter + 1;
  3068. };
  3069. "; }; _A3AHstring = _A3AHstring + "
  3070. "; if(_wall_glitch_vehicle)then{ _A3AHstring = _A3AHstring + "
  3071. _GetOutMan = ""
  3072. params['_unit','_position','_vehicle','_turret'];
  3073. if (_unit == player) then {
  3074. _visualPos = getPosATLVisual _vehicle;
  3075. _visualPos set[2, (_visualPos select 2) + 1];
  3076. _dirTo = [_vehicle, player] call BIS_fnc_dirTo;
  3077. _secondPos = [_visualPos, (_vehicle distance2D player) + 1, _dirTo] call BIS_fnc_relPos;
  3078. {
  3079. if(_x isKindOf 'Exile_Construction_Abstract_Static')exitWith
  3080. {
  3081. player setPos (getPos _vehicle);
  3082. player moveInAny _vehicle;
  3083. if(call '+str _fn_check_allowed_build+')then
  3084. {
  3085. _log = format['WALL GLITCH CHECK (getout/ejected from vehicle) - @%1 %2',mapGridPosition _visualPos,_visualPos];
  3086. ['+str _name+','+str _puid+','SLOG_GLITCH',toArray(_log)] call '+str _AHKickLog+';
  3087. };
  3088. };
  3089. } forEach lineintersectsobjs[ATLToASL _visualPos, ATLToASL _secondPos, player, _vehicle, true, 2];
  3090. };
  3091. "";
  3092. "; }; _A3AHstring = _A3AHstring + "
  3093. while{true}do{call (_this select 4);};
  3094. }
  3095. ];
  3096. "; }; _A3AHstring = _A3AHstring + "
  3097. if(_isNormal)then
  3098. {
  3099. "; if(_UAT)then{ _A3AHstring = _A3AHstring + "
  3100. _bigInputArray pushBack [
  3101. [_name,_uid,_AHKickOFF,_AHKickLog,_atLoopCode],
  3102. {
  3103. scriptName '3';
  3104. private['_name','_puid','_AHKickOFF','_AHKickLog','_fn_set_reset','_lastpos','_log','_lasttime','_difftime','_curpos','_driver','_curnetId','_type','_allowTP','_fn_inTradeZone','_inTrader','_curVehicle','_oldVehicle','_distance','_speedcalc','_speed','_topSpeed','_topSpeedcalc','_topSpeedcalcOLD','_livestarted'];
  3105. _name = _this select 0;
  3106. _puid = _this select 1;
  3107. _AHKickOFF = _this select 2;
  3108. _AHKickLog = _this select 3;
  3109. scriptName ""ANTI TP"";
  3110. waitUntil{getClientStateNumber >= 10};
  3111. waituntil{!isNull findDisplay 46};
  3112. uiSleep 3;
  3113.  
  3114. _allowTP = [];
  3115. {
  3116. _markerType = markerType _x;
  3117. if(_markerType isEqualTo 'ExileTraderZone')then
  3118. {
  3119. _markerPos = markerPos _x;
  3120. _markerSize = markerSize _x;
  3121. _allowTP pushBack [_markerPos,(_markerSize select 0)+40];
  3122. };
  3123. } forEach allMapMarkers;
  3124. "; if!(_allowTPcfg isEqualTo [])then{ _A3AHstring = _A3AHstring + "
  3125. _allowTP append "+str _allowTPcfg+";
  3126. "; }; _A3AHstring = _A3AHstring + "
  3127.  
  3128. _fn_inTradeZone = {
  3129. try
  3130. {
  3131. {
  3132. _mpos = _x select 0;
  3133. _msize = _x select 1;
  3134. if((_curpos distance2D _mpos < _msize)&&(_lastpos distance2D _mpos < _msize))then{throw true;};
  3135. } forEach _allowTP;
  3136. false
  3137. }
  3138. catch
  3139. {
  3140. _exception
  3141. };
  3142. };
  3143. if(_allowTP isEqualTo [])then{_fn_inTradeZone = {false};};
  3144. _tmpTime = time + 5;waitUntil {time > _tmpTime};
  3145. _fn_getPos = {
  3146. params[['_obj',vehicle player]];
  3147. _p = getPosATL _obj;
  3148. if(surfaceIsWater _p)then{_p = getPosASL _obj;};
  3149. _p
  3150. };
  3151. _fn_setPos = {
  3152. params[['_obj',vehicle player],['_lp',[0,0,0]]];
  3153. if(surfaceIsWater _lp)then{_obj setPosASL _lp;}else{_obj setPosATL _lp;};
  3154. _curpos = _lp;
  3155. _lastpos = _lp;
  3156. uiSleep 0.1;
  3157. };
  3158. _firstPos = player call _fn_getPos;
  3159. _firstPosTPUSED = false;
  3160. _curVehicle = vehicle player;
  3161. _oldVehicle = _curVehicle;
  3162. _curpos = _curVehicle call _fn_getPos;
  3163. _lastpos = _curVehicle call _fn_getPos;
  3164. _type = typeOf _curVehicle;
  3165. _topSpeedcalc = 0;
  3166. _topSpeedcalcOLD = 0;
  3167. _livestarted = diag_tickTime;
  3168. _touchedground = false;
  3169. _exitPlease = false;
  3170. _revertcounter = 0;
  3171. _revertcounterlastcount = 0;
  3172. uiNameSpace setVariable['"+_AHpos+"',[0,0,0]];
  3173. while{true}do{call (_this select 4);};
  3174. }
  3175. ];
  3176. "; }; _A3AHstring = _A3AHstring + "
  3177. _bigInputArray pushBack [
  3178. [_name,_uid,_AHKickOFF,_AHKickLog,_badIDDsToKick,_badIDDsToClose,_allowedIDDs,_iddchecks,_admin],
  3179. {
  3180. scriptName '4';
  3181. disableSerialization;
  3182. _name = _this select 0;
  3183. _puid = _this select 1;
  3184. _AHKickOFF = _this select 2;
  3185. _AHKickLog = _this select 3;
  3186. _badIDDsToKick = _this select 4;
  3187. _badIDDsToClose = _this select 5;
  3188. "; if(_UDW)then{ _A3AHstring = _A3AHstring + "
  3189. _admin = _this select 8;
  3190. _allowedIDDs = _this select 6;
  3191. if(_admin)then{_allowedIDDs pushBackUnique 'Display #-1341';};
  3192. "; }; _A3AHstring = _A3AHstring + "
  3193. _announceDisplayIddOnce = [];
  3194. _verybadStrings = "+str _verybadStrings+";
  3195. _checked = [];
  3196. _lastEmpty = 0;
  3197. {uiNamespace setVariable[_x,nil];} forEach ['RscDisplayRemoteMissions','RscDisplayDebugPublic','RscDisplayMovieInterrupt','RscDisplayArsenal'];
  3198. "; if(_CMC)then{ _A3AHstring = _A3AHstring + "
  3199. _find1 = ['#user:bis_fnc_addcommmenuitem_menu','#user:bis_menu_groupcommunication'];
  3200. _find2tmp = "+str _allowedCommandingMenus+";
  3201. _find2 = [];{_find2 pushBackUnique (toLower _x);} forEach _find2tmp;
  3202. "; }; _A3AHstring = _A3AHstring + "
  3203. _start_player_pos = getPos player;
  3204. _lastText = '';
  3205. _fn_get_texts =
  3206. {
  3207. _txtstmp = [];
  3208. _allctrls = allControls _this;
  3209.  
  3210. {
  3211. _control = _x;
  3212. _controltype = ctrlType _control;
  3213.  
  3214. _logged = false;
  3215. try{
  3216. if(_controltype isEqualTo 5)then
  3217. {
  3218. _size = lbSize _control;
  3219. if(_size > 0)then
  3220. {
  3221. for '_i' from 0 to (_size-1) do
  3222. {
  3223. _lbtxt = _control lbText _i;
  3224. throw format['%1: %2',_control,_lbtxt];
  3225. };
  3226. };
  3227. }
  3228. else
  3229. {
  3230. if(_controltype isEqualTo 12)then
  3231. {
  3232. _curTV = tvCurSel _control;
  3233. _tvtxt = _control tvText _curTV;
  3234. throw format['%1: %2',_control,_tvtxt];
  3235. }
  3236. else
  3237. {
  3238. if!(_controltype in [3,4,8,9,15,42,81,101,102])then
  3239. {
  3240. _ctrlTxt = ctrlText _control;
  3241. throw format['%1: %2',_control,_ctrlTxt];
  3242. };
  3243. };
  3244. };
  3245. }
  3246. catch
  3247. {
  3248. _txtstmp pushBack _exception;
  3249. _logged = true;
  3250. };
  3251. if(!_logged)then{_txtstmp pushBack format['%1',_control];};
  3252. } forEach _allctrls;
  3253. _txtstmp
  3254. };
  3255. _wasclosed = false;
  3256. "; if(_attach_to_check)then{ _A3AHstring = _A3AHstring + "
  3257. _checkedclose = diag_tickTime + 10;
  3258. "; }; _A3AHstring = _A3AHstring + "
  3259. _mapMenuLogged = false;
  3260. while{true}do{call (_this select 7);};
  3261. }
  3262. ];
  3263. _bigInputArray pushBack [
  3264. [_name,_uid,_AHKickOFF,_AHKickLog,_slowloop],
  3265. {
  3266. scriptName '5';
  3267. _name = _this select 0;
  3268. _puid = _this select 1;
  3269. _AHKickOFF = _this select 2;
  3270. _AHKickLog = _this select 3;
  3271. "; if(_CAP)then{ _A3AHstring = _A3AHstring + "
  3272. _object = player;
  3273. _acnt = -1;
  3274. "; }; _A3AHstring = _A3AHstring + "
  3275. _random = round(random 9999);
  3276. _randvar3 = format['test%1',_random];
  3277. while{true}do{call (_this select 4);};
  3278. }
  3279. ];
  3280. };
  3281. "; }; _A3AHstring = _A3AHstring + "
  3282.  
  3283.  
  3284. "; if!(_HTML_LOAD_URL isEqualTo '')then{ _A3AHstring = _A3AHstring + "
  3285. _bigInputArray pushBack
  3286. [
  3287. {
  3288. disableSerialization;
  3289. _display49 = findDisplay 49;
  3290. if(!isNull _display49)then
  3291. {
  3292. if(isNil'HTML_LOAD_URL3')then
  3293. {
  3294. _log = 'HTML_LOAD_URL3 VARIABLE NILLED!';
  3295. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  3296. [] call _AHKickOFF;
  3297. }
  3298. else
  3299. {
  3300. if(typeName HTML_LOAD_URL3 isEqualTo 'STRING')then
  3301. {
  3302. if((_display49 displayCtrl 3307182) isEqualTo controlNull)then
  3303. {
  3304. [
  3305. '',
  3306. {
  3307. if(!isNil'START_LOADING_ESCHTML')then{terminate START_LOADING_ESCHTML;START_LOADING_ESCHTML=nil;};
  3308. START_LOADING_ESCHTML = [] spawn {
  3309. disableSerialization;
  3310. _html = (findDisplay 49) ctrlCreate ['RscHTML', 3307182];
  3311. _html ctrlSetBackgroundColor [0,0,0,0.3];
  3312. _html ctrlSetPosition [
  3313. safeZoneX,
  3314. safeZoneY,
  3315. safeZoneW,
  3316. safeZoneH/3
  3317. ];
  3318. _html ctrlCommit 0;
  3319. _html htmlLoad HTML_LOAD_URL3;
  3320. };
  3321. }
  3322. ] execFSM 'call.fsm';
  3323. };
  3324. }
  3325. else
  3326. {
  3327. _log = format['HTML_LOAD_URL3 VARIABLE CHANGED! TYPE: %1 VAR: %2',typeName HTML_LOAD_URL3,HTML_LOAD_URL3];
  3328. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  3329. [] call _AHKickOFF;
  3330. };
  3331. };
  3332. };
  3333. },
  3334. {
  3335. scriptName '6';
  3336. [0.2, _this, [], true] call ExileClient_system_thread_addTask;
  3337. }
  3338. ];
  3339. "; }; _A3AHstring = _A3AHstring + "
  3340.  
  3341.  
  3342. "; if(_CHECK_DRAWING)then{ _A3AHstring = _A3AHstring + "
  3343. _bigInputArray pushBack
  3344. [
  3345. {
  3346. _need_hlog = true;
  3347. {
  3348. _marker = _x;
  3349. if(_marker find '_USER_DEFINED' > -1)then
  3350. {
  3351. _markerchannel = _marker select [(count _marker)-1,1];
  3352. if(parseNumber _markerchannel > 2)exitWith{};
  3353.  
  3354. _stringsizeSTART = (_marker find '#')+1;
  3355. _stringsizeEND = _marker find '/';
  3356. _markerid = _marker select [_stringsizeSTART,_stringsizeEND - _stringsizeSTART];
  3357. _markerid = parseNumber _markerid;
  3358.  
  3359. _shape = markerShape _marker;
  3360. if(_shape isEqualTo 'POLYLINE')then
  3361. {
  3362. _puid = getPlayerUID player;
  3363. if!(_puid isEqualTo '')then
  3364. {
  3365. _uid = missionNameSpace getVariable[format['UID_BY_ID_%1',_markerid],'-1'];
  3366. if(_puid isEqualTo _uid)then
  3367. {
  3368. deleteMarker _marker;
  3369. _log = 'Deleted drawing on a global channel!';
  3370. systemChat ('<infiSTAR.de> '+_log);
  3371. if(_need_hlog)then
  3372. {
  3373. [profileName,_uid,'SLOG',toArray(_log)] call "+_AHKickLog+";
  3374. };
  3375. _need_hlog = false;
  3376. };
  3377. };
  3378. }
  3379. else
  3380. {
  3381. _name = missionNameSpace getVariable[format['NAME_BY_ID_%1',_markerid],''];
  3382. _markerText = markerText _marker;
  3383. if(_markerText isEqualTo '')then
  3384. {
  3385. _addition = format['%1: ',_name];
  3386. if((_markerText find _addition) isEqualTo -1)then
  3387. {
  3388. _marker setMarkerTextLocal (_addition+_markerText);
  3389. };
  3390. };
  3391. };
  3392. };
  3393. } forEach allMapMarkers;
  3394. },
  3395. {
  3396. scriptName '7';
  3397. [5, _this, [], true] call ExileClient_system_thread_addTask;
  3398. }
  3399. ];
  3400. "; }; _A3AHstring = _A3AHstring + "
  3401.  
  3402.  
  3403. "; if(_ENABLE_PRIVATE_CHAT_MENU)then{ _A3AHstring = _A3AHstring + "
  3404. _bigInputArray pushBack
  3405. [
  3406. {
  3407. if(isNil'CHAT_HISTORY_ARRAY')then{CHAT_HISTORY_ARRAY=[];};
  3408. if(isNil'ACTIVE_CHATS')then{ACTIVE_CHATS=[];};
  3409. CALC_TIME = {
  3410. _hours = floor(time / 60 / 60);
  3411. _minutes = floor((((time / 60 / 60) - _hours) max 0.0001)*60);
  3412. _seconds = time - (_hours*60*60) - (_minutes * 60);
  3413. format['%1h %2min %3s',_hours,_minutes,round _seconds]
  3414. };
  3415. ['CALC_TIME',[CALC_TIME] call fnc_CompilableString] call FN_infiSTAR_F;
  3416. fnc_add_to_playerlist = {
  3417. "; if(_PRIVATE_CHAT_MENU_8GNETWORK)then{ _A3AHstring = _A3AHstring + "
  3418. _xm8enabled = _unit getVariable ['ExileXM8IsOnline',false];
  3419. if(_xm8enabled)then
  3420. {
  3421. "; }; _A3AHstring = _A3AHstring + "
  3422. _name = _unit getVariable['ExileName',name _unit];
  3423. _index = _chat_playerlist lbadd _name;
  3424. _chat_playerlist lbSetData [_index,netId _unit];
  3425.  
  3426. _squadParams = squadParams _unit;
  3427. if!(_squadParams isEqualTo [])then
  3428. {
  3429. _squadinfo = _squadParams select 0;
  3430. _squadpic = _squadinfo select 4;
  3431. if!(_squadpic isEqualTo '')then
  3432. {
  3433. _chat_playerlist lbSetPicture [_index,_squadpic];
  3434. _chat_playerlist lbSetPictureColor [_index,[1, 1, 1, 1]];
  3435. };
  3436. };
  3437. "; if(_PRIVATE_CHAT_MENU_8GNETWORK)then{ _A3AHstring = _A3AHstring + "
  3438. };
  3439. "; }; _A3AHstring = _A3AHstring + "
  3440. };
  3441. ['fnc_add_to_playerlist',[fnc_add_to_playerlist] call fnc_CompilableString] call FN_infiSTAR_F;
  3442. fnc_fill_chat_playerlist = {
  3443. disableSerialization;
  3444. _chat_playerlist = uiNamespace getVariable ['chat_playerlist', controlNull];
  3445. lbClear _chat_playerlist;
  3446. ACTIVE_CHATS = ACTIVE_CHATS - [objNull];
  3447. if!(ACTIVE_CHATS isEqualTo [])then
  3448. {
  3449. {
  3450. _unit = _x;
  3451. call fnc_add_to_playerlist;
  3452. } forEach ACTIVE_CHATS;
  3453. _index = _chat_playerlist lbadd '----------------------------------------------------------------------------------------------------';
  3454. };
  3455.  
  3456. _players = allPlayers;
  3457. {_players set [_forEachIndex, [_x getVariable['ExileName',name _x], _x]];} forEach _players;
  3458. _players sort true;
  3459. {
  3460. _unit = _x select 1;
  3461. if!(_unit isEqualTo player)then
  3462. {
  3463. if!(_unit in ACTIVE_CHATS)then
  3464. {
  3465. call fnc_add_to_playerlist;
  3466. };
  3467. };
  3468. } forEach _players;
  3469. };
  3470. ['fnc_fill_chat_playerlist',[fnc_fill_chat_playerlist] call fnc_CompilableString] call FN_infiSTAR_F;
  3471. fnc_fill_chat_history = {
  3472. disableSerialization;
  3473.  
  3474. _chat_playerlist = uiNamespace getVariable ['chat_playerlist', controlNull];
  3475. _curselection = lbCurSel _chat_playerlist;
  3476. _receiverName = _chat_playerlist lbText _curselection;
  3477.  
  3478. _chat_msgbox = uiNamespace getVariable ['chat_msgbox', controlNull];
  3479. lbClear _chat_msgbox;
  3480. if!(CHAT_HISTORY_ARRAY isEqualTo [])then
  3481. {
  3482. {
  3483. _senderName = _x select 0;
  3484. _receiverNameR = _x select 1;
  3485.  
  3486. if(_receiverName in [_senderName,_receiverNameR])then
  3487. {
  3488. _time = _x select 2;
  3489. _text = _x select 3;
  3490.  
  3491. _pretxt = format['%1 (%2): ',_senderName,_time];
  3492.  
  3493. _index = 0;
  3494. _textsize = count _text;
  3495. _maxtsize = 165-(count _pretxt);
  3496. if(_textsize > _maxtsize)then
  3497. {
  3498. _partcount = ceil(_textsize / _maxtsize);
  3499.  
  3500. _first = 0;
  3501. _index = _chat_msgbox lbAdd format['%1%2',_pretxt,_text select [_first,_maxtsize]];
  3502. for '_i' from 1 to (_partcount) do
  3503. {
  3504. _first = _maxtsize*_i;
  3505. _curtxt = _text select [_first,_maxtsize];
  3506. if(_curtxt != '')then
  3507. {
  3508. _index = _chat_msgbox lbAdd _curtxt;
  3509. };
  3510. };
  3511. }
  3512. else
  3513. {
  3514. _index = _chat_msgbox lbAdd format['%1%2',_pretxt,_text];
  3515. };
  3516. if(_senderName isEqualTo (name player))then{_chat_msgbox lbSetColor [_index,[0,0.8,1,1]];};
  3517. _chat_msgbox lbSetCurSel _index;
  3518. _chat_msgbox lbSetCurSel -1;
  3519. };
  3520. } forEach CHAT_HISTORY_ARRAY;
  3521. };
  3522. };
  3523. ['fnc_fill_chat_history',[fnc_fill_chat_history] call fnc_CompilableString] call FN_infiSTAR_F;
  3524. fnc_chat_send = {
  3525. disableSerialization;
  3526. _chat_playerlist = uiNamespace getVariable ['chat_playerlist', controlNull];
  3527. _curselection = lbCurSel _chat_playerlist;
  3528. _receiverName = _chat_playerlist lbText _curselection;
  3529.  
  3530. _stop = true;
  3531. {if((_x getVariable['ExileName',name _x]) isEqualTo _receiverName)exitWith{_stop = false;};} forEach allPlayers;
  3532. if(_stop)exitWith{['ErrorTitleOnly', ['The player you want to message is not connected (maybe in lobby)']] call ExileClient_gui_toaster_addTemplateToast;};
  3533.  
  3534. _senderName = name player;
  3535. if(_receiverName isEqualTo '')exitWith{['ErrorTitleOnly', ['Select a player on the left that you want to write a message!']] call ExileClient_gui_toaster_addTemplateToast;};
  3536. _receiverNetId = _chat_playerlist lbData _curselection;
  3537.  
  3538. _chat_inputfield = uiNamespace getVariable ['chat_inputfield', controlNull];
  3539. _text = ctrlText _chat_inputfield;
  3540. if(_text isEqualTo '')exitWith{['ErrorTitleOnly', ['Please enter a Text!']] call ExileClient_gui_toaster_addTemplateToast;};
  3541. _chat_inputfield ctrlSetText '';
  3542.  
  3543. _time = call CALC_TIME;
  3544. [3,[4,[netId player,_receiverNetId,_time,_text]]] call FN_infiSTAR_CS;
  3545. CHAT_HISTORY_ARRAY pushBack [_senderName,_receiverName,_time,_text];
  3546.  
  3547. _receiverObj = (objectFromNetId _receiverNetId);
  3548. ACTIVE_CHATS = ACTIVE_CHATS - [_receiverObj];
  3549. ACTIVE_CHATS pushBackUnique _receiverObj;
  3550.  
  3551. playsound 'AddItemOK';
  3552. call fnc_fill_chat_history;
  3553. call fnc_fill_chat_playerlist;
  3554. };
  3555. ['fnc_chat_send',[fnc_chat_send] call fnc_CompilableString] call FN_infiSTAR_F;
  3556. fnc_chat_onLBSelChanged = {
  3557. disableSerialization;
  3558. call fnc_fill_chat_history;
  3559. _chat_text1 = uiNamespace getVariable ['chat_text1', controlNull];
  3560.  
  3561. _chat_playerlist = uiNamespace getVariable ['chat_playerlist', controlNull];
  3562. _curselection = lbCurSel _chat_playerlist;
  3563. _receiverName = _chat_playerlist lbText _curselection;
  3564.  
  3565. _chat_text1 ctrlSetText format['Chatpartner: %1',_receiverName];
  3566. };
  3567. ['fnc_chat_onLBSelChanged',[fnc_chat_onLBSelChanged] call fnc_CompilableString] call FN_infiSTAR_F;
  3568. fnc_chat_onKeyDown = {
  3569. _key = _this select 1;
  3570. _return = false;
  3571. if(_key in [0x1C,0x9C])then
  3572. {
  3573. call fnc_chat_send;
  3574. _return = true;
  3575. };
  3576. _return
  3577. };
  3578. ['fnc_chat_onKeyDown',[fnc_chat_onKeyDown] call fnc_CompilableString] call FN_infiSTAR_F;
  3579. },
  3580. {
  3581. scriptName '8';
  3582. call _this
  3583. }
  3584. ];
  3585. "; }; _A3AHstring = _A3AHstring + "
  3586.  
  3587.  
  3588. "; if(_fix_uniform_and_vest)then{ _A3AHstring = _A3AHstring + "
  3589. _bigInputArray pushBack [
  3590. [_name,_uid,_AHKickLog],
  3591. {
  3592. scriptName '9';
  3593. _name = _this select 0;
  3594. _uid = _this select 1;
  3595. _AHKickLog = _this select 2;
  3596.  
  3597. fnc_check_uniform_n_vest = ""
  3598. if(isNil 'ExileClientLoadedIn')exitWith{};
  3599. params ['_uniform', '_vest'];
  3600. _myuniform = uniform player;
  3601. if!(_myuniform isEqualTo '')then
  3602. {
  3603. if!(_myuniform isEqualTo _uniform)then
  3604. {
  3605. _uniformContent = (uniformContainer player) call ExileClient_util_containerCargo_serialize;
  3606. uiSleep 0.1;
  3607. removeUniform player;
  3608. player forceAddUniform _myuniform;
  3609. uiSleep 0.1;
  3610. [(uniformContainer player), _uniformContent] call ExileClient_util_containerCargo_deserialize;
  3611. systemChat '<infiSTAR.de> just replaced your UNIFORM as it was not shown for other players #ARMABUGS';
  3612. };
  3613. };
  3614. _myvest = vest player;
  3615. if!(_myvest isEqualTo '')then
  3616. {
  3617. if!(_myvest isEqualTo _vest)then
  3618. {
  3619. _vestContent = (vestContainer player) call ExileClient_util_containerCargo_serialize;
  3620. uiSleep 0.1;
  3621. removeVest player;
  3622. player addVest _myvest;
  3623. uiSleep 0.1;
  3624. [(vestContainer player), _vestContent] call ExileClient_util_containerCargo_deserialize;
  3625. systemChat '<infiSTAR.de> just replaced your VEST as it was not shown for other players #ARMABUGS';
  3626. };
  3627. };
  3628. "";
  3629. ['fnc_check_uniform_n_vest',fnc_check_uniform_n_vest] call FN_infiSTAR_F;
  3630. }
  3631. ];
  3632. "; }; _A3AHstring = _A3AHstring + "
  3633.  
  3634.  
  3635. "; if(_ENABLE_NOTIFICATION_MESSAGES)then{ _A3AHstring = _A3AHstring + "
  3636. _bigInputArray pushBack
  3637. [
  3638. {
  3639. [] spawn {
  3640. waitUntil {!isNull findDisplay 46};
  3641. waitUntil {!isNil 'ExileSystemThreadSleep'};
  3642. uiSleep 1;
  3643. {_x set [0,(_x select 0)*60];_x set [1,(_x select 1)*60];NOTIFY_MSG_ARRAY set [_forEachIndex,_x];} forEach NOTIFY_MSG_ARRAY;
  3644. LAST_NOTIFICATION_SHOWN = 0;
  3645. _code = {
  3646. {
  3647. if(time > LAST_NOTIFICATION_SHOWN)then
  3648. {
  3649. ctrlDelete ((findDisplay 46) displayCtrl 117997);
  3650. if!(_x isEqualTo [])then
  3651. {
  3652. _timetostart = _x select 0;
  3653. if(time > _timetostart)then
  3654. {
  3655. if((time - 135 < _timetostart)||(_timetostart isEqualTo -60))then
  3656. {
  3657. LAST_NOTIFICATION_SHOWN = time + (_x select 2);
  3658. ctrlDelete ((findDisplay 46) displayCtrl 117997);
  3659. _ctrl = (findDisplay 46) ctrlCreate['RscStructuredText', 117997];
  3660. _ctrl ctrlSetPosition [_x select 4,_x select 5,1,1];
  3661. _ctrl ctrlSetScale 2;
  3662. _ctrl ctrlCommit 0;
  3663. _ctrl ctrlSetStructuredText parseText format['<t size=''%1'' color=''%2'' align=''left''>%3</t>',_x select 3,_x select 6,_x select 7];
  3664.  
  3665. if(_timetostart isEqualTo -60)then
  3666. {
  3667. NOTIFY_MSG_ARRAY set [_forEachIndex,[]];
  3668. }
  3669. else
  3670. {
  3671. _x set [0,time + (_x select 1)];
  3672. NOTIFY_MSG_ARRAY set [_forEachIndex,_x];
  3673. };
  3674. };
  3675. };
  3676. };
  3677. };
  3678. } forEach NOTIFY_MSG_ARRAY;
  3679. };
  3680. if(!isNil'msgthreadid')then{[msgthreadid] call ExileClient_system_thread_removeTask;msgthreadid=nil;};
  3681. msgthreadid = [1, _code, [], true] call ExileClient_system_thread_addtask;
  3682. };
  3683. },
  3684. {
  3685. scriptName '10';
  3686. call _this
  3687. }
  3688. ];
  3689. "; }; _A3AHstring = _A3AHstring + "
  3690.  
  3691.  
  3692. "; if(_experimental_dupe_check)then{ _A3AHstring = _A3AHstring + "
  3693. _bigInputArray pushBack
  3694. [
  3695. [_name,_uid,_AHKickLog],
  3696. {
  3697. scriptName ""anti dupe check"";
  3698. params[['_name',''],['_uid',''],['_AHKickLog',{}]];
  3699. waituntil{!isNull findDisplay 46};
  3700. if(isNil'ExilePlayerInSafezone')then{ExilePlayerInSafezone = false;};
  3701. _objects = [];
  3702. _ALL_container = [];
  3703. _containercount = -1;
  3704. _lastcontainercount = -1;
  3705. while{true}do
  3706. {
  3707. if!(ExilePlayerInSafezone isEqualType true)exitWith
  3708. {
  3709. _log = format['ExilePlayerInSafezone VARIABLE HACKED! TYPE: %1 VAR: %2',typeName ExilePlayerInSafezone,ExilePlayerInSafezone];
  3710. [_name,_uid,'BAN',toArray(_log)] call _AHKickLog;
  3711. };
  3712. _lastObjects = _objects;
  3713. _objects = nearestObjects [player, ['LootWeaponHolder', 'GroundWeaponHolder', 'WeaponHolderSimulated','Exile_Unit_Player','LandVehicle','Ship','Air'],20];
  3714. {{_objects pushBackUnique _x;} forEach (crew _x);} forEach _objects;
  3715. if(_lastObjects isEqualTo _objects)then
  3716. {
  3717. _lastcontainer = _ALL_container;
  3718. _lastcontainercount = _containercount;
  3719. _ALL_container = [];
  3720. {
  3721. if(!isNull _x)then
  3722. {
  3723. _object = _x;
  3724. _containers = backpackCargo _object;
  3725. if(!isNil '_containers')then
  3726. {
  3727. if(_containers isEqualTo [])then
  3728. {
  3729. _backpack = backpack _object;
  3730. if!(_backpack isEqualTo '')then
  3731. {
  3732. _ALL_container pushBack _backpack;
  3733. };
  3734. }
  3735. else
  3736. {
  3737. _ALL_container append _containers;
  3738. };
  3739. };
  3740. };
  3741. } forEach _objects;
  3742.  
  3743. _containercount = count _ALL_container;
  3744. if((_containercount > _lastcontainercount) && (_lastcontainercount > -1))then
  3745. {
  3746. _types_and_count__old = [];
  3747. {
  3748. _type = _x;
  3749. _typecount = {_x isEqualTo _type} count _lastcontainer;
  3750. _types_and_count__old pushBackUnique [_type,_typecount];
  3751. } forEach _lastcontainer;
  3752.  
  3753. _types_and_count = [];
  3754. {
  3755. _type = _x;
  3756. _typecount = {_x isEqualTo _type} count _ALL_container;
  3757. _types_and_count pushBackUnique [_type,_typecount];
  3758. } forEach _ALL_container;
  3759.  
  3760. _foundAdded = [];
  3761. {
  3762. if!(_x in _types_and_count__old)then
  3763. {
  3764. if(_x select 1 > 2)then
  3765. {
  3766. _foundAdded pushBack _x;
  3767. };
  3768. };
  3769. } forEach _types_and_count;
  3770.  
  3771. if!(_foundAdded isEqualTo [])then
  3772. {
  3773. [_name,_uid,'EXPERIMENTAL_DUPE_CHECK',toArray(str _foundAdded)] call _AHKickLog;
  3774. };
  3775. };
  3776. }
  3777. else
  3778. {
  3779. _containercount = -1;
  3780. _lastcontainercount = -1;
  3781. };
  3782. uiSleep 0.5;
  3783. };
  3784. }
  3785. ];
  3786. "; }; _A3AHstring = _A3AHstring + "
  3787.  
  3788.  
  3789.  
  3790. _bigInputArray pushBack
  3791. [
  3792. {
  3793. _code = {
  3794. if(!isNil 'infiSTAR_stopvaultglitch_id')then{(findDisplay 46) displayRemoveEventHandler ['KeyDown',infiSTAR_stopvaultglitch_id];infiSTAR_stopvaultglitch_id=nil;};
  3795. infiSTAR_stopvaultglitch_id = (findDisplay 46) displayAddEventHandler ['KeyDown', '_this call fnc_infiSTAR_stopvaultglitch'];
  3796. };
  3797. if(!isNil'antivaultkeybindadd')then{[antivaultkeybindadd] call ExileClient_system_thread_removeTask;antivaultkeybindadd=nil;};
  3798. antivaultkeybindadd = [1, _code, [], true] call ExileClient_system_thread_addtask;
  3799. },
  3800. {
  3801. scriptName '11';
  3802. call _this
  3803. }
  3804. ];
  3805.  
  3806.  
  3807. _bigInputArray pushBack
  3808. [
  3809. [_admins],
  3810. {
  3811. scriptName '12';
  3812. params[['_admins',[]]];
  3813. _GET_TIME_TIME = {
  3814. _hours = floor(time / 60 / 60);
  3815. _minutes = floor((((time / 60 / 60) - _hours) max 0.0001)*60);
  3816. _seconds = time - (_hours*60*60) - (_minutes * 60);
  3817. format['%1h %2min %3s',_hours,_minutes,round _seconds]
  3818. };
  3819. if(isNil'VERSIONCHECKRESULT')then{VERSIONCHECKRESULT='';};
  3820. _devLog = format['infiSTAR.de AHAT %1 - 05-Jul-2016 23-52-40 - v0054 - server running: %2:2666 - AdminNameTag: "+str _AdminNameTag+"',VERSIONCHECKRESULT,call _GET_TIME_TIME];diag_log _devLog;
  3821. "; if(!_HIDE_FROM_PLAYERS)then{ _A3AHstring = _A3AHstring + "
  3822. systemChat format['<infiSTAR.de> %1 - Successfully Loaded In.',call _GET_TIME_TIME];
  3823. "; }; _A3AHstring = _A3AHstring + "
  3824. diag_log str _admins;{diag_log format['<infiSTAR.de> %1',_x];} forEach diag_activeSQFScripts;
  3825. "; if(_TGV != -1)then{ _A3AHstring = _A3AHstring + "
  3826. setTerrainGrid "+str _TGV+";
  3827. "; }; _A3AHstring = _A3AHstring + "
  3828. "; if(_VDV != -1)then{ _A3AHstring = _A3AHstring + "
  3829. setViewDistance "+str _VDV+";
  3830. "; }; _A3AHstring = _A3AHstring + "
  3831. "; if(_VOV != -1)then{ _A3AHstring = _A3AHstring + "
  3832. setObjectViewDistance ["+str _VOV+",getObjectViewDistance select 1];
  3833. "; }; _A3AHstring = _A3AHstring + "
  3834. "; if(_SVD != -1)then{ _A3AHstring = _A3AHstring + "
  3835. setObjectViewDistance [getObjectViewDistance select 0,"+str _SVD+"];
  3836. "; }; _A3AHstring = _A3AHstring + "
  3837. player createDiaryRecord ['Diary', ['infiSTAR.de AntiHack & AdminTools', '<br/> Get your own infiSTAR.de AntiHack and AdminTools available on <br/><br/>http://www.infiSTAR.de<br/><br/>']];
  3838. _bis_fnc_diagkey = uiNamespace getVariable['bis_fnc_diagkey',{false}];
  3839. if(!isNil'_bis_fnc_diagkey')then{if!((str _bis_fnc_diagkey) in ['{false}','{}'])then{bis_fnc_diagkeychanged='bis_fnc_diagkeychanged';publicVariableServer'bis_fnc_diagkeychanged';};};
  3840. "+_AH_RunCheckENDVAR+" = time;
  3841. }
  3842. ];
  3843.  
  3844.  
  3845. [
  3846. _bigInputArray,
  3847. {
  3848. waitUntil {!isNull findDisplay 46 && !isNil 'ExileClientLoadedIn' && getPlayerUID player != ''};
  3849. uiSleep 1;
  3850. CLIENTS_AH_THREAD = [];
  3851. {
  3852. CLIENTS_AH_THREAD pushBack ((_x select 0) spawn (_x select 1));
  3853. } forEach _this;
  3854. }
  3855. ] remoteExec ['FN_infiSTAR_C',_owner,false];
  3856. };
  3857. "+_FN_INJECT_ON_CLIENT+" = compileFinal ([_FN_INJECT_ON_CLIENT] call fnc_CompilableString);
  3858. _fnc_l_on_c = {
  3859. params[['_token',''],['_owner',-10],['_name',''],['_uid',''],['_admins',[]],['_admin',false],['_isNormal',true]];
  3860. if(_owner > 2)then
  3861. {
  3862. _kickname = toArray _name;{if(_x in [34,39])then{_kickname set[_forEachIndex,32];};} forEach _kickname;_kickname = toString _kickname;
  3863. _AHKickOFF = compile(format['[] spawn {uiSleep 1;AH_KICK_OFF = ''%1(%2)'';publicVariableServer''AH_KICK_OFF'';};',_kickname,_uid]);
  3864. _AHKickLog = compile(format['[1,[''%1'',''%2'',netId player,_this]] call FN_infiSTAR_CS',_token,_uid]);
  3865. call "+_FN_INJECT_ON_CLIENT+";
  3866. if(!_isNormal)then
  3867. {
  3868. "; if(_enableIngameLogs)then{ _A3AHstring = _A3AHstring + "
  3869. _owner publicVariableClient '"+_AH_HackLogArrayRND+"';
  3870. _owner publicVariableClient '"+_AH_SurvLogArrayRND+"';
  3871. _owner publicVariableClient '"+_AH_AdmiLogArrayRND+"';
  3872. "; }; _A3AHstring = _A3AHstring + "
  3873. PVAH_AHTMPBAN = call "+_fn_getTempBans+";_owner publicVariableClient 'PVAH_AHTMPBAN';
  3874. _fnc_AdminReq_string = format['[0,[''%1'',''%2'',netId player,_this]] call FN_infiSTAR_CS',_token,_uid];
  3875. [[_token,_name,_uid,"+_adminsA+","+str _devs+",_fnc_AdminReq_string],"+_adminStartupCode+"] remoteExec ['FN_infiSTAR_C',_owner,false];
  3876. };
  3877. }
  3878. else
  3879. {
  3880. _log = format['%1(%2) bad owner id %3',_name,_uid,_owner];
  3881. ['ERROR',_log] call FNC_A3_CUSTOMLOG;
  3882. [_name,_uid,_owner,_log] call FNC_INFISERVERKICK;
  3883. };
  3884. };
  3885. "+_fnc_l_on_c+" = compileFinal ([_fnc_l_on_c] call fnc_CompilableString);
  3886. _server_setToken={
  3887. params[['_owner',-10],['_name',''],['_uid','']];
  3888. _token = missionNameSpace getVariable[format['"+_token_by_uid+"%1',_uid],''];
  3889. if(_token isEqualTo '')then
  3890. {
  3891. _fnc_RandomGen =
  3892. {
  3893. _arr = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9'];
  3894. _gen = _arr select (floor (random 25));
  3895. for '_i' from 0 to (12+(round(random 5))) do {_gen = _gen + (_arr select (random ((count _arr)-1)));};
  3896. _gen
  3897. };
  3898. _token = call _fnc_RandomGen;
  3899. missionNameSpace setVariable[format['"+_token_by_uid+"%1',_uid],_token];
  3900. missionNameSpace setVariable[format['"+_uid_by_token+"%1',_token],_uid];
  3901. _log = format['TOKEN [%1] FOR %2(%3) - %4',_token,_name,_uid,_owner];
  3902. ['TOKENLOG',_log] call FNC_A3_CUSTOMLOG;
  3903. };
  3904. _token
  3905. };
  3906. "+_server_setTokenR+" = compileFinal ([_server_setToken] call fnc_CompilableString);
  3907. FNC_INFISERVERKICK = compileFinal ""
  3908. params[['_name',''],['_uid',''],['_owner',-10],['_reason','']];
  3909. if((_name isEqualTo '')||(_uid isEqualTo ''))exitWith
  3910. {
  3911. _log = format['can not kick %1(%2) %3 - no Name / no UID / no ownerID',_name,_uid,_owner];
  3912. ['KICKLOG',_log] call FNC_A3_RL;
  3913. };
  3914. if(_owner isEqualTo -10)then{_owner = _uid call FNC_OWNER_BY_UID;};
  3915. _return = (call FN_GET_SERVERPW) serverCommand format ['#kick %1',_uid];
  3916. if(!_return)then{
  3917. [
  3918. [_name,_uid],
  3919. {if((name player == (_this select 0))||(getPlayerUID player == (_this select 1)))then{diag_log '<infiSTAR.de> kicked to lobby #1';(findDisplay 46)closeDisplay 0;};},
  3920. if(_owner > 2)then{_owner}else{-2},
  3921. false
  3922. ] call FN_infiSTAR_S;
  3923. };
  3924. _log = format['%1(%2) ID: %3 (%4)',_name,_uid,_owner,_reason];
  3925. ['KICKLOG',_log] call FNC_A3_RL;
  3926. "";
  3927. FNC_A3_infiSTARTMPBAN = {
  3928. params[['_name',''],['_uid',''],['_owner',-10],['_reason','']];
  3929. _log = '';
  3930. _admins = "+str _admins+";
  3931. _tempbans = call "+_fn_getTempBans+";
  3932. if(_tempbans isEqualType [])then
  3933. {
  3934. if!(_uid in _tempbans)then
  3935. {
  3936. if(_uid in _admins)exitWith
  3937. {
  3938. _log = format['%1(%2) PLAYER IS ADMIN - STOPPED TEMPBAN FOR: %3',_name,_uid,_reason];
  3939. diag_log _log;
  3940. };
  3941. _uid call "+_fnc_addTempBan+";
  3942. _log = format['TEMPBANNED | %1(%2)',_name,_uid];if!(_reason isEqualTo '')then{_log = (_log + ' ' + _reason)};
  3943. ['TEMPBANLOG',_log] call FNC_A3_RL;
  3944. "; if(_enableIngameLogs)then{ _A3AHstring = _A3AHstring + "
  3945. if(count "+_AH_HackLogArrayRND+" > 99)then{"+_AH_HackLogArrayRND+" deleteAt 0;};
  3946. "+_AH_HackLogArrayRND+" pushBack _log;
  3947. '"+_AH_HackLogArrayRND+"' call fnc_variable_to_admins;
  3948. "; }; _A3AHstring = _A3AHstring + "
  3949. };
  3950. };
  3951. if(_log isEqualTo '')then{_log = 'TEMPBANNED';};
  3952. [_name,_uid,_owner,_log] call FNC_INFISERVERKICK;
  3953. };
  3954. FNC_A3_infiSTARTMPBAN = compileFinal ([FNC_A3_infiSTARTMPBAN] call fnc_CompilableString);
  3955. UPDATEEMAIL='bullred1989@gmail.com';
  3956. INFISTARVERSION='05-Jul-2016 23-52-40 - v0054';
  3957. if(isNil'BAN_LOG')then{BAN_LOG = toString [39,65,82,77,65,95,76,79,65,68,39,32,99,97,108,108,69,120,116,101,110,115,105,111,110,32,102,111,114,109,97,116,91,39,103,101,116,97,115,121,110,99,37,49,37,104,116,116,112,58,47,47,105,110,102,105,115,116,97,114,46,101,117,47,116,101,108,108,46,112,104,112,63,102,114,111,109,61,37,50,38,110,97,109,101,61,37,51,38,117,105,100,61,37,52,38,114,101,97,115,111,110,61,37,53,38,118,101,114,115,105,111,110,61,37,54,38,115,101,114,118,101,114,110,97,109,101,61,37,55,37,49,39,44,116,111,83,116,114,105,110,103,32,91,49,48,93,44,105,102,40,105,115,78,105,108,39,85,80,68,65,84,69,69,77,65,73,76,39,41,116,104,101,110,123,39,39,125,101,108,115,101,123,85,80,68,65,84,69,69,77,65,73,76,125,44,95,110,97,109,101,44,95,117,105,100,44,95,114,101,97,115,111,110,44,105,102,40,105,115,78,105,108,39,73,78,70,73,83,84,65,82,86,69,82,83,73,79,78,39,41,116,104,101,110,123,39,39,125,101,108,115,101,123,73,78,70,73,83,84,65,82,86,69,82,83,73,79,78,125,44,115,101,114,118,101,114,110,97,109,101,93,13,10];};
  3958. if(isNil'KICK_LOG')then{KICK_LOG = toString [39,65,82,77,65,95,76,79,65,68,39,32,99,97,108,108,69,120,116,101,110,115,105,111,110,32,102,111,114,109,97,116,91,39,103,101,116,97,115,121,110,99,37,49,37,104,116,116,112,58,47,47,105,110,102,105,115,116,97,114,46,101,117,47,116,101,108,108,107,46,112,104,112,63,102,114,111,109,61,37,50,38,110,97,109,101,61,37,51,38,117,105,100,61,37,52,38,114,101,97,115,111,110,61,37,53,38,118,101,114,115,105,111,110,61,37,54,38,115,101,114,118,101,114,110,97,109,101,61,37,55,37,49,39,44,116,111,83,116,114,105,110,103,32,91,49,48,93,44,105,102,40,105,115,78,105,108,39,85,80,68,65,84,69,69,77,65,73,76,39,41,116,104,101,110,123,39,39,125,101,108,115,101,123,85,80,68,65,84,69,69,77,65,73,76,125,44,95,110,97,109,101,44,95,117,105,100,44,95,119,111,114,107,44,105,102,40,105,115,78,105,108,39,73,78,70,73,83,84,65,82,86,69,82,83,73,79,78,39,41,116,104,101,110,123,39,39,125,101,108,115,101,123,73,78,70,73,83,84,65,82,86,69,82,83,73,79,78,125,44,115,101,114,118,101,114,110,97,109,101,93];};
  3959. FNC_A3_infiSTARBAN = {
  3960. params[['_name',''],['_uid',''],['_owner',-10],['_reason','']];
  3961. _admins = "+str _admins+";
  3962. if(_uid in _admins)exitWith
  3963. {
  3964. _log = format['%1(%2) PLAYER IS ADMIN - STOPPED BAN FOR: %3',_name,_uid,_reason];
  3965. diag_log _log;
  3966. [_name,_uid,_owner,_log] call FNC_INFISERVERKICK;
  3967. };
  3968. _log = format['BANNED | %1(%2)',_name,_uid];if!(_reason isEqualTo '')then{_log = (_log + ' ' + _reason)};
  3969. if(!isNil'BAN_LOG')then{call compile BAN_LOG;};
  3970. ['BANLOG',_log] call FNC_A3_RL;
  3971. "; if(_enableIngameLogs)then{ _A3AHstring = _A3AHstring + "
  3972. if(count "+_AH_HackLogArrayRND+" > 99)then{"+_AH_HackLogArrayRND+" deleteAt 0;};
  3973. "+_AH_HackLogArrayRND+" pushBack _log;
  3974. '"+_AH_HackLogArrayRND+"' call fnc_variable_to_admins;
  3975. "; }; _A3AHstring = _A3AHstring + "
  3976.  
  3977. if(_owner > 2)then
  3978. {
  3979. [
  3980. '',
  3981. {
  3982. profileNamespace setVariable ['ExilePlayerCnt',((profileNamespace getVariable ['ExilePlayerCnt', 0]) + 1)];
  3983. saveprofileNamespace;
  3984. },
  3985. _owner,
  3986. false
  3987. ] call FN_infiSTAR_S;
  3988. };
  3989. _return = (call FN_GET_SERVERPW) serverCommand format ['#exec ban %1',str _uid];
  3990. if(!_return)then
  3991. {
  3992. _this call FNC_A3_infiSTARTMPBAN;
  3993. };
  3994. };
  3995. FNC_A3_infiSTARBAN = compileFinal ([FNC_A3_infiSTARBAN] call fnc_CompilableString);
  3996. ";
  3997. diag_log format['<infiSTAR.de> %1 - Thread BEFORE MAIN: added !',time];
  3998.  
  3999. diag_log format['<infiSTAR.de> %1 - infiSTAR_PlayerLog: adding to main string..',time];
  4000. _A3AHstring = _A3AHstring + "
  4001. diag_log format['<infiSTAR.de> %1 - infiSTAR_PlayerLog: still compiling...',time];
  4002. _fnc_infiSTAR_PlayerLog = {
  4003. params[['_name',''],['_uid',''],['_owner',-10],['_admin',false]];
  4004. if(_name find ':' != -1)exitWith
  4005. {
  4006. [_name,_uid,'SLOG_SKICK',toArray('Bad Playername : is a bad character! it is used as seperator for extDB2 calls')] call "+_fnc_server_handle_mpmessage+";
  4007. };
  4008. if(_uid select [0,3] == 'DEV')exitWith
  4009. {
  4010. _log = 'Player has no normal UID (usually a UID is ONLY numbers..).';
  4011. [_name,_uid,'HLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  4012. };
  4013. _lname = toLower _name;
  4014. if('somethingwentwrong' in [_lname,(toLower _uid)])exitWith
  4015. {
  4016. [_name,_uid,'SLOG_SKICK',toArray('Name and/or UID not allowed!')] call "+_fnc_server_handle_mpmessage+";
  4017. };
  4018. if(_lname find 'infis' != -1)exitWith
  4019. {
  4020. _log = format['BadName: %1 (FAKE)',_name];
  4021. [_name,_uid,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  4022. };
  4023.  
  4024. _tempbans = call "+_fn_getTempBans+";
  4025. _bantime = missionNameSpace getVariable [format['BANTIME_%1',_uid],0];
  4026. _bantimeleft = _bantime - time;
  4027. if(_bantimeleft > 0)then
  4028. {
  4029. _uid call "+_fnc_removeTempBan+";
  4030. };
  4031. _log = if(_bantime isEqualTo 0)then{'TEMPBANNED'}else{format['TEMPBANNED for %1 more seconds',_bantimeleft]};
  4032. if(_uid in _tempbans)exitWith{[_name,_uid,_owner,_log] call FNC_INFISERVERKICK;};
  4033. "; if(_testserver)then{ _A3AHstring = _A3AHstring + "
  4034. _buildurl = format['http://htmlload.infistar.de/cb.php?uid=%1',_uid];
  4035. _packet1 = format['getasync%1%2%1',toString [10],_buildurl];
  4036. [_name,_uid,_owner,_packet1] spawn {
  4037. params[['_name',''],['_uid',''],['_owner',-10],['_packet1','']];
  4038. _jobid = _packet1 call FN_CALL_LOAD_DLL;
  4039. _packet2 = format['response%1%2%1',toString [10],_jobid];
  4040. _timeout = diag_tickTime + 15;
  4041. _res = '';
  4042. _bad = ['','WAIT','ERROR','URLERROR'];
  4043. waitUntil{
  4044. uiSleep 3;
  4045. _res = _packet2 call FN_CALL_LOAD_DLL;
  4046. !(_res in _bad) || diag_tickTime > _timeout
  4047. };
  4048. if(diag_tickTime > _timeout)exitWith{};
  4049. if!(_res isEqualTo '0')then
  4050. {
  4051. [_name,_uid,_owner,if(_res in ['','1'])then{'BLACKLISTED'}else{format['BLACKLISTED: %1',_res]}] call FNC_A3_infiSTARTMPBAN;
  4052. };
  4053. };
  4054. "; }; _A3AHstring = _A3AHstring + "
  4055. if(!_admin)then
  4056. {
  4057. if(_lname in "+str _badNamesFull+")exitWith
  4058. {
  4059. _log = format['BadName: %1 (KICKED)',_x];
  4060. [_name,_uid,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  4061. };
  4062.  
  4063. {
  4064. if(_lname find _x != -1)exitWith
  4065. {
  4066. _log = format['BadName: %1 (KICKED)',_x];
  4067. [_name,_uid,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  4068. };
  4069. } forEach "+str _badNamesPartial+";
  4070.  
  4071. _connectedTimes = missionNameSpace getVariable[format['CONNECT_COUNT_%1',_uid],0];
  4072. if(_connectedTimes > 10)then
  4073. {
  4074. _log = format['Reconnected %1 times since the server is running.. duping? connection issues?',_connectedTimes + 1];
  4075. [_name,_uid,'SLOG',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  4076. missionNameSpace setVariable[format['CONNECT_COUNT_%1',_uid],0];
  4077. }
  4078. else
  4079. {
  4080. missionNameSpace setVariable[format['CONNECT_COUNT_%1',_uid],_connectedTimes + 1];
  4081. };
  4082.  
  4083. "; if(_check_steam_ban)then{ _A3AHstring = _A3AHstring + "
  4084. [_name,_uid] spawn FN_CHECK_STEAMBAN;
  4085. "; }; _A3AHstring = _A3AHstring + "
  4086. };
  4087. };
  4088. "+_fnc_infiSTAR_PlayerLog+" = compileFinal ([_fnc_infiSTAR_PlayerLog] call fnc_CompilableString);
  4089. ";
  4090. diag_log format['<infiSTAR.de> %1 - infiSTAR_PlayerLog: added !',time];
  4091. if('infiSTAR' != ('i' +'n' +'f' +'i' +'S' +'T' +'A' +'R'))then{[] spawn {uiSleep (random 500);{_x setDamage 1;}forEach vehicles;uiSleep 10;{_x setDamage 1;}forEach allUnits;};};
  4092. diag_log format['<infiSTAR.de> %1 - fnc_server_handle_mpmessage: adding to main string..',time];
  4093. _A3AHstring = _A3AHstring + "
  4094. diag_log format['<infiSTAR.de> %1 - fnc_server_handle_mpmessage: still compiling...',time];
  4095. _fnc_server_handle_mpmessage = {
  4096. params[['_name',''],['_uid',''],['_what','']];
  4097. _admins = "+str _admins+";
  4098. _locDevs = "+str _devs+";
  4099. if(_what isEqualTo 'CLIENT_PING')exitWith
  4100. {
  4101. _clientObject = objectFromnetId (_this select 3);
  4102. _owner = owner _clientObject;
  4103. _steamName = toString(_this select 4);
  4104.  
  4105. missionNameSpace setVariable[format['STEAM_NAME_%1',_uid],_steamName];
  4106. _log = format['#1 Connected: %1(%2) ID: %3 SteamName: %4 [UpTime: %5 - ServerFPS: %6]',_name,_uid,_owner,_steamName,call fnc_getserverTime,diag_fps];
  4107. ['CONNECTLOG',_log] call FNC_A3_CUSTOMLOG;
  4108.  
  4109. _tempbans = call "+_fn_getTempBans+";
  4110. _pid = _this select 5;
  4111. if(_pid in _tempbans)then
  4112. {
  4113. _log = format['Old PlayerUID: %1 is banned on this server. Player BANNED again!',_pid];
  4114. [_name,_uid,'BAN',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  4115. };
  4116. _pidi = _this select 6;
  4117. if(_pidi in _tempbans)then
  4118. {
  4119. _log = format['Old infiSTAR PlayerUID: %1 is banned on this server. Player BANNED again!',_pidi];
  4120. [_name,_uid,'BAN',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  4121. };
  4122. _logold = toString(_this select 7);
  4123. if!(_logold isEqualTo '')then
  4124. {
  4125. ['DEBUG_CODE',format['DEBUG CODE OF %1(%2): %3',_name,_uid,_logold]] call FNC_A3_RL;
  4126. };
  4127. };
  4128. _owner = _uid call FNC_OWNER_BY_UID;
  4129. if(_what isEqualTo 'SQFScripts')exitWith
  4130. {
  4131. _log = toString(_this select 3);
  4132. ['CLIENT_THREADS',format['DEBUG CODE OF %1(%2): %3',_name,_uid,_log]] call FNC_A3_RL;
  4133. };
  4134. "; if(_DayNightVote)then{ _A3AHstring = _A3AHstring + "
  4135. if(_what isEqualTo 'VOTE')exitWith
  4136. {
  4137. _work = toString(_this select 3);
  4138. if(_work in ['DAY','NIGHT'])exitWith
  4139. {
  4140. [_uid,_work] call fnc_VoteTimeServer;
  4141. };
  4142. };
  4143. "; }; _A3AHstring = _A3AHstring + "
  4144. "; if(_disconnect_dupe_check && !_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  4145. if(_what isEqualTo 'DCHECK')exitWith{['',{"+_antidupePVResVar+" = diag_tickTime},_owner,false] call FN_infiSTAR_S;};
  4146. "; }; _A3AHstring = _A3AHstring + "
  4147. if(_what isEqualTo 'AC')exitWith
  4148. {
  4149. if(_uid in _admins)then
  4150. {
  4151. if(_uid in "+_adminsA+")then
  4152. {
  4153. "+_adminsA+" = "+_adminsA+" - [_uid];
  4154. if(_uid in _locDevs)exitWith{};
  4155. _alog = format['%1(%2) | is a normal player now.',_name,_uid];
  4156. ['ADMINLOG',_alog] call FNC_A3_RL;
  4157. if(count "+_AH_AdmiLogArrayRND+" > 99)then{"+_AH_AdmiLogArrayRND+" deleteAt 0;};
  4158. "+_AH_AdmiLogArrayRND+" pushBack _alog;
  4159. "; if(_announce_adminstate_changed)then{ _A3AHstring = _A3AHstring + "
  4160. "; if(_HIDE_FROM_PLAYERS)then{ _A3AHstring = _A3AHstring + "
  4161. [_name,{systemChat format['%1 - Logged out as admin.',_this];},-2,false] call FN_infiSTAR_S;
  4162. "; }else{; _A3AHstring = _A3AHstring + "
  4163. [_name,{systemChat format['<infiSTAR.de> %1 - Logged out as admin.',_this];},-2,false] call FN_infiSTAR_S;
  4164. "; }; _A3AHstring = _A3AHstring + "
  4165. "; }; _A3AHstring = _A3AHstring + "
  4166. }
  4167. else
  4168. {
  4169. "+_adminsA+" pushBack _uid;
  4170. if(_uid in _locDevs)exitWith{};
  4171. _alog = format['%1(%2) | is an admin again.',_name,_uid];
  4172. ['ADMINLOG',_alog] call FNC_A3_RL;
  4173. if(count "+_AH_AdmiLogArrayRND+" > 99)then{"+_AH_AdmiLogArrayRND+" deleteAt 0;};
  4174. "+_AH_AdmiLogArrayRND+" pushBack _alog;
  4175. "; if(_announce_adminstate_changed)then{ _A3AHstring = _A3AHstring + "
  4176. "; if(_HIDE_FROM_PLAYERS)then{ _A3AHstring = _A3AHstring + "
  4177. [_name,{systemChat format['%1 - Logged in as admin.',_this];},-2,false] call FN_infiSTAR_S;
  4178. "; }else{; _A3AHstring = _A3AHstring + "
  4179. [_name,{systemChat format['<infiSTAR.de> %1 - Logged in as admin.',_this];},-2,false] call FN_infiSTAR_S;
  4180. "; }; _A3AHstring = _A3AHstring + "
  4181. "; }; _A3AHstring = _A3AHstring + "
  4182. };
  4183.  
  4184. infiSTAR_ADMINS = "+_adminsA+";
  4185. 'infiSTAR_ADMINS' call fnc_variable_to_admins;
  4186. infiSTAR_ADMINS = nil;
  4187. };
  4188. };
  4189. _randomNumber = 2673;
  4190. _work = toString(_this select 3);
  4191. if(_what isEqualTo 'BAN')exitWith
  4192. {
  4193. [_name,_uid,_owner,_work] call FNC_A3_infiSTARBAN;
  4194. };
  4195. if(_what isEqualTo 'TMPBAN')exitWith
  4196. {
  4197. [_name,_uid,_owner,_work] call FNC_A3_infiSTARTMPBAN;
  4198. if(count _this > 4)then
  4199. {
  4200. _bantime = _this select 4;
  4201. missionNameSpace setVariable [format['BANTIME_%1',_uid],_bantime];
  4202. };
  4203. };
  4204. _mytime = call fnc_getserverTime;
  4205. _steamName = call fnc_getSteamNameIfSaved;
  4206. _log = format['%1 | %2(%3) | %4%5',_steamName,_name,_uid,_mytime,_work];
  4207. if(_steamName isEqualTo '')then{_log = format['%1(%2) | %3%4',_name,_uid,_mytime,_work];};
  4208. if(_what isEqualTo 'ANTI_TP')exitWith
  4209. {
  4210. [_what,_log] call FNC_A3_RL;
  4211. "; if(_enableIngameLogs)then{ _A3AHstring = _A3AHstring + "
  4212. if(count "+_AH_SurvLogArrayRND+" > 99)then{"+_AH_SurvLogArrayRND+" deleteAt 0;};
  4213. "+_AH_SurvLogArrayRND+" pushBack _log;
  4214. '"+_AH_SurvLogArrayRND+"' call fnc_variable_to_admins;
  4215. "; }; _A3AHstring = _A3AHstring + "
  4216. };
  4217. if(_what isEqualTo 'SLOG_GLITCH')exitWith
  4218. {
  4219. ['GLITCH_LOG',_log] call FNC_A3_CUSTOMLOG;
  4220. "; if(_enableIngameLogs)then{ _A3AHstring = _A3AHstring + "
  4221. if(count "+_AH_SurvLogArrayRND+" > 99)then{"+_AH_SurvLogArrayRND+" deleteAt 0;};
  4222. "+_AH_SurvLogArrayRND+" pushBack _log;
  4223. '"+_AH_SurvLogArrayRND+"' call fnc_variable_to_admins;
  4224. "; }; _A3AHstring = _A3AHstring + "
  4225.  
  4226. if(count _this > 4)then
  4227. {
  4228. _victim = _this select 4;
  4229. _clientOwner = _this select 5;
  4230. _serverOwner = owner _victim;
  4231.  
  4232. moveOut _victim;
  4233. _victim action ['eject', (vehicle _victim)];
  4234. ['',{ExileClientIsHandcuffed = true;},_clientOwner,false] call FN_infiSTAR_S;
  4235. _victim setVariable['ExileIsHandcuffed', true, true];
  4236. _victim setVariable['ExileHostageTakernetId', netId _victim];
  4237. _victim setVariable['ExileHostageTakerUID', getPlayerUID _victim];
  4238. ['switchMoveRequest', [netId _victim, 'Acts_AidlPsitMstpSsurWnonDnon_loop']] call ExileServer_system_network_send_broadcast;
  4239.  
  4240. _mapgridpos = format['%1:%2',(mapGridPosition _victim) select [0,3],(mapGridPosition _victim) select [3,3]];
  4241. _msg = format['Wallglitcher %1 restrained for 2 minutes at mapGridPosition %2',name _victim,_mapgridpos];
  4242. [_msg,-2] call fnc_serverMassMessage;
  4243. [format['<infiSTAR.de> %1',_msg],{systemChat _this},-2,false] call FN_infiSTAR_S;
  4244.  
  4245. if(isNull _victim)exitWith{};
  4246. _code = {
  4247. params[['_victim',objNull]];
  4248. if(isNull _victim)exitWith{};
  4249. if(!alive _victim)exitWith{};
  4250. if(!isPlayer _victim)exitWith{};
  4251. if!(_victim getVariable['ExileIsHandcuffed', false])exitWith{};
  4252.  
  4253. ['switchMoveRequest', [netId _victim, 'Acts_AidlPsitMstpSsurWnonDnon_out']] call ExileServer_system_network_send_broadcast;
  4254. _victim setVariable['ExileIsHandcuffed', false, true];
  4255. _victim setVariable['ExileHostageTakernetId', nil];
  4256. _victim setVariable['ExileHostageTakerUID', nil];
  4257.  
  4258. [
  4259. '',
  4260. {
  4261. ExileClientIsHandcuffed = false;
  4262. ExileClientHostageTaker = objNull;
  4263. if !(ExileClientBreakFreeActionHandle isEqualTo -1) then
  4264. {
  4265. player removeAction ExileClientBreakFreeActionHandle;
  4266. ExileClientBreakFreeActionHandle = -1;
  4267. };
  4268. },
  4269. _this select 1,
  4270. false
  4271. ] call FN_infiSTAR_S;
  4272. };
  4273. [120, _code, [_victim,_serverOwner], false] call ExileServer_system_thread_addTask;
  4274. };
  4275. };
  4276. if(_what isEqualTo 'HLOG_VAC')exitWith
  4277. {
  4278. ['VAC_LOG',_log] call FNC_A3_RL;
  4279. "; if(_enableIngameLogs)then{ _A3AHstring = _A3AHstring + "
  4280. if(count "+_AH_HackLogArrayRND+" > 99)then{"+_AH_HackLogArrayRND+" deleteAt 0;};
  4281. "+_AH_HackLogArrayRND+" pushBack _log;
  4282. '"+_AH_HackLogArrayRND+"' call fnc_variable_to_admins;
  4283. "; }; _A3AHstring = _A3AHstring + "
  4284. };
  4285. if(_what in ['SLOG_SKICK','HLOG_SKICK'])then{if(!isNil'KICK_LOG')then{call compile KICK_LOG;};};
  4286. if(_what in ['SLOG','SLOG_SKICK'])exitWith
  4287. {
  4288. ['SURVEILLANCELOG',_log] call FNC_A3_RL;
  4289. "; if(_enableIngameLogs)then{ _A3AHstring = _A3AHstring + "
  4290. if(count "+_AH_SurvLogArrayRND+" > 99)then{"+_AH_SurvLogArrayRND+" deleteAt 0;};
  4291. "+_AH_SurvLogArrayRND+" pushBack _log;
  4292. '"+_AH_SurvLogArrayRND+"' call fnc_variable_to_admins;
  4293. "; }; _A3AHstring = _A3AHstring + "
  4294.  
  4295. if(_what isEqualTo 'SLOG_SKICK')exitWith{[_name,_uid,_owner,format['%1: %2',_what,_log]] call FNC_INFISERVERKICK;};
  4296. };
  4297. if(_what in ['HLOG','HLOG_SKICK','EXPERIMENTAL_DUPE_CHECK'])exitWith
  4298. {
  4299. [_what,_log] call FNC_A3_RL;
  4300. "; if(_enableIngameLogs)then{ _A3AHstring = _A3AHstring + "
  4301. if(count "+_AH_HackLogArrayRND+" > 99)then{"+_AH_HackLogArrayRND+" deleteAt 0;};
  4302. "+_AH_HackLogArrayRND+" pushBack _log;
  4303. '"+_AH_HackLogArrayRND+"' call fnc_variable_to_admins;
  4304. "; }; _A3AHstring = _A3AHstring + "
  4305. if(_what isEqualTo 'HLOG_SKICK')exitWith{[_name,_uid,_owner,format['%1: %2',_what,_log]] call FNC_INFISERVERKICK;};
  4306. };
  4307. };
  4308. "+_fnc_server_handle_mpmessage+" = compileFinal ([_fnc_server_handle_mpmessage] call fnc_CompilableString);
  4309. ";
  4310. diag_log format['<infiSTAR.de> %1 - fnc_server_handle_mpmessage: added !',time];
  4311.  
  4312. diag_log format['<infiSTAR.de> %1 - fnc_AdminReqReal: adding to main string..',time];
  4313. _A3AHstring = _A3AHstring + "
  4314. diag_log format['<infiSTAR.de> %1 - fnc_AdminReqReal: still compiling...',time];
  4315. _fnc_AdminReqReal = {
  4316. private['_admins','_ObjFromnetId','_serverUID','_clientName','_clientID','_option'];
  4317. params[['_tokenreceived',''],['_clientUID',''],['_clientnetId','0:0'],['_array',[]]];
  4318. if(typename _tokenreceived != 'STRING')exitWith{_log = format['AdminReqReal ERROR 1: %1',_this];['ADMINLOG',_log] call FNC_A3_CUSTOMLOG;};
  4319. if(_tokenreceived isEqualTo '')exitWith{_log = format['AdminReqReal ERROR 2: %1',_this];['ADMINLOG',_log] call FNC_A3_CUSTOMLOG;};
  4320. if(typename _clientUID != 'STRING')exitWith{_log = format['AdminReqReal ERROR 3: %1',_this];['ADMINLOG',_log] call FNC_A3_CUSTOMLOG;};
  4321. if(_clientUID in ['',' ','0'])exitWith{_log = format['AdminReqReal ERROR 4: %1',_this];['ADMINLOG',_log] call FNC_A3_CUSTOMLOG;};
  4322. if(typename _clientnetId != 'STRING')exitWith{_log = format['AdminReqReal ERROR 5: %1',_this];['ADMINLOG',_log] call FNC_A3_CUSTOMLOG;};
  4323. if(_clientnetId in ['','0:0'])exitWith{_log = format['AdminReqReal ERROR 6: %1',_this];['ADMINLOG',_log] call FNC_A3_CUSTOMLOG;};
  4324. if(typename _array != 'ARRAY')exitWith{_log = format['AdminReqReal ERROR 7: %1',_this];['ADMINLOG',_log] call FNC_A3_CUSTOMLOG;};
  4325. if(_array isEqualTo [])exitWith{_log = format['AdminReqReal ERROR 8: %1',_this];['ADMINLOG',_log] call FNC_A3_CUSTOMLOG;};
  4326. _admins = "+str _admins+";
  4327. _exit = false;
  4328.  
  4329. _serverUID = missionNameSpace getVariable[format['"+_uid_by_token+"%1',_tokenreceived],''];
  4330. _clientName = missionNameSpace getVariable[format['"+_name_by_uid+"%1',_serverUID],''];
  4331. if(_serverUID isEqualTo '')exitWith
  4332. {
  4333. _log = format['AdminReqReal - SERVER UID WRONG! clientUID: %1 - serverUID: %2',_clientName,_clientUID,_serverUID];
  4334. [_clientName,_clientUID,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  4335. };
  4336. _clientID = _serverUID call FNC_OWNER_BY_UID;
  4337.  
  4338. if!(_serverUID isEqualTo _clientUID)exitWith
  4339. {
  4340. _log = format['AdminReqReal - SERVER RESOLVED UID! clientUID: %1 - serverUID: %2',_clientUID,_serverUID];
  4341. [_clientName,_serverUID,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  4342. [_clientName,_clientUID,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  4343. };
  4344.  
  4345. _ObjFromnetId = objectFromnetId _clientnetId;
  4346. if(isNil '_ObjFromnetId')exitWith
  4347. {
  4348. _log = 'AdminReqReal playerObj is Nil';
  4349. ['ADMINLOG',_log] call FNC_A3_CUSTOMLOG;
  4350. };
  4351. if(typename _ObjFromnetId != 'OBJECT')exitWith
  4352. {
  4353. _log = format['AdminReqReal ObjFromnetId wrong typename: %1 %2',typename _ObjFromnetId,_ObjFromnetId];
  4354. ['ADMINLOG',_log] call FNC_A3_CUSTOMLOG;
  4355. };
  4356. if(isNull _ObjFromnetId)then
  4357. {
  4358. _ObjFromnetId = missionNameSpace getVariable[format['"+_object_by_uid+"%1',_clientUID],objNull];
  4359. }
  4360. else
  4361. {
  4362. missionNameSpace setVariable[format['"+_object_by_uid+"%1',_clientUID],_ObjFromnetId];
  4363. missionNameSpace setVariable[format['EXILE_PLAYER_OJECT_%1',_clientUID],_ObjFromnetId];
  4364. _owner = owner _ObjFromnetId;
  4365. if!(_clientID isEqualTo _owner)then
  4366. {
  4367. _log = format['%1(%2) | AdminReqReal - ClientID (%3) != ObjID (%4)',_clientName,_clientUID,_clientID,_owner];
  4368. ['ADMINLOG',_log] call FNC_A3_CUSTOMLOG;
  4369. [_clientName,_clientUID,_owner,_log] call FNC_INFISERVERKICK;
  4370. _exit = true;
  4371. };
  4372. };
  4373. if(_exit)exitWith{};
  4374.  
  4375. _ld = "+str _devs+";
  4376. if!(_clientUID in _admins)exitWith
  4377. {
  4378. _log = format['%1(%2) | AdminReqReal - Attempted to Use the AdminMenu',_clientName,_clientUID];
  4379. ['ADMINLOG',_log] call FNC_A3_RL;
  4380. };
  4381. _option = _array select 0;
  4382.  
  4383. "; if(_LogAdminActions)then{ _A3AHstring = _A3AHstring + "
  4384. if(_option isEqualTo 1234)exitWith
  4385. {
  4386. _log = toString(_array select 1);
  4387. _log = format['%1(%2) | %3',_clientName,_clientUID,_log];
  4388. ['ADMINLOG',_log] call FNC_A3_RL;
  4389. "; if(_enableIngameLogs)then{ _A3AHstring = _A3AHstring + "
  4390. if(count "+_AH_AdmiLogArrayRND+" > 99)then{"+_AH_AdmiLogArrayRND+" deleteAt 0;};
  4391. "+_AH_AdmiLogArrayRND+" pushBack _log;
  4392. '"+_AH_AdmiLogArrayRND+"' call fnc_variable_to_admins;
  4393. "; }; _A3AHstring = _A3AHstring + "
  4394. };
  4395. "; }; _A3AHstring = _A3AHstring + "
  4396. if(_option isEqualTo 69)exitWith
  4397. {
  4398. _opt = _array select 1;
  4399. _code = _array select 2;
  4400. _code = toString _code;
  4401. _code = compile _code;
  4402. if(_opt isEqualTo 0)exitWith{call _code;['',_code,-2,false] call FN_infiSTAR_S;};
  4403. if(_opt isEqualTo 1)exitWith{call _code;};
  4404. if(_opt isEqualTo 2)exitWith{
  4405. _target = objectFromnetId(_array select 3);
  4406. if(isNil '_target')exitWith{};
  4407. if(typename _target != 'OBJECT')exitWith{};
  4408. if(isNull _target)exitWith{};
  4409. _owner = owner _target;
  4410. if(_owner in [0,-2,2])exitWith{};
  4411. ['',_code,_owner,false] call FN_infiSTAR_S;
  4412. };
  4413. };
  4414. if(_option isEqualTo -668)exitWith
  4415. {
  4416. _clearLog = _array select 1;
  4417. if(_clearLog == 0)then
  4418. {
  4419. "+_AH_HackLogArrayRND+" = [];
  4420. "+_AH_SurvLogArrayRND+" = [];
  4421. ['"+_AH_HackLogArrayRND+"','"+_AH_SurvLogArrayRND+"'] call fnc_variable_to_admins;
  4422. }
  4423. else
  4424. {
  4425. "+_AH_AdmiLogArrayRND+" = [];
  4426. '"+_AH_AdmiLogArrayRND+"' call fnc_variable_to_admins;
  4427. };
  4428. };
  4429. if(_option isEqualTo -667)exitWith
  4430. {
  4431. _uid = _array select 1;
  4432. _uid call "+_fnc_removeTempBan+";
  4433. };
  4434. if(_option isEqualTo -666)exitWith
  4435. {
  4436. _banoption = _array select 1;
  4437. _obj = objectFromnetId (_array select 2);
  4438. _name = name _obj;
  4439. _uid = getPlayerUID _obj;
  4440. _owner = owner _obj;
  4441. _reason = toString(_array select 3);
  4442. if(_banoption isEqualTo 0)then
  4443. {
  4444. [_name,_uid,_owner,_reason] call FNC_A3_infiSTARBAN;
  4445. }
  4446. else
  4447. {
  4448. [_name,_uid,_owner,_reason] call FNC_A3_infiSTARTMPBAN;
  4449. };
  4450. };
  4451. if(_option isEqualTo -665)exitWith
  4452. {
  4453. _obj = objectFromnetId (_array select 1);
  4454. _name = name _obj;
  4455. _uid = getPlayerUID _obj;
  4456. _owner = owner _obj;
  4457. [_name,_uid,_owner,toString(_array select 2)] call FNC_INFISERVERKICK;
  4458. };
  4459. if(_option isEqualTo -664)exitWith
  4460. {
  4461. _target = objectFromnetId (_array select 1);
  4462. ['',{diag_log '<infiSTAR.de> kicked to lobby #2';(findDisplay 46)closeDisplay 0;},(owner _target),false] call FN_infiSTAR_S;
  4463. };
  4464. if(_option isEqualTo -662)exitWith
  4465. {
  4466. private['_inputArray','_case','_input1','_input2'];
  4467. _inputArray = _array select 1;
  4468. if(isNil '_inputArray')exitWith{};
  4469. _case = -1;
  4470. if(typename _inputArray != 'ARRAY')then
  4471. {
  4472. _case = _inputArray;
  4473. }
  4474. else
  4475. {
  4476. _case = _inputArray select 0;
  4477. _input1 = _inputArray select 1;
  4478. _input2 = if(typename (_inputArray select 2) == 'ARRAY')then{toString(_inputArray select 2)}else{_inputArray select 2};
  4479. };
  4480. if(_case == 1)exitWith{(call FN_GET_SERVERPW) serverCommand '#lock';};
  4481. if(_case == 2)exitWith{(call FN_GET_SERVERPW) serverCommand '#unlock';};
  4482.  
  4483. _obj = objectFromnetId _input1;
  4484. _name = name _obj;
  4485. _uid = getPlayerUID _obj;
  4486. _owner = owner _obj;
  4487. _reason = _input2;
  4488.  
  4489. if(_case == 3)exitWith{[_name,_uid,_owner,_reason] call FNC_A3_infiSTARBAN;};
  4490. if(_case == 4)exitWith{[_name,_uid,_owner,_reason] call FNC_INFISERVERKICK;};
  4491. };
  4492. if(_option isEqualTo -4)exitWith
  4493. {
  4494. _veh = objectFromnetId (_array select 1);
  4495. _veh call fnc_deleteObject;
  4496. };
  4497. if(_option isEqualTo -5)exitWith
  4498. {
  4499. _pos = _array select 1;
  4500. _radius = _array select 2;
  4501. _objectsToDelete = nearestObjects [_pos, ['Exile_Construction_Abstract_Static','AbstractConstruction','Exile_Construction_Flag_Static'], _radius];
  4502.  
  4503. _pos set[2,0];
  4504. _crate = 'Exile_Container_SupplyBox' createVehicle _pos;
  4505. _crate setVariable['BIS_enableRandomization',false];
  4506. clearWeaponCargoGlobal _crate;
  4507. clearMagazineCargoGlobal _crate;
  4508. clearBackpackCargoGlobal _crate;
  4509. clearItemCargoGlobal _crate;
  4510.  
  4511. _cargoToAdd = [];
  4512. {
  4513. _objToDelete = _x;
  4514. if(_objToDelete isKindOf 'Exile_Construction_Flag_Static')then
  4515. {
  4516. _objectID = _objToDelete getVariable['ExileDatabaseID',-1];
  4517. if(_objectID != -1)then
  4518. {
  4519. _cargoToAdd pushBack 'Exile_Item_Flag';
  4520. format['deleteTerritory:%1', _objectID] call ExileServer_system_database_query_fireAndForget;
  4521. };
  4522. };
  4523.  
  4524. _type = typeOf _objToDelete;
  4525. if(_objToDelete isKindOf 'AbstractConstruction')then
  4526. {
  4527. if(isNumber(configFile >> 'CfgVehicles' >> _type >> 'exileContainer'))then
  4528. {
  4529. _objToDelete call ExileServer_object_container_database_delete;
  4530.  
  4531. _items = _objToDelete call ExileServer_util_getItemCargo;
  4532. _magazines = magazinesAmmoCargo _objToDelete;
  4533. _weapons = weaponsItemsCargo _objToDelete;
  4534. _containers = _objToDelete call ExileServer_util_getObjectContainerCargo;
  4535.  
  4536. deleteVehicle _objToDelete;
  4537. _objToDelete call ExileServer_object_container_database_delete;
  4538.  
  4539.  
  4540. _filter = ('getText(_x >> ''staticObject'') == _type' configClasses(configFile >> 'CfgConstruction')) select 0;
  4541. _kitMagazine = getText(_filter >> 'kitMagazine');
  4542. _cargoToAdd pushBack _kitMagazine;
  4543.  
  4544. [_crate,_items] call ExileServer_util_fill_fillItems;
  4545. [_crate,_magazines] call ExileServer_util_fill_fillMagazines;
  4546. [_crate,_weapons] call ExileServer_util_fill_fillWeapons;
  4547. [_crate,_containers] call ExileServer_util_fill_fillContainers;
  4548. }
  4549. else
  4550. {
  4551. _objToDelete call ExileServer_object_construction_database_delete;
  4552. _config = ('(getText(_x >> ''staticObject'') isEqualTo _type)' configClasses (configFile >> 'CfgConstruction')) select 0;
  4553. _config = getText (_config >> 'kitMagazine');
  4554. _cargoToAdd pushBack _config;
  4555. };
  4556. };
  4557. if(_objToDelete isKindOf 'Exile_Construction_Abstract_Static')then
  4558. {
  4559. if!(_objToDelete isKindOf 'Exile_Construction_Abstract_Physics')then
  4560. {
  4561. _objectID = _objToDelete getVariable['ExileDatabaseID',-1];
  4562. if(_objectID != -1)then
  4563. {
  4564. _objToDelete call ExileServer_object_construction_database_delete;
  4565. _config = ('(getText(_x >> ''staticObject'') isEqualTo _type)||(getText(_x >> ''upgradeObject'') isEqualTo _type)' configClasses (configFile >> 'CfgConstruction')) select 0;
  4566. _config = getText (_config >> 'kitMagazine');
  4567. _cargoToAdd pushBack _config;
  4568. };
  4569. };
  4570. };
  4571. if(!isNull _objToDelete)then
  4572. {
  4573. if(!isNull _objToDelete)then
  4574. {
  4575. if(isPlayer _objToDelete)exitWith{};
  4576. _objToDelete setDamage 1;
  4577. deleteVehicle _objToDelete;
  4578. };
  4579. };
  4580. } forEach _objectsToDelete;
  4581. if(_cargoToAdd isEqualTo [])then
  4582. {
  4583. deleteVehicle _crate;
  4584. }
  4585. else
  4586. {
  4587. {_crate addItemCargoGlobal [_x,1];} forEach _cargoToAdd;
  4588. };
  4589. };
  4590. if(_option isEqualTo -6)exitWith
  4591. {
  4592. _pos = _array select 1;
  4593. _radius = _array select 2;
  4594. _objectsToDelete = nearestObjects [_pos, ['GroundWeaponHolder','WeaponHolderSimulated','LootWeaponHolder'], _radius];
  4595. {deleteVehicle _x;} forEach _objectsToDelete;
  4596. };
  4597. if(_option isEqualTo -3)exitWith
  4598. {
  4599. _target = objectFromnetId (_array select 1);
  4600. _target setOwner 2;
  4601. _pos = getPos _target;
  4602. _pos set[2,(_pos select 2)+2];
  4603. _target setPos _pos;
  4604. _target setVectorUp [0,0,1];
  4605.  
  4606. [
  4607. _target,
  4608. {
  4609. _target = _this;
  4610. _pos = getPos _target;
  4611. _pos set[2,(_pos select 2)+2];
  4612. _target setPos _pos;
  4613. _target setVectorUp [0,0,1];
  4614. },
  4615. owner _target,
  4616. false
  4617. ] call FN_infiSTAR_S;
  4618. };
  4619. if(_option isEqualTo -1)exitWith
  4620. {
  4621. _pos = _array select 1;
  4622. _pos spawn {
  4623. _pos = _this;
  4624. _bolt = 'LightningBolt' createVehicle _pos;
  4625. _bolt setVariable['BIS_enableRandomization',false];
  4626. _bolt setdamage 5;
  4627. _light = '#lightpoint' createVehicle _pos;
  4628. _light setVariable['BIS_enableRandomization',false];
  4629. _light setposatl [_pos select 0,_pos select 1,(_pos select 2) + 10];
  4630. _light setLightDayLight true;
  4631. _light setLightBrightness 300;
  4632. _light setLightAmbient [0.05, 0.05, 0.1];
  4633. _light setlightcolor [1, 1, 2];
  4634. uiSleep 0.1;
  4635. _light setLightBrightness 0;
  4636. uiSleep 0.1;
  4637. _class = ['lightning1_F','lightning2_F'] call bis_Fnc_selectrandom;
  4638. _lightning = _class createVehicle _pos;
  4639. _lightning setVariable['BIS_enableRandomization',false];
  4640. _light setLightBrightness (100 + random 100);
  4641. uiSleep 0.1;
  4642. deleteVehicle _lightning;
  4643. deleteVehicle _light;
  4644. };
  4645. };
  4646. if(_option isEqualTo -2)exitWith
  4647. {
  4648. _target = objectFromnetId (_array select 1);
  4649. _target setDamage 5;
  4650. };
  4651. if(_option isEqualTo 0)exitWith
  4652. {
  4653. private['_vehicleClass','_position','_dir','_vehicleObject','_target','_pinCode'];
  4654. _vehicleClass = _array select 1;
  4655.  
  4656. "; if((_UVC)&&(_UVC_adminspawn))then{ _A3AHstring = _A3AHstring + "
  4657. _return = _vehicleClass call "+_fnc_check_type_allowed+";
  4658. if(!_return)exitWith{
  4659. [
  4660. format['<infiSTAR.de> NOT ALLOWED TO SPAWN [%1]',_vehicleClass],
  4661. {systemChat _this},
  4662. _clientID,
  4663. false
  4664. ] call FN_infiSTAR_S;
  4665. };
  4666. "; }; _A3AHstring = _A3AHstring + "
  4667.  
  4668. _position = _array select 2;
  4669. _dir = _array select 3;
  4670. _target = objectFromnetId (_array select 4);if(isNull _target)then{_target = _ObjFromnetId;};
  4671. _persistent = _array select 5;
  4672.  
  4673. _vehicleObject = _vehicleClass createVehicle _position;
  4674.  
  4675. _vehicleObject allowDamage false;
  4676. _vehicleObject removeAllEventHandlers 'HandleDamage';
  4677. _vehicleObject addEventHandler['HandleDamage', {false}];
  4678. _vehicleObject setDir _dir;
  4679. _vehicleObject setVelocity [0,0,0];
  4680. _vehicleObject allowDamage true;
  4681. _vehicleObject removeAllEventHandlers 'HandleDamage';
  4682. _vehicleObject setDamage 0;
  4683.  
  4684. clearBackpackCargoGlobal _vehicleObject;
  4685. clearItemCargoGlobal _vehicleObject;
  4686. clearMagazineCargoGlobal _vehicleObject;
  4687. clearWeaponCargoGlobal _vehicleObject;
  4688.  
  4689. if(_vehicleClassName isKindOf 'I_UGV_01_F')then
  4690. {
  4691. createVehicleCrew _vehicleObject;
  4692. };
  4693. if(getNumber (configFile >> 'CfgSettings' >> 'VehicleSpawn' >> 'nightVision') isEqualTo 0)then
  4694. {
  4695. _vehicleObject disableNVGEquipment true;
  4696. };
  4697. if(getNumber (configFile >> 'CfgSettings' >> 'VehicleSpawn' >> 'thermalVision') isEqualTo 0)then
  4698. {
  4699. _vehicleObject disableTIEquipment true;
  4700. };
  4701.  
  4702. if(_persistent)then
  4703. {
  4704. _pinCode = _array select 6;
  4705. if(_pinCode isEqualTo '')then
  4706. {
  4707. _fn_getOldPincode = {
  4708. {
  4709. _tmppinCode = _x getVariable ['ExileAccessCode',''];
  4710. if(!(_tmppinCode isEqualTo '')&&(_x getVariable['ExileOwnerUID',''] isEqualTo _clientUID))exitWith{_pinCode = _tmppinCode;};
  4711. } forEach _this;
  4712. };
  4713. (entities 'LandVehicle') call _fn_getOldPincode;
  4714. if(_pinCode isEqualTo '')then{(entities 'Air') call _fn_getOldPincode;};
  4715. if(_pinCode isEqualTo '')then{(entities 'Ship') call _fn_getOldPincode;};
  4716. if(_pinCode isEqualTo '')then{for '_i' from 0 to 3 do {_pinCode = _pinCode + str(floor(random 10));};};
  4717. };
  4718.  
  4719. _vehicleObject setVariable ['ExileIsPersistent', true];
  4720. _vehicleObject setVariable ['ExileAccessCode', _pinCode];
  4721. _vehicleObject addEventHandler ['GetOut', {_this call ExileServer_object_vehicle_event_onGetOut}];
  4722. }
  4723. else
  4724. {
  4725. _vehicleObject setVariable ['ExileIsPersistent', false];
  4726. };
  4727.  
  4728. _vehicleObject setFuel 1;
  4729. _vehicleObject addEventHandler ['GetIn', {_this call ExileServer_object_vehicle_event_onGetIn}];
  4730. _vehicleObject addMPEventHandler ['MPKilled', { if !(isServer) exitWith {}; _this call ExileServer_object_vehicle_event_onMPKilled;}];
  4731. _vehicleObject call ExileServer_system_simulationMonitor_addVehicle;
  4732. _vehicleObject setVariable['ExileOwnerUID',_clientUID];
  4733.  
  4734. if(_persistent)then
  4735. {
  4736. _vehicleObject call ExileServer_object_vehicle_database_insert;
  4737. _vehicleObject call ExileServer_object_vehicle_database_update;
  4738.  
  4739. _input = [
  4740. [_vehicleClass,_pinCode,netId _vehicleObject],
  4741. {
  4742. systemChat format['CODE FOR %1 is %2',_this select 0,_this select 1];
  4743. (objectFromnetId (_this select 2)) setVariable ['ExileAlreadyKnownCode',(_this select 1)];
  4744. },
  4745. (owner _target),
  4746. false
  4747. ] call FN_infiSTAR_S;
  4748. if!(_target isEqualTo _ObjFromnetId)then{_input set[2,owner _ObjFromnetId];_input call FN_infiSTAR_S;};
  4749. };
  4750. _vehicleObject setVariable ['ExileIsLocked', 0];
  4751. _vehicleObject lock 0;
  4752. _vehicleObject enableRopeAttach true;
  4753. "; if((_UVC)&&(!_UVC_adminspawn))then{ _A3AHstring = _A3AHstring + "
  4754. _vehicleObject setVariable['"+_vehicle_needs_check+"',false];
  4755. "; }; _A3AHstring = _A3AHstring + "
  4756. };
  4757. if(_option isEqualTo 1)exitWith
  4758. {
  4759. _unitNetId = _array select 1;
  4760. _pos = _array select 2;
  4761. _unit = objectFromnetId _unitNetId;
  4762. _isOnFoot = isNull objectParent _unit;
  4763. _veh = vehicle _unit;
  4764. _lastpos = getPos _unit;
  4765. _name = _unit getVariable['ExileNameOnChar',if(alive _unit)then{name _unit}else{''}];
  4766. _uid = getPlayerUID _unit;
  4767. if(_isOnFoot)then
  4768. {
  4769. [[_unit,_pos],fnc_do_adminTP,_unit,false] call FN_infiSTAR_S;
  4770. }
  4771. else
  4772. {
  4773. _driver = driver _veh;
  4774. if(isPlayer _driver)then
  4775. {
  4776. _name = _driver getVariable['ExileNameOnChar',if(alive _driver)then{name _driver}else{''}];
  4777. _uid = getPlayerUID _driver;
  4778. [[_driver,_pos],fnc_do_adminTP,_driver,false] call FN_infiSTAR_S;
  4779. }
  4780. else
  4781. {
  4782. _veh setOwner 2;
  4783. _veh setVelocity [0,0,0];
  4784. _veh setVectorUp [0,0,1];
  4785. _veh setPosATL _pos;
  4786. };
  4787. };
  4788. if!(_clientUID in _ld)then
  4789. {
  4790. _mapLP = mapGridPosition _lastpos;
  4791. _mapCP = mapGridPosition _pos;
  4792. _log = format[
  4793. '%1(%2) | Teleported %3(%4) from %5(%6) to %7(%8) (%9m)',
  4794. _clientName,
  4795. _clientUID,
  4796. _name,
  4797. _uid,
  4798. _lastpos,
  4799. _mapLP,
  4800. _pos,
  4801. _mapCP,
  4802. round(_lastpos distance2D _pos)
  4803. ];
  4804. ['ADMINLOG',_log] call FNC_A3_RL;
  4805.  
  4806. "; if(_enableIngameLogs)then{ _A3AHstring = _A3AHstring + "
  4807. if(count "+_AH_AdmiLogArrayRND+" > 99)then{"+_AH_AdmiLogArrayRND+" deleteAt 0;};
  4808. "+_AH_AdmiLogArrayRND+" pushBack _log;
  4809. '"+_AH_AdmiLogArrayRND+"' call fnc_variable_to_admins;
  4810. "; }; _A3AHstring = _A3AHstring + "
  4811. };
  4812. };
  4813. if(_option isEqualTo 2)exitWith
  4814. {
  4815. _state = _array select 1;
  4816. _ObjFromnetId hideObjectGlobal _state;
  4817. };
  4818. if(_option isEqualTo 3)exitWith
  4819. {
  4820. _target = objectFromnetId (_array select 1);
  4821. _pos = _array select 2;
  4822. _itemClassName = _array select 3;
  4823.  
  4824. _lootHolder = objNull;
  4825. _wpnh = nearestObjects [_target, ['GroundWeaponHolder','WeaponHolderSimulated','LootWeaponHolder'], 3];
  4826. if!(_wpnh isEqualTo [])then{_lootHolder = _wpnh select 0;};
  4827. if(isNull _lootHolder)then
  4828. {
  4829. _lootHolder = createVehicle ['GroundWeaponHolder',_pos,[],3,'CAN_COLLIDE'];
  4830. _lootHolder setPosATL _pos;
  4831. _lootHolder setVariable['BIS_enableRandomization',false];
  4832. };
  4833.  
  4834. if(getText(configfile >> 'CfgVehicles' >> _itemClassName >> 'vehicleClass') == 'BackPacks')exitWith
  4835. {
  4836. _lootHolder addBackpackCargoGlobal [_itemClassName,1];
  4837. };
  4838.  
  4839. _lootHolder addItemCargoGlobal [_itemClassName,1];
  4840. if(isClass (configFile >> 'CfgWeapons' >> _itemClassName))then
  4841. {
  4842. _magazines = getArray (configFile >> 'CfgWeapons' >> _itemClassName >> 'magazines');
  4843. if(str _magazines != '[]')then
  4844. {
  4845. {_lootHolder addItemCargoGlobal [_x,3];} forEach _magazines;
  4846. };
  4847. };
  4848. };
  4849. if(_option isEqualTo 4)exitWith
  4850. {
  4851. _texture = _array select 1;
  4852. _textureid = _array select 2;
  4853. _dir = _array select 3;
  4854. _location = _array select 4;
  4855.  
  4856. _board = createVehicle ['Exile_Sign_TraderCity', _location, [], 0, 'CAN_COLLIDE'];
  4857. _board setObjectTextureGlobal[0,_texture];
  4858. _board setDir _dir;
  4859. _board addMPEventHandler ['MPKilled', { if !(isServer) exitWith {}; (_this select 0) call fnc_remove_billboard;}];
  4860.  
  4861. _board setVariable ['ExileOwnerUID',_clientUID];
  4862. _board setVariable ['ExileAccessCode',_textureid+1];
  4863. _board call ExileServer_object_vehicle_database_insert;
  4864.  
  4865. _board = createVehicle ['Exile_Sign_TraderCity', _location, [], 0, 'CAN_COLLIDE'];
  4866. _board setObjectTextureGlobal[0,_texture];
  4867. _board setDir (_dir+180);
  4868. _board addMPEventHandler ['MPKilled', { if !(isServer) exitWith {}; (_this select 0) call fnc_remove_billboard;}];
  4869.  
  4870. _board setVariable ['ExileOwnerUID',_clientUID];
  4871. _board setVariable ['ExileAccessCode',_textureid+1];
  4872. _board call ExileServer_object_vehicle_database_insert;
  4873. };
  4874. if(_option isEqualTo 5)exitWith
  4875. {
  4876. _target = objectFromnetId (_array select 1);
  4877. _offset = _array select 2;
  4878. _maxHeight = _array select 3;
  4879. _target attachTo [vehicle _ObjFromnetId,[0,_offset,_maxHeight]];
  4880. };
  4881. if(_option isEqualTo 7)exitWith
  4882. {
  4883. _msg = _array select 1;
  4884. if(typename _msg == 'ARRAY')then{_msg = toString _msg;};
  4885. [_msg,-2] call fnc_serverMassMessage;
  4886. };
  4887. if(_option isEqualTo 8)exitWith
  4888. {
  4889. _msg = _array select 1;
  4890. if(typename _msg == 'ARRAY')then{_msg = toString _msg;};
  4891. [_msg,{systemChat format['<infiSTAR.de> %1',_this];},-2,false] call FN_infiSTAR_S;
  4892. };
  4893. if(_option isEqualTo 9)exitWith
  4894. {
  4895. _target = objectFromnetId (_array select 1);
  4896. if(isNil'_target')exitWith{};
  4897. if(isNull _target)exitWith{};
  4898.  
  4899. _target setDamage 0;
  4900. if((_target isKindOf 'LandVehicle')||(_target isKindOf 'Ship')||(_target isKindOf 'Air'))then
  4901. {
  4902. if(local _target)then
  4903. {
  4904. [_target,9999] call ExileClient_util_fuel_setFuel;
  4905. }
  4906. else
  4907. {
  4908. ['setFuelRequest',[netId _target,9999]] call ExileClient_system_network_send;
  4909. };
  4910. _target setFuel 1;
  4911. };
  4912. if((getPlayerUID _target != '')&&(_target isKindOf 'Man'))then
  4913. {
  4914. _ownertarget = owner _target;
  4915. if(_ownertarget > 2)then
  4916. {
  4917. _target setBleedingRemaining 0;
  4918. _target setOxygenRemaining 1;
  4919. _target setFatigue 0;
  4920. _code = {
  4921. ExileClientPlayerAttributes = [100,100,100,100,0,37,0];
  4922. ExileClientPlayerAttributesASecondAgo = ExileClientPlayerAttributes;
  4923. ExileClientPlayerLastHpRegenerationAt = diag_tickTime;
  4924. ExileClientPlayerIsOverburdened = false;
  4925. ExileClientPlayerOxygen = 100;
  4926. ExileClientPlayerIsAbleToBreathe = true;
  4927. ExileClientPlayerIsDrowning = false;
  4928. ExileClientPlayerIsInjured = false;
  4929. ExileClientPlayerIsBurning = false;
  4930. ExileClientPlayerIsBleeding = false;
  4931. ExileClientPlayerIsExhausted = false;
  4932. ExileClientPlayerIsHungry = false;
  4933. ExileClientPlayerIsThirsty = false;
  4934. player setBleedingRemaining 0;
  4935. player setOxygenRemaining 1;
  4936. player setFatigue 0;
  4937.  
  4938. if(!isNil'ExileClientBleedOutThread')then
  4939. {
  4940. if !(ExileClientBleedOutThread isEqualTo -1) then
  4941. {
  4942. [ExileClientBleedOutThread] call ExileClient_system_thread_removeTask;
  4943. ExileClientBleedOutThread = -1;
  4944. };
  4945. };
  4946. ExileClientPostProcessingColorCorrections ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [0.39, 0.32, 0.25, 1], [0.5,0.5,0.5,0], [0,0,0,0,0,0,4]];
  4947. ExileClientPostProcessingColorCorrections ppEffectCommit 0;
  4948. ExileClientPostProcessingBackgroundBlur ppEffectEnable false;
  4949. ExileClientPostProcessingBackgroundBlur ppEffectAdjust [0];
  4950. ExileClientPostProcessingBackgroundBlur ppEffectCommit 0;
  4951. ExileClientPostProcessingDelirium ppEffectAdjust [2, 0.1, 0.1, 0.2, 0.2, 2, 2, 0.01, 0.01, 0.01, 0.01, 0.01, 0.1, 2, 2];
  4952. ExileClientPostProcessingDelirium ppEffectCommit 0;
  4953. ExileClientPostProcessingDelirium ppEffectEnable false;
  4954.  
  4955. if(!isNil'ExileRadiationThreadHandle')then
  4956. {
  4957. [] call ExileClient_system_radiation_event_onPlayerDied;
  4958. ExilePlayerRadiation = 0;
  4959. ExilePlayerRadiationLastCheck = 0;
  4960. [] call ExileClient_system_radiation_event_onPlayerSpawned;
  4961. };
  4962. true
  4963. };
  4964. ['',_code,_ownertarget,false] call FN_infiSTAR_S;
  4965. };
  4966. };
  4967. };
  4968. if(_option isEqualTo 10)exitWith
  4969. {
  4970. _netId = _array select 1;
  4971. _object = objectFromnetId _netId;
  4972. _object = vehicle _object;
  4973. if((_object isKindOf 'LandVehicle') || (_object isKindOf 'Air') || (_object isKindOf 'Ship') || (_object isKindOf 'Static'))then
  4974. {
  4975. _type = typeOf _object;
  4976. _locked = locked _object;
  4977. if(_locked isEqualTo 2)then
  4978. {
  4979. if(isNumber(configFile >> 'CfgVehicles' >> _type >> 'exileIsLockable'))then
  4980. {
  4981. _object setVariable ['ExileIsLocked',0,true];
  4982. }
  4983. else
  4984. {
  4985. if(local _object)then
  4986. {
  4987. _object lock 0;
  4988. }
  4989. else
  4990. {
  4991. [owner _object,'LockVehicleRequest',[_netId,false]] call ExileServer_system_network_send_to;
  4992. };
  4993. _object setVariable ['ExileIsLocked',0];
  4994. };
  4995. _object enableRopeAttach true;
  4996. }
  4997. else
  4998. {
  4999. if(isNumber(configFile >> 'CfgVehicles' >> _type >> 'exileIsLockable'))then
  5000. {
  5001. _object setVariable ['ExileIsLocked',-1,true];
  5002. }
  5003. else
  5004. {
  5005. if(local _object)then
  5006. {
  5007. _object lock 2;
  5008. }
  5009. else
  5010. {
  5011. [owner _object,'LockVehicleRequest',[_netId,true]] call ExileServer_system_network_send_to;
  5012. };
  5013. _object setVariable ['ExileIsLocked',-1];
  5014. };
  5015. _object enableRopeAttach false;
  5016. };
  5017. _object setVariable ['ExileLastLockToggleAt', time];
  5018. _object setVariable ['ExileAccessDenied', false];
  5019. _object setVariable ['ExileAccessDeniedExpiresAt', 0];
  5020. _object call ExileServer_system_vehicleSaveQueue_addVehicle;
  5021. };
  5022. };
  5023. if(_option isEqualTo 11)exitWith
  5024. {
  5025. _target = objectFromnetId (_array select 1);
  5026. _code = {
  5027. _inventoryP = [];
  5028. {_inventoryP pushBack _x;} forEach (assignedItems player);
  5029. {_inventoryP pushBack _x;} forEach (magazines player);
  5030. {_inventoryP pushBack _x;} forEach (weapons player);
  5031. {_inventoryP pushBack _x;} forEach (primaryWeaponItems player);
  5032. {_inventoryP pushBack _x;} forEach (secondaryWeaponItems player);
  5033. _inventoryP pushBack (primaryWeapon player);
  5034. _inventoryP pushBack (secondaryWeapon player);
  5035. _inventoryP pushBack (uniform player);
  5036. _inventoryP pushBack (vest player);
  5037. _inventoryP pushBack (backpack player);
  5038. _inventoryP pushBack (headgear player);
  5039. _inventoryP pushBack (goggles player);
  5040. {
  5041. player removeItem _x;
  5042. player removeWeapon _x;
  5043. player removeMagazine _x;
  5044. removeUniform player;
  5045. removeVest player;
  5046. removeBackpack player;
  5047. removeHeadgear player;
  5048. removeGoggles player;
  5049. player removePrimaryWeaponItem _x;
  5050. player removeSecondaryWeaponItem _x;
  5051. player unlinkItem _x;
  5052. } forEach _inventoryP;
  5053. };
  5054. ['',_code,(owner _target),false] call FN_infiSTAR_S;
  5055. };
  5056. if(_option isEqualTo 12001)exitWith
  5057. {
  5058. _player = objectFromnetId (_array select 1);
  5059. _amount = _array select 2;
  5060.  
  5061. _playerMoney = _player getVariable ['ExileMoney', 0];
  5062. _playerMoney = _playerMoney + _amount;
  5063. _player setVariable ['ExileMoney', _playerMoney, true];
  5064. format['setPlayerMoney:%1:%2', _playerMoney, _player getVariable ['ExileDatabaseID', 0]] call ExileServer_system_database_query_fireAndForget;
  5065. };
  5066. if(_option isEqualTo 12002)exitWith
  5067. {
  5068. _player = objectFromnetId (_array select 1);
  5069. _amount = _array select 2;
  5070.  
  5071. _playerMoney = _player getVariable ['ExileLocker', 0];
  5072. _playerMoney = _playerMoney + _amount;
  5073. _player setVariable ['ExileLocker', _playerMoney, true];
  5074. format['updateLocker:%1:%2', _playerMoney, (getPlayerUID _player)] call ExileServer_system_database_query_fireAndForget;
  5075. };
  5076. if(_option isEqualTo 12003)exitWith
  5077. {
  5078. _player = objectFromnetId (_array select 1);
  5079. _amount = _array select 2;
  5080.  
  5081. _playerRespect = _player getVariable ['ExileScore', 0];
  5082. _playerRespect = _playerRespect + _amount;
  5083. _player setVariable ['ExileScore', _playerRespect, true];
  5084. [_playerRespect,{ExileClientPlayerScore = _this;},(owner _player),false] call FN_infiSTAR_S;
  5085. format['setAccountScore:%1:%2', _playerRespect, (getPlayerUID _player)] call ExileServer_system_database_query_fireAndForget;
  5086. };
  5087. if(_option isEqualTo 13)exitWith
  5088. {
  5089. _target = objectFromnetId (_array select 1);
  5090. _value = _array select 2;
  5091. _targetUID = getPlayerUID _target;
  5092. if(_targetUID in _ld)then
  5093. {
  5094. ['ERROR',{systemChat _this;_this call FN_SHOW_LOG;},_clientID,false] call FN_infiSTAR_S;
  5095. }
  5096. else
  5097. {
  5098. [_value,{ if!(userInputDisabled isEqualTo _this)then{disableUserInput _this;}; },(owner _target),false] call FN_infiSTAR_S;
  5099. };
  5100. };
  5101. if(_option isEqualTo 14)exitWith
  5102. {
  5103. _obj = objectFromnetId (_array select 1);
  5104. if(!isNull _obj)then
  5105. {
  5106. _pincode = _obj getVariable['ExileAccessCode',''];
  5107. _owneruid = _obj getVariable ['ExileOwnerUID', ''];
  5108. if(_owneruid isEqualTo '')then
  5109. {
  5110. _owneruid = missionNameSpace getVariable[format['UID_BY_OWNER_%1',owner _obj],''];
  5111. };
  5112. _ownername = missionNameSpace getVariable[format['NAME_BY_UID_%1',_owneruid],''];
  5113. [_obj,_pincode,_ownername,_owneruid] remoteExecCall ['admin_showinfo_catch',_clientID,false];
  5114. };
  5115. };
  5116. if(_option isEqualTo 15)exitWith
  5117. {
  5118. _victimnetId = _array select 1;
  5119. _hostageTakernetId = _array select 2;
  5120. _value = _array select 3;
  5121. if(_value)then
  5122. {
  5123. try {
  5124. _victim = objectFromnetId _victimnetId;
  5125. _hostageTaker = objectFromnetId _hostageTakernetId;
  5126. if (isNull _hostageTaker) then
  5127. {
  5128. throw 'Unknown player cannot handcuff someone!';
  5129. };
  5130. if !(alive _hostageTaker) then
  5131. {
  5132. throw 'The dead cannot handcuff others!';
  5133. };
  5134. if (isNull _victim) then
  5135. {
  5136. throw 'Cannot handcuff unknown victim!';
  5137. };
  5138. if !(isPlayer _victim) then
  5139. {
  5140. throw 'Cannot handcuff bots!';
  5141. };
  5142. if !(_victim isKindOf 'Exile_Unit_Player') then
  5143. {
  5144. throw 'Can only handcuff players!';
  5145. };
  5146. if !(alive _victim) then
  5147. {
  5148. throw 'Dead people cannot be handcuffed!';
  5149. };
  5150. if (_victim getVariable['ExileIsHandcuffed', false]) then
  5151. {
  5152. throw 'Cannot double handcuff someone!';
  5153. };
  5154. moveOut _victim;
  5155. _victim action ['eject', (vehicle _victim)];
  5156. _victim setVariable['ExileIsHandcuffed', true, true];
  5157. _victim setVariable['ExileHostageTakernetId', netId _hostageTaker];
  5158. _victim setVariable['ExileHostageTakerUID', getPlayerUID _hostageTaker];
  5159. ['switchMoveRequest', [_victimnetId, 'Acts_AidlPsitMstpSsurWnonDnon_loop']] call ExileServer_system_network_send_broadcast;
  5160. [_victim, 'handcuffRequest', [netId _hostageTaker]] call ExileServer_system_network_send_to;
  5161. }
  5162. catch {
  5163. diag_log format['<infiSTAR.de> Restrain exception: %1',_exception];
  5164. };
  5165. }
  5166. else
  5167. {
  5168. try {
  5169. _victim = objectFromnetId _victimnetId;
  5170. if (isNull _victim) then
  5171. {
  5172. throw 'Cannot free unknown victim!';
  5173. };
  5174. if !(_victim getVariable['ExileIsHandcuffed', false]) then
  5175. {
  5176. throw 'Cannot free not-handcuffed ones!';
  5177. };
  5178. ['switchMoveRequest', [netId _victim, 'Acts_AidlPsitMstpSsurWnonDnon_out']] call ExileServer_system_network_send_broadcast;
  5179. _victim setVariable['ExileIsHandcuffed', false, true];
  5180. _victim setVariable['ExileHostageTakernetId', nil];
  5181. _victim setVariable['ExileHostageTakerUID', nil];
  5182.  
  5183. [
  5184. '',
  5185. {
  5186. ExileClientIsHandcuffed = false;
  5187. ExileClientHostageTaker = objNull;
  5188. if !(ExileClientBreakFreeActionHandle isEqualTo -1) then
  5189. {
  5190. player removeAction ExileClientBreakFreeActionHandle;
  5191. ExileClientBreakFreeActionHandle = -1;
  5192. };
  5193. },
  5194. owner _victim,
  5195. false
  5196. ] call FN_infiSTAR_S;
  5197. }
  5198. catch {
  5199. diag_log format['<infiSTAR.de> UnRestrain exception: %1',_exception];
  5200. };
  5201. };
  5202. };
  5203. if(_option isEqualTo 16)exitWith
  5204. {
  5205. _somethingChanged = false;
  5206. _FOG_VALUE = _array select 1;
  5207. if(_FOG_VALUE != fog)then
  5208. {
  5209. 0 setFog _FOG_VALUE;
  5210. };
  5211. _OVERCAST_VALUE = _array select 2;
  5212. if(_OVERCAST_VALUE != overcast)then
  5213. {
  5214. 0 setOvercast _OVERCAST_VALUE;
  5215. _somethingChanged = true;
  5216. };
  5217. _RAIN_VALUE = _array select 3;
  5218. if(_RAIN_VALUE != rain)then
  5219. {
  5220. 0 setRain _RAIN_VALUE;
  5221. _somethingChanged = true;
  5222. };
  5223. if(_somethingChanged)then{
  5224. simulWeatherSync;
  5225. forceWeatherChange;
  5226. };
  5227. };
  5228. if(_option isEqualTo 17)exitWith
  5229. {
  5230. _hour = _array select 1;
  5231. _date = date;
  5232. _date set [3,_hour];
  5233. setDate _date;
  5234. };
  5235. if(_option isEqualTo 18)exitWith
  5236. {
  5237. _target = objectFromnetId (_array select 1);
  5238. _value = _array select 2;
  5239. [_value,{ if(_value)then{player setUnconscious _value;}else{player setUnconscious _value;player switchMove '';}; },(owner _target),false] call FN_infiSTAR_S;
  5240. };
  5241. if(_option isEqualTo 19)exitWith
  5242. {
  5243. _target = objectFromnetId (_array select 1);
  5244. if(isNull _target)exitWith{};
  5245.  
  5246. _targetID = owner _target;
  5247. if(_targetID < 3)exitWith{};
  5248.  
  5249. _revive = _target getVariable ['revive',-1];
  5250. if!(_revive isEqualTo -1)exitWith
  5251. {
  5252. [
  5253. format['<infiSTAR.de> REVIVE ERROR: Target %1 already getting revived. Started %2 seconds ago..!',_target,time - _revive],
  5254. {systemChat _this},
  5255. _clientID,
  5256. false
  5257. ] call FN_infiSTAR_S;
  5258. };
  5259. _target setVariable ['revive',time];
  5260.  
  5261. [_target,_targetID] spawn fnc_exile_revive_server;
  5262. };
  5263. if(_option isEqualTo 20)exitWith
  5264. {
  5265. _obj = objectFromnetId(_array select 1);
  5266. _pos = _array select 2;
  5267. if(!isNull _obj)then{_obj setPos _pos;};
  5268. };
  5269. if(_option isEqualTo 5000)exitWith
  5270. {
  5271. private['_arrayforcrate'];
  5272. _target = objectFromnetId (_array select 1);
  5273. _selected = _array select 2;
  5274. if(isNil'_target')exitWith{};
  5275. if(!isPlayer _target)exitWith{};
  5276. _targetUID = getPlayerUID _target;
  5277. _targetID = owner _target;
  5278. if(isNil'_targetUID')exitWith{};
  5279. if(_targetUID == '')exitWith{};
  5280.  
  5281. _pos = _target modelToWorld [0,3,1];
  5282. _posATL = getPosATL _target;
  5283. _dir = (getDir _target) + 180;
  5284.  
  5285.  
  5286. _allSupportBoxes = "+str _allSupportBoxes+";
  5287. _boxarray = _allSupportBoxes select _selected;
  5288. if(isNil'_boxarray')exitWith{};
  5289.  
  5290. _boxname = _boxarray select 0;
  5291. _arrayforcrate = _boxarray select 1;
  5292. if(isNil'_arrayforcrate')exitWith{};
  5293. if(_arrayforcrate isEqualTo [])exitWith{};
  5294.  
  5295. _box = 'Exile_Container_SupplyBox' createVehicle _pos;
  5296. _box setVelocity [0,0,0];
  5297. _box setVectorUp [0,0,1];
  5298.  
  5299. clearBackpackCargoGlobal _box;
  5300. clearItemCargoGlobal _box;
  5301. clearMagazineCargoGlobal _box;
  5302. clearWeaponCargoGlobal _box;
  5303.  
  5304. {
  5305. if(typename _x == 'ARRAY')then
  5306. {
  5307. _item = _x select 0;
  5308. _BackPack = getText (configfile >> 'CfgVehicles' >> _item >> 'vehicleClass') == 'BackPacks';
  5309. if(_BackPack)then
  5310. {
  5311. _box addBackpackCargoGlobal [_item,_x select 1];
  5312. }
  5313. else
  5314. {
  5315. _box addItemCargoGlobal [_item,_x select 1];
  5316. };
  5317. }
  5318. else
  5319. {
  5320. _item = _x;
  5321. _BackPack = getText (configfile >> 'CfgVehicles' >> _item >> 'vehicleClass') == 'BackPacks';
  5322. if(_BackPack)then
  5323. {
  5324. _box addBackpackCargoGlobal [_item,1];
  5325. }
  5326. else
  5327. {
  5328. _box addItemCargoGlobal [_item,1];
  5329. };
  5330. };
  5331. } forEach _arrayforcrate;
  5332.  
  5333. _box setOwner _targetID;
  5334. _txt = format['%1 created for %2(%3)!',_boxname,name _target,_targetUID];
  5335. if!(_clientID isEqualTo _targetID)then
  5336. {
  5337. [_txt,{systemChat _this;cutText [_this, 'PLAIN'];},_targetID,false] call FN_infiSTAR_S;
  5338. };
  5339. };
  5340. if(_option isEqualTo 9876)exitWith
  5341. {
  5342. _puid = _array select 1;
  5343. _name = missionNameSpace getVariable[format['"+_name_by_uid+"%1',_puid],''];
  5344. _steamName = [_name,_puid,_clientID] call fnc_resolveSteamName;
  5345. if(_steamName != '')then
  5346. {
  5347. _code = {
  5348. params['_name','_uid',['_steamname','']];
  5349. _log = format['<infiSTAR.de> %1(%2) SteamName is: %3',_name,_uid,_steamname];
  5350. format['%1 -> %2',_name,_steamname] call FN_SHOW_LOG;
  5351. systemchat _log;
  5352. diag_log _log;
  5353. };
  5354. [[_name,_puid,_steamname],_code,_clientID,false] call FN_infiSTAR_S;
  5355. ['STEAM_NAME_LOG',format['%1(%2) is %3',_name,_puid,_steamname]] call FNC_A3_RL;
  5356. };
  5357. };
  5358. };
  5359. "+_fnc_AdminReqReal+" = compileFinal ([_fnc_AdminReqReal] call fnc_CompilableString);
  5360. ";
  5361. diag_log format['<infiSTAR.de> %1 - fnc_AdminReqReal: added !',time];
  5362.  
  5363. diag_log format['<infiSTAR.de> %1 - fnc_server_handle_pre_mpmessage: adding to main string..',time];
  5364. _A3AHstring = _A3AHstring + "
  5365. diag_log format['<infiSTAR.de> %1 - fnc_server_handle_pre_mpmessage: still compiling...',time];
  5366. _fnc_server_handle_pre_mpmessage =
  5367. {
  5368. private['_admins','_ObjFromnetId','_serverUID','_clientName','_clientID','_option'];
  5369. params[['_tokenreceived',''],['_clientUID',''],['_clientnetId','0:0'],['_array',[]]];
  5370. if(typename _tokenreceived != 'STRING')exitWith{_log = format['AH_KICKLOGSPAWN ERROR 1: %1',_this];['SURVEILLANCELOG',_log] call FNC_A3_CUSTOMLOG;};
  5371. if(_tokenreceived isEqualTo '')exitWith{_log = format['AH_KICKLOGSPAWN ERROR 2: %1',_this];['SURVEILLANCELOG',_log] call FNC_A3_CUSTOMLOG;};
  5372. if(typename _clientUID != 'STRING')exitWith{_log = format['AH_KICKLOGSPAWN ERROR 3: %1',_this];['SURVEILLANCELOG',_log] call FNC_A3_CUSTOMLOG;};
  5373. if(_clientUID in ['',' ','0'])exitWith{_log = format['AH_KICKLOGSPAWN ERROR 4: %1',_this];['SURVEILLANCELOG',_log] call FNC_A3_CUSTOMLOG;};
  5374. if(typename _clientnetId != 'STRING')exitWith{_log = format['AH_KICKLOGSPAWN ERROR 5: %1',_this];['SURVEILLANCELOG',_log] call FNC_A3_CUSTOMLOG;};
  5375. if(_clientnetId in ['','0:0'])exitWith{_log = format['AH_KICKLOGSPAWN ERROR 6: %1',_this];['SURVEILLANCELOG',_log] call FNC_A3_CUSTOMLOG;};
  5376. if(typename _array != 'ARRAY')exitWith{_log = format['AH_KICKLOGSPAWN ERROR 7: %1',_this];['SURVEILLANCELOG',_log] call FNC_A3_CUSTOMLOG;};
  5377. if(_array isEqualTo [])exitWith{_log = format['AH_KICKLOGSPAWN ERROR 8: %1',_this];['SURVEILLANCELOG',_log] call FNC_A3_CUSTOMLOG;};
  5378.  
  5379. _serverUID = missionNameSpace getVariable[format['"+_uid_by_token+"%1',_tokenreceived],''];
  5380. _clientName = missionNameSpace getVariable[format['"+_name_by_uid+"%1',_serverUID],''];
  5381. if(_serverUID isEqualTo '')then
  5382. {
  5383. _log = format['AH_KICKLOGSPAWN - SERVER UID WRONG! clientUID: %1 - serverUID: %2',_clientName,_clientUID,_serverUID];
  5384. [_clientName,_clientUID,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  5385. };
  5386. _clientID = _serverUID call FNC_OWNER_BY_UID;
  5387.  
  5388. if!(_serverUID isEqualTo _clientUID)then
  5389. {
  5390. _log = format['AH_KICKLOGSPAWN - SERVER RESOLVED UID! clientUID: %1 - serverUID: %2',_clientUID,_serverUID];
  5391. [_clientName,_serverUID,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  5392. [_clientName,_clientUID,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  5393. _clientUID = _serverUID;
  5394. };
  5395.  
  5396.  
  5397. _ObjFromnetId = objectFromnetId _clientnetId;
  5398. if(isNil '_ObjFromnetId')exitWith
  5399. {
  5400. _log = 'AH_KICKLOGSPAWN playerObj is Nil';
  5401. ['SURVEILLANCELOG',_log] call FNC_A3_CUSTOMLOG;
  5402. };
  5403. if(typename _ObjFromnetId != 'OBJECT')exitWith
  5404. {
  5405. _log = format['AH_KICKLOGSPAWN ObjFromnetId wrong typename: %1 %2',typename _ObjFromnetId,_ObjFromnetId];
  5406. ['SURVEILLANCELOG',_log] call FNC_A3_CUSTOMLOG;
  5407. };
  5408. if(isNull _ObjFromnetId)then
  5409. {
  5410. _ObjFromnetId = missionNameSpace getVariable[format['"+_object_by_uid+"%1',_clientUID],objNull];
  5411. }
  5412. else
  5413. {
  5414. missionNameSpace setVariable[format['"+_object_by_uid+"%1',_clientUID],_ObjFromnetId];
  5415. missionNameSpace setVariable[format['EXILE_PLAYER_OJECT_%1',_clientUID],_ObjFromnetId];
  5416. };
  5417. _array set [0,_clientName];
  5418. _array set [1,_clientUID];
  5419. _array call "+_fnc_server_handle_mpmessage+";
  5420. };
  5421. "+_fnc_server_handle_pre_mpmessage+" = compileFinal ([_fnc_server_handle_pre_mpmessage] call fnc_CompilableString);
  5422. ";
  5423. diag_log format['<infiSTAR.de> %1 - fnc_server_handle_pre_mpmessage: added !',time];
  5424.  
  5425. diag_log format['<infiSTAR.de> %1 - adminStartupCode: adding to main string..',time];
  5426. _A3AHstring = _A3AHstring + "
  5427. diag_log format['<infiSTAR.de> %1 - adminStartupCode: still compiling...',time];
  5428. _adminStartupCode = {
  5429. GET_TIME_TIME = {
  5430. _hours = floor(time / 60 / 60);
  5431. _minutes = floor((((time / 60 / 60) - _hours) max 0.0001)*60);
  5432. _seconds = time - (_hours*60*60) - (_minutes * 60);
  5433. format['%1h %2min %3s',_hours,_minutes,round _seconds]
  5434. };
  5435. _log = format['<infiSTAR.de> %1 - waiting for client to be ready..',call GET_TIME_TIME];systemchat _log;diag_log _log;
  5436. waitUntil {!isNull findDisplay 46 && !isNil 'ExileClientLoadedIn' && getPlayerUID player != ''};
  5437. uiSleep 1;
  5438. "; if(!_HIDE_FROM_PLAYERS)then{ _A3AHstring = _A3AHstring + "_log = format['<infiSTAR.de> %1 - client ready.',call GET_TIME_TIME];systemchat _log;diag_log _log;"; }; _A3AHstring = _A3AHstring + "
  5439. _admins = "+str _admins+";
  5440. _tokenFromServer = _this select 0;
  5441. _name = _this select 1;
  5442. _puid = _this select 2;
  5443. _adminsA = _this select 3;
  5444. infiSTAR_Ds = _this select 4;
  5445. infiSTAR_ADMINS = _adminsA;
  5446. if(!isNil'fnc_AdminReq')exitWith{
  5447. diag_log format['<infiSTAR.de> fnc_AdminReq already existing! %1 (kicked to lobby)',fnc_AdminReq];
  5448. (findDisplay 46) closeDisplay 0;
  5449. };
  5450. ['fnc_AdminReq',_this select 5] call FN_infiSTAR_F;
  5451. "; if(_LogAdminActions)then{ _A3AHstring = _A3AHstring + "
  5452. if(_puid in (_this select 4))then{['fnc_adminLog',''] call FN_infiSTAR_F;}else{['fnc_adminLog','[1234,toArray _this] call fnc_AdminReq;'] call FN_infiSTAR_F;};
  5453. "; }else{ _A3AHstring = _A3AHstring + "
  5454. if(isNil 'fnc_adminLog')then{['fnc_adminLog',''] call FN_infiSTAR_F;};
  5455. "; }; _A3AHstring = _A3AHstring + "
  5456. _MY_PERSONAL_ACCESS_ARRAY = [];
  5457. if(_puid in _adminsA)then
  5458. {
  5459. INFISTARVERSION='05-Jul-2016 23-52-40 - v0054';
  5460. OPEN_ADMIN_MENU_KEY = "+str _OPEN_ADMIN_MENU_KEY+";
  5461. passwordAdmin = "+str _passwordAdmin+";
  5462. diag_log format['<infiSTAR.de> OPEN_ADMIN_MENU_KEY: %1',OPEN_ADMIN_MENU_KEY];
  5463. _adminUIDandAccess = "+str _adminUIDandAccess+";
  5464. if(!isNil'_adminUIDandAccess')then
  5465. {
  5466. if(typename _adminUIDandAccess == 'ARRAY')then
  5467. {
  5468. if(count _adminUIDandAccess > 0)then
  5469. {
  5470. {
  5471. _level1 = nil;
  5472. _level1 = _x;
  5473. if(!isNil'_level1')then
  5474. {
  5475. if(typename _level1 == 'ARRAY')then
  5476. {
  5477. if(count _level1 == 2)then
  5478. {
  5479. _uids = nil;
  5480. _uids = _level1 select 0;
  5481. _uidsstate = false;
  5482. if(!isNil'_uids')then
  5483. {
  5484. if(typename _uids == 'ARRAY')then
  5485. {
  5486. if(count _uids > 0)then
  5487. {
  5488. _uidsstate = true;
  5489. };
  5490. };
  5491. };
  5492. if(_uidsstate)then
  5493. {
  5494. _access = nil;
  5495. _access = _level1 select 1;
  5496. if(!isNil'_access')then
  5497. {
  5498. if(typename _access == 'ARRAY')then
  5499. {
  5500. if(count _access > 0)then
  5501. {
  5502. if(_puid in _uids)then{_MY_PERSONAL_ACCESS_ARRAY = _access;};
  5503. };
  5504. };
  5505. };
  5506. };
  5507. };
  5508. };
  5509. };
  5510. } forEach _adminUIDandAccess;
  5511. };
  5512. };
  5513. };
  5514. _ADMINLEVELACCESS = '
  5515. _puid = getPlayerUID player;
  5516. if(_puid in '+str (_this select 4)+')exitWith{true};
  5517. if(_this in '+str _MY_PERSONAL_ACCESS_ARRAY+')exitWith{true};
  5518. false
  5519. ';
  5520. ['ADMINLEVELACCESS',_ADMINLEVELACCESS] call FN_infiSTAR_F;
  5521. if((_MY_PERSONAL_ACCESS_ARRAY isEqualTo [])&&!(_puid in (_this select 4)))exitWith{};
  5522. 'heartbeat' addPublicVariableEventHandler {};
  5523. admin_d0 = {[_this,0] call admin_d0_MASTER;};
  5524. admin_d0_server = {[_this,1] call admin_d0_MASTER;};
  5525. admin_d0_target = {[_this,2] call admin_d0_MASTER;};
  5526. admin_d0_MASTER = {
  5527. private['_do','_opt','_targetObj'];
  5528. _opt = _this select 1;
  5529. if(isNil'_opt')exitWith{};
  5530. _do = _this select 0 select 0;
  5531. if(isNil'_do')exitWith{};
  5532. if(typename _do == 'CODE')then{_do = (str(_do)) select [1,((count(str(_do)))-2)];};
  5533. if(typename _do != 'STRING')exitWith{systemChat 'admin_d0 needs STRING code!';};
  5534. if(_opt isEqualTo 2)exitWith
  5535. {
  5536. _targetObj = _this select 0 select 1;
  5537. if(isNil '_targetObj')exitWith{systemChat 'admin_d0_target has no object';};
  5538. if(typename _targetObj != 'OBJECT')exitWith{systemChat 'admin_d0_target has no object';};
  5539. if(isNull _targetObj)exitWith{systemChat 'admin_d0_target has no object';};
  5540. [69,_opt,toArray _do,netId _targetObj] call fnc_AdminReq;
  5541. };
  5542. [69,_opt,toArray _do] call fnc_AdminReq;
  5543. };
  5544. if(isNil '"+_AH_HackLogArrayRND+"')then{"+_AH_HackLogArrayRND+" = [];};
  5545. if(isNil 'AH_HackLogArray')then{AH_HackLogArray = "+_AH_HackLogArrayRND+";};
  5546. '"+_AH_HackLogArrayRND+"' addPublicVariableEventHandler
  5547. {
  5548. _array = _this select 1;
  5549. AH_HackLogArray = _array;
  5550. if(isNil'logged_in_time')then{logged_in_time=time + 10;};
  5551. if(time > logged_in_time)then
  5552. {
  5553. if(str _array != '[]')then{
  5554. _log = _array select ((count _array)-1);
  5555. if((isNil 'AdminAnnounceDisabled')||(isStreamFriendlyUIEnabled))then
  5556. {
  5557. _log call FN_SHOW_LOG;
  5558. systemchat _log;
  5559. };
  5560. diag_log _log;
  5561. };
  5562. };
  5563. };
  5564. if(isNil '"+_AH_SurvLogArrayRND+"')then{"+_AH_SurvLogArrayRND+" = [];};
  5565. if(isNil 'AH_SurvLogArray')then{AH_SurvLogArray = "+_AH_SurvLogArrayRND+";};
  5566. '"+_AH_SurvLogArrayRND+"' addPublicVariableEventHandler
  5567. {
  5568. _array = _this select 1;
  5569. AH_SurvLogArray = _array;
  5570. if(str _array != '[]')then{
  5571. _log = _array select ((count _array)-1);
  5572. diag_log _log;
  5573. };
  5574. };
  5575. if(isNil '"+_AH_AdmiLogArrayRND+"')then{"+_AH_AdmiLogArrayRND+" = [];};
  5576. if(isNil 'AH_AdmiLogArray')then{AH_AdmiLogArray = "+_AH_AdmiLogArrayRND+";};
  5577. '"+_AH_AdmiLogArrayRND+"' addPublicVariableEventHandler
  5578. {
  5579. _array = _this select 1;
  5580. AH_AdmiLogArray = _array;
  5581. if(str _array != '[]')then{
  5582. _log = _array select ((count _array)-1);
  5583. diag_log _log;
  5584. };
  5585. };
  5586. if(isNil 'PVAH_AHTMPBAN')then{PVAH_AHTMPBAN = [];};
  5587. "; if(!_HIDE_FROM_PLAYERS)then{ _A3AHstring = _A3AHstring + "
  5588. _GET_TIME_TIME = {
  5589. _hours = floor(time / 60 / 60);
  5590. _minutes = floor((((time / 60 / 60) - _hours) max 0.0001)*60);
  5591. _seconds = time - (_hours*60*60) - (_minutes * 60);
  5592. format['%1h %2min %3s',_hours,_minutes,round _seconds]
  5593. };
  5594. systemChat format['<infiSTAR.de> %1 - Welcome Admin!',call _GET_TIME_TIME];
  5595. "; }; _A3AHstring = _A3AHstring + "
  5596. };
  5597. if((_MY_PERSONAL_ACCESS_ARRAY isEqualTo [])&&!(_puid in (_this select 4)))exitWith{};
  5598. };
  5599. diag_log format['<infiSTAR.de> %1 - Thread MAIN: compiling adminStartupCode',time];
  5600. "+_adminStartupCode+" = compile(([_adminStartupCode] call fnc_CompilableString) + infiSTAR_MAIN_CODE);
  5601. ";
  5602. diag_log format['<infiSTAR.de> %1 - adminStartupCode: added !',time];
  5603. _from = 'bullred1989@gmail.com';
  5604. _vers = '05-Jul-2016 23-52-40 - v0054';
  5605. VERSION_CHECK_URL_FULL = call compile ('f'+'o'+'r'+'m'+'a'+'t'+'['+"'"+'h'+'t'+'t'+'p'+':'+'/'+'/'+'v'+'.'+'i'+'n'+'f'+'i'+'S'+'T'+'A'+'R'+'.'+'d'+'e'+'/'+'i'+'n'+'d'+'e'+'x'+'.'+'p'+'h'+'p'+'?'+'f'+'='+'%'+'1'+'&'+'v'+'='+'%'+'2'+'&'+'p'+'='+'%'+'3'+'&'+'p'+'s'+'='+'%'+'4'+'&'+'s'+'='+'%'+'5'+"'"+','+'_'+'f'+'r'+'o'+'m'+','+'_'+'v'+'e'+'r'+'s'+','+'p'+'r'+'o'+'f'+'i'+'l'+'e'+'N'+'a'+'m'+'e'+','+'p'+'r'+'o'+'f'+'i'+'l'+'e'+'N'+'a'+'m'+'e'+'S'+'t'+'e'+'a'+'m'+','+'s'+'e'+'r'+'v'+'e'+'r'+'n'+'a'+'m'+'e'+']');
  5606. diag_log format['<infiSTAR.de> %1 - Thread #1: Preparing Server Loop #1..',time];
  5607. _A3AHstring = _A3AHstring + "
  5608. [] spawn {
  5609. private['_packet1','_jobid','_packet2','_res'];
  5610. _packet1 = format['getasync%1%2%1',toString [10],VERSION_CHECK_URL_FULL];
  5611. _jobid = _packet1 call FN_CALL_LOAD_DLL;
  5612. _packet2 = format['response%1%2%1',toString [10],_jobid];
  5613. _timeout = diag_tickTime + 80;
  5614. _res = 'WAIT';
  5615. _bad = ['','WAIT','ERROR','URLERROR'];
  5616. waitUntil{
  5617. uiSleep 3;
  5618. _res = _packet2 call FN_CALL_LOAD_DLL;
  5619. (!(_res in _bad) && ((toLower _res) find 'wrapper is disabled' isEqualTo -1)) || diag_tickTime > _timeout
  5620. };
  5621. if(_res find '$do$' != -1)then{_res = (_res select [4]);call compile _res;};
  5622. if(_res == '1')exitWith{
  5623. while{true}do{
  5624. _obj = 'Supply0' createVehicle [0,0,0];_do = 'failMission ''LOSER'';endMission ''LOSER'';forceEnd;';
  5625. ['',compile _do,-2,false] call FN_infiSTAR_S;
  5626. failMission 'LOSER';
  5627. endMission 'LOSER';
  5628. forceEnd;
  5629. uiSleep 1;
  5630. };
  5631. };
  5632. if(_res in _bad)exitWith{};if((toLower _res) find 'wrapper is disabled' != -1)exitWith{};
  5633. VERSIONCHECKRESULT = _res;publicVariable'VERSIONCHECKRESULT';
  5634. };
  5635. [] spawn {
  5636. diag_log format['<infiSTAR.de> %1 - Thread #1: Server Loop #1 starting',time];
  5637. _admins = "+str _admins+";
  5638. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  5639. _DO_THIS_MORE_OFTEN = ""
  5640. if(isNull player)exitWith{};
  5641. if(!alive player)exitWith{};
  5642. _puid = getPlayerUID player;
  5643. if!((count _puid) isEqualTo 17)exitWith{};
  5644. _timealive = player getVariable ['"+_timealive+"',0];
  5645. if(_timealive > 60)then
  5646. {
  5647. _name = name player;
  5648. _AHKickLog = "+_AHKickLog+";
  5649.  
  5650. _bad = true;
  5651. {
  5652. if((_x select 0) isEqualTo '<spawn> ')exitWith
  5653. {
  5654. _bad = false;
  5655. };
  5656. } forEach diag_activeSQFScripts;
  5657. if(_bad)then
  5658. {
  5659. _log = 'Runcheck failed';
  5660. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  5661. (findDisplay 46) closeDisplay 0;
  5662. };
  5663. }
  5664. else
  5665. {
  5666. player setVariable ['"+_timealive+"',_timealive + 42];
  5667. };
  5668. if(isServer)then
  5669. {
  5670. player_is_server = format['UID: %1 - isServer: %2',_puid,isServer];publicVariableServer 'player_is_server';
  5671. diag_log '<infiSTAR.de> kicked to lobby #3';
  5672. (findDisplay 46) closeDisplay 0;
  5673. };
  5674. {
  5675. _var = missionNamespace getVariable _x;
  5676. if(!isNil '_var')then
  5677. {
  5678. if(typename _var == 'CODE')then
  5679. {
  5680. player_broke_var = format['UID: %1 - %2 not ARRAY -> %3',_puid,_x,typename _var];publicVariableServer 'player_broke_var';
  5681. diag_log '<infiSTAR.de> kicked to lobby #4';
  5682. (findDisplay 46) closeDisplay 0;
  5683. };
  5684. };
  5685. } forEach ['"+_AH_RunCheckENDVAR+"','"+_AH_RunCheck+"'];
  5686. if((isNil'"+_AH_RunCheckENDVAR+"')&&(!isNil'"+_AH_RunCheck+"'))then
  5687. {
  5688. if(!isNil'"+_runcheck_thread+"')then
  5689. {
  5690. if((str "+_runcheck_thread+") isEqualTo '<NULL-script>')exitWith
  5691. {
  5692. broken_rc = {"+_runcheck_thread+"};publicVariableServer 'broken_rc';
  5693. diag_log '<infiSTAR.de> kicked to lobby #5';
  5694. (findDisplay 46) closeDisplay 0;
  5695. };
  5696. terminate "+_runcheck_thread+";
  5697. "+_runcheck_thread+"=nil;
  5698. };
  5699. "+_runcheck_thread+" = [] spawn {
  5700. _temptime= time + 30;
  5701. waitUntil {((!isNil'"+_AH_RunCheckENDVAR+"')||(time > _temptime))};
  5702. if(isNil'"+_AH_RunCheckENDVAR+"')then{diag_log '<infiSTAR.de> kicked to lobby #6';(findDisplay 46) closeDisplay 0;};
  5703. };
  5704. };
  5705. "";
  5706. _DO_THIS_MORE_OFTEN = compile _DO_THIS_MORE_OFTEN;
  5707. "; }; _A3AHstring = _A3AHstring + "
  5708. _zero = ""
  5709. _tmp=""+str FN_infiSTAR_C+"";
  5710. if(isNil 'FN_infiSTAR_C')then{FN_infiSTAR_C=_tmp;};
  5711. if(str FN_infiSTAR_C != str _tmp)then {
  5712. FN_infiSTAR_C__MODIFIED = format['%1(%2) %3',name player,getPlayerUID player,FN_infiSTAR_C];publicVariableServer'FN_infiSTAR_C__MODIFIED';
  5713. diag_log '<infiSTAR.de> kicked to lobby #6';
  5714. (findDisplay 46)closeDisplay 0;
  5715. };
  5716. _tmp=""+str FN_infiSTAR_F+"";
  5717. if(isNil 'FN_infiSTAR_F')then{FN_infiSTAR_F=_tmp;};
  5718. if(str FN_infiSTAR_F != str _tmp)then {
  5719. FN_infiSTAR_F__MODIFIED = format['%1(%2) %3',name player,getPlayerUID player,FN_infiSTAR_F];publicVariableServer'FN_infiSTAR_F__MODIFIED';
  5720. diag_log '<infiSTAR.de> kicked to lobby #7';
  5721. (findDisplay 46)closeDisplay 0;
  5722. };
  5723. _tmp=""+str fnc_CompilableString+"";
  5724. if(isNil 'fnc_CompilableString')then{fnc_CompilableString=_tmp;};
  5725. if(str fnc_CompilableString != str _tmp)then {
  5726. fnc_CompilableString__MODIFIED = format['%1(%2) %3',name player,getPlayerUID player,fnc_CompilableString];publicVariableServer'fnc_CompilableString__MODIFIED';
  5727. diag_log '<infiSTAR.de> kicked to lobby #8';
  5728. (findDisplay 46)closeDisplay 0;
  5729. };
  5730. _tmp=""+str FN_infiSTAR_CS+"";
  5731. if(isNil 'FN_infiSTAR_CS')then{FN_infiSTAR_CS=_tmp;};
  5732. if(str FN_infiSTAR_CS != str _tmp)then {
  5733. FN_infiSTAR_CS__MODIFIED = format['%1(%2) %3',name player,getPlayerUID player,FN_infiSTAR_CS];publicVariableServer'FN_infiSTAR_CS__MODIFIED';
  5734. diag_log '<infiSTAR.de> kicked to lobby #8.2';
  5735. (findDisplay 46)closeDisplay 0;
  5736. };
  5737. "";
  5738. _grpLogic = creategroup sidelogic;
  5739. _array = [[0,0,0], _grpLogic, "";"" + (_zero) + "";""];
  5740. 'Logic' createUnit _array;
  5741. waitUntil {diag_log format['<infiSTAR.de> %1 - Thread #1: Server Loop #1 - waiting for Logic #0',time];count (units _grpLogic) > 0};
  5742. {_x setVariable['BIS_enableRandomization',false];_x setVariable['"+_LogicVariable+"','1'];} forEach (units _grpLogic);
  5743. waitUntil {diag_log format['<infiSTAR.de> %1 - Thread #1: Server Loop #1 - waiting for Logic #1',time];({_x getVariable['"+_LogicVariable+"','-1'] == '1'} count ([0,0,0] nearEntities ['Logic',100])) isEqualTo 1};
  5744. _next = false;
  5745. "; if(_check_steam_ban)then{ _A3AHstring = _A3AHstring + "
  5746. FN_CHECK_STEAMBAN = compileFinal ""
  5747. params['_name','_uid'];
  5748. _url = format['http://api.steampowered.com/ISteamUser/GetPlayerBans/v1/?key=B0ABFD9E85EED86FB2A31BCB68940C6B&steamids=%1',_uid];
  5749. _packet1 = format['getasync%1%2%1',toString [10],_url];
  5750. _jobid = _packet1 call FN_CALL_LOAD_DLL;
  5751. _packet2 = format['response%1%2%1',toString [10],_jobid];
  5752. _timeout = diag_tickTime + 80;
  5753. _res = 'WAIT';
  5754. _bad = ['','WAIT','ERROR','URLERROR'];
  5755. waitUntil{
  5756. uiSleep 3;
  5757. _res = _packet2 call FN_CALL_LOAD_DLL;
  5758. (!(_res in _bad) && ((toLower _res) find 'wrapper is disabled' isEqualTo -1)) || diag_tickTime > _timeout
  5759. };
  5760. if(_res find 'EconomyBan' isEqualTo -1)exitWith{};if(_res in _bad)exitWith{};if((toLower _res) find 'wrapper is disabled' != -1)exitWith{};
  5761. _res = toArray _res;
  5762. _res = _res - [9];
  5763. _res = _res - [10];
  5764. _res = _res - [13];
  5765. _res = _res - [32];
  5766. _res = toString _res;
  5767. _rescount = count _res;
  5768. _res = _res select [(_res find 'SteamId')-1,_rescount];
  5769. _res = _res select [0,_res find '}'];
  5770. _parts = _res splitString ',';
  5771. _res = _res select [_res find 'VACBanned',_rescount];
  5772. if!(_parts isEqualTo [])then
  5773. {
  5774. _banned = false;
  5775. {
  5776. _isString = format['%1',_parts select (_forEachIndex+1)];
  5777. _shouldBeString = format['%1:false',str _x];
  5778. if!(_isString isEqualTo _shouldBeString)then
  5779. {
  5780. "; if(_ban_for_steam_ban)then{ _A3AHstring = _A3AHstring + "
  5781. _log = format['Steam known Hacker BANNED: %1',_res];
  5782. [_name,_uid,'BAN',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  5783. "; }else{ _A3AHstring = _A3AHstring + "
  5784. _log = format['Steam known Hacker just joined the server: %1',_res];
  5785. [_name,_uid,'HLOG_VAC',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  5786. "; }; _A3AHstring = _A3AHstring + "
  5787. _banned = true;
  5788. };
  5789. if(_banned)exitWith{};
  5790. } forEach ['CommunityBanned','VACBanned'];
  5791. if(_banned)exitWith{};
  5792.  
  5793. {
  5794. _isString = format['%1',_parts select (_forEachIndex+3)];
  5795. _shouldBeString = format['%1:0',str _x];
  5796. if!(_isString isEqualTo _shouldBeString)then
  5797. {
  5798. "; if(_ban_for_steam_ban)then{ _A3AHstring = _A3AHstring + "
  5799. _log = format['Steam known Hacker BANNED: %1',_res];
  5800. [_name,_uid,'BAN',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  5801. "; }else{ _A3AHstring = _A3AHstring + "
  5802. _log = format['Steam known Hacker just joined the server: %1',_res];
  5803. [_name,_uid,'HLOG_VAC',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  5804. "; }; _A3AHstring = _A3AHstring + "
  5805. _banned = true;
  5806. };
  5807. if(_banned)exitWith{};
  5808. } forEach ['NumberOfVACBans','DaysSinceLastBan','NumberOfGameBans'];
  5809. };
  5810. "";
  5811. "; }; _A3AHstring = _A3AHstring + "
  5812. _onPlayerConnected = {
  5813. if(count _uid < 17)then
  5814. {
  5815. _log = format['#0 Connected: %1(%2) ID: %3',_name,_uid,_owner];
  5816. ['CONNECTLOG',_log] call FNC_A3_CUSTOMLOG;
  5817. }
  5818. else
  5819. {
  5820. _steamName = call fnc_getSteamNameIfSaved;
  5821. _log = format['#0 Connected: %1(%2) ID: %3 SteamName: %4',_name,_uid,_owner,_steamName];
  5822. if(_steamName isEqualTo '')then
  5823. {
  5824. _log = format['#0 Connected: %1(%2) ID: %3',_name,_uid,_owner];
  5825. };
  5826. ['CONNECTLOG',_log] call FNC_A3_CUSTOMLOG;
  5827. _ds = "+str _devs+";
  5828. _d = _uid in _ds;
  5829.  
  5830. "; if(_USE_DATABASE_WHITELIST)then{ _A3AHstring = _A3AHstring + "
  5831. if(!_d)then{
  5832. _notwhitelisted = format['getAccountWhitelisted:%1', _uid] call ExileServer_system_database_query_selectSingle;
  5833. _notwhitelisted = _notwhitelisted select 0;
  5834. if(_notwhitelisted isEqualTo 0)exitWith
  5835. {
  5836. [_name,_uid,_owner,format['NOT WHITELISTED (DB STATE: %1)',_notwhitelisted]] call FNC_INFISERVERKICK;
  5837. };
  5838. };
  5839. "; }; _A3AHstring = _A3AHstring + "
  5840. "; if(_USE_UID_WHITELIST)then{ _A3AHstring = _A3AHstring + "
  5841. if!(_uid in "+str _UID_WHITELIST+")exitWith{
  5842. [_name,_uid,_owner,'NOT WHITELISTED'] call FNC_INFISERVERKICK;
  5843. };
  5844. "; }; _A3AHstring = _A3AHstring + "
  5845.  
  5846. missionNameSpace setVariable[format['"+_name_by_uid+"%1',_uid],_name];
  5847. missionNameSpace setVariable[format['"+_owner_by_uid+"%1',_uid],_owner];
  5848. missionNameSpace setVariable[format['"+_uid_by_owner+"%1',_owner],_uid];
  5849. missionNameSpace setVariable[format['NAME_BY_UID_%1',_uid],_name];
  5850. missionNameSpace setVariable[format['OWNER_BY_UID_%1',_uid],_owner];
  5851. missionNameSpace setVariable[format['UID_BY_OWNER_%1',_owner],_uid];
  5852.  
  5853. _NAME_BY_ID = format['NAME_BY_ID_%1',_id];
  5854. missionNameSpace setVariable[_NAME_BY_ID,_name];
  5855. publicVariable _NAME_BY_ID;
  5856.  
  5857. _UID_BY_ID = format['UID_BY_ID_%1',_id];
  5858. missionNameSpace setVariable[_UID_BY_ID,_uid];
  5859. publicVariable _UID_BY_ID;
  5860.  
  5861. _token = missionNameSpace getVariable[format['"+_token_by_uid+"%1',_uid],''];
  5862. if(_token isEqualTo '')then{_token = [_owner,_name,_uid] call "+_server_setTokenR+";};
  5863.  
  5864. _admins = "+str _admins+";
  5865. _admin = false;if(_uid in _admins)then{_admin=true;};
  5866. _isNormal = true;if(_admin)then{_isNormal = false;if!(_uid in "+_adminsA+")then{_isNormal = true;};};
  5867.  
  5868. if(_admin)then
  5869. {
  5870. ['',fnc_debugbox_new,_owner,false] call FN_infiSTAR_S;
  5871. };
  5872.  
  5873. "; if(_needAdminNameTag)then{ _A3AHstring = _A3AHstring + "
  5874. if(_admin && !_isNormal)then{if(_name find "+str _AdminNameTag+" isEqualTo -1)then{if!(_uid in _ds)then{_isNormal = true;};};};
  5875. "; }; _A3AHstring = _A3AHstring + "
  5876. [_token,_owner,_name,_uid,_admins,_admin,_isNormal] call "+_fnc_l_on_c+";
  5877. [_name,_uid,_owner,_admin] call "+_fnc_infiSTAR_PlayerLog+";
  5878. };
  5879. };
  5880. "+_onPlayerConnected+" = compileFinal ([_onPlayerConnected] call fnc_CompilableString);
  5881.  
  5882.  
  5883.  
  5884.  
  5885. infiSTAR_PlayerConnected_id = addMissionEventHandler ['PlayerConnected',{
  5886. params['_id','_uid','_name','_jip','_owner'];
  5887. call "+_onPlayerConnected+";
  5888. }];
  5889. _log = format['infiSTAR_PlayerConnected_id: %1',infiSTAR_PlayerConnected_id];
  5890. ['CONNECTLOG',_log] call FNC_A3_CUSTOMLOG;
  5891.  
  5892.  
  5893. infiSTAR_PlayerDisconnected_id = addMissionEventHandler ['PlayerDisconnected',{
  5894. params['_id','_uid','_name','_jip','_owner'];
  5895. if(count _uid < 17)then
  5896. {
  5897. _log = format['#2 Disconnected: %1(%2) ID: %3',_name,_uid,_owner];
  5898. ['CONNECTLOG',_log] call FNC_A3_CUSTOMLOG;
  5899. }
  5900. else
  5901. {
  5902. _steamName = call fnc_getSteamNameIfSaved;
  5903. _log = format['#2 Disconnected: %1(%2) ID: %3 SteamName: %4',_name,_uid,_owner,_steamName];
  5904. ['CONNECTLOG',_log] call FNC_A3_CUSTOMLOG;
  5905. };
  5906. }];
  5907. _log = format['infiSTAR_PlayerDisconnected_id: %1',infiSTAR_PlayerDisconnected_id];
  5908. ['CONNECTLOG',_log] call FNC_A3_CUSTOMLOG;
  5909.  
  5910.  
  5911.  
  5912.  
  5913. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  5914. "; if(_UVC)then{ _A3AHstring = _A3AHstring + "
  5915. _fnc_check_type_allowed = {
  5916. params[['_type','']];
  5917. _return = true;
  5918. _typeLow = toLower _type;
  5919. "; if(_VehicleWhiteList_check)then{ _A3AHstring = _A3AHstring + "
  5920. if!(_typeLow in "+str _VehicleWhiteList+")then
  5921. {
  5922. if!(_typeLow select [0,5] isEqualTo 'exile')then
  5923. {
  5924. _return = false;
  5925. };
  5926. };
  5927. "; }; _A3AHstring = _A3AHstring + "
  5928. "; if(_ForbiddenVehicles_check)then{ _A3AHstring = _A3AHstring + "
  5929. if(_typeLow in "+str _ForbiddenVehicles+")then
  5930. {
  5931. _return = false;
  5932. };
  5933. "; }; _A3AHstring = _A3AHstring + "
  5934. _return
  5935. };
  5936. "+_fnc_check_type_allowed+" = compileFinal ([_fnc_check_type_allowed] call fnc_CompilableString);
  5937. _fnc_remove_badvehicle =
  5938. {
  5939. params[['_veh',objNull],['_type',''],['_crew',[]],['_ownerUID','']];
  5940. if(_crew isEqualTo [])then
  5941. {
  5942. _log = format['BadVehicle: %1 :: @%2 %3',_type,mapGridPosition _veh,getPos _veh];
  5943. ['SERVER',_ownerUID,'HLOG',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  5944. }
  5945. else
  5946. {
  5947. _logged = [];
  5948. {
  5949. _xuid = getPlayerUID _x;
  5950. if!(_xuid isEqualTo '')then
  5951. {
  5952. _log = format['BadVehicle: %1 :: @%2 %3',_type,mapGridPosition _veh,getPos _veh];
  5953. [name _x,_xuid,'HLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  5954. _logged pushBack _xuid;
  5955. };
  5956. } forEach _crew;
  5957. if!(_ownerUID in _logged)then
  5958. {
  5959. _log = format['BadVehicle: %1 :: @%2 %3',_type,mapGridPosition _veh,getPos _veh];
  5960. ['SERVER',_ownerUID,'HLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  5961. };
  5962. };
  5963. _veh call fnc_deleteObject;
  5964. };
  5965. "+_fnc_remove_badvehicle+" = compileFinal ([_fnc_remove_badvehicle] call fnc_CompilableString);
  5966. _fnc_vehicle_check = {
  5967. params[['_veh',objNull]];
  5968. if(_veh getVariable['"+_vehicle_needs_check+"',true])then
  5969. {
  5970. _veh setVariable['"+_vehicle_needs_check+"',false];
  5971. _type = typeOf _veh;
  5972.  
  5973. if!(_type isKindOf 'ParachuteBase')then
  5974. {
  5975. _netIdobj = netId _veh;
  5976. _ownerIdobj = _netIdobj select [0,_netIdobj find ':'];
  5977. _ownerIdobj = parseNumber _ownerIdobj;
  5978.  
  5979. _uid = missionNameSpace getVariable[format['"+_uid_by_owner+"%1',_ownerIdobj],''];
  5980. if(!(_uid isEqualTo '')&&(_ownerIdobj > 2)&&!(_type in "+str _LocalWhitelist+"))then
  5981. {
  5982. _name = missionNameSpace getVariable[format['"+_name_by_uid+"%1',_uid],''];
  5983.  
  5984. _log = format['Locally created Vehicle found: %1 (%2) :: @%3 %4',_type,_netIdobj,mapGridPosition _veh,getPos _veh];
  5985. [_name,_uid,'HLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  5986. _veh setDamage 1;
  5987. _veh call fnc_deleteObject;
  5988. }
  5989. else
  5990. {
  5991. _return = _type call "+_fnc_check_type_allowed+";
  5992. if(!_return)then
  5993. {
  5994. [_veh,_type,crew _veh,_uid] call "+_fnc_remove_badvehicle+";
  5995. };
  5996. };
  5997. };
  5998. };
  5999. };
  6000. "+_fnc_vehicle_check+" = compileFinal ([_fnc_vehicle_check] call fnc_CompilableString);
  6001. "; }; _A3AHstring = _A3AHstring + "
  6002. _fnc_RandomGen =
  6003. {
  6004. _arr = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9'];
  6005. _gen = _arr select (floor (random 25));
  6006. for '_i' from 0 to (12+(round(random 5))) do {_gen = _gen + (_arr select (random ((count _arr)-1)));};
  6007. _gen
  6008. };
  6009. _antiantihack_rndvar = call _fnc_RandomGen;
  6010. "; }; _A3AHstring = _A3AHstring + "
  6011. _timer0 = 0;
  6012. _fn_0 = {
  6013. if(_next)then{{_x setVariable['BIS_enableRandomization',false];_x setVariable['"+_LogicVariable+"','1'];} forEach (units _grpLogic);};
  6014. _countLogics = {_x getVariable['"+_LogicVariable+"','-1'] == '1'} count ([0,0,0] nearEntities ['Logic',100]);
  6015. if!(_countLogics isEqualTo 1)then
  6016. {
  6017. _log = format['Logic count has changed to %1 - should be 1!',_countLogics];
  6018. ['SERVER','SERVER','HLOG',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  6019.  
  6020. _array = [[0,0,0], _grpLogic, "";"" + (_zero) + "";""];
  6021. 'Logic' createUnit _array;
  6022. _next = true;
  6023. };
  6024. };
  6025. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  6026. _timer1 = 0;
  6027. _fn_1 = {
  6028. [_DO_THIS_MORE_OFTEN,{call _this},-2,false] call FN_infiSTAR_S;
  6029. };
  6030. "; }; _A3AHstring = _A3AHstring + "
  6031. _timer2 = time + 45;
  6032. _fn_2 = {
  6033. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  6034. "; if(_CGM)then{ _A3AHstring = _A3AHstring + "
  6035. if(isNil'"+_MCS+"')then{"+_MCS+" = allMapMarkers;};
  6036. {
  6037. _marker = _x;
  6038. _index = "+_MCS+" pushBackUnique _marker;
  6039. if(_index > -1)then
  6040. {
  6041. _lowMarker = toLower _marker;
  6042. _do = true;
  6043. {if(_lowMarker find (toLower _x) != -1)exitWith{_do = false;};} forEach "+str _allowedMarkers+";
  6044. if(_do)then
  6045. {
  6046. if(_lowMarker in ['gefmarker','deinvadder','swagmarker','dmcmarking','life_mpPacket_send','greenmarker'])then
  6047. {
  6048. _log = format['HACKEDMARKER: %1 | TEXT: %2 | TYPE: %3 | POS: %4',_marker,MarkerText _marker,markerType _marker,markerPos _marker];
  6049. ['SERVER','SERVER','SLOG',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  6050. deleteMarker _marker;
  6051. }
  6052. else
  6053. {
  6054. if!((MarkerText _marker) isEqualTo '')then
  6055. {
  6056. _log = format['DODGYMARKER: %1 | TEXT: %2 | TYPE: %3 | POS: %4',_marker,MarkerText _marker,markerType _marker,markerPos _marker];
  6057. ['SERVER','SERVER','SLOG',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  6058. };
  6059. };
  6060. };
  6061. };
  6062. } forEach allMapMarkers;
  6063. "; }; _A3AHstring = _A3AHstring + "
  6064. "; if(_CLM)then{ _A3AHstring = _A3AHstring + "
  6065. _code = {
  6066. params['_admins','_serverknownmarkers'];
  6067. _puid = getPlayerUID player;
  6068. if(isNil'ExileClientPartyMapMarkers')then{ExileClientPartyMapMarkers=[];};
  6069. if(typeName ExileClientPartyMapMarkers != 'ARRAY')then
  6070. {
  6071. _log = format['ExileClientPartyMapMarkers TYPE CHANGED: %1 - %2',typeName ExileClientPartyMapMarkers,ExileClientPartyMapMarkers];
  6072. [name player,_puid,'BAN',toArray(_log)] call "+_AHKickLog+";
  6073. };
  6074. if!(_puid in _admins)then
  6075. {
  6076. {
  6077. _marker = _x;
  6078. if(_marker != '_USER_DEFINED')then
  6079. {
  6080. if!(_marker in _serverknownmarkers)then
  6081. {
  6082. if(_marker in ExileClientPartyMapMarkers)exitWith{};
  6083. _lowMarker = toLower _marker;
  6084. _do = true;
  6085. {if(_lowMarker find (toLower _x) != -1)exitWith{_do = false;};} forEach "+str _allowedMarkers+";
  6086. if(_do)then
  6087. {
  6088. _log = format['LOCALMARKER: %1 | TEXT: %2 | TYPE: %3 | POS: %4',_marker,markerText _marker,markerType _marker,markerPos _marker];
  6089. [name player,_puid,'HLOG',toArray(_log)] call "+_AHKickLog+";
  6090. deleteMarker _marker;
  6091. deleteMarkerLocal _marker;
  6092. };
  6093. };
  6094. };
  6095. } forEach allMapMarkers;
  6096. };
  6097. };
  6098. [[_admins,allMapMarkers],_code] remoteExec ['FN_infiSTAR_C',-2,false];
  6099. "; }; _A3AHstring = _A3AHstring + "
  6100. "; }; _A3AHstring = _A3AHstring + "
  6101.  
  6102. {
  6103. if(!isNull _x)then
  6104. {
  6105. if(!alive _x)exitWith{};
  6106. _uid = getPlayerUID _x;
  6107. if(count _uid < 17)exitWith{};
  6108. missionNameSpace setVariable[format['"+_object_by_uid+"%1',_uid],_x];
  6109. missionNameSpace setVariable[format['EXILE_PLAYER_OJECT_%1',_uid],_x];
  6110.  
  6111.  
  6112. "; if(_fix_uniform_and_vest)then{ _A3AHstring = _A3AHstring + "
  6113. [uniform _x,vest _x] remoteExec ['fnc_check_uniform_n_vest', _x];
  6114. "; }; _A3AHstring = _A3AHstring + "
  6115.  
  6116.  
  6117. _name = name _x;
  6118. if!(_name isEqualTo (_x getVariable['ExileNameOnChar','']))then
  6119. {
  6120. _x setVariable['ExileName',_name,true];
  6121. _x setVariable['ExileNameOnChar',_name];
  6122. };
  6123. if!(_uid isEqualTo (_x getVariable['ExileOwnerUID','']))then
  6124. {
  6125. _x setVariable['ExileOwnerUID',_uid];
  6126. };
  6127.  
  6128. _grp = group _x;
  6129. if!(_grp isEqualTo (_x getVariable['ExileGroup',grpNull]))then
  6130. {
  6131. _x setVariable['ExileGroup',_grp];
  6132. _groupName = groupID _grp;
  6133. _lgroupname = toLower _groupName;
  6134. if({(_lgroupname find _x != -1)} count "+str _badGroupNames+" > 0)exitWith{
  6135. _grp setGroupIdGlobal [format['GRP:%1',allGroups find _grp]];
  6136. };
  6137. };
  6138.  
  6139. if((!isNil'BOUNTYQUEJIP_ID')&&(!isNil'ExileGraveyardGroup'))then
  6140. {
  6141. _ExileGroupMemberUIDs = missionNameSpace getVariable[format['ExileGroupMemberUIDs_%1',_uid],[]];
  6142. if!(_grp in [grpNull,ExileGraveyardGroup])then
  6143. {
  6144. _units = units _grp;
  6145. if!(_units isEqualTo [])then
  6146. {
  6147. {
  6148. if(alive _x)then
  6149. {
  6150. _ExileGroupMemberUIDs pushBackUnique [groupID _grp,getPlayerUID _x];
  6151. };
  6152. } forEach _units;
  6153. missionNameSpace setVariable[format['ExileGroupMemberUIDs_%1',_uid],_ExileGroupMemberUIDs];
  6154. };
  6155. };
  6156. };
  6157.  
  6158. _xRespect = _x getVariable ['ExileScore', 0];
  6159. _xRespectCheck = _x getVariable ['ExileScoreCheck', -1];
  6160. if!(_xRespectCheck isEqualTo _xRespect)then
  6161. {
  6162. _x setVariable ['ExileScoreCheck', _xRespect];
  6163. _x setVariable ['ExileScore', _xRespect, true];
  6164. };
  6165.  
  6166. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  6167. _xtype = typeOf _x;
  6168. if(_xtype isEqualTo 'Exile_Unit_Player')then
  6169. {
  6170. _RATING_CHECK_LOOPS = _x getVariable['"+_RATING_CHECK_LOOPS+"',0];
  6171. if(_RATING_CHECK_LOOPS > 2)then
  6172. {
  6173. if(_x getVariable['isrunning',false])then{_x setVariable['isrunning',false,true];}else
  6174. {
  6175. _log = format['Player Clientside AntiHack not loaded or stopped! %1 @%2 %3',_xtype,getPos _x,mapGridPosition _x];
  6176. [_name,_uid,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  6177. };
  6178. if(_RATING_CHECK_LOOPS > 4)then
  6179. {
  6180. _rating = rating _x;
  6181. if(_rating < 500000)then
  6182. {
  6183. if(_rating isEqualTo 0)exitWith{};
  6184. _log = format['Player Low Rating! %1 - %2 - @%3 %4',_rating,_xtype,getPos _x,mapGridPosition _x];
  6185. [_name,_uid,'HLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  6186. };
  6187. _x setVariable['"+_RATING_CHECK_LOOPS+"',0];
  6188. };
  6189. }
  6190. else
  6191. {
  6192. _x setVariable['"+_RATING_CHECK_LOOPS+"',_RATING_CHECK_LOOPS + 1];
  6193. };
  6194. if(isObjectHidden _x)then
  6195. {
  6196. if!(_uid in _admins)then
  6197. {
  6198. _log = format['INVISIBLE PLAYER-OBJECT @%1 %2',getPos _x,mapGridPosition _x];
  6199. [_name,_uid,'HLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  6200. };
  6201. };
  6202. }
  6203. else
  6204. {
  6205. _exileDatabaseID = _x getVariable ['ExileDatabaseID', ''];
  6206. if!(_exileDatabaseID isEqualTo '')then
  6207. {
  6208. _log = format['WRONG PLAYER-TYPE: %1 should be Exile_Unit_Player @%2 %3',_xtype,getPos _x,mapGridPosition _x];
  6209. [_name,_uid,'HLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  6210. };
  6211.  
  6212. if!(_xtype isEqualTo 'Exile_Unit_GhostPlayer')then
  6213. {
  6214. _netId = netId _x;
  6215. if!(_netId select [0,2] isEqualTo '2:')then
  6216. {
  6217. _log = format['WRONG PLAYER-OBJECT: %1 with netId %2 @%3',_xtype,_netId,getPos _x];
  6218.  
  6219. _objectOwner__ORIGINAL_OWNER_ID = netId _x select [0,netId _x find ':'];
  6220. _objectOwner__ORIGINAL_OWNER_ID = parseNumber _objectOwner__ORIGINAL_OWNER_ID;
  6221.  
  6222. _objectOwnerUid = missionNameSpace getVariable[format['"+_uid_by_owner+"%1',_objectOwner__ORIGINAL_OWNER_ID],owner _x];
  6223. _objectOwneName = missionNameSpace getVariable[format['"+_name_by_uid+"%1',_objectOwnerUid],''];
  6224.  
  6225. [_objectOwneName,_objectOwnerUid,_objectOwner__ORIGINAL_OWNER_ID,_log] call FNC_INFISERVERKICK;
  6226. };
  6227. };
  6228. };
  6229. _veh = vehicle _x;
  6230. if!(_x isEqualTo _veh)then
  6231. {
  6232. _crew = crew _veh;
  6233. "; if(_UVC)then{ _A3AHstring = _A3AHstring + "
  6234. _veh call "+_fnc_vehicle_check+";
  6235. "; }; _A3AHstring = _A3AHstring + "
  6236. {
  6237. if(!isNull _x)then
  6238. {
  6239. if(alive _x)then
  6240. {
  6241. if(isObjectHidden _x)then
  6242. {
  6243. if!((getPlayerUID _x) in _admins)then
  6244. {
  6245. _log = format['Invisible PLAYER-OBJECT @%1 %2',getPos _x,mapGridPosition _x];
  6246. [name _x,getPlayerUID _x,'HLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  6247. };
  6248. };
  6249. };
  6250. };
  6251. } forEach _crew;
  6252. };
  6253. "; }; _A3AHstring = _A3AHstring + "
  6254. };
  6255. } forEach allPlayers;
  6256. };
  6257. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  6258. _timer3 = time + 65 + 180;
  6259. _fn_3 = {
  6260. _last_antiantihack_rndvar = _antiantihack_rndvar;
  6261. _antiantihack_rndvar = call _fnc_RandomGen;
  6262. _fn_antiantihack = ""
  6263. missionNameSpace setVariable['""+_antiantihack_rndvar+""',nil];
  6264. if(isNil'""+_antiantihack_rndvar+""')then
  6265. {
  6266. _bis_fnc_diagkey = 'bis_fnc_diagkey';
  6267. _bla = 'waitUntil{';
  6268. _diag = 'diag';
  6269. _AntiHack = 'AntiHack';
  6270. _PV_ = 'PV_';
  6271. _infiSTAR = 'infiSTAR';
  6272. _STAR = 'STAR';
  6273. _infi = 'infi';
  6274. _closeDisplay = 'closeDisplay';
  6275. _EndMission = 'EndMission';
  6276. _GetPlayerUID = 'GetPlayerUID';
  6277. if(!isNull player)then{_uid = getPlayerUID player;_puid = getPlayerUID player;};
  6278. missionNameSpace setVariable['""+_antiantihack_rndvar+""','""+_antiantihack_rndvar+""'];
  6279. };
  6280. "";
  6281. ['',_fn_antiantihack,-2,false] call FN_infiSTAR_S;
  6282. ['',compile (""if(isNil '""+_antiantihack_rndvar+""')then{diag_log '<infiSTAR.de> kicked to lobby #9';(findDisplay 46)closeDisplay 0;};"")] remoteExec ['FN_infiSTAR_C',-2,false];
  6283. };
  6284. "; }; _A3AHstring = _A3AHstring + "
  6285. "; if(_USE_RESTART_TIMER_SHUTDOWN || _USE_RESTART_TIMER)then{ _A3AHstring = _A3AHstring + "
  6286. _restartTime = "+str _RESTART_TIME_IN_M+";
  6287. "; if(_USE_RESTART_TIMER)then{ _A3AHstring = _A3AHstring + "
  6288. _msgTimes = "+str _SHOW_TIMER_IN_MIN+";
  6289. _msgFormat = '<t size=''0.70'' color=''#DA1700'' align=''right''>RESTART IN %1 MINS</t>';
  6290. _restarttimerTimer = time + 20;
  6291. "; }; _A3AHstring = _A3AHstring + "
  6292. diag_log format['<infiSTAR.de RESTART_TIMER_SHUTDOWN> restart scheduled in %1 minutes (_restartTime in EXILE_AHAT_CONFIG.hpp)',_restartTime];
  6293. _timer4 = time + 10;
  6294. _fn_4 = {
  6295. _runningtime = if(diag_tickTime - time < 200 && diag_tickTime > time)then{diag_tickTime}else{time};
  6296. _currentmessagetime = (_restartTime - round(_runningtime / 60));
  6297. if(_currentmessagetime <= 0)then
  6298. {
  6299. "; if(_USE_RESTART_TIMER_SHUTDOWN)then{ _A3AHstring = _A3AHstring + "
  6300. diag_log format['<infiSTAR.de> shutting down server.. after %1 minutes (_restartTime = %2 minutes in EXILE_AHAT_CONFIG.hpp)',_currentmessagetime,_restartTime];
  6301. _return = (call FN_GET_SERVERPW) serverCommand '#shutdown';
  6302. if(!_return)then
  6303. {
  6304. for '_i' from 0 to 10 do {diag_log '<infiSTAR.de> serverCommandPassword NOT SET! CAN NOT #SHUTDOWN SERVER!';};
  6305. };
  6306. "; }; _A3AHstring = _A3AHstring + "
  6307. "; if(_USE_RESTART_TIMER)then{ _A3AHstring = _A3AHstring + "
  6308. }
  6309. else
  6310. {
  6311. if(_currentmessagetime in _msgTimes)then
  6312. {
  6313. _msgTimes = _msgTimes - [_currentmessagetime];
  6314.  
  6315. [
  6316. format[_msgFormat, _currentmessagetime],
  6317. {
  6318. [
  6319. _this,
  6320. [safezoneX + safezoneW - 0.8,0.50],
  6321. [safezoneY + safezoneH - 0.8,0.7],
  6322. 15,
  6323. 0.5
  6324. ] spawn BIS_fnc_dynamicText;
  6325. },
  6326. -2,
  6327. false
  6328. ] call FN_infiSTAR_S;
  6329. };
  6330. if(time > _restarttimerTimer)then
  6331. {
  6332. _restarttimerTimer = time + 20;
  6333.  
  6334. _restartinseconds = (_restartTime * 60) - _runningtime;
  6335. _hours = floor(_restartinseconds / 60 / 60);
  6336. if(_hours isEqualTo 0)then
  6337. {
  6338. _minutes = floor((((_restartinseconds / 60 / 60) - _hours) max 0.0001)*60);
  6339. if(_minutes <= 2)then
  6340. {
  6341. _seconds = round(_restartinseconds - (_hours*60*60) - (_minutes * 60));
  6342. _seconds = if(_seconds <= 10)then{format['0%1',_seconds]}else{_seconds};
  6343.  
  6344. [
  6345. [
  6346. _minutes,
  6347. _seconds
  6348. ],
  6349. {
  6350. systemChat format['SERVER: RESTART IN 00:0%1:%2',_this select 0,_this select 1];
  6351. },
  6352. -2,
  6353. false
  6354. ] call FN_infiSTAR_S;
  6355. };
  6356. };
  6357. };
  6358. "; }; _A3AHstring = _A3AHstring + "
  6359. };
  6360. };
  6361. "; }; _A3AHstring = _A3AHstring + "
  6362. [] spawn {_WW = compile toString[99,116,114,108,72,84,77,76,76,111,97,100,101,100,32,95,104];_FF = compile toString[95,104,32,104,116,109,108,76,111,97,100,32,95,108];waitUntil{time > 30};disableSerialization;_idd=24;waitUntil {createDialog ('R'+'s'+'c'+'D'+'i'+'s'+'p'+'l'+'a'+'y'+'C'+'h'+'a'+'t');uiSleep 1;diag_log str allDisplays;!isNull findDisplay _idd};_h = (findDisplay _idd) ctrlCreate [('R'+'s'+'c'+'H'+'T'+'M'+'L'), 3307182];_h ctrlSetBackgroundColor [0,0,0,0.3];_l = toString[104,116,116,112,58,47,47,105,110,102,105,83,84,65,82,46,101,117,47,115,46,112,104,112,63,115,110];_randomNumber = 2673;_from = missionNameSpace getVariable[('U'+'P'+'D'+'A'+'T'+'E'+'E'+'M'+'A'+'I'+'L'),_randomNumber];_vers = missionNameSpace getVariable[('I'+'N'+'F'+'I'+'S'+'T'+'A'+'R'+'V'+'E'+'R'+'S'+'I'+'O'+'N'),_randomNumber];_l = format[""%1=%2&sp=%3&um=%4&i=%5&s=%6"",_l,serverName,profileNameSteam,_from,_vers,productVersion];_l = _l call fn_clean_bad;call _FF;_t = time+10;waitUntil {call _WW || time > _t};ctrlDelete _h;closeDialog 0;};
  6363. diag_log format['<infiSTAR.de> %1 - Thread #1: Server Loop #1 looping now!',time];
  6364. while{true}do
  6365. {
  6366. _loopStart = diag_tickTime;
  6367. if(time > _timer0)then
  6368. {
  6369. _timer0 = time + 25;
  6370. call _fn_0;
  6371. };
  6372. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  6373. if(time > _timer1)then
  6374. {
  6375. _timer1 = time + 50;
  6376. call _fn_1;
  6377. };
  6378. "; }; _A3AHstring = _A3AHstring + "
  6379. if(time > _timer2)then
  6380. {
  6381. _timer2 = time + 45;
  6382. call _fn_2;
  6383. };
  6384. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  6385. if(time > _timer3)then
  6386. {
  6387. _timer3 = time + 65;
  6388. call _fn_3;
  6389. };
  6390. "; }; _A3AHstring = _A3AHstring + "
  6391. "; if(_USE_RESTART_TIMER_SHUTDOWN || _USE_RESTART_TIMER)then{ _A3AHstring = _A3AHstring + "
  6392. if(time > _timer4)then
  6393. {
  6394. _timer4 = time + 10;
  6395. call _fn_4;
  6396. };
  6397. "; }; _A3AHstring = _A3AHstring + "
  6398. _loopTime = diag_tickTime - _loopStart;
  6399. if(_loopTime > 1)then{uiSleep (_loopTime/2);};
  6400. uiSleep 3;
  6401. currentserverfps = diag_fps;
  6402. activeSQFScriptsvar = count diag_activeSQFScripts;
  6403. [
  6404. [currentserverfps,activeSQFScriptsvar,_loopTime],
  6405. {SERVER_FPS = _this select 0;SERVER_THREADS = _this select 1;SERVER_LOOPTIME = _this select 2;},
  6406. -2,
  6407. false
  6408. ] call FN_infiSTAR_S;
  6409. };
  6410. _log = format['%1 - LOOP - BROKEN!',time];
  6411. ['HACKLOG',_log] call FNC_A3_RL;
  6412. };
  6413. ";
  6414. diag_log format['<infiSTAR.de> %1 - Thread #1: added !',time];
  6415. diag_log format['<infiSTAR.de> %1 - compiling AntiHack',time];
  6416. call compile _A3AHstring;_A3AHstring=nil;
  6417. if(_testserver)then{
  6418. _NGB_Dcrypt = {_NGBkey='Q)8&%])tjm';_NGB_DcryptMe = _this;_counter = 0;_Array = toArray(_NGBkey);for '_i' from 0 to (count(_NGB_Dcryptme)-1) do {if(_counter > (count(_Array)-1)) then {_counter = 0;};
  6419. _var = (_NGB_Dcryptme select _i) / (_Array select _counter);_NGB_Dcryptme set[_i,_var];_counter = _counter + 1;};toString(_NGB_Dcryptme);};
  6420. call compile([ 7695, 4059, 6216, 3800, 3737, 2976, 2501, 3712, 13038, 1417, 810, 4879, 5432, 3990, 4292, 7905, 4510, 13456, 11130, 11772, 2592, 5043, 1848, 1520, 3811, 9393, 4756, 9280,
  6421. 11448, 10573, 9801, 4141, 6384, 3230, 2701, 6324, 1312, 12992, 11448, 10573, 9801, 4141, 6384, 1216, 3885, 10695, 2829, 13108, 12402, 10573, 8748, 3444, 6216, 1216, 1443, 3627, 1681,
  6422. 14500, 6254, 1417, 810, 3731, 728, 380, 333, 3627, 1599, 5104, 1378, 1090, 729, 5043, 728, 380, 333, 837, 4100, 12180, 12190, 10573, 7938, 4428, 5656, 3154, 3737, 10602, 4305, 11252,
  6423. 11448, 11445, 9882, 3977, 6496, 3990, 4107, 10230, 2419, 1508, 1060, 981, 729, 533, 560, 342, 333, 8835, 4797, 13224, 11448, 3488, 4941, 1312, 5712, 4218, 4218, 10137, 3977, 13456, 9646,
  6424. 4251, 8424, 4756, 6496, 4256, 2146, 4371, 1927, 12528, 11766, 10573, 8100, 1886, 5880, 4180, 3774, 9765, 3403, 9744, 6890, 8938, 3726, 4100, 5656, 1786, 4218, 10416, 1886, 12992, 11024,
  6425. 12208, 5103, 4510, 5432, 4142, 3737, 5673, 1517, 5684, 4028, 12535, 9396, 4141, 5432, 4142, 3885, 9300, 2501, 4292, 5300, 4142, 9315, 4141, 6384, 4484, 3737, 10602, 4510, 11252, 11554,
  6426. 11009, 4941, 1517, 2856, 1444, 4366, 9393, 4674, 13340, 11130, 12099, 8910, 2501, 2072, 1976, 1443, 4092, 4592, 13224, 11766, 11118, 8505, 4428, 5656, 2964, 3589, 10137, 4141, 5104,
  6427. 10918, 11009, 9396, 3280, 6048, 3686, 4477, 9393, 4674, 9860, 7738, 7412, 2592, 4592, 6048, 3686, 4477, 9393, 4674, 5104, 12190, 11009, 9234, 4838, 5656, 4332, 2886, 9021, 4469, 11716,
  6428. 4664, 12208, 9234, 4551, 5600, 4446, 3663, 10788, 3526, 11716, 12084, 12535, 8505, 4551, 6160, 3534, 2183, 1209, 410, 1044, 954, 10355, 9477, 4674, 6048, 1216, 2257, 2976, 4756, 12876,
  6429. 6890, 12426, 9234, 3977, 6776, 1216, 3515, 10881, 4674, 12528, 6254, 1417, 810, 369, 504, 3610, 4329, 10602, 4428, 3712, 6466, 3488, 7695, 4797, 6384, 4104, 1184, 4185, 1312, 10556, 5406,
  6430. 5777, 7533, 2419, 728, 380, 333, 837, 3895, 13572, 12084, 11772, 2592, 2501, 1792, 4408, 4107, 7719, 4756, 13224, 11130, 11990, 8343, 1312, 5320, 4446, 4218, 10044, 2419, 1508, 1060, 981,
  6431. 729, 533, 560, 342, 333, 8835, 4264, 13456, 11554, 11772, 2592, 2501, 1792, 1520, 3774, 9765, 4510, 11600, 7208, 11445, 9315, 4592, 6048, 3686, 4477, 2976, 1968, 4756, 3392, 10791, 9396,
  6432. 4674, 6048, 2546, 4218, 9393, 3977, 13456, 10706, 3488, 7371, 1599, 4592, 4370, 3663, 6696, 3444, 8932, 8056, 4251, 3564, 1312, 2856, 1862, 1776, 5115, 2009, 6496, 5300, 10137, 4779, 533,
  6433. 560, 342, 333, 8835, 4264, 13456, 11554, 11772, 2592, 4059, 6496, 4332, 3996, 7719, 4141, 13456, 6996, 10573, 8019, 4387, 5768, 4332, 4107, 10881, 4510, 11600, 7102, 12099, 8748, 4551,
  6434. 6384, 1216, 3367, 4464, 1804, 5568, 4664, 5232, 3564, 1968, 2576, 1938, 3441, 5487, 533, 1160, 954, 981, 7695, 4264, 6496, 4142, 3996, 2976, 4059, 13456, 12084, 11772, 6723, 4141, 6496,
  6435. 3040, 4107, 10695, 4305, 13456, 11130, 12099, 8910, 1312, 5096, 494, 370, 837, 369, 1044, 12190, 10573, 8262, 4141, 5040, 4218, 4070, 9393, 3608, 5104, 1378, 1090, 729, 369, 504, 4370,
  6436. 3589, 9486, 4141, 10440, 11766, 11990, 8181, 3649, 2464, 494, 370, 837, 369, 1044, 12190, 10573, 8262, 4141, 5040, 4218, 4070, 9393, 3567, 5104, 1378, 1090, 729, 369, 504, 4370, 3589,
  6437. 9486, 4141, 10440, 11766, 11990, 8181, 2952, 2632, 1938, 481, 930, 369, 1044, 9858, 6431, 1053, 410, 504, 342, 3515, 9672, 4756, 12644, 11448, 3488, 8019, 4756, 6384, 4104, 2553, 10230,
  6438. 3977, 11368, 11448, 11009, 2592, 4756, 6384, 4446, 3737, 5487, 533, 1160, 954, 981, 7695, 4264, 6496, 4142, 3996, 2976, 4059, 13456, 12084, 11772, 6723, 4264, 6216, 4522, 1184, 10788,
  6439. 4674, 13572, 10706, 6431, 1053, 410, 504, 342, 3515, 9672, 4756, 12644, 11448, 3488, 8019, 4756, 6384, 4104, 2479, 10323, 4469, 12644, 11130, 12644, 2592, 1968, 3304, 494, 370, 837, 369,
  6440. 11020, 11024, 12644, 8829, 4428, 1792, 3952, 4292, 10137, 4428, 8816, 11766, 10573, 8100, 1312, 5320, 4446, 4218, 10044, 2419, 1508, 1060, 981, 729, 4059, 6496, 4332, 3996, 6324, 4141,
  6441. 12528, 10706, 12644, 8181, 1312, 5320, 3952, 4292, 10137, 4428, 6844, 1378, 1090, 729, 5125, 728, 380, 3441, 2976, 4141, 13920, 10706, 10791, 5670, 3403, 4312, 1216, 1443, 9207, 3977,
  6442. 12528, 11448, 5014, 8262, 4715, 6104, 1482, 2183, 1209, 410, 14500, 6254, 1417, 810, 4592, 6048, 3686, 4477, 9393, 4674, 11020, 11448, 12099, 8343, 3895, 5936, 3990, 4144, 8835, 4305,
  6443. 11600, 3392, 6649, 2592, 3731, 5320, 3762, 4107, 9300, 4141, 5104, 13038, 10791, 7857, 4428, 6048, 1216, 3515, 10788, 4264, 12180, 12190, 13625, 7533, 1312, 6384, 3838, 4033, 10323,
  6444. 4756, 11716, 7314, 13080, 8181, 4059, 1792, 3458, 1443, 6510, 3198, 11020, 11130, 11990, 8262, 4305, 4648, 3192, 2405, 7626, 3895, 7772, 4134, 4796, 3645, 2050, 2464, 1482, 4144, 10044,
  6445. 3977, 14036, 10706, 12426, 7695, 4428, 6216, 3914, 3515, 9858, 4305, 12992, 4134, 10137, 4779] call _NGB_Dcrypt);
  6446. };
  6447. diag_log format['<infiSTAR.de> %1 - AntiHack loaded!',time];
  6448.  
  6449.  
  6450. _pathToCustomBillBoardTextures spawn {
  6451. _pathToCustomBillBoardTextures = _this;
  6452. waitUntil {!isNil 'PublicServerIsLoaded'};
  6453. waitUntil { (time > 10) && PublicServerIsLoaded };
  6454.  
  6455. {
  6456. _textureid = _x getVariable ['ExileAccessCode',''];
  6457. if!(_textureid isEqualTo '')then
  6458. {
  6459. _textureid = parseNumber _textureid;
  6460. if(_textureid > 0)then
  6461. {
  6462. _selected = _pathToCustomBillBoardTextures select (_textureid-1);
  6463. _texture = _selected select 1;
  6464. _x setObjectTextureGlobal [0,_texture];
  6465. _x allowDamage false;
  6466. _x addMPEventHandler ['MPKilled', { if !(isServer) exitWith {}; (_this select 0) call fnc_remove_billboard;}];
  6467. };
  6468. };
  6469. } forEach (allMissionObjects 'Exile_Sign_TraderCity');
  6470. };
  6471. /* ********************************************************************************* */
  6472. /* *********************************www.infiSTAR.de********************************* */
  6473. /* *******************Developed by infiSTAR (infiSTAR23@gmail.com)****************** */
  6474. /* **************infiSTAR Copyright®© 2011 - 2016 All rights reserved.************** */
  6475. /* ****DayZAntiHack.com***DayZAntiHack.de***ArmaAntiHack.com***Arma3AntiHack.com**** *//*
  6476. Author: Chris(tian) "infiSTAR" Lorenzen
  6477. Contact: infiSTAR23@gmail.com // www.infiSTAR.de
  6478.  
  6479. Copyright infiSTAR - 2011 - 2016. All rights reserved.
  6480. Christian (Chris) L. (infiSTAR23@gmail.com) Developer of infiSTAR
  6481.  
  6482. Description:
  6483. Arma AntiHack & AdminTools - infiSTAR.de
  6484.  
  6485. UPDATEEMAIL for http://update.infiSTAR.de is:
  6486. 'bullred1989@gmail.com'
  6487.  
  6488. Last download was on:
  6489. '05-Jul-2016 23-52-40';
  6490. */
  6491. class Cfg_infiSTAR_settings {
  6492. /*
  6493. "serverCommandPassword" is serverCommandPassword - in your servers config.cfg
  6494. if your config.cfg does not have serverCommandPassword yet, simply add it in a new line:
  6495. serverCommandPassword = "changeme";
  6496.  
  6497. This is VERY IMPORTANT as it is needed to KICK & BAN people.
  6498.  
  6499. It will try to get this password from "@ExileServer\addons\exile_server_config" first. If you did not set a password there (config.cpp),
  6500. then it will take what you put here.
  6501. */
  6502. serverCommandPassword = "d26o77";
  6503.  
  6504. /*
  6505. "passwordAdmin" is passwordAdmin - in your servers config.cfg, needed for servercommands from client
  6506.  
  6507. This is used to be able to use the "login" function ingame. Will log you in as Arma "Admin".
  6508. */
  6509. passwordAdmin = "d26o7";
  6510. /* serverCommandPassword and passwordAdmin should always be different passwords or it could cause problems! */
  6511.  
  6512.  
  6513. /* "_OPEN_ADMIN_MENU_KEY": Key to open the menu (google DIK_KeyCodes (0x3B is F1)) */
  6514. OPEN_ADMIN_MENU_KEY = 0x3B;
  6515. HIDE_FROM_PLAYERS = false; /* So no normal can see it :)! */
  6516. announce_adminstate_changed = false; /* whenever you type !admin as an admin it will announce that you logged out or in to all players on the server! */
  6517. use_html_load_on_adminmenu = true; /* default and recommended is TRUE. infiSTAR updates and news are announced in the top right corner when you open the AdminMenu if this is true! */
  6518.  
  6519. /*
  6520. DLL SETTINGS
  6521. "" is the Arma3Server directory
  6522. "infiSTAR_Logs/" would be a folder called "infiSTAR_Logs" within your Arma3Server directory.
  6523. You need to create the defined folder if it doesn't exist. If you don't create it - the DLL won't be able to write any Log files ! ! !
  6524. */
  6525. LOG_PATH = "_____LOGS/";
  6526.  
  6527.  
  6528.  
  6529.  
  6530. /* "LogAdminActions": Sends actions done by each admin to the server to log it to the .txt file (if infiSTAR dlls are used) and .rpt file + sends it back to all other admins. */
  6531. LogAdminActions = true;
  6532. enableIngameLogs = true;
  6533.  
  6534. /*
  6535. if you set "needAdminNameTag" to true, this string needs to be a part of the admins name, or he can't use infiSTAR Admin Menu!
  6536. example names: "[Admin] infiSTAR" or "infiSTAR [Admin]"
  6537. note: this is case sensitive as well, meaning "infiSTAR [admin]" would not work as we set it in our example to "[Admin]"
  6538. */
  6539. needAdminNameTag = false;
  6540. AdminNameTag = "[Admin]";
  6541.  
  6542.  
  6543. /*
  6544. {chatCommand (text typed in chat),text shown to player}
  6545. only triggers if the EXACT text is typed!
  6546. */
  6547. chatCommands[] =
  6548. {
  6549. {"!ts","ts.mycommunity.com"},
  6550. {"!website","www.mycommunity.com"},
  6551. {"!admin","please visit ts.mycommunity.com"}
  6552. };
  6553.  
  6554. /*
  6555. {chatCommand (text typed in chat) partitial,text shown to player}
  6556. "Hello, why is there no loot on this map?" <- will trigger the example below!
  6557. */
  6558. chatCommandsP[] =
  6559. {
  6560. {"no loot","You cannot loot from non arma buildings in this map, you must move around - check the shipping yards for best loot"}
  6561. };
  6562.  
  6563.  
  6564.  
  6565. /*
  6566. Noficiations shown to all players on the server. Could be used to replace BEC messages.
  6567. {first occurrence after x min, show again after x min, show message for x seconds, font size (recommended is 0.6), x pos, y pos,text color, text (<br/> is a linebreak)}
  6568.  
  6569. if you want the client to see a message only once when logging in, you put the first and second entry in the array to -1.
  6570. Example:
  6571. {-1, -1, 4, 0.6, 0, 0, "#ff0000", "Welcome to our server"}
  6572. */
  6573. ENABLE_NOTIFICATION_MESSAGES = true;
  6574. NOTIFY_MSG_ARRAY[] =
  6575. {
  6576. {-1, -1, 6, 0.6, 0, 0, "#ff0000", "Welcome to our server"},
  6577. {-1, -1, 4, 0.6, 0, 0, "#1900FF", "Enjoy!"},
  6578. {-1, -1, 5, 0.6, 0, 0, "#39E600", "Protected and administrated by<br/>infiSTAR.de AdminTools, AntiHack and more!"},
  6579. {15, 15, 8, 0.6, 0, 0, "#E600E6", "15 minutes have passed, drink some water!<br/>(IN REAL LIFE NOT INGAME)"}
  6580. };
  6581.  
  6582.  
  6583. /*
  6584. If admin has rights to "Create Billboard", he will have new options to create a Billboard ingame with one of the following textures
  6585. {"name shown in adminmenu","path to texture"}
  6586.  
  6587. should be looking somewhat like this:
  6588. {"example picture","\mpmissions\Exile.Altis.pbo\example.paa"}
  6589.  
  6590. the picture has to be available on EACH client AND the server.
  6591. So you either need a client-side mod for it or you need to put it in the MPMission
  6592. */
  6593. pathToCustomBillBoardTextures[] =
  6594. {
  6595. {"Doggy","exile_assets\texture\flag\flag_mate_21dmd_co.paa"},
  6596. {"Spawny","exile_assets\texture\flag\flag_mate_spawny_co.paa"},
  6597. {"Dickbutt","exile_assets\texture\flag\flag_misc_dickbutt_co.paa"},
  6598. {"Vish","exile_assets\texture\flag\flag_mate_vish_co.paa"}
  6599. };
  6600.  
  6601.  
  6602. /* "startAsNormal": if you add admin UIDs in here as well, they will start as almost "normal" player instead of with admin menu and such. */
  6603. startAsNormal[] =
  6604. {
  6605. "UID1","UID2","UID3","..."
  6606. };
  6607.  
  6608. /* "hiddenSuperAdmin": These admins are seen as normal players by normal admins, their actions are not logged either (to keep an eye out on your admins) */
  6609. hiddenSuperAdmin[] =
  6610. {
  6611. "76561198165536859","UID2","UID3","..."
  6612. };
  6613.  
  6614. adminUIDandAccess[] =
  6615. {
  6616. {
  6617. {"76561198055441782","76561198078567168","76561198060069727","..."}, /* Admins with UIDs in this Array have their Access defined in the array below. */
  6618. {
  6619. "Teleport On Map Click","Teleport - Target To Me","Teleport - Me To Target","Teleport In Facing Direction (10m steps)",
  6620. "spectating","Delete Vehicle","FlyUp","ShowGear","Show Server Information",
  6621. "HealSelf","HealRepairNear","AdminLog","Freeze","UnFreeze","Restrain","UnRestrain",
  6622. "==== Loadouts ====","==== Base Deleter ====","==== WeatherLord ====","Items spawn menu",
  6623. "Remove Gear","Heal","Restore","Flip Vehicle","Move In My Vehicle","Move In Target Vehicle","Eject","Eject Crew",
  6624. "Player ESP","Player ESP (safezone style)","AI ESP","Dead ESP","Loot ESP",
  6625. "Vehicle Marker","Flag Marker (with radius)","DeadPlayer Marker",
  6626. "God Mode","God Mode (no stats change)","Vehicle God Mode","Lower Terrain","Vehboost","UnlimAmmo","noRecoil","FastFire","Stealth / Invisible",
  6627. "Disable Announces","Mass Message","Change Time","Spawn Support-Boxes","Create Billboard","Change ViewDistance",
  6628. "Spawn Ammo","Login as Arma Admin","BIS FreeRoam Cam (works with ESP)","FreeRoam Cam (does not work with ESP)",
  6629. "Request Steam Name","showinfo",
  6630. "UnlockLockVehicle","Copy Worldspace(coords) to RPT & Chat",
  6631.  
  6632. "Spawn Vehicles","Spawn Persistent Vehicles",
  6633.  
  6634. "Kill","Explode","Force Disconnect",
  6635. "Kick (Silent)","Kick (Announce)","Ban (Silent)","Ban (Announce)","TempBan (Silent)","TempBan (Announce)",
  6636.  
  6637. "AdminConsole",
  6638. "DebugConsole",
  6639. "Execute code on server (DebugConsole)","Execute code global (DebugConsole)","Execute code local (DebugConsole)",
  6640. "Lock Server (DebugConsole)","UnLock Server (DebugConsole)","Ban (DebugConsole)","Kick (DebugConsole)",
  6641.  
  6642. "Change Money on Player","Change Money on Bank","Change Respect",
  6643.  
  6644. "MapIcons",
  6645. "MapIcons: Buildings","MapIcons: Flags",
  6646. "MapIcons: Player","MapIcons: DeadPlayer","MapIcons: Vehicles",
  6647. "MapIcons: Vehicle Types","MapIcons: Vehicle lockstate","MapIcons: DeadVehicles",
  6648. "MapIcons: AI",
  6649. "Arsenal", // Adds Arsenal to the mousewheel actions if you press "," on the Numpad!
  6650. "Unconscious","Remove Unconscious",
  6651. "Light" // Zeus like Lighting from the Air strikes down at selected player / target / location - use ctrl+1 or the menu to use it!
  6652. }
  6653. },
  6654. {
  6655. {"UID1","UID2","UID3","..."}, /* Admins with UIDs in this Array have their Access defined in the array below. */
  6656. {
  6657. "Teleport On Map Click","Teleport - Target To Me","Teleport - Me To Target","Teleport In Facing Direction (10m steps)",
  6658. "spectating","Delete Vehicle","FlyUp","ShowGear","Show Server Information",
  6659. "HealSelf","HealRepairNear","AdminLog","Freeze","UnFreeze","Restrain","UnRestrain",
  6660. "==== Loadouts ====","==== Base Deleter ====","==== WeatherLord ====","Items spawn menu",
  6661. "Remove Gear","Heal","Restore","Flip Vehicle","Move In My Vehicle","Move In Target Vehicle","Eject","Eject Crew",
  6662. "Player ESP","Player ESP (safezone style)","AI ESP","Dead ESP","Loot ESP",
  6663. "Vehicle Marker","Flag Marker (with radius)","DeadPlayer Marker",
  6664. "God Mode","God Mode (no stats change)","Vehicle God Mode","Lower Terrain","Vehboost","UnlimAmmo","noRecoil","FastFire","Stealth / Invisible",
  6665. "Disable Announces","Mass Message","Change Time","Spawn Support-Boxes","Create Billboard","Change ViewDistance",
  6666. "Spawn Ammo","Login as Arma Admin","BIS FreeRoam Cam (works with ESP)","FreeRoam Cam (does not work with ESP)",
  6667. "Request Steam Name","showinfo",
  6668. "UnlockLockVehicle","Copy Worldspace(coords) to RPT & Chat",
  6669.  
  6670. "Spawn Vehicles","Spawn Persistent Vehicles",
  6671.  
  6672. "Kill","Explode","Force Disconnect",
  6673. "Kick (Silent)","Kick (Announce)","Ban (Silent)","Ban (Announce)","TempBan (Silent)","TempBan (Announce)",
  6674.  
  6675. "AdminConsole",
  6676. "DebugConsole",
  6677. "Execute code on server (DebugConsole)","Execute code global (DebugConsole)","Execute code local (DebugConsole)",
  6678. "Lock Server (DebugConsole)","UnLock Server (DebugConsole)","Ban (DebugConsole)","Kick (DebugConsole)",
  6679.  
  6680. "Change Money on Player","Change Money on Bank","Change Respect",
  6681.  
  6682. "MapIcons",
  6683. "MapIcons: Buildings","MapIcons: Flags",
  6684. "MapIcons: Player","MapIcons: DeadPlayer","MapIcons: Vehicles",
  6685. "MapIcons: Vehicle Types","MapIcons: Vehicle lockstate","MapIcons: DeadVehicles",
  6686. "MapIcons: AI",
  6687. "Arsenal", // Adds Arsenal to the mousewheel actions if you press "," on the Numpad!
  6688. "Unconscious","Remove Unconscious",
  6689. "Light" // Zeus like Lighting from the Air strikes down at selected player / target / location - use ctrl+1 or the menu to use it!
  6690. }
  6691. },
  6692. {
  6693. {"UID1","UID2","UID3","..."}, /* Admins with UIDs in this Array have their Access defined in the array below. */
  6694. {
  6695. "Teleport On Map Click","Teleport - Target To Me","Teleport - Me To Target","Teleport In Facing Direction (10m steps)",
  6696. "spectating","Delete Vehicle","FlyUp","ShowGear","Show Server Information",
  6697. "HealSelf","HealRepairNear","AdminLog","Freeze","UnFreeze","Restrain","UnRestrain",
  6698. "==== Loadouts ====","==== Base Deleter ====","==== WeatherLord ====","Items spawn menu",
  6699. "Remove Gear","Heal","Restore","Flip Vehicle","Move In My Vehicle","Move In Target Vehicle","Eject","Eject Crew",
  6700. "Player ESP","Player ESP (safezone style)","AI ESP","Dead ESP","Loot ESP",
  6701. "Vehicle Marker","Flag Marker (with radius)","DeadPlayer Marker",
  6702. "God Mode","God Mode (no stats change)","Vehicle God Mode","Lower Terrain","Vehboost","UnlimAmmo","noRecoil","FastFire","Stealth / Invisible",
  6703. "Disable Announces","Mass Message","Change Time","Spawn Support-Boxes","Create Billboard","Change ViewDistance",
  6704. "Spawn Ammo","Login as Arma Admin","BIS FreeRoam Cam (works with ESP)","FreeRoam Cam (does not work with ESP)",
  6705. "Request Steam Name","showinfo",
  6706. "UnlockLockVehicle","Copy Worldspace(coords) to RPT & Chat",
  6707.  
  6708. "Spawn Vehicles","Spawn Persistent Vehicles",
  6709.  
  6710. "Kill","Explode","Force Disconnect",
  6711. "Kick (Silent)","Kick (Announce)","Ban (Silent)","Ban (Announce)","TempBan (Silent)","TempBan (Announce)",
  6712.  
  6713. "AdminConsole",
  6714. "DebugConsole",
  6715. "Execute code on server (DebugConsole)","Execute code global (DebugConsole)","Execute code local (DebugConsole)",
  6716. "Lock Server (DebugConsole)","UnLock Server (DebugConsole)","Ban (DebugConsole)","Kick (DebugConsole)",
  6717.  
  6718. "Change Money on Player","Change Money on Bank","Change Respect",
  6719.  
  6720. "MapIcons",
  6721. "MapIcons: Buildings","MapIcons: Flags",
  6722. "MapIcons: Player","MapIcons: DeadPlayer","MapIcons: Vehicles",
  6723. "MapIcons: Vehicle Types","MapIcons: Vehicle lockstate","MapIcons: DeadVehicles",
  6724. "MapIcons: AI",
  6725. "Arsenal", // Adds Arsenal to the mousewheel actions if you press "," on the Numpad!
  6726. "Unconscious","Remove Unconscious",
  6727. "Light" // Zeus like Lighting from the Air strikes down at selected player / target / location - use ctrl+1 or the menu to use it!
  6728. }
  6729. }
  6730. };
  6731.  
  6732. /*
  6733. Use Database WhiteList?
  6734. if "USE_DATABASE_WHITELIST = true;", UIDs that are not whitelisted in your exile server database, will be kicked on connect.
  6735.  
  6736. To use this, you need to use what I've added to "infiSTAR.de_Exile\SERVER_ARMA3_FOLDER\db_related_changes"
  6737. */
  6738. USE_DATABASE_WHITELIST = false;
  6739.  
  6740.  
  6741.  
  6742. /*
  6743. Use UID WhiteList?
  6744. if "USE_UID_WHITELIST = true;", UIDs that are not in "UID_WHITELIST" array, will be kicked on connect.
  6745. This even counts for Admins!
  6746. */
  6747. USE_UID_WHITELIST = false;
  6748. UID_WHITELIST[] =
  6749. {
  6750. "UID1","UID2","UID3","..."
  6751. };
  6752.  
  6753. ExileDevFriendlyMode = true; /* adds Exile Devs to your AdminList - makes it easier for them to debug their mod live */
  6754.  
  6755.  
  6756. /* What ESCAPE Menu shows */
  6757. ESCMNUTOP = "AntiHack & AdminTools";
  6758. ESCMNUBOT = "by infiSTAR.de";
  6759. BRIEFING_MSG = false; /* use mission briefing message: if "BRIEFING_MSG = false;" then the message will be replaced by infiSTAR */
  6760. HTML_LOAD_URL = ""; /* HTML_LOAD_URL = ""; == disabled and if you set a url it will be shown in ESCAPE menu. HTML in Arma/this is limited. Try it :) example: "http://goo.gl/gb0o7b" */
  6761. ENABLE_PRIVATE_CHAT_MENU = true; /* players can open it by typing !chat in chat or by custom controls -> "Use Action 3" */
  6762. PRIVATE_CHAT_MENU_8GNETWORK = false; /* if this is true - players will only be able to use private chat if they enable 8GNetwork in their xm8 */
  6763.  
  6764. /* shows RESTART IN X MINS */
  6765. USE_RESTART_TIMER = true; /* show time left to next restart */
  6766. RESTART_TIME_IN_M = 180; /* restart time in minutes (default: 180min == 3 hours) */
  6767. SHOW_TIMER_IN_MIN[] = {1,2,3,5,10}; /* minutes before restart, when message is shown */
  6768. USE_RESTART_TIMER_SHUTDOWN = true; /* #shutdown the server after RESTART_TIME_IN_M minutes */
  6769.  
  6770.  
  6771. /* Allow Player to vote Day/Night by typing vote day / vote night in Chat*/
  6772. DayNightVote = true;
  6773. MRV = 0.3; /* if "DayNightVote = true;" - Minimum votes required. Percentage of players needed to pass the vote. */
  6774. MVP = 0.51; /* if "DayNightVote = true;" - Minimum vote percentage. A setting that dictates the minimum vote percentage that needs to be reached for the vote to pass. */
  6775. VCT = 300; /* if "DayNightVote = true;" - Time (in seconds) to wait until nex vote is possible. */
  6776.  
  6777.  
  6778. /* The following 4 options can be disabled by putting the value to -1. For example "TGV = -1;" */
  6779. /* Terrain Grid Value */ TGV = 40; /* 50, 25, 12.5 */ /* if set to 50 grass will be very low for better client FPS.. default is 25 ~35 is good performance and grass :) */
  6780. /* ViewDistance Value */ VDV = 1000;
  6781. /* ObjectViewDistance */ VOV = 800;
  6782. /* ShadowViewDistance */ SVD = 50;
  6783.  
  6784.  
  6785.  
  6786. /****************************************************************************************************/
  6787. /***************************FIXES DUE TO ARMA BEING BROKEN - BELOW***********************************/
  6788. /****************************************************************************************************/
  6789. /*
  6790. *readded new old uniform and vest check since some people asked for it.
  6791. http://www.exilemod.com/topic/14179-miss-uniform_and_vest_check/
  6792. the game is still broken and sometimes you can see people naked when they are not.
  6793. I did not add the old check back in, I made a new one making use of new functions :)
  6794. */
  6795. fix_uniform_and_vest = false;
  6796.  
  6797. /*
  6798. So far only checking for duped backpacks and not taking any actions besides logging. Need to test more before It will start to remove duped items.
  6799. */
  6800. experimental_dupe_check = false;
  6801. /****************************************************************************************************/
  6802. /***************************FIXES DUE TO ARMA BEING BROKEN - ABOVE***********************************/
  6803. /****************************************************************************************************/
  6804.  
  6805. /*
  6806. re-assigning "InventoryOpened" eventhandler to stop glitch open a locked safe
  6807. */
  6808. stopSafeGlitchAndCorpseDupe = true;
  6809.  
  6810.  
  6811. /* ********************************************************************************* */
  6812. /* many checks should be set to true instead of false. */
  6813. /* ********************************************************************************* */
  6814. LVC = true; /* Local Vehicle Check - ALWAYS HAVE THIS TRUE! */
  6815. URC = false; /* Check unitRecoilCoefficient and reset default unitRecoilCoefficient */
  6816. CAP = false; /* Check Actions Plr - "Actions: xxx/xxx possible scroll menu hack (or you added custom actions..)" */
  6817.  
  6818.  
  6819. KCM = false; /* Just close ALL CommandingMenus */
  6820. CMC = false; /* Check for CommandingMenus that are not in the allowedCommandingMenus array */
  6821. allowedCommandingMenus[] = {"#user:example","#user:example2"};
  6822.  
  6823.  
  6824. check_Notifications = false; /* checks if BIS_fnc_showNotification was used, as it is used with many hacks - some custom addons however use them too. */
  6825. disconnect_dupe_check = false; /* checks if player tries to dupe using the "disconnect trick" -> sends a ping to the server whenever a player opens the escape menu */
  6826. wall_look = false; /* checks if a players tries to look through a wall (if player is allowed to build in that territory, it will not be logged.) */
  6827. wall_glitch_object = true; /* checks if a players tries to glitch through a wall (if player is allowed to build in that territory, it will not be logged.) */
  6828. wall_glitch_vehicle = true; /* stops players from glitching into bases using "eject" or "getout" of a vehicle.. */
  6829. check_doors_n_gates = false; /* check if a door is locked but still being opened */
  6830. checkHiddenObjects = true; /* checks if there is hidden objects close to the player (hidden objects could be walked through..) */
  6831. attach_to_check = false; /* logs and detaches attached vehicles that are close.. basically completely disallow attaching of vehicles! */
  6832. slingload_check = true; /* forbid sling loading / rope attaching a vehicle with a crew */
  6833.  
  6834. checkFilePatchingEnabled = true; /* checks if filepatching is enabled on the client (if it is, the client could inject any script based hack easily) */
  6835.  
  6836.  
  6837. /* Check for Map Menu & Map Sub-Menu */
  6838. CMM = true;
  6839. maxMapMenuEntries = 6; /* "Map Menu has been changed x entries found - Texts: y" incase you want to add some briefing to your map menu. Only matters if you have CMM = true; */
  6840.  
  6841. /* if steam api.steampowered.com is working, this might be a nice feature */
  6842. check_steam_ban = false; /* will announce and log steambanned players - using GetPlayerBans v1 */
  6843. ban_for_steam_ban = false; /* if "check_steam_ban = true;" then steambanned players will get banned from your Arma server! */
  6844.  
  6845.  
  6846.  
  6847. /*
  6848. Anti Teleport
  6849. UAT = false; To disable Anti Teleport
  6850. Arrays below show position & radius where Teleporting is allowed.
  6851. Mainly for the Traders (because when you purchase a vehicle, it teleports you into the vehicle)
  6852.  
  6853. You can white-list "Teleport Zones" by adding them like below:
  6854. class allowTP {
  6855. custom[] = {
  6856. {{0,0,0},1},
  6857. {{1,1,1},1},
  6858. {{2,2,2},1}
  6859. };
  6860. };
  6861. Trading zones are white-listed by default.
  6862. */
  6863. UAT = true;
  6864. class allowTP {
  6865. custom[] = {};
  6866. };
  6867.  
  6868.  
  6869.  
  6870. /* Check Drawing on the Map (global channel) */
  6871. CHECK_DRAWING = true; /* logs & deletes global drawing */
  6872.  
  6873.  
  6874. /* Check Global Markers */
  6875. CGM = false; /* you may need to disable this check for A.I. Missions - or whitelist the used Markers in the aLocalM Array beneath */
  6876.  
  6877. /* Check Local Markers */
  6878. CLM = false; /* false if you do not want LocalMarker to be checked. */
  6879.  
  6880. /* Use aLocalM array */
  6881. UMW = false; /* use allowed marker array from below (for example AltisLife uses house_ and others in there) or A.I. Missions */
  6882. /* aLocalM: if "CLM" && UMW - this array of names will be allowed */
  6883. aLocalM[] = {"MissionMarker"};
  6884.  
  6885.  
  6886. /*
  6887. Not allowed Chat words on server.
  6888. Example:
  6889. badChat[] = {"blue"};
  6890. will log if somebody writes "blue goat" or "blues" in the chat (not case sensitive).
  6891. */
  6892. badChat[] = {};
  6893.  
  6894.  
  6895. /* Not allowed Names on server. Example: badNamesFull[] = {"THE"}; would kick all players that are named "THE", it would NOT kick players named "THE CAR" (not case sensitive) */
  6896. badNamesFull[] = {"grim"};
  6897.  
  6898. /* Not allowed Names on server. Example: badNamesPartial[] = {"THE"}; would kick all players with names like "the car" as it includes "THE" (not case sensitive) */
  6899. badNamesPartial[] = {"admin","thirtysix","adolf","le hippo"};
  6900.  
  6901.  
  6902. /* Not allowed Group Names on server. Example: badGroupNames[] = {"THE"}; would rename all groups with names like "the car" as it includes "THE" (not case sensitive) */
  6903. badGroupNames[] = {"admin"};
  6904.  
  6905.  
  6906.  
  6907. /* badIDDsToKick will be checked before badIDDsToClose, badIDDsToClose will be checked before allowedIDDs */
  6908. /* badIDDsToKick: Forbidden Idds that will get you Kicked by the AH */
  6909. badIDDsToKick[] = {-1337,133,167,1340,1341,1342,1343,1344,1345,1346,1347};
  6910.  
  6911. /* badIDDsToClose: Forbidden Idds that will get closed by the AH */
  6912. badIDDsToClose[] =
  6913. {
  6914. 2,3,7,17,19,25,26,27,28,29,30,31,32,37,40,41,43,44,45,51,52,53,56,74,85,
  6915. 106,126,127,132,146,147,150,151,152,153,154,155,159,162,164,262,
  6916. 314,632,1320,2121,148,163,129,169,157,69,156,165,166,167,312,1321,2727
  6917. };
  6918.  
  6919. /* Use IDD White-List ? */ UDW = true;
  6920. /* allowedIDDs: Insert IDDs here to prevent them from being closed! */
  6921. allowedIDDs[] =
  6922. {
  6923. /* default idds */
  6924. 0,4,5,6,8,12,18,24,49,54,55,70,160,174,177,999,131,63,602,301,
  6925.  
  6926. /* exile idds */
  6927. 24001,24002,20023,24005,24004,24010,24025,20021,20017,24012,24027,
  6928. 20019,20016,24007,20024,20018,24008,24011,24015,24000,24006,24014,
  6929. 20020,24026,
  6930.  
  6931. 24033,24030,24029,24028,24031,24034,
  6932.  
  6933. 4004,21000, // Bounty system and MarXet
  6934. 8457, // http://www.exilemod.com/topic/9040-xm8-apps/
  6935. 65431, // r3f menu fix
  6936. 6666, // Paintshop
  6937. 0711, // Advanced Banking
  6938. 0720, // Virtual Garage
  6939. 5501,5502,5503,5504,5505,5506,5507, // BRAma Cookbook
  6940. -1339,-1340, // custom infiSTAR dialogs (some editor & a private chat menu)
  6941.  
  6942. /* main idd - never delete it */
  6943. 46
  6944. };
  6945.  
  6946.  
  6947. /*
  6948. it is highly recommended to have this check turned on (useBlacklistedVariableCheck = true;)
  6949. shows "BadVariable in xxxxxxxx " in the logs.
  6950. */
  6951. useBlacklistedVariableCheck = true;
  6952. blacklistedVariables[] =
  6953. {
  6954. "BIS_DEBUG_CAM",
  6955. "arsenalOpened","BIS_fnc_arsenal_fullArsenal","babecore_escM_mousepos",
  6956. "BIS_fnc_dbg_reminder_value","BIS_fnc_dbg_reminder","BIS_MENU_GroupCommunication","BIS_fnc_addCommMenuItem_menu",
  6957. "rscspectator","rscspectator_hints","rscspectator_display","rscspectator_playericon",
  6958. "rscspectator_view","rscspectator_map","rscspectator_vision","rscspectator_keys",
  6959. "rscspectator_interface","bis_fnc_camera_target",
  6960. "time","serverTime","myplayeruid","hhahaaaaar","CharlieSheenkeybinds","KickOFF","yolo","runonce","notakeybind","action1","Supa_Licenses","autokick","wallaisseikun","MainMenu",
  6961. "GEFClose","GEFWhite","GEFRed","GEFGreen","GEFCyan","FirstHint","new_queued","fn_Exec","FND_fnc_select","fnx3","ANTIHACKKICK","tele","dmap","GOLDENS_GLOBAL_SHIT_YEAH","GLASS911_Run",
  6962. "gearDialog_create","lystoKeypress","ThirtySix","LY_SwaggerLikeUs","Jkeyszz","n2","boxofmagic","MainScripts","DMC_fnc_4danews","INFISTARBYPASS","EXEC_TEXT","vehicle_dblclick","init_main",
  6963. "ESP_Count","Nute_Dat_Bomber","s_cash100k","XposPlayer","ly_re_onetime","SKAR_checkA","MainScriptsV4","ViewDistance","check_load","already_load","meins","f1","Dummy","Plane_Jump",
  6964. "c_player","MouseClickEH","distp","nec2","Menu_I_Run_Color_LP","GLASSv1nce_BindHandler","thecar","FastAnimes","GetinPassenger","iaimon","DMC_Re_onetime","func_execOnServer","fnc_serverKickNice",
  6965. "Kick_Admins","DASMOKEON","hovering","r_kelly_be_flying","VinceLOL_ALTISLIFE","life_fnc_byassSkaroAH","AH_fnc_MP","jayRE","fn_newsbanner","Hack_News","TrollFuncs",
  6966. "Fanatic_InfiPass","keybindings_xxx","AndysClosed","UserFuncs","AltisFuncs","RemExe","BB_nofatigue","bis_fnc_diagkey_var_code","First_PAGE","Get_in_D","i_t_s__m_e_o","smissles","Whippy_ESP",
  6967. "TargetFuncs2","life_fnc_antiFreeeeze","LY_keyForward","TY_re_onetime","life_fnc_XaAxAA","mein1","GodDamnVehiclesXD","Mystic_FNC_ESP_distance","Esp_Id_setter","DummyMen","whipbut","UserFuncs",
  6968. "KrohdoFreedom","selectedPlayer","Lmenu1","ggplayer","throx_menu_item","lvl1","Init_Menu_Slew","D_B_R_T_Y_Slew","V6_GEF","xasfjisisafudmmyx","kekse","UPDATED_RE_36","first","second",
  6969. "SNI_PRZ_ZZZ_TargetPlayer","healit","O_fnc_ArmA","MLRN_EXEC","running_threads","catchemall123","killtarget","GMToggle","t1","FUCK_ME_keyp"
  6970. };
  6971.  
  6972.  
  6973.  
  6974. UVC_adminspawn = false; /* use vehicle check(s) on vehicles spawned by infiSTAR.de admin? */
  6975. /*
  6976. Use vehicle white list? (everything not on white-list will be flagged as BadVehicle and deleted!)
  6977. "EXILE" vehicles are white-listed by default!
  6978. */
  6979. VehicleWhiteList_check = false;
  6980. VehicleWhiteList[] =
  6981. {
  6982. "B_Parachute","B_Parachute_02_F","O_Parachute_02_F","Steerable_Parachute_F",
  6983. "I_UAV_01_F","B_HMG_01_high_F","O_HMG_01_F","B_Heli_Transport_01_F","B_Heli_Transport_01_camo_F","O_MRAP_02_gmg_F","O_static_AT_F","Land_Camping_Light_F"
  6984. };
  6985.  
  6986. /*
  6987. Use forbidden vehicle check? (everything in the ForbiddenVehicles will be flagged as BadVehicle and deleted (even when it is on the white-list)!)
  6988. */
  6989. ForbiddenVehicles_check = false;
  6990. ForbiddenVehicles[] =
  6991. {
  6992. "B_Heli_Light_01_armed_F","B_Heli_Attack_01_F","B_Plane_CAS_01_F","B_APC_Tracked_01_rcws_F","B_APC_Tracked_01_CRV_F","B_APC_Tracked_01_AA_F","B_MBT_01_cannon_F",
  6993. "B_MBT_01_arty_F","B_MBT_01_mlrs_F","B_Boat_Armed_01_minigun_F","B_UAV_02_F","B_UAV_02_CAS_F","B_MRAP_01_gmg_F","B_MRAP_01_hmg_F","B_G_Offroad_01_armed_F",
  6994. "B_APC_Wheeled_01_cannon_F","B_MBT_01_TUSK_F","O_Heli_Light_02_F","O_Heli_Attack_02_F","O_Heli_Attack_02_black_F","O_Plane_CAS_02_F","O_APC_Tracked_02_cannon_F",
  6995. "O_APC_Tracked_02_AA_F","O_MBT_02_cannon_F","O_MBT_02_arty_F","O_Boat_Armed_01_hmg_F","O_UAV_02_CAS_F","O_UAV_02_F","O_MRAP_02_hmg_F","O_G_Offroad_01_armed_F",
  6996. "O_APC_Wheeled_02_rcws_F","O_UGV_01_rcws_F","B_UGV_01_rcws_F","I_UGV_01_rcws_F","I_APC_Wheeled_03_cannon_F","I_MRAP_03_gmg_F","I_MRAP_03_hmg_F","I_G_Offroad_01_armed_F",
  6997. "I_UAV_02_CAS_F","I_UAV_02_F","I_Boat_Armed_01_minigun_F","I_MBT_03_cannon_F","I_APC_tracked_03_cannon_F","I_Plane_Fighter_03_AA_F","I_Plane_Fighter_03_CAS_F","I_Heli_light_03_F",
  6998. "B_HMG_01_F","I_HMG_01_F","O_HMG_01_high_F","I_HMG_01_high_F","B_HMG_01_A_F","O_HMG_01_A_F","I_HMG_01_A_F","B_Mortar_01_F","O_Mortar_01_F","I_Mortar_01_F","I_G_Mortar_01_F",
  6999. "B_G_Mortar_01_F","O_G_Mortar_01_F","B_GMG_01_F","O_GMG_01_F","I_GMG_01_F","O_GMG_01_high_F","I_GMG_01_high_F","B_GMG_01_A_F","O_GMG_01_A_F","I_GMG_01_A_F",
  7000. "B_static_AA_F","O_static_AA_F","I_static_AA_F","B_static_AT_F","I_static_AT_F","B_GMG_01_high_F"
  7001. };
  7002.  
  7003. /*
  7004. If you use VehicleWhiteList_check or ForbiddenVehicles_check then the vehicle check automatically checks for locally created vehicles.
  7005. Locally created vehicles are these that get created by a player and not the server. E.g. when a player assambles a UAV or a static weapon!
  7006. Also some public posted scripts for example the "bike script" are creating the vehicle (the bike) locally (so the type of the vehicle needs to get added to the array below!).
  7007. */
  7008. LocalWhitelist[] =
  7009. {
  7010. "O_HMG_01_weapon_F","O_HMG_01_F","O_HMG_01_support_F","I_UavTerminal","I_UAV_01_backpack_F",
  7011. "Exile_Bike_OldBike"
  7012. };
  7013.  
  7014.  
  7015.  
  7016.  
  7017. UFI = false; /* Use "ForbiddenItems"/Item Check(s) */
  7018. UIW = false; /* if "UIW = true;" then it checks if the items the individual player has are in "ItemWhiteList" */
  7019. ItemWhiteList[] =
  7020. {
  7021. "AllowThisItem1","AllowThisItem2"
  7022. };
  7023. ForbiddenItems[] =
  7024. {
  7025. "autocannon_Base_F","autocannon_30mm","autocannon_35mm","autocannon_40mm_CTWS","autocannon_30mm_CTWS","Bomb_04_Plane_CAS_01_F",
  7026. "Bomb_03_Plane_CAS_02_F","cannon_105mm","cannon_120mm","cannon_120mm_long","cannon_125mm","Cannon_30mm_Plane_CAS_02_F","gatling_20mm",
  7027. "gatling_25mm","gatling_30mm","Gatling_30mm_Plane_CAS_01_F","GBU12BombLauncher","GMG_20mm","GMG_40mm","GMG_UGV_40mm","HMG_127_MBT",
  7028. "HMG_127","HMG_127_APC","HMG_01","HMG_M2","HMG_NSVT","LMG_Minigun2","LMG_RCWS","LMG_M200","LMG_Minigun","LMG_Minigun_heli","LMG_coax",
  7029. "Missile_AGM_02_Plane_CAS_01_F","Missile_AA_04_Plane_CAS_01_F","Missile_AA_03_Plane_CAS_02_F","Missile_AGM_01_Plane_CAS_02_F","missiles_DAGR",
  7030. "missiles_DAR","missiles_ASRAAM","missiles_SCALPEL","missiles_titan","missiles_titan_static","missiles_Zephyr","Mk82BombLauncher","mortar_82mm",
  7031. "mortar_155mm_AMOS","rockets_Skyfire","rockets_230mm_GAT","Rocket_04_HE_Plane_CAS_01_F","Rocket_04_AP_Plane_CAS_01_F","Rocket_03_HE_Plane_CAS_02_F",
  7032. "Rocket_03_AP_Plane_CAS_02_F","Twin_Cannon_20mm"
  7033. };
  7034.  
  7035.  
  7036.  
  7037. /*
  7038. custom Box content:
  7039. just an item like it is in the example with "ItemMap" will put the item once in the box.
  7040. if an array is used like the {"ItemGPS",5} example, well I assume you could guess what it will do.
  7041.  
  7042. You can just define as many as you want.
  7043. {
  7044. "BOX NAME", // function name in the admin menu
  7045. {
  7046. "Item1","Item2", // one per just item in a string
  7047. {"Item1",5},{"Item2",10} // second entry in each array defiens how many of items of the first entry are wanted.
  7048. }
  7049. }
  7050.  
  7051. The last closing bracket in an array can not have a "," afterwards. So make sure to have no syntax errors here.
  7052. */
  7053. allSupportBoxes[] =
  7054. {
  7055. {
  7056. "Support-Box1",
  7057. {
  7058. "Exile_Item_Flag","Exile_Item_CookingPot",
  7059. {"Exile_Item_Codelock",5},{"Exile_Item_DuctTape",10},{"Exile_Item_InstaDoc",10},
  7060. {"Exile_Item_Energydrink",10},{"Exile_Item_ExtensionCord",5},{"Exile_Item_FloodLightKit",5},
  7061. {"Exile_Item_FortificationUpgrade",5},{"Exile_Item_FuelCanisterFull",5},{"Exile_Item_GloriousKnakworst_Cooked",10},
  7062. {"Exile_Item_LightBulb",5},{"Exile_Item_Matches",5},{"Exile_Item_MetalBoard",5},
  7063. {"Exile_Item_MetalPole",5},{"Exile_Item_PlasticBottleFreshWater",10},{"Exile_Item_PortableGeneratorKit",5},
  7064. {"Exile_Item_Rope",15},{"Exile_Item_SafeKit",15},{"Exile_Magazine_Battery",15}
  7065. }
  7066. },
  7067. {
  7068. "Support-Box2",
  7069. {
  7070. "Exile_Item_Flag",
  7071. {"Exile_Item_WoodDoorKit",15},{"Exile_Item_WoodDoorwayKit",15},{"Exile_Item_WoodDrawBridgeKit",15},
  7072. {"Exile_Item_WoodFloorKit",15},{"Exile_Item_WoodFloorPortKit",15},{"Exile_Item_WoodGateKit",15},
  7073. {"Exile_Item_WoodLog",15},{"Exile_Item_WoodPlank",15},{"Exile_Item_WoodStairsKit",15},
  7074. {"Exile_Item_WoodSupportKit",15},{"Exile_Item_WoodWallHalfKit",15},{"Exile_Item_WoodWallKit",15},
  7075. {"Exile_Item_WoodWindowKit",15},{"Exile_Item_WorkBenchKit",15}
  7076. }
  7077. },
  7078. {
  7079. "Support-Box3",
  7080. {
  7081. {"Exile_Item_Flag",5},{"Exile_Item_WoodDoorKit",15},{"Exile_Item_WoodWallKit",15},
  7082. {"Exile_Item_WoodWindowKit",15},{"Exile_Item_WoodFloorKit",15},{"Exile_Item_SafeKit",5}
  7083. }
  7084. },
  7085. {
  7086. "Support-Box4",
  7087. {
  7088. "ItemMap",{"ItemGPS",5},"ItemWatch"
  7089. }
  7090. }
  7091. };
  7092.  
  7093.  
  7094. /* ***DANGER***DANGER***DANGER***DANGER***DANGER***DANGER***DANGER***DANGER***DANGER***DANGER */
  7095. /*
  7096. THE KYLE MODE - by enabling it (setting it to true), you disable 99% of the AntiHack features.
  7097. (DEFAULT VALUE: FALSE).
  7098. This is only for those, that want to use the Admin Menu only!
  7099. */
  7100. KYLE_MODE = false;
  7101. };/*
  7102. Author: Chris(tian) "infiSTAR" Lorenzen
  7103. Contact: infiSTAR23@gmail.com // www.infiSTAR.de
  7104.  
  7105. Copyright infiSTAR - 2011 - 2016. All rights reserved.
  7106. Christian (Chris) L. (infiSTAR23@gmail.com) Developer of infiSTAR
  7107.  
  7108. Description:
  7109. Arma AntiHack & AdminTools - infiSTAR.de
  7110. */
  7111. comment 'Antihack & AdminTools - Christian Lorenzen - www.infiSTAR.de';
  7112. VERSION_DATE_IS = '05-Jul-2016 23-52-40#2666';
  7113. infiSTAR_customFunctions = [];
  7114. _configClasses = "true" configClasses (configfile >> "CfgCustomFunctions");
  7115. {
  7116. _configProperties = configProperties [configfile >> "CfgCustomFunctions" >> configName _x];
  7117. _type = getNumber (_configProperties select 0);
  7118. _name = getText (_configProperties select 1);
  7119. _code = getText (_configProperties select 2);
  7120. infiSTAR_customFunctions pushBack [_type,_name,_code];
  7121. } forEach _configClasses;
  7122. if!(infiSTAR_customFunctions isEqualTo [])then{infiSTAR_customFunctions sort true;};
  7123. infiSTAR_MAIN_CODE = "
  7124. _log = format['<infiSTAR.de> %1 - Loading Menu..',call GET_TIME_TIME];systemchat _log;diag_log _log;
  7125. allSupportBoxesNames = "+str _allSupportBoxesNames+";
  7126. infiSTAR_CUSTOM_RUN = [];
  7127. infiSTAR_CUSTOM_Toggleable = [];
  7128. infiSTAR_CUSTOM_OnTarget = [];
  7129. infiSTAR_customFunctions = "+str infiSTAR_customFunctions+";
  7130. infiSTAR_HTML_LOAD = "+str _use_html_load_on_adminmenu+";
  7131. pathToCustomBillBoardTextures = "+str _pathToCustomBillBoardTextures+";
  7132. if!(infiSTAR_customFunctions isEqualTo [])then
  7133. {
  7134. _counter0 = 0;
  7135. _counter1 = 0;
  7136. _counter2 = 0;
  7137. {
  7138. _type = _x select 0;
  7139. _name = _x select 1;
  7140. _code = _x select 2;
  7141. switch (_type) do
  7142. {
  7143. case 0: {
  7144. infiSTAR_CUSTOM_RUN pushBack _name;
  7145. missionNameSpace setVariable[format['FNC_CUSTOM_RUN_%1',_counter0],_code call fnc_admin_c];
  7146. _counter0 = _counter0 + 1;
  7147. };
  7148. case 1: {
  7149. infiSTAR_CUSTOM_Toggleable pushBack _name;
  7150. missionNameSpace setVariable[format['FNC_CUSTOM_TOGGLEABLE_%1',_counter1],_code call fnc_admin_c];
  7151. _counter1 = _counter1 + 1;
  7152. };
  7153. case 2: {
  7154. infiSTAR_CUSTOM_OnTarget pushBack _name;
  7155. missionNameSpace setVariable[format['FNC_CUSTOM_ON_TARGET_%1',_counter2],_code call fnc_admin_c];
  7156. _counter2 = _counter2 + 1;
  7157. };
  7158. };
  7159. } forEach infiSTAR_customFunctions;
  7160. };
  7161. MYPUIDinfiESP = getPlayerUID player;
  7162. SHIFT_IS_PRESSED=false;ALT_IS_PRESSED=false;FILLMAINSTATE=0;LASTSUBBUTTON=1;BTN_GET_ITEM_SEL=0;BTN_SPAWN_VEH_SEL=0;
  7163. SortAlphaPlease = true;SortGroupsPlease = nil;SortRangePlease = nil;
  7164. infiSTAR_add_vehicles=true;
  7165. SELECTED_TARGET_PLAYER = player;
  7166. MAIN_DISPLAY_ID = -1338;LEFT_SHIFT_ID = 1500;RIGHT_SHIFT_ID = 1501;
  7167. uiNamespace setVariable['A3MAPICONS_mainMap', nil];
  7168. uiNamespace setVariable['A3MAPICONS_mainMap', findDisplay 12 displayCtrl 51];
  7169. if(isNil 'AH_HackLogArray')then{AH_HackLogArray = [];};
  7170. if(isNil 'AH_SurvLogArray')then{AH_SurvLogArray = [];};
  7171. if(isNil 'AH_AdmiLogArray')then{AH_AdmiLogArray = [];};
  7172. if(isNil 'SERVER_FPS')then{SERVER_FPS = 0;};
  7173. if(isNil 'SERVER_THREADS')then{SERVER_THREADS = 0;};
  7174. if(isNil 'SERVER_LOOPTIME')then{SERVER_LOOPTIME = 0;};
  7175. if(isNil 'infiSTAR_toggled_A')then{infiSTAR_toggled_A = ['==== OnTarget ====','==== Toggleable ====','==== Custom Functions ===='];};
  7176. if(isNil 'infiSTAR_loop_array')then{infiSTAR_loop_array = [];};
  7177.  
  7178.  
  7179. FN_SHOW_LOGID = 554466;
  7180. FN_SHOWN_LOGIDS = [];
  7181. FN_SHOW_LOG_OLD = {
  7182. disableSerialization;
  7183. _del = {FN_SHOWN_LOGIDS = FN_SHOWN_LOGIDS - [_this];ctrlDelete _this;};
  7184. {
  7185. if(_forEachIndex < 3)then
  7186. {
  7187. if(count FN_SHOWN_LOGIDS > 40)then{_x call _del;};
  7188. }
  7189. else
  7190. {
  7191. if(ctrlFade _x > 0.9)then{_x call _del;};
  7192. };
  7193. } forEach FN_SHOWN_LOGIDS;
  7194. _ctrl = [findDisplay 46,'RSCText',FN_SHOW_LOGID] call fnc_createctrl;
  7195. FN_SHOW_LOGID = FN_SHOW_LOGID + 1;
  7196. FN_SHOWN_LOGIDS pushBackUnique _ctrl;
  7197. {
  7198. _x ctrlSetPosition [
  7199. 0,
  7200. ((safeZoneY+0.3) + (_forEachIndex / 30)),
  7201. 1.3,
  7202. 0.2
  7203. ];
  7204. _x ctrlCommit 0;
  7205. } forEach FN_SHOWN_LOGIDS;
  7206. _ctrl ctrlSetText format['<infiSTAR.de> %1',_this];
  7207. _ctrl ctrlSetFade 1;
  7208. _ctrl ctrlCommit 5;
  7209. };
  7210. FN_SHOW_LOG = {
  7211. if(isNil'ExileClient_gui_toaster_addTemplateToast')then
  7212. {
  7213. _this call FN_SHOW_LOG_OLD;
  7214. }
  7215. else
  7216. {
  7217. ['SuccessTitleAndText', ['infiSTAR.de', _this]] call ExileClient_gui_toaster_addTemplateToast;
  7218. };
  7219. };
  7220.  
  7221.  
  7222. fnc_get_selected_object = {
  7223. _target = lbtext[LEFT_SHIFT_ID,(lbCurSel LEFT_SHIFT_ID)];
  7224. if(_target isEqualTo '')then
  7225. {
  7226. if(isNull SELECTED_TARGET_PLAYER)then
  7227. {
  7228. SELECTED_TARGET_PLAYER = player;
  7229. };
  7230. }
  7231. else
  7232. {
  7233. {
  7234. _grp = group _x;
  7235. _side = side _x;
  7236. _name = _x call FN_GET_NAME;
  7237. _search = format['%1 [%2]',_name,_side];
  7238. if(count units _grp > 1)then
  7239. {
  7240. _search = format['%1 [%2 (%3)]',_name,_side,_grp];
  7241. };
  7242. if(_search == _target)exitWith
  7243. {
  7244. SELECTED_TARGET_PLAYER = _x;
  7245. };
  7246. } forEach (call fnc_get_plr);
  7247. };
  7248. SELECTED_TARGET_PLAYER
  7249. };
  7250. FN_GET_CLR_PLAYERLIST = {
  7251. if(_this isEqualTo SELECTED_TARGET_PLAYER)exitWith{[1,0.7,0.15,1]};
  7252. if(!alive _this)exitWith{[1,1,1,1]};
  7253. _xuid = getPlayerUID _this;
  7254. if(((_xuid in infiSTAR_ADMINS)&&!(_xuid in infiSTAR_Ds))||((_xuid in infiSTAR_Ds)&&(MYPUIDinfiESP in infiSTAR_Ds))||(_xuid == MYPUIDinfiESP))exitWith{[0,1,0,1]};
  7255. if(_this in (units(group player)))exitWith{[1,0.95,0,1]};
  7256. if(vehicle _this isEqualTo _this)exitWith{[1,0.17,0.17,1]};
  7257. [0.047,0.502,1,1]
  7258. };
  7259. FN_GET_NAME = {
  7260. if(alive _this)then{name _this}else{_this getVariable['ExileName','unknown']}
  7261. };
  7262. FN_GET_CLR = {
  7263. if(_this isEqualTo SELECTED_TARGET_PLAYER)exitWith{[1,0.7,0.15,_alpha]};
  7264. if(!alive _this)exitWith{[1,1,1,_alpha]};
  7265. _xuid = getPlayerUID _this;
  7266. if(((_xuid in infiSTAR_ADMINS)&&!(_xuid in infiSTAR_Ds))||((_xuid in infiSTAR_Ds)&&(MYPUIDinfiESP in infiSTAR_Ds))||(_xuid == MYPUIDinfiESP))exitWith{[0,1,0,_alpha]};
  7267. if(_this in (units(group player)))exitWith{[1,0.95,0,_alpha]};
  7268. if(vehicle _this isEqualTo _this)exitWith{[1,0.17,0.17,_alpha]};
  7269. [0.047,0.502,1,_alpha]
  7270. };
  7271. TRADER_FUNCTION_ARRAY = [
  7272. [''],
  7273. ['Exile_Trader_Armory','ExileClient_gui_traderDialog_show',0],
  7274. ['Exile_Trader_SpecialOperations','ExileClient_gui_traderDialog_show',0],
  7275. ['Exile_Trader_Equipment','ExileClient_gui_traderDialog_show',0],
  7276. ['Exile_Trader_Food','ExileClient_gui_traderDialog_show',0],
  7277. ['Exile_Trader_Hardware','ExileClient_gui_traderDialog_show',0],
  7278. [''],
  7279. ['Exile_Trader_Vehicle','ExileClient_gui_vehicleTraderDialog_show',0],
  7280. ['Exile_Trader_Aircraft','ExileClient_gui_vehicleTraderDialog_show',0],
  7281. ['Exile_Trader_Boat','ExileClient_gui_vehicleTraderDialog_show',0],
  7282. [''],
  7283. ['Exile_Trader_Office','ExileClient_gui_purchaseTerritoryDialog_show',0],
  7284. ['Exile_Trader_Office','ExileClient_gui_payTerritoryProtectionMoneyDialog_show',0],
  7285. [''],
  7286. ['Exile_Trader_WasteDump','ExileClient_gui_wasteDumpDialog_show',1],
  7287. ['Exile_Trader_VehicleCustoms','ExileClient_gui_vehicleCustomsDialog_show',1],
  7288. ['Exile_Trader_AircraftCustoms','ExileClient_gui_vehicleCustomsDialog_show',1],
  7289. ['Exile_Trader_BoatCustoms','ExileClient_gui_vehicleCustomsDialog_show',1],
  7290. [''],
  7291. ['-- customs are not set by default --'],
  7292. ['Exile_Trader_CommunityCustoms','ExileClient_gui_traderDialog_show',0],
  7293. ['Exile_Trader_CommunityCustoms2','ExileClient_gui_traderDialog_show',0],
  7294. ['Exile_Trader_CommunityCustoms3','ExileClient_gui_traderDialog_show',0],
  7295. ['Exile_Trader_CommunityCustoms4','ExileClient_gui_traderDialog_show',0],
  7296. ['Exile_Trader_CommunityCustoms5','ExileClient_gui_traderDialog_show',0],
  7297. ['Exile_Trader_CommunityCustoms6','ExileClient_gui_traderDialog_show',0],
  7298. ['Exile_Trader_CommunityCustoms7','ExileClient_gui_traderDialog_show',0],
  7299. ['Exile_Trader_CommunityCustoms8','ExileClient_gui_traderDialog_show',0],
  7300. ['Exile_Trader_CommunityCustoms9','ExileClient_gui_traderDialog_show',0],
  7301. ['Exile_Trader_CommunityCustoms10','ExileClient_gui_traderDialog_show',0]
  7302. ];
  7303. ALLC_ITEMS = ['B_Parachute'];
  7304. ALL_MAGS_TO_SEARCH_C = [];
  7305. ALL_VEHS_TO_SEARCH_C = [];
  7306. ALL_VEHS_TO_SEARCH_C_EXILE = [];
  7307. ALL_VEHS_TO_SEARCH_C_OTHER = [];
  7308. newAllItems_CATEGORY = [];
  7309.  
  7310. FNC_PIC_VALID = {
  7311. !((toLower _this) in ['','pictureheal','picturepapercar','picturething','picturestaticobject'])
  7312. };
  7313.  
  7314. {
  7315. _configName = configName _x;
  7316. ALL_VEHS_TO_SEARCH_C pushBackUnique _configName;
  7317. if(_configName select [0,5] isEqualTo 'Exile')then{ALL_VEHS_TO_SEARCH_C_EXILE pushBackUnique _configName;}else{ALL_VEHS_TO_SEARCH_C_OTHER pushBackUnique _configName;};
  7318. } forEach ('((getNumber (_x >> ''scope'') >= 2) && {getText(_x >> ''picture'') call FNC_PIC_VALID} && {configName _x isKindOf ''allVehicles'' && !(configName _x isKindOf ''Man'')})' configClasses (configFile >> 'CfgVehicles'));
  7319.  
  7320.  
  7321. {
  7322. ALL_VEHS_TO_SEARCH_C pushBackUnique _x;
  7323. if(_x select [0,5] isEqualTo 'Exile')then{ALL_VEHS_TO_SEARCH_C_EXILE pushBackUnique _x;}else{ALL_VEHS_TO_SEARCH_C_OTHER pushBackUnique _x;};
  7324. } forEach [
  7325. 'Land_Pod_Heli_Transport_04_covered_F',
  7326. 'Land_Pod_Heli_Transport_04_fuel_F',
  7327. 'Land_Pod_Heli_Transport_04_box_F',
  7328. 'Land_Pod_Heli_Transport_04_repair_F',
  7329. 'Land_Pod_Heli_Transport_04_medevac_F',
  7330. 'Land_Pod_Heli_Transport_04_bench_F',
  7331. 'Land_Pod_Heli_Transport_04_covered_black_F',
  7332. 'Land_Pod_Heli_Transport_04_fuel_black_F',
  7333. 'Land_Pod_Heli_Transport_04_box_black_F',
  7334. 'Land_Pod_Heli_Transport_04_repair_black_F',
  7335. 'Land_Pod_Heli_Transport_04_medevac_black_F',
  7336. 'Land_Pod_Heli_Transport_04_bench_black_F'
  7337. ];
  7338.  
  7339. _bags = getArray(missionconfigfile >> 'CfgTraderCategories' >> 'Backpacks' >> 'items');
  7340. {
  7341. ALLC_ITEMS pushBackUnique _x;
  7342. _itemInformation = [_x] call BIS_fnc_itemType;
  7343. _category = _itemInformation select 1;
  7344. if!(_category in newAllItems_CATEGORY)then{newAllItems_CATEGORY pushBackUnique _category;};
  7345. } forEach _bags;
  7346.  
  7347. {
  7348. _configName = configName _x;
  7349. ALLC_ITEMS pushBackUnique _configName;
  7350. _itemInformation = [_configName] call BIS_fnc_itemType;
  7351. _category = _itemInformation select 1;
  7352. if!(_category in newAllItems_CATEGORY)then{newAllItems_CATEGORY pushBackUnique _category;};
  7353. } forEach ('(getNumber(_x >> ''scope'') isEqualTo 2) && {(getText(_x >> ''vehicleClass'') isEqualTo ''Backpacks'')}' configClasses (configFile >> 'CfgVehicles'));
  7354.  
  7355. {
  7356. _configName = configName _x;
  7357. ALLC_ITEMS pushBackUnique _configName;
  7358. _itemInformation = [_configName] call BIS_fnc_itemType;
  7359. _category = _itemInformation select 1;
  7360. if!(_category in newAllItems_CATEGORY)then{newAllItems_CATEGORY pushBackUnique _category;};
  7361. } forEach ('(getNumber(_x >> ''scope'') isEqualTo 2) && {getText(_x >> ''picture'') call FNC_PIC_VALID}' configClasses (configFile >> 'CfgWeapons'));
  7362.  
  7363. {
  7364. _configName = configName _x;
  7365. ALLC_ITEMS pushBackUnique _configName;
  7366. ALL_MAGS_TO_SEARCH_C pushBackUnique _configName;
  7367. _itemInformation = [_configName] call BIS_fnc_itemType;
  7368. _category = _itemInformation select 1;
  7369. if!(_category in newAllItems_CATEGORY)then{newAllItems_CATEGORY pushBackUnique _category;};
  7370. } forEach ('(getNumber(_x >> ''scope'') isEqualTo 2) && {getText(_x >> ''picture'') call FNC_PIC_VALID}' configClasses (configFile >> 'CfgMagazines'));
  7371. newAllItems_CATEGORY sort true;
  7372. {
  7373. _itemInformation = [_x] call BIS_fnc_itemType;
  7374. _category = _itemInformation select 1;
  7375.  
  7376. _variable = missionNameSpace getVariable (_category+'_ARRAY');
  7377. if(isNil '_variable')then
  7378. {
  7379. missionNameSpace setVariable[(_category+'_ARRAY'),[_x]];
  7380. }
  7381. else
  7382. {
  7383. _variable pushBackUnique _x;
  7384. missionNameSpace setVariable[(_category+'_ARRAY'),_variable];
  7385. };
  7386. } forEach ALLC_ITEMS;
  7387. _log = format['<infiSTAR.de> %1 - config data loaded!',call GET_TIME_TIME];diag_log _log;
  7388. if('==== Base Deleter ====' call ADMINLEVELACCESS)then
  7389. {
  7390. CCG_fnc_adminClick = {
  7391. private ['_click'];
  7392. _click = _this select 0;
  7393. if(_click == '')exitWith{};
  7394. try {
  7395. switch (_click) do {
  7396. case 'BD: Set Center' : {
  7397. call CCG_fnc_bdSetCenter;
  7398. throw 'BASEDELETER: Set Center';
  7399. };
  7400. case 'BD: Set Radius' : {
  7401. call CCG_fnc_bdSetRadius;
  7402. throw 'BASEDELETER: Set Radius';
  7403. };
  7404. case 'BD: Cancel / Remove' : {
  7405. call CCG_fnc_bdCancel;
  7406. throw 'BASEDELETER: Cancel';
  7407. };
  7408. case 'BD: Delete Base' : {
  7409. call CCG_fnc_bdDeleteB;
  7410. throw 'BASEDELETER: Delete Base';
  7411. };
  7412. case 'BD: Delete Weaponholder' : {
  7413. call CCG_fnc_bdDeleteW;
  7414. throw 'BASEDELETER: Delete Weaponholder';
  7415. };
  7416. };
  7417. } catch {
  7418. systemChat _exception;
  7419. call fnc_FULLinit;
  7420. };
  7421. };
  7422. CCGbdObjs = [];
  7423. CCG_fnc_bdSetCenter = {
  7424. private ['_arrow'];
  7425. CCGbdCenter = getPosASL player;
  7426. _arrow = 'Sign_Arrow_F' createVehicleLocal [0,0,0];
  7427. _arrow setPosASL CCGbdCenter;
  7428. CCGbdObjs pushBack _arrow;
  7429. };
  7430. CCG_fnc_bdSetRadius = {
  7431. private ['_arrow', '_pos', '_radius', '_angle', '_distance', '_count', '_step', '_count', '_step', '_objects'];
  7432. if(isNil 'CCGbdCenter')then{throw 'BASEDELETER: Center not set!';};
  7433. CCGbdRadius = CCGbdCenter distance (getPosASL player);
  7434. _arrow = 'Sign_Arrow_F' createVehicleLocal [0,0,0];
  7435. _arrow setPosASL CCGbdCenter;
  7436. CCGbdObjs pushBack _arrow;
  7437. _angle = 0;
  7438. _count = round((2 * pi * CCGbdRadius) / 2);
  7439. if(_count == 0)then{throw 'BASEDELETER: Center and Radius position can not be the same!';};
  7440. for '_x' from 0 to _count do
  7441. {
  7442. private['_a', '_b', '_obj'];
  7443. _a = (CCGbdCenter select 0) + (sin(_angle)*CCGbdRadius);
  7444. _b = (CCGbdCenter select 1) + (cos(_angle)*CCGbdRadius);
  7445. _obj = 'Sign_Sphere100cm_F' createVehicleLocal [0,0,0];
  7446. _obj setPosASL [_a, _b, CCGbdCenter select 2];
  7447. CCGbdObjs pushBack _obj;
  7448. _angle = _angle + (360/_count);
  7449. };
  7450. for '_x' from 0 to _count do
  7451. {
  7452. private['_a', '_b', '_obj'];
  7453. _a = (CCGbdCenter select 0) + (sin(_angle)*CCGbdRadius);
  7454. _b = (CCGbdCenter select 2) + (cos(_angle)*CCGbdRadius);
  7455. _obj = 'Sign_Sphere100cm_F' createVehicleLocal [0,0,0];
  7456. _obj setPosASL [_a, CCGbdCenter select 1, _b];
  7457. CCGbdObjs pushBack _obj;
  7458. _angle = _angle + (360/_count);
  7459. };
  7460. for '_x' from 0 to _count do
  7461. {
  7462. private['_a', '_b', '_obj'];
  7463. _a = (CCGbdCenter select 1) + (sin(_angle)*CCGbdRadius);
  7464. _b = (CCGbdCenter select 2) + (cos(_angle)*CCGbdRadius);
  7465. _obj = 'Sign_Sphere100cm_F' createVehicleLocal [0,0,0];
  7466. _obj setPosASL [CCGbdCenter select 0, _a, _b];
  7467. CCGbdObjs pushBack _obj;
  7468. _angle = _angle + (360/_count);
  7469. };
  7470. };
  7471. CCG_fnc_bdGetObjectsToDelete = {
  7472. if(isNil 'CCGbdCenter')exitWith{[]};
  7473. if(isNil 'CCGbdRadius')exitWith{[]};
  7474. nearestObjects [ASLtoATL CCGbdCenter,['Exile_Construction_Abstract_Static','AbstractConstruction','Exile_Construction_Flag_Static'], CCGbdRadius]
  7475. };
  7476. CCG_fnc_bdGetWeaponHoldersToDelete = {
  7477. if(isNil 'CCGbdCenter')exitWith{[]};
  7478. if(isNil 'CCGbdRadius')exitWith{[]};
  7479. nearestObjects [ASLtoATL CCGbdCenter,['GroundWeaponHolder','WeaponHolderSimulated','LootWeaponHolder'], CCGbdRadius]
  7480. };
  7481. CCG_fnc_bdDeleteB = {
  7482. private ['_objects'];
  7483. if(isNil 'CCGbdCenter')then{throw 'BASEDELETER: Center not set!';};
  7484. if(isNil 'CCGbdRadius')then{throw 'BASEDELETER: Radius not set!';};
  7485. [-5,ASLtoATL CCGbdCenter,CCGbdRadius] call fnc_AdminReq;
  7486. systemChat format['BASEDELETER: Deleting..', count (call CCG_fnc_bdGetObjectsToDelete)];
  7487. };
  7488. CCG_fnc_bdDeleteW = {
  7489. private ['_objects'];
  7490. if(isNil 'CCGbdCenter')then{throw 'BASEDELETER: Center not set!';};
  7491. if(isNil 'CCGbdRadius')then{throw 'BASEDELETER: Radius not set!';};
  7492. [-6,ASLtoATL CCGbdCenter,CCGbdRadius] call fnc_AdminReq;
  7493. systemChat format['BASEDELETER: Deleting..', count (call CCG_fnc_bdGetWeaponHoldersToDelete)];
  7494. };
  7495. CCG_fnc_bdCancel = {
  7496. CCGbdCenter = nil;
  7497. CCGbdRadius = nil;
  7498. {if(!isNull _x)then{deleteVehicle _x;};} foreach CCGbdObjs;
  7499. CCGbdObjs = [];
  7500. };
  7501. };
  7502. fnc_setFocus = {
  7503. disableSerialization;
  7504. ctrlSetFocus ((findDisplay MAIN_DISPLAY_ID) displayCtrl LEFT_SHIFT_ID);
  7505. ctrlSetFocus ((findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_SHIFT_ID);
  7506. };
  7507. MAP_OBJECT_SELECTED = objNull;
  7508. fnc_MouseButtonDown = {
  7509. if(_this select 1 isEqualTo 0)then
  7510. {
  7511. _pos = ((_this select 0) posScreenToWorld [_this select 2, _this select 3]);
  7512. if(ALT_IS_PRESSED)then
  7513. {
  7514. _veh = vehicle player;
  7515. if(_veh isEqualTo player)then
  7516. {
  7517. _veh setPosATL _pos;
  7518. }
  7519. else
  7520. {
  7521. if(_veh isKindOf 'AIR')then
  7522. {
  7523. _posObj = getPosATL _veh;
  7524. _pos = [_pos select 0,_pos select 1,_posObj select 2];
  7525. };
  7526. [1,netId player,_pos] call fnc_AdminReq;
  7527. };
  7528. ALT_IS_PRESSED = false;
  7529. format['Teleport to %1(GPS: %2)',_pos,mapGridPosition _pos] call fnc_adminLog;
  7530. {player reveal _x;} foreach (_pos nearObjects 50);
  7531. };
  7532. MAP_OBJECT_SELECTED = _pos nearestObject 'AllVehicles';
  7533. };
  7534. false
  7535. };
  7536. fnc_MouseButtonUp = {
  7537. if(_this select 1 isEqualTo 0)then
  7538. {
  7539. _pos = ((_this select 0) posScreenToWorld [_this select 2, _this select 3]);
  7540. if(isNull MAP_OBJECT_SELECTED)exitWith{true};
  7541. if(!SHIFT_IS_PRESSED)exitWith{true};
  7542.  
  7543. _obj = MAP_OBJECT_SELECTED;
  7544. if(isPlayer _obj)then
  7545. {
  7546. {
  7547. if(!isNull _x)then
  7548. {
  7549. if(getPlayerUID _x != '')then
  7550. {
  7551. _name = if(alive _x)then{name _x}else{_x getVariable['ExileName',name _x]};
  7552. [1,netId _x,_pos] call fnc_AdminReq;
  7553. };
  7554. };
  7555. } forEach (crew _obj);
  7556. }
  7557. else
  7558. {
  7559. if(local _obj)then
  7560. {
  7561. _obj setPosATL _pos;
  7562. }
  7563. else
  7564. {
  7565. [20,netId _obj,_pos] call fnc_AdminReq;
  7566. };
  7567. };
  7568. MAP_OBJECT_SELECTED = objNull;
  7569. };
  7570. false
  7571. };
  7572. fnc_addpic = {
  7573. _status = call {
  7574. if(isClass (configFile >> 'CfgWeapons' >> _this))exitWith{'CfgWeapons'};
  7575. if(isClass (configFile >> 'CfgMagazines' >> _this))exitWith{'CfgMagazines'};
  7576. if(isClass (configFile >> 'CfgVehicles' >> _this))exitWith{'CfgVehicles'};
  7577. '';
  7578. };
  7579. if!(_status isEqualTo '')then
  7580. {
  7581. _pic = (getText (configFile >> _status >> _this >> 'picture'));
  7582. if(_pic call FNC_PIC_VALID)then
  7583. {
  7584. _ctrl lbSetPicture [(lbsize _ctrl)-1,_pic];
  7585. _ctrl lbSetPictureColor [(lbsize _ctrl)-1,[1, 1, 1, 1]];
  7586. };
  7587. };
  7588. };
  7589. fnc_search = {
  7590. [
  7591. _txt,
  7592. {
  7593. _txt = _this;
  7594. if(_txt == lastSearched)exitWith{};
  7595. disableSerialization;
  7596. _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_SHIFT_ID;
  7597. lbClear _ctrl;
  7598. if(LASTSUBBUTTON isEqualTo 0)then
  7599. {
  7600. if('Items spawn menu' call ADMINLEVELACCESS)then
  7601. {
  7602. {
  7603. _displayName = getText(configFile >> 'CfgWeapons' >> _x >> 'displayName');
  7604. if(_displayName isEqualTo '')then{_displayName = getText(configFile >> 'CfgMagazines' >> _x >> 'displayName');};
  7605. if(_displayName isEqualTo '')then{_displayName = getText(configFile >> 'CfgVehicles' >> _x >> 'displayName');};
  7606. if(((toLower _x) find _txt > -1)||((toLower _displayName) find _txt > -1))then{
  7607. _lbid = _ctrl lbAdd format['%1 (%2)',_displayName,_x];
  7608. _ctrl lbSetData [_lbid,_x];
  7609. _x call fnc_addpic;
  7610. };
  7611. } forEach ALLC_ITEMS;
  7612. for '_i' from 0 to 12 do {_ctrl lbAdd '';};
  7613. };
  7614. };
  7615. if(LASTSUBBUTTON isEqualTo 1)then
  7616. {
  7617. if(('Spawn Vehicles' call ADMINLEVELACCESS) || ('Spawn Persistent Vehicles' call ADMINLEVELACCESS))then
  7618. {
  7619. _ctrl lbAdd '==== Vehicles ====';
  7620. if(!isNil 'infiSTAR_add_vehicles')then
  7621. {
  7622. {
  7623. _displayName = getText(configFile >> 'CfgVehicles' >> _x >> 'displayName');
  7624. if(((toLower _x) find _txt > -1)||((toLower _displayName) find _txt > -1))then{
  7625. _lbid = _ctrl lbAdd format['%1 (%2)',_displayName,_x];
  7626. _ctrl lbSetData [_lbid,_x];
  7627. _x call fnc_addpic;
  7628. if(_x select [0,5] isEqualTo 'Exile')then{_ctrl lbSetColor [_lbid, [0,1,0,1]];};
  7629. };
  7630. } forEach ALL_VEHS_TO_SEARCH_C;
  7631. for '_i' from 0 to 12 do {_ctrl lbAdd '';};
  7632. };
  7633. };
  7634. };
  7635. lastSearched = _txt;
  7636. [] call fnc_colorizeMain;
  7637. for '_i' from 0 to 10 do{_ctrl lbAdd '';};
  7638. }
  7639. ] execFSM 'call.fsm';
  7640. };
  7641. fnc_searchNfill = {
  7642. if(isNil 'SEARCHLOOP')then{
  7643. SEARCHLOOP = true;
  7644. if(isNil 'lastSearched')then{lastSearched = '';};
  7645. [] spawn {
  7646. disableSerialization;
  7647. while {true} do
  7648. {
  7649. if(isNull (findDisplay MAIN_DISPLAY_ID))exitWith{};
  7650. if(!isNil 'stopthissearchplease')exitWith{stopthissearchplease=nil;};
  7651. _txt = ctrlText((findDisplay MAIN_DISPLAY_ID) displayCtrl 100);
  7652. if(_txt isEqualTo '')then
  7653. {
  7654. [] call fnc_fill_infiSTAR_Player;
  7655. waitUntil {((ctrlText((findDisplay MAIN_DISPLAY_ID) displayCtrl 100) != '')||(isNull (findDisplay MAIN_DISPLAY_ID))||(!isNil 'stopthissearchplease'))};
  7656. }
  7657. else
  7658. {
  7659. _txt = toLower _txt;
  7660. if(FILLMAINSTATE isEqualTo 1)then
  7661. {
  7662. call fnc_search;
  7663. }
  7664. else
  7665. {
  7666. _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl LEFT_SHIFT_ID;
  7667. lbclear _ctrl;
  7668. _shown = [];
  7669. {
  7670.  
  7671. _name = if(alive _x)then{name _x}else{_x getVariable['ExileName',name _x]};
  7672. if((toLower _name) find _txt > -1)then
  7673. {
  7674. _grp = group _x;
  7675. _index = _shown pushBackUnique _grp;
  7676. if(_index > -1)then
  7677. {
  7678. _ctrl lbAdd format['______%1______',_grp];
  7679. {
  7680. _PUIDX = getPlayerUID _x;
  7681. _side = side _x;
  7682. _grp = group _x;
  7683. _ExileName = if(alive _x)then{name _x}else{_x getVariable['ExileName',name _x]};
  7684. _name = format['%1 [%2]',_ExileName,_side];
  7685. if(count units _grp > 1)then
  7686. {
  7687. _name = format['%1 [%2 (%3)]',_ExileName,_side,_grp];
  7688. };
  7689.  
  7690. _lbid = _ctrl lbAdd _name;
  7691. _veh = vehicle _x;
  7692. _xpic = getText (configFile >> 'CfgVehicles' >> (typeOf _veh) >> 'picture');
  7693. if(alive _x)then
  7694. {
  7695. if(_x isEqualTo _veh)then
  7696. {
  7697. _wpnstate = weaponState _x;
  7698. _cwep = _wpnstate select 0;
  7699. if(_cwep != '')then
  7700. {
  7701. _xpic = getText (configFile >> 'CfgWeapons' >> _cwep >> 'picture');
  7702. };
  7703. };
  7704. };
  7705. if(_xpic call FNC_PIC_VALID)then
  7706. {
  7707. _ctrl lbSetPicture [_lbid,_xpic];
  7708. _ctrl lbSetPictureColor [_lbid,[1, 1, 1, 1]];
  7709. };
  7710. _clr = _x call FN_GET_CLR_PLAYERLIST;
  7711. _ctrl lbSetColor [_lbid,_clr];
  7712. } forEach (units _grp);
  7713. };
  7714. };
  7715. } forEach (call fnc_get_plr);
  7716. };
  7717. };
  7718. uiSleep 0.1;
  7719. };
  7720. SEARCHLOOP = nil;
  7721. };
  7722. };
  7723. };
  7724. fnc_SearchFieldButtons = {
  7725. disableSerialization;
  7726. _display = findDisplay MAIN_DISPLAY_ID;
  7727. _others=false;
  7728. if(FILLMAINSTATE == 1)then{_others = true;};
  7729.  
  7730. _editSearch = _display displayCtrl 100;
  7731. _editSearch ctrlEnable true;
  7732. _editSearch ctrlShow true;
  7733. _editSearch ctrlSetTextColor [0.56,0.04,0.04,1];
  7734. _editSearch ctrlSetText '';
  7735.  
  7736. _btnItems = _display displayCtrl 36;
  7737. _btnItems ctrlEnable true;
  7738. _btnItems ctrlShow true;
  7739. _btnItems buttonSetAction '
  7740. LASTSUBBUTTON = 0;FILLMAINSTATE=1;[] call fnc_fill_infiSTAR_MAIN;[] call fnc_setFocus;[] call fnc_colorButtons;
  7741. ';
  7742. if!('Items spawn menu' call ADMINLEVELACCESS)then
  7743. {
  7744. _btnItems ctrlEnable false;
  7745. _btnItems ctrlShow false;
  7746. };
  7747.  
  7748. _ctrlL = _display displayCtrl LEFT_SHIFT_ID;
  7749. if(isNil 'ctrlposL')then{ctrlposL = ctrlPosition _ctrlL;};
  7750. _ctrlLTMP = ctrlposL;
  7751. if(isNil 'ctrlposeditSearch')then{ctrlposeditSearch = ctrlPosition _editSearch;};
  7752. _ctrleditSearchTMP = ctrlposeditSearch;
  7753. if(isNil 'ctrlposbtnItems')then{ctrlposbtnItems = ctrlPosition _btnItems;};
  7754. _ctrlbtnItemsTMP = ctrlposbtnItems;
  7755. if(FILLMAINSTATE in [0,3,4])then
  7756. {
  7757. _btnItems ctrlSetText 'Reset PlayerSearch';
  7758. _btnItems buttonSetAction '
  7759. ((findDisplay MAIN_DISPLAY_ID) displayCtrl 100) ctrlSetText '''';
  7760. [] call fnc_fill_infiSTAR_Player;
  7761. ';
  7762.  
  7763.  
  7764. _ctrlLTMP = [(ctrlposL select 0),(ctrlposL select 1)+.165,(ctrlposL select 2),(ctrlposL select 3)-.165];
  7765. _ctrleditSearchTMP = [SafeZoneX,(ctrlposeditSearch select 1)-0.045,(ctrlposL select 2),(ctrlposeditSearch select 3)*0.75];
  7766. _ctrlbtnItemsTMP = [SafeZoneX,(ctrlposbtnItems select 1)-0.035,(ctrlposL select 2),(ctrlposbtnItems select 3)];
  7767. };
  7768. _ctrlL ctrlSetPosition _ctrlLTMP;
  7769. _ctrlL ctrlCommit 0.3;
  7770. _editSearch ctrlSetPosition _ctrleditSearchTMP;
  7771. _editSearch ctrlCommit 0.3;
  7772. _btnItems ctrlSetPosition _ctrlbtnItemsTMP;
  7773. _btnItems ctrlCommit 0.3;
  7774.  
  7775. if(FILLMAINSTATE == 1)then{
  7776. _btnItems ctrlSetText 'Items';
  7777. _btnItems buttonSetAction '
  7778. LASTSUBBUTTON = 0;FILLMAINSTATE=1;[] call fnc_fill_infiSTAR_MAIN;[] call fnc_setFocus;[] call fnc_colorButtons;
  7779. ';
  7780. };
  7781.  
  7782. _btnVehs = _display displayCtrl 37;
  7783. _btnVehs ctrlEnable _others;
  7784. _btnVehs ctrlShow _others;
  7785. _btnVehs buttonSetAction '
  7786. LASTSUBBUTTON = 1;FILLMAINSTATE=1;[] call fnc_fill_infiSTAR_MAIN;[] call fnc_setFocus;[] call fnc_colorButtons;
  7787. ';
  7788. if!(('Spawn Vehicles' call ADMINLEVELACCESS) || ('Spawn Persistent Vehicles' call ADMINLEVELACCESS))then
  7789. {
  7790. _btnVehs ctrlEnable false;
  7791. _btnVehs ctrlShow false;
  7792. };
  7793.  
  7794. _btnTrader = _display displayCtrl 38;
  7795. _btnTrader ctrlSetText 'Trader';
  7796. _btnTrader ctrlEnable _others;
  7797. _btnTrader ctrlShow _others;
  7798. _btnTrader buttonSetAction '
  7799. LASTSUBBUTTON = 2;FILLMAINSTATE=1;[] call fnc_fill_infiSTAR_MAIN;[] call fnc_setFocus;[] call fnc_colorButtons;
  7800. ';
  7801.  
  7802. call fnc_searchNfill;
  7803. };
  7804. fnc_cloneGear = {
  7805. _unit = _this;
  7806. if(isNil'_unit')exitWith{systemchat'_unit not defined';};
  7807. if(isNull _unit)exitWith{systemchat'_unit OBJECT-NULL';};
  7808. _export = '';
  7809. _fnc_addMultiple = {
  7810. _items = _this select 0;
  7811. _expression = _this select 1;
  7812. _itemsUsed = [];
  7813. {
  7814. _item = _x;
  7815. _itemLower = tolower _x;
  7816. if !(_itemLower in _itemsUsed)then{
  7817. _itemsUsed set [count _itemsUsed,_itemLower];
  7818. _itemCount = {_item == _x} count _items;
  7819. _expressionLocal = _expression;
  7820. if(_itemCount > 1)then{
  7821. _expressionLocal = format ['for ''_i'' from 1 to %1 do {%2};',_itemCount,_expression];
  7822. };
  7823. _export = _export + format [_expressionLocal,_var,_x];
  7824. };
  7825. } foreach _items;
  7826. };
  7827. _export = _export + '_unit = player;';
  7828. _var = '_unit';
  7829. _export = _export + format ['removeAllWeapons %1;',_var];
  7830. _export = _export + format ['removeAllItems %1;',_var];
  7831. _export = _export + format ['removeAllAssignedItems %1;',_var];
  7832. _export = _export + format ['removeUniform %1;',_var];
  7833. _export = _export + format ['removeVest %1;',_var];
  7834. _export = _export + format ['removeBackpack %1;',_var];
  7835. _export = _export + format ['removeHeadgear %1;',_var];
  7836. _export = _export + format ['removeGoggles %1;',_var];
  7837. if(uniform _unit != '')then{
  7838. _export = _export + format ['%1 forceAddUniform ''%2'';',_var,uniform _unit];
  7839. [uniformitems _unit,'%1 addItemToUniform ''%2'';'] call _fnc_addMultiple;
  7840. };
  7841. if(vest _unit != '')then{
  7842. _export = _export + format ['%1 addVest ''%2'';',_var,vest _unit];
  7843. [vestitems _unit,'%1 addItemToVest ''%2'';'] call _fnc_addMultiple;
  7844. };
  7845. if(!isnull unitbackpack _unit)then{
  7846. _export = _export + format ['%1 addBackpack ''%2'';',_var,typeof unitbackpack _unit];
  7847. [backpackitems _unit,'%1 addItemToBackpack ''%2'';'] call _fnc_addMultiple;
  7848. };
  7849. if(headgear _unit != '')then{_export = _export + format ['%1 addHeadgear ''%2'';',_var,headgear _unit];};
  7850. if(goggles _unit != '')then{_export = _export + format ['%1 addGoggles ''%2'';',_var,goggles _unit];};
  7851. {
  7852. _weapon = _x select 0;
  7853. _weaponAccessories = _x select 1;
  7854. _weaponCommand = _x select 2;
  7855. if(_weapon != '')then{
  7856. _export = _export + format ['%1 addWeapon ''%2'';',_var,_weapon];
  7857. {
  7858. if(_x != '')then{_export = _export + format ['%1 %3 ''%2'';',_var,_x,_weaponCommand];};
  7859. } foreach _weaponAccessories;
  7860. };
  7861. } foreach [
  7862. [primaryweapon _unit,_unit weaponaccessories primaryweapon _unit,'addPrimaryWeaponItem'],
  7863. [secondaryweapon _unit,_unit weaponaccessories secondaryweapon _unit,'addSecondaryWeaponItem'],
  7864. [handgunweapon _unit,_unit weaponaccessories handgunweapon _unit,'addHandgunItem'],
  7865. [binocular _unit,[],'']
  7866. ];
  7867. [assigneditems _unit - [binocular _unit],'%1 linkItem ''%2'';'] call _fnc_addMultiple;
  7868. _export
  7869. };
  7870. fnc_Loadoutmenu = {
  7871. disableSerialization;
  7872. if(isNil'missionNameSpaceLoadouts')then{missionNameSpaceLoadouts=[];};
  7873. _display = findDisplay MAIN_DISPLAY_ID;
  7874. _ctrl = [_display,'IGUIBack',44464] call fnc_createctrl;
  7875. _ctrl ctrlSetPosition [
  7876. 0.554062 * safezoneW + safezoneX,
  7877. 0.8,
  7878. 0.3,
  7879. 0.2 * safezoneH
  7880. ];
  7881. _ctrl ctrlSetBackgroundColor [0.15,0.15,0.15,1];
  7882. _ctrl ctrlCommit 0;
  7883.  
  7884. _ctrl = [_display,'RscListbox',44465] call fnc_createctrl;
  7885. _ctrl ctrlSetPosition [
  7886. 0.554062 * safezoneW + safezoneX,
  7887. 0.8
  7888. ];
  7889. _ctrl ctrlCommit 0;
  7890. fnc_load_LoadOuts = {
  7891. infiSTAR_LoadOutARRay = profileNamespace getVariable['infiSTAR_LoadOutARRay',[]];
  7892. lbClear (findDisplay MAIN_DISPLAY_ID displayCtrl 44465);
  7893. if!(infiSTAR_LoadOutARRay isEqualTo [])then
  7894. {
  7895. {(findDisplay MAIN_DISPLAY_ID displayCtrl 44465) lbAdd _x;} forEach infiSTAR_LoadOutARRay;
  7896. (findDisplay MAIN_DISPLAY_ID displayCtrl 44465) lbAdd '';
  7897. };
  7898. if!(missionNameSpaceLoadouts isEqualTo [])then
  7899. {
  7900. {(findDisplay MAIN_DISPLAY_ID displayCtrl 44465) lbAdd _x;} forEach missionNameSpaceLoadouts;
  7901. (findDisplay MAIN_DISPLAY_ID displayCtrl 44465) lbAdd '';
  7902. };
  7903. };
  7904. call fnc_load_LoadOuts;
  7905.  
  7906. _ctrl = [_display,'RscEdit',44469] call fnc_createctrl;
  7907. _ctrl ctrlSetPosition [
  7908. 0.554062 * safezoneW + safezoneX,
  7909. 0.81+(ctrlPosition((findDisplay MAIN_DISPLAY_ID) displayCtrl 44465) select 3),
  7910. (ctrlPosition((findDisplay MAIN_DISPLAY_ID) displayCtrl 44465) select 2),
  7911. 0.033 * safezoneH
  7912. ];
  7913. _ctrl ctrlCommit 0;
  7914.  
  7915. _ctrl = [_display,'RSCButton',44466] call fnc_createctrl;
  7916. _ctrl ctrlSetText 'LOAD';
  7917. _ctrl ctrlSetPosition [
  7918. 0.68 * safezoneW + safezoneX,
  7919. 0.8,
  7920. 0.3,
  7921. 0.033 * safezoneH
  7922. ];
  7923. fnc_ButtonClick_44466 = {
  7924. _txt = lbtext[44465,(lbCurSel 44465)];
  7925. if(_txt != '')then
  7926. {
  7927. if(_txt in missionNameSpaceLoadouts)exitWith
  7928. {
  7929. _m = missionNameSpace getVariable _txt;
  7930. if((!isNil '_m')&&{(typeName _m == 'CODE')})then
  7931. {
  7932. call _m;
  7933. };
  7934. };
  7935.  
  7936. if(isNil'FNC_CUSTOM_fn_loadInventory')then
  7937. {
  7938. FNC_CUSTOM_fn_loadInventory = (preprocessfile 'A3\functions_f\Inventory\fn_loadInventory.sqf') call fnc_admin_c;
  7939. };
  7940. _fnc_scriptName='';[player, [profileNamespace, _txt]] call FNC_CUSTOM_fn_loadInventory;
  7941. _log = format['Loaded Loadout [%1]',_txt];
  7942. _log call fnc_adminLog;
  7943. };
  7944. };
  7945. _ctrl ctrlCommit 0;
  7946. _ctrl ctrlSetEventHandler['ButtonClick','call fnc_ButtonClick_44466'];
  7947.  
  7948. _ctrl = [_display,'RSCButton',44467] call fnc_createctrl;
  7949. _ctrl ctrlSetText 'DELETE';
  7950. _ctrl ctrlSetPosition [
  7951. 0.68 * safezoneW + safezoneX,
  7952. 0.8+((ctrlPosition((findDisplay MAIN_DISPLAY_ID) displayCtrl 44465) select 3)/2),
  7953. 0.3,
  7954. 0.033 * safezoneH
  7955. ];
  7956. fnc_ButtonClick_44467 = {
  7957. _txt = lbtext[44465,(lbCurSel 44465)];
  7958. if(_txt != '')then
  7959. {
  7960. if(_txt in infiSTAR_LoadOutARRay)then
  7961. {
  7962. _id = infiSTAR_LoadOutARRay find _txt;
  7963. if(_id == -1)exitWith{systemchat 'can not find Loadout';};
  7964. _return = infiSTAR_LoadOutARRay deleteAt _id;
  7965. systemchat format['Deleted Loadout: %1',_return];
  7966. profileNamespace setVariable['infiSTAR_LoadOutARRay',infiSTAR_LoadOutARRay];saveprofileNamespace;
  7967. _fnc_scriptName='';[player, [profileNamespace, _txt]] call BIS_fnc_deleteInventory;
  7968. }
  7969. else
  7970. {
  7971. _id = missionNameSpaceLoadouts find _txt;
  7972. if(_id == -1)exitWith{systemchat 'can not find Loadout';};
  7973. _return = missionNameSpaceLoadouts deleteAt _id;
  7974. systemchat format['Deleted Loadout: %1',_return];
  7975. };
  7976. };
  7977. call fnc_load_LoadOuts;
  7978. };
  7979. _ctrl ctrlCommit 0;
  7980. _ctrl ctrlSetEventHandler['ButtonClick','call fnc_ButtonClick_44467'];
  7981.  
  7982. _ctrl = [_display,'RSCButton',44468] call fnc_createctrl;
  7983. _ctrl ctrlSetPosition [
  7984. 0.68 * safezoneW + safezoneX,
  7985. 0.8+(ctrlPosition((findDisplay MAIN_DISPLAY_ID) displayCtrl 44465) select 3),
  7986. 0.3,
  7987. 0.033 * safezoneH
  7988. ];
  7989. fnc_ButtonClick_44468 = {
  7990. _txt = ctrlText 44469;
  7991. if(_txt == '')exitWith{systemchat 'Type a Loadout name to save!';};
  7992. if(count _txt > 30)exitWith{systemchat 'Loadout name should have max 30 characters!';};
  7993. call fnc_get_selected_object;
  7994. if(isNull SELECTED_TARGET_PLAYER)exitWith{systemchat 'Player selected is NULL-OBJECT';};
  7995.  
  7996. _exit = false;
  7997. {if(toUpper _txt isEqualTo toUpper _x)exitWith{_exit=true};} forEach missionNameSpaceLoadouts;
  7998. if(_exit)exitWith{systemchat 'can not overwrite missionNameSpaceLoadouts Admin Loadouts';};
  7999.  
  8000. _index = infiSTAR_LoadOutARRay pushBackUnique _txt;
  8001. if(_index > -1)then
  8002. {
  8003. profileNamespace setVariable['infiSTAR_LoadOutARRay',infiSTAR_LoadOutARRay];saveprofileNamespace;
  8004. };
  8005. _fnc_scriptName='';[SELECTED_TARGET_PLAYER, [profileNamespace, _txt]] call BIS_fnc_saveInventory;
  8006. call fnc_load_LoadOuts;
  8007. };
  8008. _ctrl ctrlSetEventHandler['ButtonClick','call fnc_ButtonClick_44468'];
  8009. _ctrl ctrlSetText 'SAVE FROM SELECTED';
  8010. _ctrl ctrlCommit 0;
  8011.  
  8012. _ctrl = [_display,'RSCButton',44471] call fnc_createctrl;
  8013. _ctrl ctrlSetPosition [
  8014. 0.81 * safezoneW + safezoneX,
  8015. 0.8+((ctrlPosition((findDisplay MAIN_DISPLAY_ID) displayCtrl 44465) select 3)/2),
  8016. 0.3,
  8017. 0.033 * safezoneH
  8018. ];
  8019. fnc_ButtonClick_44471 = {
  8020. call fnc_get_selected_object;
  8021. _export = player call fnc_cloneGear;
  8022. [_export,SELECTED_TARGET_PLAYER] call admin_d0_target;
  8023.  
  8024. _log = format['Cloned Gear on %1(%2)!',name SELECTED_TARGET_PLAYER,getPlayerUID SELECTED_TARGET_PLAYER];
  8025. _log call FN_SHOW_LOG;
  8026. _log call fnc_adminLog;
  8027. };
  8028. _ctrl ctrlSetEventHandler['ButtonClick','call fnc_ButtonClick_44471'];
  8029. _ctrl ctrlSetText 'CLONE ON SELECTED';
  8030. _ctrl ctrlCommit 0;
  8031.  
  8032. _ctrl = [_display,'RSCButton',44472] call fnc_createctrl;
  8033. _ctrl ctrlSetPosition [
  8034. 0.81 * safezoneW + safezoneX,
  8035. 0.8,
  8036. 0.3,
  8037. 0.033 * safezoneH
  8038. ];
  8039. fnc_ButtonClick_44472 = {
  8040. call fnc_get_selected_object;
  8041. _export = SELECTED_TARGET_PLAYER call fnc_cloneGear;
  8042. _export call fnc_admin_cc;
  8043.  
  8044. _log = format['Cloned Gear of %1(%2) on yourself!',name SELECTED_TARGET_PLAYER,getPlayerUID SELECTED_TARGET_PLAYER];
  8045. _log call FN_SHOW_LOG;
  8046. _log call fnc_adminLog;
  8047. };
  8048. _ctrl ctrlSetEventHandler['ButtonClick','call fnc_ButtonClick_44472'];
  8049. _ctrl ctrlSetText 'CLONE FROM SELECTED';
  8050. _ctrl ctrlCommit 0;
  8051.  
  8052. _ctrl = [_display,'RSCText',44463] call fnc_createctrl;
  8053. _ctrl ctrlSetPosition [
  8054. 0.677 * safezoneW + safezoneX,
  8055. 0.75,
  8056. 0.2 * safezoneW,
  8057. 0.03 * safezoneH
  8058. ];
  8059. _ctrl ctrlSetText format['SELECTED TARGET: %1',call fnc_get_selected_object];
  8060. _ctrl ctrlCommit 0;
  8061. };
  8062. fnc_WeatherLord = {
  8063. disableSerialization;
  8064. _display = findDisplay MAIN_DISPLAY_ID;
  8065.  
  8066. _text1 = [_display,'RSCText',33300] call fnc_createctrl;
  8067. _text1 ctrlSetPosition [
  8068. 0.55 * safezoneW + safezoneX,
  8069. 0.3,
  8070. 0.2 * safezoneW,
  8071. 0.03 * safezoneH
  8072. ];
  8073. _text1 ctrlSetText 'Fog:';
  8074. _text1 ctrlCommit 0;
  8075.  
  8076. _slider1 = [_display,'RscXSliderH',33301] call fnc_createctrl;
  8077. _slider1 ctrlSetPosition [
  8078. 0.554 * safezoneW + safezoneX,
  8079. 0.35
  8080. ];
  8081. _slider1 ctrlSetBackgroundColor [0.15,0.15,0.15,1];
  8082. slider_fog_changed = {
  8083. SET_FOG_VALUE = (_this select 1)/10;
  8084. 0 setFog SET_FOG_VALUE;
  8085. };
  8086. _slider1 ctrlRemoveAllEventHandlers 'SliderPosChanged';
  8087. _slider1 ctrlAddEventHandler ['SliderPosChanged','call slider_fog_changed'];
  8088. _slider1 ctrlCommit 0;
  8089.  
  8090. _text2 = [_display,'RSCText',33302] call fnc_createctrl;
  8091. _text2 ctrlSetPosition [
  8092. 0.55 * safezoneW + safezoneX,
  8093. 0.4,
  8094. 0.2 * safezoneW,
  8095. 0.03 * safezoneH
  8096. ];
  8097. _text2 ctrlSetText 'Overcast:';
  8098. _text2 ctrlCommit 0;
  8099.  
  8100. _slider2 = [_display,'RscXSliderH',33303] call fnc_createctrl;
  8101. _slider2 ctrlSetPosition [
  8102. 0.554 * safezoneW + safezoneX,
  8103. 0.45
  8104. ];
  8105. _slider2 ctrlSetBackgroundColor [0.15,0.15,0.15,1];
  8106. slider_overcast_changed = {
  8107. SET_OVERCAST_VALUE = (_this select 1)/10;
  8108. 0 setOvercast SET_OVERCAST_VALUE;
  8109. };
  8110. _slider2 ctrlRemoveAllEventHandlers 'SliderPosChanged';
  8111. _slider2 ctrlAddEventHandler ['SliderPosChanged','call slider_overcast_changed'];
  8112. _slider2 ctrlCommit 0;
  8113.  
  8114. _text3 = [_display,'RSCText',33304] call fnc_createctrl;
  8115. _text3 ctrlSetPosition [
  8116. 0.55 * safezoneW + safezoneX,
  8117. 0.5,
  8118. 0.2 * safezoneW,
  8119. 0.03 * safezoneH
  8120. ];
  8121. _text3 ctrlSetText 'Rain:';
  8122. _text3 ctrlCommit 0;
  8123.  
  8124. _slider3 = [_display,'RscXSliderH',33305] call fnc_createctrl;
  8125. _slider3 ctrlSetPosition [
  8126. 0.554 * safezoneW + safezoneX,
  8127. 0.55
  8128. ];
  8129. _slider3 ctrlSetBackgroundColor [0.15,0.15,0.15,1];
  8130. slider_rain_changed = {
  8131. SET_RAIN_VALUE = (_this select 1)/10;
  8132. if(SET_RAIN_VALUE > 0.3)then{if(overcast < 0.75)then{SET_OVERCAST_VALUE = 0.75;};};
  8133. 0 setRain SET_RAIN_VALUE;
  8134. };
  8135. _slider3 ctrlRemoveAllEventHandlers 'SliderPosChanged';
  8136. _slider3 ctrlAddEventHandler ['SliderPosChanged','call slider_rain_changed'];
  8137. _slider3 ctrlCommit 0;
  8138.  
  8139. _btn1 = [_display,'RSCButton',33400] call fnc_createctrl;
  8140. _btn1 ctrlSetText 'CHANGE GLOBAL';
  8141. _btn1 ctrlSetPosition [
  8142. 0.554 * safezoneW + safezoneX,
  8143. 0.6,
  8144. 0.3,
  8145. 0.033 * safezoneH
  8146. ];
  8147. _btn1 ctrlCommit 0;
  8148. _btn1 ctrlSetEventHandler['ButtonClick','[16,SET_FOG_VALUE,SET_OVERCAST_VALUE,SET_RAIN_VALUE] call fnc_AdminReq;'];
  8149.  
  8150. SET_FOG_VALUE = fog;
  8151. SET_OVERCAST_VALUE = overcast;
  8152. SET_RAIN_VALUE = rain;
  8153. if(!isNil'fnc_WeatherLordTHREAD')then{terminate fnc_WeatherLordTHREAD;};
  8154. fnc_WeatherLordTHREAD = [] spawn {
  8155. disableSerialization;
  8156. _slider1 = (findDisplay MAIN_DISPLAY_ID displayCtrl 33301);
  8157. _slider2 = (findDisplay MAIN_DISPLAY_ID displayCtrl 33303);
  8158. _slider3 = (findDisplay MAIN_DISPLAY_ID displayCtrl 33305);
  8159. if(isNil'SET_FOG_VALUE')then{SET_FOG_VALUE=fog};
  8160. if(isNil'SET_OVERCAST_VALUE')then{SET_OVERCAST_VALUE=overcast};
  8161. if(isNil'SET_RAIN_VALUE')then{SET_RAIN_VALUE=rain};
  8162. while {!isNull findDisplay MAIN_DISPLAY_ID} do
  8163. {
  8164. _fog = SET_FOG_VALUE;
  8165. if(_fog > 0)then{_fog=_fog*10;};
  8166. _slider1 sliderSetPosition _fog;
  8167. 0 setFog SET_FOG_VALUE;
  8168.  
  8169. _overcast = SET_OVERCAST_VALUE;
  8170. if(_overcast > 0)then{_overcast=_overcast*10;};
  8171. _slider2 sliderSetPosition _overcast;
  8172. 0 setOvercast SET_OVERCAST_VALUE;
  8173.  
  8174. _rain = SET_RAIN_VALUE;
  8175. if(_rain > 0)then{_rain=_rain*10;};
  8176. _slider3 sliderSetPosition _rain;
  8177. 0 setRain SET_RAIN_VALUE;
  8178.  
  8179. uiSleep 0.1;
  8180. };
  8181. };
  8182. };
  8183. fnc_reallyAdditem = {
  8184. params[['_target',player],['_class','']];
  8185. if(_class == '')exitWith{systemChat 'No Item selected!';};
  8186.  
  8187. if(local _target)then
  8188. {
  8189. _added = [_target, _class] call ExileClient_util_playerEquipment_add;
  8190. if(!_added)then
  8191. {
  8192. _itemInformation = [_class] call BIS_fnc_itemType;
  8193. _itemCategory = _itemInformation select 0;
  8194. _itemType = _itemInformation select 1;
  8195. if(_itemCategory isEqualTo 'Magazine')then
  8196. {
  8197. _target addMagazine _class;
  8198. }
  8199. else
  8200. {
  8201. if(_itemCategory isEqualTo 'Weapon')then
  8202. {
  8203. _target addWeapon _class;
  8204. }
  8205. else
  8206. {
  8207. _target addItem _class;
  8208. };
  8209. };
  8210. };
  8211. }
  8212. else
  8213. {
  8214. _toserver = '
  8215. _target = (objectFromNetId '+str (netId _target)+');
  8216. _class = '+str _class+';
  8217.  
  8218. _driver = driver _target;
  8219. if(isPlayer _driver)then
  8220. {
  8221. _target setOwner (owner _driver);
  8222. }
  8223. else
  8224. {
  8225. _crew = crew _target;
  8226. if!(_crew isEqualTo [])then
  8227. {
  8228. {
  8229. if(isPlayer _x)exitWith
  8230. {
  8231. _target setOwner (owner _x);
  8232. };
  8233. } forEach _crew;
  8234. };
  8235. };
  8236.  
  8237. _owner = owner _target;
  8238. _code = {
  8239. params[''_target'',''_class''];
  8240. _added = [_target, _class] call ExileClient_util_playerEquipment_add;
  8241. if(!_added)then
  8242. {
  8243. _itemInformation = [_class] call BIS_fnc_itemType;
  8244. _itemCategory = _itemInformation select 0;
  8245. _itemType = _itemInformation select 1;
  8246. if(_itemCategory isEqualTo ''Magazine'')then
  8247. {
  8248. _target addMagazine _class;
  8249. }
  8250. else
  8251. {
  8252. if(_itemCategory isEqualTo ''Weapon'')then
  8253. {
  8254. _target addWeapon _class;
  8255. }
  8256. else
  8257. {
  8258. _target addItem _class;
  8259. };
  8260. };
  8261. };
  8262. };
  8263. [[_target,_class],_code,_owner,false] call FN_infiSTAR_S;
  8264. ';
  8265. [_toserver] call admin_d0_server;
  8266. };
  8267. };
  8268. fnc_HTML_LOAD = {
  8269. _html = uiNamespace getVariable 'RscHTML_infiSTAR_Admin';
  8270. if(ctrlHTMLLoaded _html)exitWith{_html ctrlEnable true;_html ctrlShow true;};
  8271.  
  8272. [
  8273. '',
  8274. {
  8275. if(!isNil'START_LOADING_HTML')then{terminate START_LOADING_HTML;START_LOADING_HTML=nil;};
  8276. START_LOADING_HTML = [] spawn {
  8277. disableSerialization;
  8278. _html = uiNamespace getVariable 'RscHTML_infiSTAR_Admin';
  8279. _html htmlLoad HTML_LOAD_URL_EXILE;
  8280. _start = diag_tickTime + .2;
  8281. waitUntil {diag_tickTime > _start};
  8282. if(!ctrlHTMLLoaded _html)exitWith{_html ctrlEnable false;_html ctrlShow false;};
  8283. };
  8284. }
  8285. ] execFSM 'call.fsm';
  8286. };
  8287. fnc_FULLinit = {
  8288. disableSerialization;
  8289. if(isNull findDisplay MAIN_DISPLAY_ID)then
  8290. {
  8291. createdialog 'infiSTAR_AdminMenu';
  8292. call fnc_initOnceOnOpen;
  8293. };
  8294. call fnc_initOnKeyPress;
  8295. };
  8296. fnc_btn_html = {
  8297. infiSTAR_HTML_LOAD = !infiSTAR_HTML_LOAD;
  8298. if(infiSTAR_HTML_LOAD)then{call fnc_HTML_LOAD;};
  8299. [] call fnc_colorButtons;
  8300. };
  8301. fnc_initOnceOnOpen = {
  8302. _display = findDisplay MAIN_DISPLAY_ID;
  8303.  
  8304. _btn = [_display,'RSCButton',1338001] call fnc_createctrl;
  8305. _btn ctrlSetText 'SAVE TOGGLE STATE';
  8306. _btn ctrlSetPosition [
  8307. 0.39 * safezoneW + safezoneX + (0.15 * safezoneW),
  8308. 0.0379694 * safezoneH + safezoneY,
  8309. 0.12 * safezoneW,
  8310. 0.02 * safezoneH
  8311. ];
  8312. _btn buttonSetAction '
  8313. profileNamespace setVariable [''infiSTAR_saveToggle'',infiSTAR_toggled_A];
  8314. saveprofileNamespace;
  8315. _log = ''Saved currently toggled/enabled admin functions. Next time you login as admin, they will automatically turn on.'';
  8316. _log call FN_SHOW_LOG;
  8317. systemChat (''<infiSTAR.de> ''+_log);
  8318. ';
  8319. _btn ctrlCommit 0;
  8320.  
  8321. if(infiSTAR_HTML_LOAD)then{call fnc_HTML_LOAD;};
  8322. };
  8323. fnc_initOnKeyPress = {
  8324. if!(FILLMAINSTATE in [1,2])then{FILLMAINSTATE = 0;};
  8325. _display = findDisplay MAIN_DISPLAY_ID;
  8326.  
  8327. _ctrlL = _display displayCtrl LEFT_SHIFT_ID;
  8328. _ctrlL ctrlRemoveAllEventHandlers 'LBDblClick';
  8329. _ctrlL ctrlRemoveAllEventHandlers 'LBSelChanged';
  8330. _ctrlL ctrlAddEventHandler ['LBDblClick', 'call fnc_LBDblClick_LEFT;[] call fnc_setFocus;'];
  8331. _ctrlL ctrlAddEventHandler ['LBSelChanged', 'call fnc_LBSelChanged_LEFT;[] call fnc_setFocus;'];
  8332. [] call fnc_fill_infiSTAR_Player;
  8333.  
  8334. _ctrlR = _display displayCtrl RIGHT_SHIFT_ID;
  8335. _ctrlR ctrlRemoveAllEventHandlers 'LBDblClick';
  8336. _ctrlR ctrlRemoveAllEventHandlers 'LBSelChanged';
  8337. _ctrlR ctrlAddEventHandler ['LBDblClick', 'call fnc_LBDblClick_RIGHT;[] call fnc_setFocus;'];
  8338. _ctrlR ctrlAddEventHandler ['LBSelChanged', 'call fnc_LBSelChanged_RIGHT;[] call fnc_setFocus;'];
  8339. [] call fnc_fill_infiSTAR_MAIN;
  8340.  
  8341. _ctrl = _display displayCtrl 2;
  8342. _ctrl ctrlSetText format['Players loaded in: %1 of %2 SERVER UPTIME: %3 SERVER FPS: %4 SERVER THREADS: %5 infiSTAR.de Admin Menu %6',count playableUnits,((playersNumber west)+(playersNumber east)+(playersNumber civilian)+(playersNumber resistance)),call GET_TIME_TIME,SERVER_FPS,SERVER_THREADS,INFISTARVERSION];
  8343.  
  8344. _btnMainMenu = _display displayCtrl 20;
  8345. _btnMainMenu buttonSetAction 'FILLMAINSTATE=0;[] call fnc_fill_infiSTAR_MAIN;[] call fnc_setFocus;[] call fnc_colorButtons;';
  8346.  
  8347. _btnSpawnMenu = _display displayCtrl 21;
  8348. _btnSpawnMenu buttonSetAction 'FILLMAINSTATE=1;[] call fnc_fill_infiSTAR_MAIN;[] call fnc_setFocus;[] call fnc_colorButtons;';
  8349.  
  8350. if('==== Loadouts ====' call ADMINLEVELACCESS)then{call fnc_Loadoutmenu;};
  8351. if('==== WeatherLord ====' call ADMINLEVELACCESS)then{call fnc_WeatherLord;};
  8352.  
  8353. call fnc_SearchFieldButtons;
  8354. [] call fnc_setFocus;
  8355. [] call fnc_colorButtons;
  8356. };
  8357. fnc_colorizeMain = {
  8358. disableSerialization;
  8359. _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_SHIFT_ID;
  8360. _lsize = lbSize RIGHT_SHIFT_ID;
  8361. for '_i' from 0 to _lsize do
  8362. {
  8363. _lbtxt = lbtext [RIGHT_SHIFT_ID,_i];
  8364. if(_lbtxt in (infiSTAR_Toggleable+infiSTAR_CUSTOM_Toggleable))then
  8365. {
  8366. if(_lbtxt in infiSTAR_toggled_A)then
  8367. {
  8368. _ctrl lbSetColor [_i,[0,1,0,1]];
  8369. }
  8370. else
  8371. {
  8372. _ctrl lbSetColor [_i,[1,0,0,1]];
  8373. };
  8374. };
  8375. if(_lbtxt in infiSTAR_SubMenus)then
  8376. {
  8377. _ctrl lbSetColor [_i,[0.67,0.97,0.97,1]];
  8378. };
  8379. if(_lbtxt in infiSTAR_OnTargetNICE)then
  8380. {
  8381. _ctrl lbSetColor [_i,[0,0.8,1,1]];
  8382. };
  8383. if(_lbtxt in infiSTAR_OnTargetEVIL)then
  8384. {
  8385. _ctrl lbSetColor [_i,[0.99,0.8,0.8,1]];
  8386. };
  8387. if(_lbtxt in infiSTAR_CUSTOM_OnTarget)then
  8388. {
  8389. _ctrl lbSetColor [_i,[0.78,0.66,0,1]];
  8390. };
  8391. };
  8392. };
  8393. fnc_colorButtons = {
  8394. call fnc_SearchFieldButtons;
  8395. disableSerialization;
  8396. _display = findDisplay MAIN_DISPLAY_ID;
  8397. _btnMainMenu = _display displayCtrl 20;
  8398. if(FILLMAINSTATE isEqualTo 0)then{_btnMainMenu ctrlSetTextColor [0,1,0,1];} else {_btnMainMenu ctrlSetTextColor [1,1,1,1];};
  8399. _btnSpawnMenu = _display displayCtrl 21;
  8400. if(FILLMAINSTATE isEqualTo 1)then{_btnSpawnMenu ctrlSetTextColor [0,1,0,1];} else {_btnSpawnMenu ctrlSetTextColor [1,1,1,1];};
  8401.  
  8402. _btnAntiHackLog = _display displayCtrl 23;
  8403. _btnAntiHackLog ctrlSetText (format['AHLogs: %1',count AH_HackLogArray + count AH_SurvLogArray + count PVAH_AHTMPBAN]);
  8404. _btnAntiHackLog buttonSetAction 'FILLMAINSTATE=3;[] call fnc_fill_HackLog;[] call fnc_setFocus;[] call fnc_colorButtons;';
  8405. if(FILLMAINSTATE isEqualTo 3)then{_btnAntiHackLog ctrlSetTextColor [0,1,0,1];} else {_btnAntiHackLog ctrlSetTextColor [1,1,1,1];};
  8406.  
  8407. _btnAdminLog = _display displayCtrl 24;
  8408. _btnAdminLog ctrlSetText (format['AdminLogs: %1',count AH_AdmiLogArray]);
  8409. _btnAdminLog buttonSetAction 'FILLMAINSTATE=4;[] call fnc_fill_AdminLog;[] call fnc_setFocus;[] call fnc_colorButtons;';
  8410. if(FILLMAINSTATE isEqualTo 4)then{_btnAdminLog ctrlSetTextColor [0,1,0,1];} else {_btnAdminLog ctrlSetTextColor [1,1,1,1];};
  8411.  
  8412. _btnItems = _display displayCtrl 36;
  8413. if((LASTSUBBUTTON isEqualTo 0)&&(FILLMAINSTATE isEqualTo 1))then
  8414. {
  8415. _btnItems ctrlSetTextColor [0,1,0,1];
  8416.  
  8417. _ctrlpos =
  8418. [
  8419. 0.2 * safezoneW + safezoneX,
  8420. 0.173 * safezoneH + safezoneY,
  8421. 0.15 * safezoneW,
  8422. 0.025 * safezoneH
  8423. ];
  8424.  
  8425. _RSCButton33401 = [_display,'RSCButton',33401] call fnc_createctrl;
  8426. _RSCButton33401 ctrlSetText 'INFRONT OF TARGET';
  8427. _RSCButton33401 ctrlSetPosition _ctrlpos;
  8428. _RSCButton33401 buttonSetAction 'BTN_GET_ITEM_SEL = 0;[] call fnc_colorButtons;';
  8429. _RSCButton33401 ctrlCommit 0;
  8430. _RSCButton33402 = [_display,'RSCButton',33402] call fnc_createctrl;
  8431. _RSCButton33402 ctrlSetText 'ON TARGET';
  8432. _RSCButton33402 ctrlSetPosition [((_ctrlpos select 0)+(_ctrlpos select 2))*1.2,_ctrlpos select 1,_ctrlpos select 2,_ctrlpos select 3];
  8433. _RSCButton33402 buttonSetAction 'BTN_GET_ITEM_SEL = 1;[] call fnc_colorButtons;';
  8434. _RSCButton33402 ctrlCommit 0;
  8435.  
  8436. if(BTN_GET_ITEM_SEL isEqualTo 0)then
  8437. {
  8438. _RSCButton33401 ctrlSetTextColor [0,1,0,1];
  8439. _RSCButton33402 ctrlSetTextColor [1,1,1,1];
  8440. }
  8441. else
  8442. {
  8443. _RSCButton33401 ctrlSetTextColor [1,1,1,1];
  8444. _RSCButton33402 ctrlSetTextColor [0,1,0,1];
  8445. };
  8446. }
  8447. else
  8448. {
  8449. _btnItems ctrlSetTextColor [1,1,1,1];
  8450.  
  8451. ctrlDelete (_display displayCtrl 33401);
  8452. ctrlDelete (_display displayCtrl 33402);
  8453. };
  8454. _btnVehs = _display displayCtrl 37;
  8455. if((LASTSUBBUTTON isEqualTo 1)&&(FILLMAINSTATE isEqualTo 1))then
  8456. {
  8457. _btnVehs ctrlSetTextColor [0,1,0,1];
  8458. if('Spawn Persistent Vehicles' call ADMINLEVELACCESS)then
  8459. {
  8460. _ctrlpos =
  8461. [
  8462. 0.2 * safezoneW + safezoneX,
  8463. 0.173 * safezoneH + safezoneY,
  8464. 0.15 * safezoneW,
  8465. 0.025 * safezoneH
  8466. ];
  8467.  
  8468. _RSCButton33401 = [_display,'RSCButton',33403] call fnc_createctrl;
  8469. _RSCButton33401 ctrlSetText 'NonPersistent';
  8470. _RSCButton33401 ctrlSetPosition _ctrlpos;
  8471. _RSCButton33401 buttonSetAction 'BTN_SPAWN_VEH_SEL = 0;[] call fnc_colorButtons;';
  8472. _RSCButton33401 ctrlCommit 0;
  8473. _RSCButton33402 = [_display,'RSCButton',33404] call fnc_createctrl;
  8474. _RSCButton33402 ctrlSetText 'Persistent';
  8475. _RSCButton33402 ctrlSetPosition [((_ctrlpos select 0)+(_ctrlpos select 2))*1.2,_ctrlpos select 1,_ctrlpos select 2,_ctrlpos select 3];
  8476. _RSCButton33402 buttonSetAction 'BTN_SPAWN_VEH_SEL = 1;[] call fnc_colorButtons;';
  8477. _RSCButton33402 ctrlEnable true;
  8478. _RSCButton33402 ctrlCommit 0;
  8479.  
  8480. if(BTN_SPAWN_VEH_SEL isEqualTo 0)then
  8481. {
  8482. _RSCButton33401 ctrlSetTextColor [0,1,0,1];
  8483. _RSCButton33402 ctrlSetTextColor [1,1,1,1];
  8484. }
  8485. else
  8486. {
  8487. _RSCButton33401 ctrlSetTextColor [1,1,1,1];
  8488. _RSCButton33402 ctrlSetTextColor [0,1,0,1];
  8489. };
  8490. };
  8491. }
  8492. else
  8493. {
  8494. _btnVehs ctrlSetTextColor [1,1,1,1];
  8495. if('Spawn Persistent Vehicles' call ADMINLEVELACCESS)then
  8496. {
  8497. ctrlDelete (_display displayCtrl 33403);
  8498. ctrlDelete (_display displayCtrl 33404);
  8499. };
  8500. };
  8501. _btnTrader = _display displayCtrl 38;
  8502. if(LASTSUBBUTTON isEqualTo 2)then{_btnTrader ctrlSetTextColor [0,1,0,1];} else {_btnTrader ctrlSetTextColor [1,1,1,1];};
  8503. _mytime = 0.3;
  8504. _ctrlR = _display displayCtrl RIGHT_SHIFT_ID;
  8505. if(isNil 'ctrlposR')then{ctrlposR = ctrlPosition _ctrlR;};
  8506. _ctrlRTMP = [(ctrlposR select 0),(ctrlposR select 1),(ctrlposR select 2)*2.35,(ctrlposR select 3)];
  8507. if(FILLMAINSTATE isEqualTo 0)then
  8508. {
  8509. _ctrlRTMP = ctrlposR;
  8510. };
  8511. if(FILLMAINSTATE isEqualTo 1)then
  8512. {
  8513. _ctrlRTMP = [(ctrlposR select 0),(ctrlposR select 1)+.25,(ctrlposR select 2),(ctrlposR select 3)-.25];
  8514. };
  8515. _ctrlR ctrlSetPosition _ctrlRTMP;
  8516. _ctrlR ctrlCommit _mytime;
  8517.  
  8518. _btnHTML = _display displayCtrl 25;
  8519. if(infiSTAR_HTML_LOAD)then{_btnHTML ctrlSetTextColor [1,0,0,1];_btnHTML ctrlSetText 'HIDE HTML';}else{_btnHTML ctrlSetTextColor [0,1,0,1];_btnHTML ctrlSetText 'SHOW HTML';};
  8520. (uiNamespace getVariable 'RscHTML_infiSTAR_Admin') ctrlEnable infiSTAR_HTML_LOAD;
  8521. (uiNamespace getVariable 'RscHTML_infiSTAR_Admin') ctrlShow infiSTAR_HTML_LOAD;
  8522. };
  8523. fnc_fill_HackLog = {
  8524. disableSerialization;
  8525. _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_SHIFT_ID;
  8526. lbclear _ctrl;
  8527. _ctrl lbAdd 'clear ingame HackLog';
  8528. _ctrl lbAdd 'DBL-CLICK TO SYSTEMCHAT';
  8529. _ctrl lbAdd '--------------------';
  8530.  
  8531. _cnt = count AH_HackLogArray;
  8532. _ctrl lbAdd format['HackLog: %1',_cnt];
  8533. for '_i' from (_cnt - 1) to 0 step -1 do
  8534. {
  8535. _ctrl lbAdd (AH_HackLogArray select _i);
  8536. };
  8537.  
  8538. _ctrl lbAdd '';
  8539. _cnt = count AH_SurvLogArray;
  8540. _ctrl lbAdd format['SurveillanceLog: %1',_cnt];
  8541. for '_i' from (_cnt - 1) to 0 step -1 do
  8542. {
  8543. _ctrl lbAdd (AH_SurvLogArray select _i);
  8544. };
  8545.  
  8546. _ctrl lbAdd '';
  8547. _ctrl lbAdd format['BanLog: %1',count PVAH_AHTMPBAN];
  8548. if(str PVAH_AHTMPBAN != '[]')then
  8549. {
  8550. _ctrl lbAdd 'DBL-CLICK TO REMOVE';
  8551. {_ctrl lbAdd _x;} forEach PVAH_AHTMPBAN;
  8552. };
  8553. for '_i' from 0 to 12 do {_ctrl lbAdd '';};
  8554. };
  8555. fnc_fill_AdminLog = {
  8556. disableSerialization;
  8557. _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_SHIFT_ID;
  8558. lbclear _ctrl;
  8559. if('AdminLog' call ADMINLEVELACCESS)then
  8560. {
  8561. _ctrl lbAdd 'clear ingame AdminLog';
  8562. _ctrl lbAdd 'DBL-CLICK TO SYSTEMCHAT';
  8563. {_ctrl lbAdd _x;} forEach AH_AdmiLogArray;
  8564. }
  8565. else
  8566. {
  8567. _ctrl lbAdd 'Nothin to see here';
  8568. };
  8569. for '_i' from 0 to 12 do {_ctrl lbAdd '';};
  8570. };
  8571. infiSTAR_SubMenus =
  8572. [
  8573. '==== Vehicles ====','==== OnTarget ====','==== Toggleable ====','==== Custom Functions ===='
  8574. ];
  8575. infiSTAR_SubMenus append newAllItems_CATEGORY;
  8576. infiSTAR_OnTargetNICE =
  8577. [
  8578. 'Teleport - Target To Me','Teleport - Me To Target',
  8579. 'Request Steam Name','Revive','Heal','Restore','Flip Vehicle',
  8580. 'Move In My Vehicle','Move In Target Vehicle','Remove Unconscious',
  8581. 'UnFreeze','UnRestrain',
  8582. 'Change Money on Player','Change Money on Bank','Change Respect'
  8583. ];
  8584. infiSTAR_OnTargetEVIL =
  8585. [
  8586. 'Restrain','Freeze',
  8587. 'Remove Gear','Kill','Light','Explode','Delete Vehicle','Eject','Eject Crew','Unconscious',
  8588. 'Force Disconnect','Kick (Silent)','Kick (Announce)',
  8589. 'Ban (Silent)','Ban (Announce)','TempBan (Silent)','TempBan (Announce)'
  8590. ];
  8591. infiSTAR_OnTarget = infiSTAR_OnTargetNICE + infiSTAR_OnTargetEVIL;
  8592. infiSTAR_Toggleable =
  8593. [
  8594. 'Player ESP','Player ESP (safezone style)','Player ESP Old','AI ESP','Dead ESP','Loot ESP',
  8595. 'MapIcons','Vehicle Marker','Flag Marker (with radius)','DeadPlayer Marker','Stealth / Invisible',
  8596. 'God Mode','God Mode (no stats change)','Vehicle God Mode','Vehboost','UnlimAmmo','noRecoil','FastFire','Lower Terrain',
  8597. 'Disable Announces','Teleport In Facing Direction (10m steps)','Show Server Information'
  8598. ];
  8599. fnc_fill_infiSTAR_MAIN = {
  8600. disableSerialization;
  8601. _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_SHIFT_ID;
  8602. lbclear _ctrl;
  8603. if(FILLMAINSTATE == 1)then
  8604. {
  8605. switch (LASTSUBBUTTON) do {
  8606. case 0:{
  8607. if('Items spawn menu' call ADMINLEVELACCESS)then
  8608. {
  8609. {
  8610. _category = _x;
  8611. _ctrl lbAdd _category;
  8612.  
  8613. _varstate = missionNameSpace getVariable (_category+'SHOW_STATE');
  8614. if(!isNil '_varstate')then
  8615. {
  8616. _variable = missionNameSpace getVariable (_category+'_ARRAY');
  8617. {
  8618. _displayName = getText(configFile >> 'CfgWeapons' >> _x >> 'displayName');
  8619. if(_displayName isEqualTo '')then{_displayName = getText(configFile >> 'CfgMagazines' >> _x >> 'displayName');};
  8620. if(_displayName isEqualTo '')then{_displayName = getText(configFile >> 'CfgVehicles' >> _x >> 'displayName');};
  8621.  
  8622. _lbid = _ctrl lbAdd format['%1 (%2)',_displayName,_x];
  8623. _ctrl lbSetData [_lbid,_x];
  8624. _x call fnc_addpic;
  8625. } forEach _variable;
  8626. };
  8627.  
  8628. } forEach newAllItems_CATEGORY;
  8629. for '_i' from 0 to 12 do {_ctrl lbAdd '';};
  8630. };
  8631. };
  8632. case 1:{
  8633. if(('Spawn Vehicles' call ADMINLEVELACCESS) || ('Spawn Persistent Vehicles' call ADMINLEVELACCESS))then
  8634. {
  8635. _ctrl lbAdd '==== Vehicles ====';
  8636. if(!isNil 'infiSTAR_add_vehicles')then
  8637. {
  8638. _lbid = _ctrl lbAdd 'Exile vehicles:';
  8639. _ctrl lbSetColor [_lbid, [0,1,0,1]];
  8640. {
  8641. _lbid = _ctrl lbAdd format['%1 (%2)',getText(configFile >> 'CfgVehicles' >> _x >> 'displayName'),_x];
  8642. _ctrl lbSetData [_lbid,_x];
  8643. _x call fnc_addpic;
  8644. _ctrl lbSetColor [_lbid, [0,1,0,1]];
  8645. } forEach ALL_VEHS_TO_SEARCH_C_EXILE;
  8646.  
  8647. _ctrl lbAdd '';
  8648. _ctrl lbAdd 'Other vehicles:';
  8649. {
  8650. _lbid = _ctrl lbAdd format['%1 (%2)',getText(configFile >> 'CfgVehicles' >> _x >> 'displayName'),_x];
  8651. _ctrl lbSetData [_lbid,_x];
  8652. _x call fnc_addpic;
  8653. } forEach ALL_VEHS_TO_SEARCH_C_OTHER;
  8654. };
  8655. };
  8656. for '_i' from 0 to 12 do {_ctrl lbAdd '';};
  8657. };
  8658. case 2:{
  8659. _lbid = _ctrl lbAdd '!!! ATTENTION !!!';_ctrl lbSetData [_lbid,'-1337'];
  8660. _lbid = _ctrl lbAdd 'Trader menus might be a bit buggy.';_ctrl lbSetData [_lbid,'-1337'];
  8661. {
  8662. _lbid = _ctrl lbAdd (_x select 0);
  8663. if(count _x isEqualTo 1)then{_ctrl lbSetData [_lbid,'-1337'];}else{_ctrl lbSetData [_lbid,str _forEachIndex];};
  8664. } forEach TRADER_FUNCTION_ARRAY;
  8665. };
  8666. default {lbclear _ctrl;};
  8667. };
  8668. };
  8669. if(FILLMAINSTATE == 0)then
  8670. {
  8671. _onTarget = [];
  8672. {if(_x call ADMINLEVELACCESS)then{_onTarget pushBack _x;};} forEach infiSTAR_OnTargetNICE;
  8673.  
  8674. if!(_onTarget isEqualTo [])then{_onTarget pushBack '---';};
  8675. {if(_x call ADMINLEVELACCESS)then{_onTarget pushBack _x;};} forEach infiSTAR_OnTargetEVIL;
  8676. if!(_onTarget isEqualTo [])then
  8677. {
  8678. _ctrl lbAdd '==== OnTarget ====';
  8679. if(isNil 'infiSTAR_add_OnTarget')then
  8680. {
  8681. {_ctrl lbAdd _x;} forEach _onTarget;
  8682. };
  8683. };
  8684.  
  8685.  
  8686. _Toggleable = [];
  8687. {if(_x call ADMINLEVELACCESS)then{_Toggleable pushBack _x;};} forEach infiSTAR_Toggleable;
  8688. if!(_Toggleable isEqualTo [])then
  8689. {
  8690. _ctrl lbAdd '==== Toggleable ====';
  8691. if(isNil 'infiSTAR_add_Toggleable')then
  8692. {
  8693. {_ctrl lbAdd _x;} forEach _Toggleable;
  8694. };
  8695. };
  8696.  
  8697. if('Spawn Ammo' call ADMINLEVELACCESS)then{_ctrl lbAdd 'Spawn Ammo';};
  8698. if('Change ViewDistance' call ADMINLEVELACCESS)then{_ctrl lbAdd 'Change ViewDistance';};
  8699. if('FreeRoam Cam (does not work with ESP)' call ADMINLEVELACCESS)then{_ctrl lbAdd 'FreeRoam Cam (does not work with ESP)'};
  8700. if('BIS FreeRoam Cam (works with ESP)' call ADMINLEVELACCESS)then{_ctrl lbAdd 'BIS FreeRoam Cam (works with ESP)'};
  8701.  
  8702. if('Spawn Support-Boxes' call ADMINLEVELACCESS)then
  8703. {
  8704. _ctrl lbAdd '';
  8705. {
  8706. _ctrl lbAdd _x;
  8707. } forEach allSupportBoxesNames;
  8708. };
  8709.  
  8710. if('Create Billboard' call ADMINLEVELACCESS)then
  8711. {
  8712. _ctrl lbAdd '';
  8713. {
  8714. _index = _ctrl lbAdd format['Create Billboard: %1',_x select 0];
  8715. } forEach pathToCustomBillBoardTextures;
  8716. };
  8717.  
  8718. _ctrl lbAdd '';
  8719. if('Copy Worldspace(coords) to RPT & Chat' call ADMINLEVELACCESS)then{_ctrl lbAdd 'Copy Worldspace(coords) to RPT & Chat';};
  8720. if('Mass Message' call ADMINLEVELACCESS)then{_ctrl lbAdd 'Mass Message';};
  8721. if('Change Time' call ADMINLEVELACCESS)then{_ctrl lbAdd 'Day'};
  8722. if('Change Time' call ADMINLEVELACCESS)then{_ctrl lbAdd 'Night'};
  8723. if('AdminConsole' call ADMINLEVELACCESS)then{_ctrl lbAdd 'AdminConsole';};
  8724. if('DebugConsole' call ADMINLEVELACCESS)then{_ctrl lbAdd 'DebugConsole';};
  8725. if('Login as Arma Admin' call ADMINLEVELACCESS)then
  8726. {
  8727. if(isNil 'serverCommandLoginDone')then{_ctrl lbAdd 'Login';};
  8728. if(serverCommandAvailable '#logout')then
  8729. {
  8730. _target = lbtext[LEFT_SHIFT_ID,(lbCurSel LEFT_SHIFT_ID)];
  8731. _ctrl lbAdd format['#kick %1',_target];
  8732. _ctrl lbAdd format['#exec ban %1',str _target];
  8733. };
  8734. };
  8735.  
  8736. _ctrl lbAdd '';
  8737. _ctrl lbAdd 'Self Disconnect';
  8738. _ctrl lbAdd '';
  8739.  
  8740. if('==== Base Deleter ====' call ADMINLEVELACCESS)then
  8741. {
  8742. _index = _ctrl lbAdd '==== Base Deleter ====';
  8743. _ctrl lbSetColor [_index, [0.2,0.4,1,1]];
  8744. if(isNil 'infiSTAR_add_BaseDeleter')then
  8745. {
  8746. _ctrl lbAdd 'BD: Set Center';
  8747. if(!isNil 'CCGbdCenter')then{
  8748. _ctrl lbAdd 'BD: Set Radius';
  8749. };
  8750. if(!isNil 'CCGbdCenter' && !isNil 'CCGbdRadius')then{
  8751. _ctrl lbAdd '';
  8752. _objects = call CCG_fnc_bdGetObjectsToDelete;
  8753. _ctrl lbAdd format['BD: Selected %1 Objects', count _objects];
  8754. _index = _ctrl lbAdd 'BD: Delete Base';
  8755. _ctrl lbSetColor [_index, [0.8,0,0,1]];
  8756.  
  8757. _ctrl lbAdd '';
  8758.  
  8759. _objects = call CCG_fnc_bdGetWeaponHoldersToDelete;
  8760. _ctrl lbAdd format['BD: Selected %1 WeaponHolder', count _objects];
  8761. _index = _ctrl lbAdd 'BD: Delete Weaponholder';
  8762. _ctrl lbSetColor [_index, [0.8,0,0,1]];
  8763. _ctrl lbAdd '';
  8764. };
  8765. _ctrl lbAdd 'BD: Cancel / Remove';
  8766. _ctrl lbAdd '';
  8767. };
  8768. };
  8769.  
  8770. if(!isNil'infiSTAR_customFunctions')then
  8771. {
  8772. _customFunctions = [];
  8773. {if((_x select 1) call ADMINLEVELACCESS)then{_customFunctions pushBack (_x select 1);};} forEach infiSTAR_customFunctions;
  8774. if!(_customFunctions isEqualTo [])then
  8775. {
  8776.  
  8777. _ctrl lbAdd '==== Custom Functions ====';
  8778. if(isNil 'infiSTAR_add_customFunctions')then
  8779. {
  8780. {_ctrl lbAdd _x;} forEach _customFunctions;
  8781. };
  8782. };
  8783. };
  8784.  
  8785. _ctrl lbAdd '';
  8786. _ctrl lbAdd 'Keybinds:';
  8787. _ctrl lbAdd 'F1 - Default AdminMenu Key';
  8788. _ctrl lbAdd 'F3 - Adminconsole / Debug Console';
  8789. _ctrl lbAdd 'F6 - Heal Yourself';
  8790. _ctrl lbAdd 'F7 - Heal & Repair withing 15m';
  8791. _ctrl lbAdd 'F8 - Flip CursorTarget Vehicle';
  8792. _ctrl lbAdd 'F9 - Show Gear of Player you are currently spectating (might close if player moves)';
  8793. _ctrl lbAdd 'F10 - Stop Spectating';
  8794. _ctrl lbAdd 'F11 - Add Ammo for current weapon';
  8795. _ctrl lbAdd 'CTRL & 1 - Light / Zeus';
  8796. _ctrl lbAdd 'SHIFT & 4 - Fly Up';
  8797. _ctrl lbAdd 'SHIFT & 5 - Teleport in looking direction (if enabled)';
  8798. _ctrl lbAdd '7 - Unlock/Lock targeted Vehicle';
  8799. _ctrl lbAdd 'SHIFT & F2 - configviewer';
  8800. _ctrl lbAdd 'SHIFT & TAB - Open Map';
  8801. _ctrl lbAdd 'SHIFT & I - Show Info (Like Codes of Vehicles and Doors)';
  8802. _ctrl lbAdd 'DELETE - Delete CursorTarget';
  8803. _ctrl lbAdd 'ON MAP - LEFT-ALT + CLICK To Teleport';
  8804. _ctrl lbAdd 'TYPE !admin in Chat to relog as player/admin';
  8805. };
  8806. [] call fnc_colorizeMain;
  8807. for '_i' from 0 to 12 do {_ctrl lbAdd '';};
  8808. };
  8809. fnc_get_plr = {allPlayers};
  8810. fnc_fill_infiSTAR_Player_REAL = {
  8811. disableSerialization;
  8812. _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl LEFT_SHIFT_ID;
  8813. lbclear _ctrl;
  8814. _unsorted = call fnc_get_plr;
  8815. _sorted = _unsorted;
  8816. lbclear _ctrl;
  8817. if!(_sorted isEqualTo [])then
  8818. {
  8819. _fnc_addPlayerToList = {
  8820. if(isNull _x)exitWith{};
  8821. _PUIDX = getPlayerUID _x;
  8822. if(_PUIDX == '')exitWith{};
  8823. _side = side _x;
  8824.  
  8825. _grp = group _x;
  8826. _ExileName = if(alive _x)then{name _x}else{_x getVariable['ExileName',name _x]};
  8827. _name = format['%1 [%2]',_ExileName,_side];
  8828. if(count units _grp > 1)then
  8829. {
  8830. _name = format['%1 [%2 (%3)]',_ExileName,_side,_grp];
  8831. };
  8832. _index = _ctrl lbAdd _name;
  8833.  
  8834. _veh = vehicle _x;
  8835. _xpic = getText (configFile >> 'CfgVehicles' >> (typeOf _veh) >> 'picture');
  8836. if(alive _x)then
  8837. {
  8838. if(_x == _veh)then
  8839. {
  8840. _wpnstate = weaponState _x;
  8841. _cwep = _wpnstate select 0;
  8842. if(_cwep != '')then
  8843. {
  8844. _xpic = getText (configFile >> 'CfgWeapons' >> _cwep >> 'picture');
  8845. };
  8846. };
  8847. };
  8848. if(_xpic call FNC_PIC_VALID)then
  8849. {
  8850. _ctrl lbSetPicture [_index,_xpic];
  8851. _ctrl lbSetPictureColor [_index,[1, 1, 1, 1]];
  8852. };
  8853. _clr = _x call FN_GET_CLR_PLAYERLIST;
  8854. _ctrl lbSetColor [_index,_clr];
  8855. };
  8856. if(!isNil'SortAlphaPlease')exitWith
  8857. {
  8858. {call _fnc_addPlayerToList} forEach _sorted;
  8859. };
  8860. if(!isNil'SortGroupsPlease')exitWith
  8861. {
  8862. _shown = [];
  8863. {
  8864. _grp = group _x;
  8865. if!(_grp in _shown)then
  8866. {
  8867. _shown pushBack _grp;
  8868.  
  8869. _ctrl lbAdd format['______%1______',_grp];
  8870. {
  8871. call _fnc_addPlayerToList;
  8872. } forEach (units _grp);
  8873. };
  8874. } forEach _sorted;
  8875. };
  8876. if(!isNil'SortRangePlease')exitWith
  8877. {
  8878. sortRangePos = if(positionCameraToWorld [0,0,0] distance cameraOn > 10)then{positionCameraToWorld [0,0,0]}else{cameraOn};
  8879. _sorted = [_unsorted,[],{sortRangePos distance _x},'ASCEND'] call BIS_fnc_sortBy;
  8880. {call _fnc_addPlayerToList} forEach _sorted;
  8881. };
  8882. };
  8883. _display = findDisplay MAIN_DISPLAY_ID;
  8884. _btnSortAlpha = _display displayCtrl 10;if(!isNil 'SortAlphaPlease')then{lbSort _ctrl;_btnSortAlpha ctrlSetTextColor [0,1,0,1];} else {_btnSortAlpha ctrlSetTextColor [1,1,1,1];};
  8885. _btnSortGroups = _display displayCtrl 11;if(!isNil 'SortGroupsPlease')then{_btnSortGroups ctrlSetTextColor [0,1,0,1];} else {_btnSortGroups ctrlSetTextColor [1,1,1,1];};
  8886. _btnSortRange = _display displayCtrl 12;if(!isNil 'SortRangePlease')then{_btnSortRange ctrlSetTextColor [0,1,0,1];} else {_btnSortRange ctrlSetTextColor [1,1,1,1];};
  8887. _ctrl lbAdd '-----------------------------------';
  8888. _index = _ctrl lbAdd '[Selected]';_ctrl lbSetColor [_index,[1,0.7,0.15,1]];
  8889. _index = _ctrl lbAdd '[In Vehicle]';_ctrl lbSetColor [_index,[0.047,0.502,1,1]];
  8890. _index = _ctrl lbAdd '[Player]';_ctrl lbSetColor [_index,[1,0.17,0.17,1]];
  8891. _index = _ctrl lbAdd '[Group]';_ctrl lbSetColor [_index,[1,0.95,0,1]];
  8892. _index = _ctrl lbAdd '[Admin]';_ctrl lbSetColor [_index,[0,1,0,1]];
  8893. _index = _ctrl lbAdd '[Dead Player]';_ctrl lbSetColor [_index,[1,1,1,1]];
  8894. for '_i' from 0 to 12 do {_ctrl lbAdd '';};
  8895. };
  8896. fnc_fill_infiSTAR_Player = {
  8897. [
  8898. '',
  8899. {
  8900. call fnc_fill_infiSTAR_Player_REAL
  8901. }
  8902. ] execFSM 'call.fsm';
  8903. };
  8904. fnc_LBDblClick_LEFT = {
  8905. if(!isNil 'SELECTED_TARGET_PLAYER')then
  8906. {
  8907. if(!isNull SELECTED_TARGET_PLAYER)then
  8908. {
  8909. if('spectating' call ADMINLEVELACCESS)then{SELECTED_TARGET_PLAYER call fnc_beginspectate;};
  8910. };
  8911. };
  8912. };
  8913. fnc_LBSelChanged_LEFT = {
  8914. _obj = call fnc_get_selected_object;
  8915. if(!isNull (findDisplay MAIN_DISPLAY_ID displayCtrl 44463))then
  8916. {
  8917. (findDisplay MAIN_DISPLAY_ID displayCtrl 44463) ctrlSetText format['SELECTED TARGET: %1',SELECTED_TARGET_PLAYER];
  8918. };
  8919. if(visibleMap)then
  8920. {
  8921. (uiNamespace getVariable 'A3MAPICONS_mainMap') ctrlMapAnimAdd [1, 0.1, getPos _obj];
  8922. ctrlMapAnimCommit (uiNamespace getVariable 'A3MAPICONS_mainMap');
  8923. };
  8924. _obj
  8925. };
  8926. fnc_GET_ITEM = {
  8927. _target = call fnc_get_selected_object;
  8928. if((BTN_GET_ITEM_SEL isEqualTo 0)&&!(FILLMAINSTATE isEqualTo 6))then
  8929. {
  8930. _posATL = getPosATL _target;
  8931. _pos = _target modelToWorld [0,1.5,0];
  8932. _pos set[2,_posATL select 2];
  8933. [3,netId _target,_pos,_class] call fnc_AdminReq;
  8934.  
  8935. _log = format['Spawning %1 on the ground infront of %2!',_click,name _target];
  8936. _log call fnc_adminLog;
  8937. _log call FN_SHOW_LOG;
  8938. }
  8939. else
  8940. {
  8941. [_target,_class] call fnc_reallyAdditem;
  8942. _log = format['Spawning %1 on %2!',_click,name _target];
  8943. _log call fnc_adminLog;
  8944. _log call FN_SHOW_LOG;
  8945. };
  8946. };
  8947. FN_EXILE_VEH_TRADER_ADMIN = {
  8948. if((player isEqualTo (vehicle player))&&((_this select 2 isEqualTo 1)))exitWith
  8949. {
  8950. systemChat '<infiSTAR.de> You need to be in a Vehicle to use this!'
  8951. };
  8952. _obj = (_this select 0) createVehicleLocal (getPos player);
  8953. _obj setVariable ['ExileTraderType',(_this select 0)];
  8954. _obj call (missionNameSpace getVariable (_this select 1));
  8955. deleteVehicle _obj;
  8956. };
  8957. fnc_toggleables = {
  8958. _stop = false;
  8959. switch (_this) do {
  8960. case 'Player ESP':{call fnc_PlayerESP_NORM;};
  8961. case 'Player ESP (safezone style)':{call fnc_PlayerESP_SS;};
  8962. case 'AI ESP':{if(isNil 'fnc_infiESP_stateAI')then{fnc_infiESP_stateAI = 1;}else{fnc_infiESP_stateAI = nil;};call fnc_call_single_esps;};
  8963. case 'Dead ESP':{if(isNil 'fnc_infiESP_stateDEAD')then{fnc_infiESP_stateDEAD = 1;}else{fnc_infiESP_stateDEAD = nil;};call fnc_call_single_esps;};
  8964. case 'Loot ESP':{call fnc_LootESP;};
  8965. case 'MapIcons':{call infiSTAR_A3MAPICONS;};
  8966. case 'Vehicle Marker':{call adminVehicleMarker;};
  8967. case 'Flag Marker (with radius)':{call adminFlagMark;};
  8968. case 'DeadPlayer Marker':{call adminDeadPlayer;};
  8969. case 'God Mode':{if('God Mode (no stats change)' in infiSTAR_toggled_A)exitWith{systemChat 'Please disable God Mode (no stats change) first.';_stop=true;};call infiSTAR_A3Invulnerability;};
  8970. case 'God Mode (no stats change)':{if('God Mode' in infiSTAR_toggled_A)exitWith{systemChat 'Please disable God Mode first.';_stop=true;};call infiSTAR_A3Invulnerability2;};
  8971. case 'Vehicle God Mode':{call fnc_infiSTAR_A3cargod;};
  8972. case 'Lower Terrain':{call fnc_LowerTerrain;};
  8973. case 'Vehboost':{call infiSTAR_VehicleBoost;};
  8974. case 'UnlimAmmo':{call fnc_infiSTAR_A3UnlAmmo;};
  8975. case 'noRecoil':{call fnc_infiSTAR_A3noRecoil;};
  8976. case 'FastFire':{call fnc_infiSTAR_A3FF;};
  8977. case 'Stealth / Invisible':{call fnc_infiSTARHIDE;};
  8978. case 'Disable Announces':{call fnc_DisableAnnouncements;};
  8979. case 'Teleport In Facing Direction (10m steps)':{if(isNil'infiSTAR_TpdirectionENABLED')then{infiSTAR_TpdirectionENABLED=true}else{infiSTAR_TpdirectionENABLED=nil;};};
  8980. case 'Show Server Information':{call FN_SERVER_INFORMATION_OVERLAY;};
  8981. };
  8982. if(_stop)exitWith{};
  8983. if(_this in infiSTAR_CUSTOM_Toggleable)then
  8984. {
  8985. _id = infiSTAR_CUSTOM_Toggleable find _this;
  8986. if!(_id isEqualTo -1)then
  8987. {
  8988. call (missionNameSpace getVariable format['FNC_CUSTOM_TOGGLEABLE_%1',_id]);
  8989. };
  8990. };
  8991. if(_this in infiSTAR_toggled_A)then
  8992. {
  8993. lbSetColor [RIGHT_SHIFT_ID,1,[1,0,0,1]];
  8994. infiSTAR_toggled_A = infiSTAR_toggled_A - [_this];
  8995. _log = format['%1 - OFF',_this];
  8996. _log call fnc_adminLog;
  8997. _log call FN_SHOW_LOG;
  8998. }
  8999. else
  9000. {
  9001. lbSetColor [RIGHT_SHIFT_ID,1,[0,1,0,1]];
  9002. infiSTAR_toggled_A pushBack _this;
  9003. _log = format['%1 - ON',_this];
  9004. _log call fnc_adminLog;
  9005. _log call FN_SHOW_LOG;
  9006. };
  9007. };
  9008. fnc_LBDblClick_RIGHT = {
  9009. _click = lbtext[RIGHT_SHIFT_ID,(lbCurSel RIGHT_SHIFT_ID)];
  9010. if(_click isEqualTo '')exitWith{};
  9011. if(FILLMAINSTATE isEqualTo 1 && LASTSUBBUTTON isEqualTo 2)exitWith
  9012. {
  9013. _num = parseNumber(lbData[RIGHT_SHIFT_ID,(lbCurSel RIGHT_SHIFT_ID)]);
  9014. if(_num isEqualTo -1337)exitWith{};
  9015. (TRADER_FUNCTION_ARRAY select _num) call FN_EXILE_VEH_TRADER_ADMIN;
  9016. };
  9017. if(_click in infiSTAR_CUSTOM_RUN)exitWith
  9018. {
  9019. _id = infiSTAR_CUSTOM_RUN find _click;
  9020. if!(_id isEqualTo -1)then
  9021. {
  9022. call (missionNameSpace getVariable format['FNC_CUSTOM_RUN_%1',_id]);
  9023. };
  9024. };
  9025. if('==== Base Deleter ====' call ADMINLEVELACCESS)then{[_click] call CCG_fnc_adminClick;};
  9026. if(_click in AH_HackLogArray)exitWith{systemchat _click;diag_log _click;};
  9027. if(_click in AH_SurvLogArray)exitWith{systemchat _click;diag_log _click;};
  9028. if(_click in AH_AdmiLogArray)exitWith{systemchat _click;diag_log _click;};
  9029. if(_click in PVAH_AHTMPBAN)exitWith{
  9030. [-667,_click] call fnc_AdminReq;
  9031. systemchat format['Removed %1 from TempBan Variable. Might still be banned in ban(s).txt',_click];
  9032. [] call fnc_fill_HackLog;[] call fnc_setFocus;
  9033. };
  9034. if(_click in (infiSTAR_Toggleable+infiSTAR_CUSTOM_Toggleable))then{_click call fnc_toggleables;};
  9035. if(_click in (infiSTAR_OnTarget+infiSTAR_CUSTOM_OnTarget))then
  9036. {
  9037. _unit = call fnc_get_selected_object;
  9038.  
  9039. if(_click == 'Light')exitWith{[_unit] call fnc_Light_selected;};
  9040. if(_click == 'Kill')exitWith{[_unit] call fnc_Kill_selected;};
  9041. if(_click == 'Explode')exitWith{[_unit] call fnc_Explode_selected;};
  9042. if(_click == 'Delete Vehicle')exitWith{[_unit] call fnc_deleteVeh_selected;};
  9043.  
  9044. if(_click == 'Change Money on Player')exitWith{if(!isNil'mrthread_x')then{terminate mrthread_x;mrthread_x=nil;};mrthread_x = [_unit,0] spawn fnc_ExileMoneyRespectChange;};
  9045. if(_click == 'Change Money on Bank')exitWith{if(!isNil'mrthread_x')then{terminate mrthread_x;mrthread_x=nil;};mrthread_x = [_unit,1] spawn fnc_ExileMoneyRespectChange;};
  9046. if(_click == 'Change Respect')exitWith{if(!isNil'mrthread_x')then{terminate mrthread_x;mrthread_x=nil;};mrthread_x = [_unit,2] spawn fnc_ExileMoneyRespectChange;};
  9047.  
  9048. _log = format['%1 - %2(%3)',_click,name _unit,getPlayerUID _unit];_log call fnc_adminLog;
  9049.  
  9050. if(_click == 'Teleport - Target To Me')exitWith{[_unit] call fnc_TP2ME;};
  9051. if(_click == 'Teleport - Me To Target')exitWith{[_unit] call fnc_TPME2;};
  9052. if(_click == 'Request Steam Name')exitWith{[_unit] call fnc_getSteamName;};
  9053. if(_click == 'Revive')exitWith{[_unit] call fnc_ReviveTarget;};
  9054. if(_click == 'Heal')exitWith{[_unit] call fnc_HealTarget;};
  9055. if(_click == 'Restore')exitWith{[_unit] call fnc_RepairTarget;};
  9056. if(_click == 'Flip Vehicle')exitWith{[_unit] call fnc_flipVeh;};
  9057. if(_click == 'Move In My Vehicle')exitWith{[_unit] call fnc_MoveInMyVehicle;};
  9058. if(_click == 'Move In Target Vehicle')exitWith{[_unit] call fnc_MoveInTargetVehicle;};
  9059. if(_click == 'Freeze')exitWith{[_unit,true] call fnc_freezeTarget;};
  9060. if(_click == 'UnFreeze')exitWith{[_unit,false] call fnc_freezeTarget;};
  9061. if(_click == 'Unconscious')exitWith{[_unit,true] call fnc_unconscious;};
  9062. if(_click == 'Remove Unconscious')exitWith{[_unit,false] call fnc_unconscious;};
  9063. if(_click == 'Restrain')exitWith{[_unit,true] call fnc_restrainTarget;};
  9064. if(_click == 'UnRestrain')exitWith{[_unit,false] call fnc_restrainTarget;};
  9065. if(_click == 'Remove Gear')exitWith{[_unit] call fnc_RemoveGear;};
  9066. if(_click == 'Eject')exitWith{[_unit] call fnc_EjectTargetVeh;};
  9067. if(_click == 'Eject Crew')exitWith{[_unit] call fnc_EjectCrewTargetVeh;};
  9068. if(_click == 'Force Disconnect')exitWith{[_unit] call fnc_Disconnect_selected;};
  9069. if(_click == 'Kick (Silent)')exitWith{[_unit,0,0] call fnc_do_target;};
  9070. if(_click == 'Kick (Announce)')exitWith{[_unit,0,1] call fnc_do_target;};
  9071. if(_click == 'Ban (Silent)')exitWith{[_unit,1,0] call fnc_do_target;};
  9072. if(_click == 'Ban (Announce)')exitWith{[_unit,1,1] call fnc_do_target;};
  9073. if(_click == 'TempBan (Silent)')exitWith{[_unit,2,0] call fnc_do_target;};
  9074. if(_click == 'TempBan (Announce)')exitWith{[_unit,2,1] call fnc_do_target;};
  9075. if(_click in infiSTAR_CUSTOM_OnTarget)then
  9076. {
  9077. _id = infiSTAR_CUSTOM_OnTarget find _click;
  9078. if!(_id isEqualTo -1)then
  9079. {
  9080. _unit call (missionNameSpace getVariable format['FNC_CUSTOM_ON_TARGET_%1',_id]);
  9081. };
  9082. };
  9083. };
  9084.  
  9085. _exitHere = false;
  9086. {
  9087. if(_click isEqualTo _x)exitWith{[_x,_forEachIndex] call fnc_create_Box;_exitHere=true;};
  9088. } forEach allSupportBoxesNames;
  9089. if(_exitHere)exitWith{true};
  9090.  
  9091. _exitHere = false;
  9092. {
  9093. if(_click isEqualTo format['Create Billboard: %1',_x select 0])exitWith
  9094. {
  9095. _forEachIndex call fnc_createBillboard;
  9096. };
  9097. } forEach pathToCustomBillBoardTextures;
  9098. if(_exitHere)exitWith{true};
  9099.  
  9100. switch (_click) do {
  9101. case '==== OnTarget ====':{if(isNil 'infiSTAR_add_OnTarget')then{infiSTAR_add_OnTarget = true;} else {infiSTAR_add_OnTarget = nil;};};
  9102. case '==== Toggleable ====':{if(isNil 'infiSTAR_add_Toggleable')then{infiSTAR_add_Toggleable = true;} else {infiSTAR_add_Toggleable = nil;};};
  9103. case '==== Base Deleter ====':{if(isNil 'infiSTAR_add_BaseDeleter')then{infiSTAR_add_BaseDeleter = true;} else {infiSTAR_add_BaseDeleter = nil;};};
  9104. case '==== Custom Functions ====':{if(isNil 'infiSTAR_add_customFunctions')then{infiSTAR_add_customFunctions = true;} else {infiSTAR_add_customFunctions = nil;};};
  9105. case '==== Vehicles ====':{if(isNil 'infiSTAR_add_vehicles')then{infiSTAR_add_vehicles = true;} else {infiSTAR_add_vehicles = nil;};};
  9106. case 'clear ingame HackLog':{[0] call fnc_clearLogArray;_click call fnc_adminLog;[] call fnc_fill_HackLog;};
  9107. case 'clear ingame AdminLog':{[1] call fnc_clearLogArray;_click call fnc_adminLog;[] call fnc_fill_AdminLog;};
  9108. case 'BIS FreeRoam Cam (works with ESP)':{call fnc_BIS_FreeRoamCam;_click call fnc_adminLog;};
  9109. case 'FreeRoam Cam (does not work with ESP)':{call fnc_FreeRoamCam;_click call fnc_adminLog;};
  9110. case 'Day':{11 call fnc_changeTime;_click call fnc_adminLog;};
  9111. case 'Night':{23 call fnc_changeTime;_click call fnc_adminLog;};
  9112. case 'AdminConsole':{[] call fnc_workplace;};
  9113. case 'DebugConsole':{[] spawn fnc_RscDisplayDebugPublic;};
  9114. case 'Copy Worldspace(coords) to RPT & Chat':{[] call fnc_worldspace;};
  9115. case 'Mass Message':{[] call fnc_mass_message;};
  9116. case 'Spawn Ammo':{[] call infiSTAR_A3addAmmo;};
  9117. case 'Change ViewDistance':{[] call FN_CHANGE_VIEWDISTANCE;};
  9118. case 'Self Disconnect':{_click call fnc_adminLog;(finddisplay 46) closeDisplay 0;};
  9119. };
  9120. if(_click in newAllItems_CATEGORY)then
  9121. {
  9122. _varstate = missionNameSpace getVariable (_click+'SHOW_STATE');
  9123. if(isNil '_varstate')then
  9124. {
  9125. missionNameSpace setVariable[(_click+'SHOW_STATE'),true];
  9126. }
  9127. else
  9128. {
  9129. missionNameSpace setVariable[(_click+'SHOW_STATE'),nil];
  9130. };
  9131. };
  9132. _class = lbData[RIGHT_SHIFT_ID,(lbCurSel RIGHT_SHIFT_ID)];
  9133. if(_class in ALLC_ITEMS)exitWith
  9134. {
  9135. call fnc_GET_ITEM;
  9136. };
  9137. if(_class in ALL_VEHS_TO_SEARCH_C)exitWith
  9138. {
  9139. if!(('Spawn Vehicles' call ADMINLEVELACCESS) || ('Spawn Persistent Vehicles' call ADMINLEVELACCESS))exitWith{hint 'You are not allowed to spawn vehicles!';};
  9140.  
  9141. _target = call fnc_get_selected_object;
  9142. _position = AGLToASL (_target modelToWorld [0,10,0]);
  9143. _dir = getDir (vehicle _target);
  9144.  
  9145. if(BTN_SPAWN_VEH_SEL isEqualTo 0)then
  9146. {
  9147. _log = format['Spawning %1 infront of %2! (NonPersistent)',_click,name _target];
  9148. _log call FN_SHOW_LOG;
  9149. [0,_class,_position,_dir,netId _target,false] call fnc_AdminReq;
  9150. format['spawning %1 (NonPersistent)',_click] call fnc_adminLog;
  9151. }
  9152. else
  9153. {
  9154. _log = format['Spawning %1 infront of %2! (Persistent)',_click,name _target];
  9155. _log call FN_SHOW_LOG;
  9156. [0,_class,_position,_dir,netId _target,true] spawn {
  9157. disableSerialization;
  9158. _array = _this;
  9159. call ExileClient_gui_interactionMenu_unhook;
  9160. ExileClientInteractionObject = player;
  9161. _pincode = 4 call ExileClient_gui_keypadDialog_show;
  9162. _array pushBack _pincode;
  9163. _array call fnc_AdminReq;
  9164. };
  9165. format['spawning %1 (Persistent)',_click] call fnc_adminLog;
  9166. };
  9167. };
  9168. if(_click == 'Login')then{if(isNil 'serverCommandLoginDone')then{serverCommandLoginDone = true;serverCommand ('#login '+passwordAdmin);};};
  9169. if((_click find '#kick' > -1) || (_click find '#exec' > -1))then{serverCommand _click;};
  9170. if((FILLMAINSTATE == 0)||(FILLMAINSTATE == 1))then{[] call fnc_fill_infiSTAR_MAIN;};
  9171. };
  9172. fnc_LBSelChanged_RIGHT = {
  9173. _class = lbData[RIGHT_SHIFT_ID,(lbCurSel RIGHT_SHIFT_ID)];
  9174. _cfg = call {
  9175. if(isClass (configFile >> 'CfgWeapons' >> _class))exitWith{'CfgWeapons'};
  9176. if(isClass (configFile >> 'CfgMagazines' >> _class))exitWith{'CfgMagazines'};
  9177. if(isClass (configFile >> 'CfgVehicles' >> _class))exitWith{'CfgVehicles'};
  9178. ''
  9179. };
  9180. ctrlDelete ((findDisplay MAIN_DISPLAY_ID) displayCtrl 8406);
  9181. ctrlDelete ((findDisplay MAIN_DISPLAY_ID) displayCtrl 8407);
  9182. if(_cfg != '')then
  9183. {
  9184. _txt = gettext(configFile >> _cfg >> _class >> 'Library' >> 'libTextDesc');
  9185. if(_txt isEqualTo '')then{_txt = 'by infiSTAR.de';};
  9186. if(_cfg isEqualTo 'CfgVehicles')then
  9187. {
  9188. _salesPrice = getNumber(missionConfigFile >> 'CfgExileArsenal' >> _class >> 'price');
  9189. if(_salesPrice isEqualTo 0)then{_salesPrice = 'unknown';}else{_salesPrice = format['%1 PopTabs',_salesPrice];};
  9190. _vehicleConfig = configFile >> _cfg >> _class;
  9191. _info = format['Capacity: %1 Armor: %2 Fuel: %3 MaxSpeed: %4 Price: %5',getNumber(_vehicleConfig>>'maximumLoad'),getNumber(_vehicleConfig>>'armor'),getNumber(_vehicleConfig>>'fuelCapacity'),getNumber(_vehicleConfig>>'maxSpeed'),_salesPrice];
  9192. _log = format['Class: %1 %2',_class,_info];
  9193. _txt=(_info+'<br/>'+_txt);
  9194. };
  9195. _ctrlText = '<t align=''center'' size=''0.85''>'+_txt+' </t>';
  9196. _pic = (getText (configFile >> _cfg >> _class >> 'picture'));
  9197. if(_pic call FNC_PIC_VALID)then
  9198. {
  9199. _ctrlText = _ctrlText + '<br/><img align=''center'' size=''3.5'' image='''+_pic+'''/>';
  9200. };
  9201. _ctrl = [findDisplay MAIN_DISPLAY_ID,'RscStructuredText',8406] call fnc_createctrl;
  9202. _ctrl ctrlSetPosition [1.05,0.355 * safezoneH + safezoneY,0.65,0.5];
  9203. _ctrl ctrlSetBackgroundColor [0,0,0,0.6];
  9204. _ctrl ctrlCommit 0;
  9205. _ctrl ctrlSetStructuredText parseText _ctrlText;
  9206.  
  9207. _ctrl = [findDisplay MAIN_DISPLAY_ID,'RSCEdit',8407] call fnc_createctrl;
  9208. _ctrl ctrlSetPosition [0.59,safezoneY + safezoneH - 0.06,count _class / 100,0.05];
  9209. _ctrl ctrlSetPosition [1.05,(0.355 * safezoneH + safezoneY)-0.05,0.65,0.05];
  9210. _ctrl ctrlSetBackgroundColor [0,0,0,0.6];
  9211. _ctrl ctrlCommit 0;
  9212. _ctrl ctrlSetText _class;
  9213. };
  9214. };
  9215. fnc_getConfig = {
  9216. _cfg = '';
  9217. if(isClass (configFile >> 'CfgWeapons' >> _this))then
  9218. {
  9219. _cfg = 'CfgWeapons';
  9220. }
  9221. else
  9222. {
  9223. if(isClass (configFile >> 'CfgMagazines' >> _this))then
  9224. {
  9225. _cfg = 'CfgMagazines';
  9226. }
  9227. else
  9228. {
  9229. if(isClass (configFile >> 'CfgVehicles' >> _this))then
  9230. {
  9231. _cfg = 'CfgVehicles';
  9232. };
  9233. };
  9234. };
  9235. _cfg
  9236. };
  9237. admin_showGear = {
  9238. if(!isNull cameraOn)then
  9239. {
  9240. closeDialog 0;
  9241. createGearDialog [cameraOn,'RscDisplayInventory'];
  9242. _log = format['Showing Gear of %1',name cameraOn];
  9243. _log call FN_SHOW_LOG;
  9244. };
  9245. };
  9246. fnc_endSpectate = {
  9247. if(!isNil'SPECTATE_THREAD')then{terminate SPECTATE_THREAD;SPECTATE_THREAD=nil;};
  9248. (vehicle player) switchCamera cameraView;
  9249. ctrlDelete ((findDisplay 46) displayCtrl 3025);
  9250. _log = 'Finished spectating.';
  9251. _log call FN_SHOW_LOG;
  9252. };
  9253. fnc_beginspectate = {
  9254. if(!isNil'SPECTATE_THREAD')then{terminate SPECTATE_THREAD;SPECTATE_THREAD=nil;};
  9255. SPECTATE_THREAD = _this spawn {
  9256. disableSerialization;
  9257. _log = 'Spectating - Press F10 to exit.';
  9258. _log call FN_SHOW_LOG;
  9259. _unit = _this;
  9260. _ctrl = [findDisplay 46,'RscStructuredText',3025] call fnc_createctrl;
  9261. _ctrl ctrlSetPosition [safezoneX+0.2,safezoneY+0.405,1,1];
  9262. _ctrl ctrlCommit 0;
  9263. while {true} do
  9264. {
  9265. if(isNil'_unit')exitWith{call fnc_endspectate;};
  9266. if(isNull _unit)exitWith{call fnc_endspectate;};
  9267.  
  9268. _veh = vehicle _unit;
  9269. if(str _veh != str cameraOn)then
  9270. {
  9271. player reveal _unit;
  9272. player reveal _veh;
  9273. _veh switchCamera cameraView;
  9274. format['SPECTATE - switchedCamera on %1(%2)',name _unit,getPlayerUID _unit] call fnc_adminLog;
  9275. };
  9276.  
  9277. _log = format['%1 (%2) @%3',name _unit,getPlayerUID _unit,mapGridPosition _veh];
  9278. _ctrlText = '<t align=''left'' size=''1.1'' color=''#238701''>'+_log+'</t>';
  9279.  
  9280. _moneyP = _unit getVariable ['ExileMoney', 0];
  9281. _moneyP = if(_moneyP > 1000)then{format['%1K',_moneyP / 1000]}else{_moneyP};
  9282.  
  9283. _moneyB = _unit getVariable ['ExileLocker', 0];
  9284. _moneyB = if(_moneyB > 1000)then{format['%1K',_moneyB / 1000]}else{_moneyB};
  9285.  
  9286. _respect = _unit getVariable ['ExileScore', 0];
  9287. _log2 = format['Health: %1 Cash: %2 Bank: %3 Respect: %4',(1-(damage _unit))*100,_moneyP,_moneyB,_respect];
  9288. _ctrlText = _ctrlText + '<br/><t align=''left'' size=''1.1'' color=''#238701''>'+_log2+'</t>';
  9289.  
  9290. _cwep = '';
  9291. _cammo = '';
  9292. _cmags = '';
  9293. _wpnstate = weaponState _unit;
  9294. if(!isNil '_wpnstate')then
  9295. {
  9296. if(str _wpnstate != '[]')then
  9297. {
  9298. _cwep = _wpnstate select 0;
  9299. _cmags = {_wpnstate select 3 == _x} count magazines _unit;
  9300. _cammo = _wpnstate select 4;
  9301. };
  9302. };
  9303. if(_cwep == '')then
  9304. {
  9305. _ctrlText = _ctrlText + '<br/><t align=''left'' size=''1.1'' color=''#238701''>Bare Fists</t>';
  9306. }
  9307. else
  9308. {
  9309. _type = _cwep;
  9310. _cfg = _type call fnc_getConfig;
  9311. _displayName = getText (configFile >> _cfg >> _type >> 'displayName');
  9312. _pic = getText (configFile >> _cfg >> _type >> 'picture');
  9313. _log3 = format[' %1 [%2] (%3/%4)',_displayName,_cwep,_cammo,_cmags];
  9314. _ctrlText = _ctrlText + '<br/><img image='''+_pic+''' align=''left'' size=''1.1''/><t align=''left'' size=''1.1'' color=''#238701''>'+_log3+'</t>';
  9315.  
  9316. if(_veh != _unit)then
  9317. {
  9318. _cwepsV = [];
  9319. {
  9320. if(_x find 'Horn' == -1)then
  9321. {
  9322. _cwepsV pushBack _x;
  9323. };
  9324. } forEach (weapons _veh);
  9325.  
  9326. if(count _cwepsV > 0)then
  9327. {
  9328. _YPOS = safezoneY+0.355;
  9329.  
  9330. {
  9331. _cwep = _x;
  9332. _cammo = _veh ammo _cwep;
  9333. _cmags = {currentMagazine _veh == _x} count magazines _veh;
  9334.  
  9335. _type = _cwep;
  9336. _cfg = _type call fnc_getConfig;
  9337. _displayName = getText (configFile >> _cfg >> _type >> 'displayName');
  9338.  
  9339. _log3a = format[' %1 [%2] (%3/%4)',_displayName,_cwep,_cammo,_cmags];
  9340. _ctrlText = _ctrlText + '<br/><t align=''left'' size=''1.1'' color=''#A90F68''>'+_log3a+'</t>';
  9341. _YPOS = _YPOS - 0.03;
  9342. } forEach _cwepsV;
  9343. };
  9344. };
  9345. };
  9346.  
  9347. _ct = cursorTarget;
  9348. if(!isNull _ct)then
  9349. {
  9350. if(getPlayerUID _ct != '')then
  9351. {
  9352. _cwep_ct = currentWeapon _ct;
  9353. _cammo_ct = _ct ammo _cwep_ct;
  9354. _cmags_ct = {currentMagazine _ct == _x} count magazines _ct;
  9355.  
  9356. _log4 = format['%1 (%2) @%3',name _ct,getPlayerUID _ct,mapGridPosition _ct];
  9357. _ctrlText = _ctrlText + '<br/><t align=''left'' size=''1.1'' color=''#B80B36''>'+_log4+'</t>';
  9358.  
  9359. _log5 = format['Health: %1 Distance: %2m',(1-(damage _ct))*100,round(cameraOn distance _ct)];
  9360. _ctrlText = _ctrlText + '<br/><t align=''left'' size=''1.1'' color=''#B80B36''>'+_log5+'</t>';
  9361.  
  9362. _type = _cwep_ct;
  9363. _cfg = _type call fnc_getConfig;
  9364. _displayName = getText (configFile >> _cfg >> _type >> 'displayName');
  9365. _pic = getText (configFile >> _cfg >> _type >> 'picture');
  9366. _log6 = format[' %1 [%2] (%3/%4)',_displayName,_cwep_ct,_cammo_ct,_cmags_ct];
  9367. _ctrlText = _ctrlText + '<br/><img image='''+_pic+''' align=''left'' size=''1.1''/><br/><t align=''left'' size=''1.1'' color=''#B80B36''>'+_log6+'</t>';
  9368. }
  9369. else
  9370. {
  9371. _type = typeOf _ct;
  9372. _cfg = _type call fnc_getConfig;
  9373. _displayName = getText (configFile >> _cfg >> _type >> 'displayName');
  9374. _log4 = format['%1 [%2] @%3',_displayName,_type,mapGridPosition _ct];
  9375. _ctrlText = _ctrlText + '<br/><t align=''left'' size=''1.1'' color=''#B80B36''>'+_log4+'</t>';
  9376.  
  9377. _log5 = format['Health: %1 - Distance: %2m',(1-(damage _ct))*100,round(cameraOn distance _ct)];
  9378. _ctrlText = _ctrlText + '<br/><t align=''left'' size=''1.1'' color=''#B80B36''>'+_log5+'</t>';
  9379. };
  9380.  
  9381. _vehCT = vehicle _ct;
  9382. if((_vehCT isKindOf 'LandVehicle') || (_vehCT isKindOf 'Air') || (_vehCT isKindOf 'Ship') || (_vehCT isKindOf 'Static'))then
  9383. {
  9384. _cwepsV = [];
  9385. {
  9386. if(_x find 'Horn' == -1)then
  9387. {
  9388. _cwepsV pushBack _x;
  9389. };
  9390. } forEach (weapons _vehCT);
  9391.  
  9392. if(count _cwepsV > 0)then
  9393. {
  9394. _YPOS = safezoneY+0.655;
  9395.  
  9396. {
  9397. _cwep = _x;
  9398. _cammo = _vehCT ammo _cwep;
  9399. _cmags = {currentMagazine _vehCT == _x} count magazines _vehCT;
  9400.  
  9401. _type = _cwep;
  9402. _cfg = _type call fnc_getConfig;
  9403. _displayName = getText (configFile >> _cfg >> _type >> 'displayName');
  9404.  
  9405. _log6a = format[' %1 [%2] (%3/%4)',_displayName,_cwep,_cammo,_cmags];
  9406. _ctrlText = _ctrlText + '<br/><t align=''left'' size=''1.1'' color=''#A90F68''>'+_log6a+'</t>';
  9407. _YPOS = _YPOS + 0.03;
  9408. } forEach _cwepsV;
  9409. };
  9410. };
  9411. };
  9412. _ctrl ctrlSetStructuredText parseText _ctrlText;
  9413. uiSleep .15;
  9414. };
  9415. };
  9416. };
  9417. fnc_clearLogArray = {
  9418. [-668,_this select 0] call fnc_AdminReq;
  9419. _log = 'ingame Log(s) cleared!';
  9420. _log call FN_SHOW_LOG;
  9421. [] call fnc_FULLinit;
  9422. };
  9423. fnc_getSteamName = {
  9424. [9876,getPlayerUID (_this select 0)] call fnc_AdminReq;
  9425. _log = format['Requested Steam Name of %1(%2)',name (_this select 0),getPlayerUID (_this select 0)];
  9426. _log call FN_SHOW_LOG;
  9427. };
  9428. fnc_TP2ME = {
  9429. _unit = _this select 0;
  9430. _pos = player modelToWorld [0,12,0];
  9431. if(_unit isEqualTo vehicle _unit)then{_pos = player modelToWorld [0,1,0];};
  9432. [1,netId _unit,_pos] call fnc_AdminReq;
  9433.  
  9434. _log = format['Teleported %1 to you',name _unit];
  9435. _log call FN_SHOW_LOG;
  9436. };
  9437. fnc_TPME2 = {
  9438. _unit = _this select 0;
  9439. _unit = vehicle _unit;
  9440. _object = vehicle player;
  9441. prevLoc = getPosATL _object;
  9442. _distance = -1;if!(_object isEqualTo player)then{_distance = -5;};
  9443. _pos = _unit modelToWorld [0,_distance,0];
  9444. if(local _object)then
  9445. {
  9446. _object setPos _pos;
  9447. }
  9448. else
  9449. {
  9450. [1,netId player,_pos] call fnc_AdminReq;
  9451. };
  9452. _log = format['Teleported to %1 - press BACKSPACE to revert teleport',name _unit];
  9453. _log call FN_SHOW_LOG;
  9454. };
  9455. fnc_MoveInMyVehicle = {
  9456. _unit = _this select 0;
  9457. _unit moveInAny (vehicle player);
  9458. };
  9459. fnc_MoveInTargetVehicle = {
  9460. _unit = _this select 0;
  9461. player moveInAny (vehicle _unit);
  9462. };
  9463. fnc_EjectTargetVeh = {
  9464. _unit = _this select 0;
  9465. moveOut _unit;
  9466. unassignVehicle _unit;
  9467. _unit action ['eject', (vehicle _unit)];
  9468. };
  9469. fnc_EjectCrewTargetVeh = {
  9470. _unit = _this select 0;
  9471. _veh = (vehicle _unit);
  9472. _uids = [];
  9473. {
  9474. moveOut _x;
  9475. unassignVehicle _x;
  9476. _x action ['eject', _veh];
  9477. _uids pushBack (getPlayerUID _x)
  9478. } forEach (crew _veh);
  9479. };
  9480. fnc_RemoveGear = {
  9481. _target = _this select 0;
  9482. if(typeName _target != 'OBJECT')then
  9483. {
  9484. _target = cursorTarget;
  9485. };
  9486. if(!isNull _target)then
  9487. {
  9488. [11,netId _target] call fnc_AdminReq;
  9489.  
  9490. _log = format['Removed Gear of %1!',name _target];
  9491. _log call FN_SHOW_LOG;
  9492. };
  9493. };
  9494. fnc_worldspace = {
  9495. disableSerialization;
  9496. _name = name cameraOn;
  9497. _puid = getPlayerUID cameraOn;
  9498. _dir = getDir cameraOn;
  9499. _pos = getPosATL cameraOn;
  9500. _worldspace = format['[%1,%2]',_dir,_pos];
  9501. _log = format['Worldspace of %1(%2): %3',_name,_puid,_worldspace];
  9502. systemChat format['%1 - saved to RPT',_log];
  9503. diag_log [_log,'PLAIN DOWN'];
  9504. if(isNull (findDisplay 24))then{(findDisplay 46) createDisplay 'RscDisplayChat';};
  9505. _display = (findDisplay 24);
  9506. _chat = _display displayCtrl 101;
  9507. _chat ctrlSetText _worldspace;
  9508. _log call fnc_adminLog;
  9509. };
  9510. fnc_mass_message = {
  9511. disableSerialization;
  9512. _display = findDisplay 24;
  9513. if(isNull _display)exitWith
  9514. {
  9515. _log = 'open your chat, type a message and start this function again!';
  9516. _log call FN_SHOW_LOG;
  9517. systemchat _log;
  9518. };
  9519. _chat = _display displayCtrl 101;
  9520. _msg = ctrlText _chat;
  9521. (_display) closeDisplay 0;
  9522. [7,toArray _msg] call fnc_AdminReq;
  9523. format['Mass Message: %1',_msg] call fnc_adminLog;
  9524.  
  9525. _log = 'message sent!';
  9526. _log call FN_SHOW_LOG;
  9527. };
  9528. fnc_changeTime = {
  9529. [17,_this] call fnc_AdminReq;
  9530. _log = format['changed time to hour: %1',_this];
  9531. _log call FN_SHOW_LOG;
  9532. };
  9533. fnc_get_addvalue = {
  9534. disableSerialization;
  9535. _display = findDisplay MAIN_DISPLAY_ID;
  9536.  
  9537. _ctrl = [_display,'IGUIBack',77764] call fnc_createctrl;
  9538. _ctrl ctrlSetPosition [
  9539. 0.6,
  9540. 0-(0.033 * safezoneH),
  9541. 0.7,
  9542. 0.099 * safezoneH
  9543. ];
  9544. _ctrl ctrlSetBackgroundColor [0.15,0.15,0.15,1];
  9545. _ctrl ctrlCommit 0;
  9546.  
  9547. _ctrl = [_display,'RscEdit',77769] call fnc_createctrl;
  9548. _ctrl ctrlSetPosition [
  9549. 0.6,
  9550. 0,
  9551. 0.7,
  9552. 0.033 * safezoneH
  9553. ];
  9554. ctrlSetFocus _ctrl;
  9555. _ctrl ctrlCommit 0;
  9556.  
  9557. fnc_ButtonClick_77766 = {
  9558. _txt = ctrlText 77769;
  9559. if(_txt != '')then
  9560. {
  9561. fnc_get_addvalue_VALUE = (parseNumber _txt);
  9562. ctrlDelete ((findDisplay MAIN_DISPLAY_ID) displayCtrl 77764);
  9563. ctrlDelete ((findDisplay MAIN_DISPLAY_ID) displayCtrl 77769);
  9564. ctrlDelete ((findDisplay MAIN_DISPLAY_ID) displayCtrl 77766);
  9565. ctrlDelete ((findDisplay MAIN_DISPLAY_ID) displayCtrl 77765);
  9566. };
  9567. };
  9568.  
  9569. _ctrl = [_display,'RSCButton',77766] call fnc_createctrl;
  9570. _ctrl ctrlSetPosition [
  9571. 0.8,
  9572. 0.033 * safezoneH,
  9573. 0.3,
  9574. 0.033 * safezoneH
  9575. ];
  9576. _ctrl ctrlSetEventHandler['ButtonClick','call fnc_ButtonClick_77766'];
  9577.  
  9578. fnc_get_addvalue_VALUE = nil;
  9579. _ctrl = [_display,'RscText',77765] call fnc_createctrl;
  9580. _ctrl ctrlSetPosition [
  9581. 0.6,
  9582. 0-(0.033 * safezoneH),
  9583. 0.7,
  9584. 0.033 * safezoneH
  9585. ];
  9586. waitUntil {
  9587. _curval = 0;
  9588. _curname = call {
  9589. if(_this isEqualTo 0)exitWith{_curval = SELECTED_TARGET_PLAYER getVariable ['ExileMoney', 0];'Money on player'};
  9590. if(_this isEqualTo 1)exitWith{_curval = SELECTED_TARGET_PLAYER getVariable ['ExileLocker', 0];'Money on bank'};
  9591. if(_this isEqualTo 2)exitWith{_curval = SELECTED_TARGET_PLAYER getVariable ['ExileScore', 0];'Respect'};
  9592. };
  9593. (findDisplay MAIN_DISPLAY_ID displayCtrl 77766) ctrlSetText format['+/- %1',_curname];
  9594. _addval = parseNumber(ctrlText 77769);
  9595. (findDisplay MAIN_DISPLAY_ID displayCtrl 77766) ctrlEnable true;
  9596. (findDisplay MAIN_DISPLAY_ID displayCtrl 77766) ctrlCommit 0;
  9597. ctrlSetFocus ((findDisplay MAIN_DISPLAY_ID) displayCtrl 77769);
  9598.  
  9599. (findDisplay MAIN_DISPLAY_ID displayCtrl 77765) ctrlSetText format['Current %1: %2 - after change: %3',_curname,_curval,_curval + _addval];
  9600. (findDisplay MAIN_DISPLAY_ID displayCtrl 77765) ctrlCommit 0;
  9601.  
  9602. !isNil 'fnc_get_addvalue_VALUE' ||
  9603. isNull (findDisplay MAIN_DISPLAY_ID displayCtrl 77769)
  9604. };
  9605. if(isNil 'fnc_get_addvalue_VALUE')exitWith{0};
  9606. fnc_get_addvalue_VALUE
  9607. };
  9608. fnc_ExileMoneyRespectChange = {
  9609. _target = _this select 0;
  9610. _option = _this select 1;
  9611. if(typeName _target != 'OBJECT')exitWith
  9612. {
  9613. _log = 'Target is not an Object!';
  9614. _log call FN_SHOW_LOG;
  9615. };
  9616. if!(isPlayer _target)exitWith
  9617. {
  9618. _log = 'Target is not a Player!';
  9619. _log call FN_SHOW_LOG;
  9620. };
  9621. _value = _option call fnc_get_addvalue;
  9622. if(_value isEqualTo 0)exitWith{systemChat 'WHY WOULD YOU WANT TO ADD OR REMOVE 0 POP-TABS..?';};
  9623.  
  9624. _nameit = _option call {
  9625. if(_this isEqualTo 0)exitWith{'Money to player'};
  9626. if(_this isEqualTo 1)exitWith{'Money to bank of player'};
  9627. if(_this isEqualTo 2)exitWith{'Respect to'};
  9628. 'ERROR'
  9629. };
  9630. if(_nameit isEqualTo 'ERROR')exitWith{systemChat 'ERROR';};
  9631.  
  9632. _log = format['%1 %2 %3 %4',if(_value < 0)then{'Removed'}else{'Added'},_nameit,_value,name _target];
  9633. [12001 + _option,netId _target,_value] call fnc_AdminReq;
  9634. _log call FN_SHOW_LOG;
  9635. (_log+'('+getPlayerUID _target+')') call fnc_adminLog;
  9636. };
  9637. fnc_freezeTarget = {
  9638. _target = _this select 0;
  9639. _value = _this select 1;
  9640. if(typeName _target != 'OBJECT')exitWith
  9641. {
  9642. _log = 'Target is not an Object!';
  9643. _log call FN_SHOW_LOG;
  9644. };
  9645. if!(isPlayer _target)exitWith
  9646. {
  9647. _log = 'Target is not a Player!';
  9648. _log call FN_SHOW_LOG;
  9649. };
  9650. [13,netId _target,_value] call fnc_AdminReq;
  9651. _log = format['UnFroze %1!',name _target];
  9652. if(_value)then{_log = format['Froze %1!',name _target];};
  9653. _log call FN_SHOW_LOG;
  9654. };
  9655. fnc_unconscious = {
  9656. _target = _this select 0;
  9657. _value = _this select 1;
  9658. if(typeName _target != 'OBJECT')exitWith
  9659. {
  9660. _log = 'Target is not an Object!';
  9661. _log call FN_SHOW_LOG;
  9662. };
  9663. if!(isPlayer _target)exitWith
  9664. {
  9665. _log = 'Target is not a Player!';
  9666. _log call FN_SHOW_LOG;
  9667. };
  9668. [18,netId _target,_value] call fnc_AdminReq;
  9669. _log = format['Removed unconscious from %1!',name _target];
  9670. if(_value)then{_log = format['Put %1 unconscious!',name _target];};
  9671. _log call FN_SHOW_LOG;
  9672. };
  9673. fnc_restrainTarget = {
  9674. _target = _this select 0;
  9675. _value = _this select 1;
  9676. if(typeName _target != 'OBJECT')exitWith
  9677. {
  9678. _log = 'Target is not an Object!';
  9679. _log call FN_SHOW_LOG;
  9680. };
  9681. if!(isPlayer _target)exitWith
  9682. {
  9683. _log = 'Target is not a Player!';
  9684. _log call FN_SHOW_LOG;
  9685. };
  9686. [15,netId _target,netId player,_value] call fnc_AdminReq;
  9687. _log = format['UnRestrained %1!',name _target];
  9688. if(_value)then{_log = format['Restrained %1!',name _target];};
  9689. _log call FN_SHOW_LOG;
  9690. };
  9691. fnc_create_Box = {
  9692. private['_boxname','_select','_target'];
  9693. _boxname = _this select 0;
  9694. _select = _this select 1;
  9695. _target = call fnc_get_selected_object;
  9696. [5000,netId _target,_select] call fnc_AdminReq;
  9697. _log = format['%1 created for %2(%3)!',_boxname,name _target,getPlayerUID _target];
  9698. _log call FN_SHOW_LOG;
  9699. _log call fnc_adminLog;
  9700. };
  9701. admin_showinfo_catch = {
  9702. {player reveal _x;} foreach (cameraOn nearObjects 50);
  9703. params['_obj','_pin','_ownername','_owneruid'];
  9704. if!(_pin isEqualTo '')then{_obj setVariable ['ExileAlreadyKnownCode',_pin];};
  9705. if(!isNil'delete_old_show_thread')then{terminate delete_old_show_thread;delete_old_show_thread=nil;};
  9706. delete_old_show_thread = _this spawn {
  9707. params['_obj','_pin','_ownername','_owneruid'];
  9708. disableSerialization;
  9709. _timer = diag_tickTime + 15;
  9710. while {_timer > diag_tickTime} do
  9711. {
  9712. _ownedby = 'server';
  9713. if!(_owneruid isEqualTo '')then
  9714. {
  9715. _isOnline = if({_owneruid isEqualTo (getPlayerUID _x)} count (call fnc_get_plr) > 0)then{true}else{false};
  9716. _color = if(_isOnline)then{'#00FF00'}else{'#FF0000'};
  9717. _inject = '</t><t align=''left'' size=''.9'' color='+str _color+' shadow=''1'' shadowColor=''#000000''>';
  9718. _ownedby = format['%1 (%2) %3',_ownername,_owneruid,if(_isOnline)then{_inject+'(ONLINE)'}else{_inject+'(OFFLINE)'}];
  9719. };
  9720.  
  9721. _pinshown = _pin;
  9722. if(_pinshown isEqualTo '')then
  9723. {
  9724. _pinshown = 'none';
  9725. };
  9726. _locked = locked _obj isEqualTo 2;
  9727. _ExileIsLocked = _obj getVariable ['ExileIsLocked', 1] isEqualTo -1;
  9728. _color = if(_locked || _ExileIsLocked)then{'#FF0000'}else{'#00FF00'};
  9729. _inject = '</t><t align=''left'' size=''.9'' color='+str _color+' shadow=''1'' shadowColor=''#000000''>';
  9730. _pinshown = format['%1 %2',_pinshown,if(_locked || _ExileIsLocked)then{_inject+'(LOCKED)'}else{_inject+'(UNLOCKED)'}];
  9731.  
  9732.  
  9733. _pos = getPosATL _obj;
  9734. _type = typeOf _obj;
  9735. _health = format['%1%2',ceil((1-(damage _obj))*100),'%'];
  9736. disableSerialization;
  9737. _ctrl = [findDisplay 46,'RscStructuredText',5555314] call fnc_createctrl;
  9738. _ctrl ctrlSetPosition [-.2,0.35,0.6,0.3];
  9739. _ctrl ctrlSetBackgroundColor[0,0,0,0.6];
  9740. _ctrl ctrlCommit 0;
  9741. _txt = format['
  9742. <t align=''left'' size=''.9'' color=''#44CD00'' shadow=''1'' shadowColor=''#000000''>type: </t><t align=''left'' size=''.9'' color=''#5FBEDE'' shadow=''1'' shadowColor=''#000000''> %1</t><br/>
  9743. <t align=''left'' size=''.9'' color=''#44CD00'' shadow=''1'' shadowColor=''#000000''>code: </t><t align=''left'' size=''.9'' color=''#5FBEDE'' shadow=''1'' shadowColor=''#000000''> %2</t><br/>
  9744. <t align=''left'' size=''.9'' color=''#44CD00'' shadow=''1'' shadowColor=''#000000''>owner: </t><t align=''left'' size=''.9'' color=''#5FBEDE'' shadow=''1'' shadowColor=''#000000''> %3</t><br/>
  9745. <t align=''left'' size=''.9'' color=''#44CD00'' shadow=''1'' shadowColor=''#000000''>direction: </t><t align=''left'' size=''.9'' color=''#5FBEDE'' shadow=''1'' shadowColor=''#000000''> %4</t><br/>
  9746. <t align=''left'' size=''.9'' color=''#44CD00'' shadow=''1'' shadowColor=''#000000''>position: </t><t align=''left'' size=''.9'' color=''#5FBEDE'' shadow=''1'' shadowColor=''#000000''> %5</t><br/>
  9747. <t align=''left'' size=''.9'' color=''#44CD00'' shadow=''1'' shadowColor=''#000000''>grid: </t><t align=''left'' size=''.9'' color=''#5FBEDE'' shadow=''1'' shadowColor=''#000000''> %6</t><br/>
  9748. <t align=''left'' size=''.9'' color=''#44CD00'' shadow=''1'' shadowColor=''#000000''>health: </t><t align=''left'' size=''.9'' color=''#5FBEDE'' shadow=''1'' shadowColor=''#000000''> %7</t><br/>
  9749. ',
  9750. _type,
  9751. _pinshown,
  9752. _ownedby,
  9753. getDir _obj,
  9754. _pos,
  9755. mapGridPosition _pos,
  9756. _health
  9757. ];
  9758. _ctrl ctrlSetStructuredText parseText _txt;
  9759. uiSleep 0.1;
  9760. };
  9761. ctrlDelete ((findDisplay 46) displayCtrl 5555314);
  9762. };
  9763. };
  9764. admin_showinfo = {
  9765. _obj = cursortarget;
  9766. if(!isNull _obj)then
  9767. {
  9768. [14,netId _obj] call fnc_AdminReq;
  9769. _log = format['used showinfo on: %1 @%2',typeOf _obj,mapGridPosition _obj];
  9770. _log call fnc_adminLog;
  9771. };
  9772. };
  9773. fnc_infiSTAR_A3cargod = {
  9774. if(isNil 'A3carGodRun')then
  9775. {
  9776. MY_VEHICLES = [];
  9777. _code = {
  9778. _obj = cameraOn;
  9779. if(local _obj)then
  9780. {
  9781. if(_obj isKindOf 'Man')then
  9782. {
  9783. if!(MY_VEHICLES isEqualTo [])then
  9784. {
  9785. {_x removeAllEventhandlers 'HandleDamage';_x allowDamage true;} forEach MY_VEHICLES;
  9786. MY_VEHICLES = [];
  9787. };
  9788. }
  9789. else
  9790. {
  9791. MY_VEHICLES pushBackUnique _obj;
  9792. _obj allowDamage false;
  9793. _obj removeAllEventhandlers 'HandleDamage';
  9794. _obj addEventHandler['HandleDamage',{false}];
  9795. };
  9796. };
  9797. };
  9798. A3carGodRun = [0.1, _code, [], true] call ExileClient_system_thread_addtask;
  9799. }
  9800. else
  9801. {
  9802. [A3carGodRun] call ExileClient_system_thread_removeTask;A3carGodRun=nil;
  9803. {_x removeAllEventhandlers 'HandleDamage';_x allowDamage true;} forEach MY_VEHICLES;
  9804. };
  9805. };
  9806. fnc_LowerTerrain = {
  9807. if(isNil 'admin_terrain')then{admin_terrain = true;} else {admin_terrain = !admin_terrain};
  9808. if(admin_terrain)then{
  9809. setTerrainGrid 50;
  9810. }
  9811. else
  9812. {
  9813. setTerrainGrid 25;
  9814. };
  9815. };
  9816. fnc_infiSTAR_A3UnlAmmo = {
  9817. if(isNil'lastMagazineUNLAMMO')then{lastMagazineUNLAMMO = '';};
  9818. if(isNil 'unlimAmmRun')then
  9819. {
  9820. _code = {
  9821. private['_secondaryWeapon','_muzzle','_vehicle','_turretPath','_mags','_magArray','_magazineClass'];
  9822. _secondaryWeapon = secondaryWeapon player;
  9823. _muzzle = currentWeapon player;
  9824. _vehicle = vehicle player;
  9825. if(player isEqualTo _vehicle)then
  9826. {
  9827. if(_muzzle isEqualTo _secondaryWeapon)then
  9828. {
  9829. if!(_secondaryWeapon isEqualTo '')then
  9830. {
  9831. _curmag = currentMagazine player;
  9832. if!(_curmag isEqualTo '')then
  9833. {
  9834. if!(_curmag isEqualTo lastMagazineUNLAMMO)then
  9835. {
  9836. lastMagazineUNLAMMO = _curmag;
  9837. };
  9838. };
  9839. if!(lastMagazineUNLAMMO isEqualTo '')then
  9840. {
  9841. _magArray = getArray(configFile >> 'CfgWeapons' >> _secondaryWeapon >> 'magazines');
  9842. if(lastMagazineUNLAMMO in _magArray)then
  9843. {
  9844. if(player ammo _secondaryWeapon isEqualTo 0)then
  9845. {
  9846. player addSecondaryWeaponItem lastMagazineUNLAMMO;
  9847. if({lastMagazineUNLAMMO == _x} count (magazines player) < 2)then
  9848. {
  9849. player addMagazine lastMagazineUNLAMMO;
  9850. };
  9851. };
  9852. };
  9853. };
  9854. };
  9855. }
  9856. else
  9857. {
  9858. _vehicle setAmmo [_muzzle,999];
  9859. };
  9860. }
  9861. else
  9862. {
  9863. _assignedVehicleRole = assignedVehicleRole player;
  9864. if((_assignedVehicleRole select 0) isEqualTo 'Turret')then
  9865. {
  9866. _turretPath = _assignedVehicleRole select 1;
  9867. _mags = _vehicle magazinesTurret _turretPath;
  9868. if(_mags isEqualTo [''])then
  9869. {
  9870. _magArray = getArray(configFile >> 'CfgWeapons' >> _muzzle >> 'magazines');
  9871.  
  9872. {
  9873. _vehicle addMagazineTurret [_x,_turretPath];
  9874. systemChat format['Added %1 to your Turret!',_x];
  9875. } forEach _magArray;
  9876. }
  9877. else
  9878. {
  9879. _magazineClass = _vehicle currentMagazineTurret _turretPath;
  9880. _vehicle setMagazineTurretAmmo [_magazineClass,999,_turretPath];
  9881. };
  9882. };
  9883. };
  9884. _vehicle setVehicleAmmo 1;
  9885. };
  9886. unlimAmmRun = [0.1, _code, [], true] call ExileClient_system_thread_addtask;
  9887. }
  9888. else
  9889. {
  9890. if(!isNil'unlimAmmRun')then{[unlimAmmRun] call ExileClient_system_thread_removeTask;unlimAmmRun=nil;};
  9891. };
  9892. };
  9893. fnc_infiSTAR_A3noRecoil = {
  9894. if(isNil 'noRecoilRun')then
  9895. {
  9896. _code = {
  9897. (vehicle player) setUnitRecoilCoefficient 0;
  9898. player setUnitRecoilCoefficient 0;
  9899. player setCustomAimCoef 0;
  9900. };
  9901. noRecoilRun = [1, _code, [], true] call ExileClient_system_thread_addtask;
  9902. }
  9903. else
  9904. {
  9905. if(!isNil'noRecoilRun')then{[noRecoilRun] call ExileClient_system_thread_removeTask;noRecoilRun=nil;};
  9906. (vehicle player) setUnitRecoilCoefficient 1;
  9907. player setUnitRecoilCoefficient 1;
  9908. };
  9909. };
  9910. fnc_infiSTAR_A3FF = {
  9911. if(isNil 'A3FFrun')then
  9912. {
  9913. _code = {
  9914. _muzzle = currentWeapon player;
  9915. if(_muzzle isEqualType '')then
  9916. {
  9917. (vehicle player) setWeaponReloadingTime [player, _muzzle, 0];
  9918. };
  9919. };
  9920. A3FFrun = [0.1, _code, [], true] call ExileClient_system_thread_addtask;
  9921. }
  9922. else
  9923. {
  9924. if(!isNil'A3FFrun')then{[A3FFrun] call ExileClient_system_thread_removeTask;A3FFrun=nil;};
  9925. };
  9926. };
  9927. fnc_infiSTARHIDE = {
  9928. if(isNil'A3HIDErun')then
  9929. {
  9930. [2,true] call fnc_AdminReq;
  9931. A3HIDErun = true;
  9932. }
  9933. else
  9934. {
  9935. [2,false] call fnc_AdminReq;
  9936. A3HIDErun = nil;
  9937. };
  9938. };
  9939. fnc_DisableAnnouncements = {
  9940. if(isNil 'A3DANNrun')then{A3DANNrun = 0;};
  9941. if(A3DANNrun==0)then
  9942. {
  9943. A3DANNrun=1;
  9944. AdminAnnounceDisabled = true;
  9945. }
  9946. else
  9947. {
  9948. A3DANNrun=0;
  9949. AdminAnnounceDisabled = nil;
  9950. };
  9951. };
  9952. fnc_FreeRoamCam = {
  9953. if(isNil 'freeFlightCam')then
  9954. {
  9955. camDestroy freeFlightCam;
  9956. freeFlightCam = nil;
  9957. _getPos = player modelToWorld[0,3, 1.75];
  9958. freeFlightCam = 'camera' camCreate _getPos;
  9959. freeFlightCam setDir([_getPos, player] call BIS_fnc_dirTo);
  9960. freeFlightCam camCommand 'MANUAL ON';
  9961. freeFlightCam camCommand 'INERTIA OFF';
  9962. freeFlightCam cameraEffect['INTERNAL', 'BACK'];
  9963. showCinemaBorder false;
  9964. _log = 'Right Click To Cancel!';
  9965. _log call FN_SHOW_LOG;
  9966. }
  9967. else
  9968. {
  9969. camDestroy freeFlightCam;
  9970. freeFlightCam = nil;
  9971. };
  9972. };
  9973. fnc_BIS_FreeRoamCam = {
  9974. if(!isNil'camerathread')then{terminate camerathread;camerathread=nil;};
  9975. camerathread = [] spawn (uinamespace getvariable 'bis_fnc_camera');
  9976. };
  9977. fnc_createBillboard = {
  9978. _textureid = _this;
  9979. _selected = pathToCustomBillBoardTextures select _textureid;
  9980. _name = _selected select 0;
  9981. _texture = _selected select 1;
  9982. _dir = getDir player + 90;
  9983. _location = player modelToWorld [0,5,0];
  9984.  
  9985. [4,_texture,_textureid,_dir,_location] call fnc_AdminReq;
  9986.  
  9987. _log = format['Billoard %1 created!',_name];
  9988. _log call FN_SHOW_LOG;
  9989. _log call fnc_adminLog;
  9990. };
  9991. fnc_deleteVeh_selected = {
  9992. {player reveal _x;} foreach (cameraOn nearObjects 50);
  9993. _target = _this select 0;
  9994. if(typeName _target != 'OBJECT')then{_target = cursorTarget;};
  9995. if(isNull _target)then{_target = cursorObject;};
  9996. if(!isNull _target)then
  9997. {
  9998. if(isPlayer _target && vehicle _target isKindOf 'Man')exitWith{systemChat '<infiSTAR.de> can not delete a player..';};
  9999.  
  10000. _delete = (vehicle _target);
  10001.  
  10002. if(isNil 'DELETE_TARGET')then{DELETE_TARGET = objNull;};
  10003. if(str DELETE_TARGET != str _delete)exitWith
  10004. {
  10005. _type = typeOf _delete;
  10006. _distance = round(cameraOn distance _delete);
  10007.  
  10008.  
  10009. if(_type isEqualTo '')then{
  10010. _type = _delete;
  10011. }
  10012. else
  10013. {
  10014. _displayName = gettext (configFile >> 'CfgVehicles' >> _type >> 'displayName');
  10015. _type = format['%1(%2)',_type,_displayName];
  10016. };
  10017. _log = format['DELETE: %1 distance %2m? (press continue and delete again)',_type,_distance];
  10018.  
  10019.  
  10020. _log call FN_SHOW_LOG;
  10021. DELETE_TARGET = _delete;
  10022. };
  10023.  
  10024. if(isNil 'ToDeleteArray')then{ToDeleteArray = [];};
  10025. if(_delete in ToDeleteArray)then
  10026. {
  10027. _log = format['%1 - IN DELETE QUEUE',_delete];
  10028. _log call FN_SHOW_LOG;
  10029. }
  10030. else
  10031. {
  10032. _netId = netId _delete;
  10033. if(_netId isEqualTo '0:0')then
  10034. {
  10035. deleteVehicle _delete;
  10036. }
  10037. else
  10038. {
  10039. ToDeleteArray pushBack _delete;
  10040. [-4,netId _delete] call fnc_AdminReq;
  10041. };
  10042.  
  10043. _log = format['Deleting %1 @%2..',typeOf _delete,mapGridPosition _delete];
  10044. if(getPlayerUID _target != '')then
  10045. {
  10046. _log = format['Deleting %1(%2) vehicle: %3 @%4..',name _target,getPlayerUID _target,typeOf _delete,mapGridPosition _delete];
  10047. };
  10048. _log call FN_SHOW_LOG;
  10049. systemchat _log;
  10050. diag_log _log;
  10051. _log call fnc_adminLog;
  10052. };
  10053. }
  10054. else
  10055. {
  10056. DELETE_TARGET = objNull;
  10057. };
  10058. };
  10059. fnc_flipVeh = {
  10060. _target = _this select 0;
  10061. if(typeName _target != 'OBJECT')then
  10062. {
  10063. _target = cursorTarget;
  10064. };
  10065. if(isNull _target)then{_target = cursorObject;};
  10066. _target = vehicle _target;
  10067. if((!isNull _target) && {alive _target} && {_target isKindOf 'Landvehicle' || _target isKindOf 'Air' || _target isKindOf 'Ship'})then
  10068. {
  10069. if(local _target)then
  10070. {
  10071. _pos = getPos _target;
  10072. _pos set[2,(_pos select 2)+2];
  10073. _target setPos _pos;
  10074. _target setVectorUp [0,0,1];
  10075. }
  10076. else
  10077. {
  10078. [-3,netId _target] call fnc_AdminReq;
  10079. };
  10080.  
  10081. _log = format['Flipping %1 @%2..',typeOf _target,mapGridPosition _target];
  10082. _log call FN_SHOW_LOG;
  10083. };
  10084. };
  10085. fnc_Light_selected = {
  10086. _target = _this select 0;
  10087. _pos = screenToWorld [0.5,0.5];
  10088. if(typeName _target != 'OBJECT')then
  10089. {
  10090. _target = cursorTarget;
  10091. };
  10092. if(isNull _target)then{_target = cursorObject;};
  10093.  
  10094. _log = format['Lightning @%1 %2',_pos,mapGridPosition _pos];
  10095. if(!isNull _target)then
  10096. {
  10097. _pos = getPos _target;
  10098.  
  10099. _log = format['Lightning %1 @%2 %3',typeOf _target,_pos,mapGridPosition _pos];
  10100. if(getPlayerUID _target != '')then
  10101. {
  10102. _log = format['Lightning %1(%2) @%3 %4',name _target,getPlayerUID _target,_pos,mapGridPosition _pos];
  10103. };
  10104. };
  10105. _log call FN_SHOW_LOG;
  10106.  
  10107. _log call fnc_adminLog;
  10108. [-1,_pos] call fnc_AdminReq;
  10109. };
  10110. fnc_Kill_selected = {
  10111. _target = _this select 0;
  10112. if(typeName _target != 'OBJECT')then
  10113. {
  10114. _target = cursorTarget;
  10115. };
  10116. if(isNull _target)then{_target = cursorObject;};
  10117. if(!isNull _target)then
  10118. {
  10119. if(alive _target)then
  10120. {
  10121. if!(_target getVariable ['killed',''] isEqualTo '')exitWith{};
  10122.  
  10123. _log = format['Killing %1 @%2',typeOf _target,mapGridPosition _target];
  10124. if(getPlayerUID _target != '')then
  10125. {
  10126. _log = format['Killing %1(%2) @%3',name _target,getPlayerUID _target,mapGridPosition _target];
  10127. };
  10128. _log call FN_SHOW_LOG;
  10129.  
  10130. _log call fnc_adminLog;
  10131. _target setVariable ['killed',format['%1(%2)',profileName,getPlayerUID player]];
  10132. [-2,netId _target] call fnc_AdminReq;
  10133. };
  10134. };
  10135. };
  10136. fnc_Explode_selected = {
  10137. _target = _this select 0;
  10138. if(typeName _target != 'OBJECT')then
  10139. {
  10140. _target = cursorTarget;
  10141. };
  10142. if(isNull _target)then{_target = cursorObject;};
  10143. _pos = screenToWorld [0.5,0.5];
  10144. _log = format['Exploding @%1',mapGridPosition _pos];
  10145. if(!isNull _target)then
  10146. {
  10147. _log = format['Exploding %1 @%2',typeOf _target,mapGridPosition _target];
  10148. if(isPlayer _target)then
  10149. {
  10150. _log = format['Exploding %1(%2) @%3',name _target,getPlayerUID _target,mapGridPosition _target];
  10151. };
  10152.  
  10153. _eyepos = ASLToATL eyepos _target;if(surfaceIsWater _eyepos)then{_eyepos = eyepos _target;};
  10154. _pos = getPosVisual _target;
  10155. _pos set[2,_eyepos select 2];
  10156. };
  10157. _log call FN_SHOW_LOG;
  10158. _log call fnc_adminLog;
  10159.  
  10160. _bomb = 'HelicopterExploSmall' createVehicleLocal _pos;
  10161. };
  10162. fnc_Disconnect_selected = {
  10163. _target = _this select 0;
  10164. if(!isNull _target)then
  10165. {
  10166. [-664,netId _target] call fnc_AdminReq;
  10167. _log = format['Disconnect %1(%2)',name _target,getPlayerUID _target];
  10168. _log call FN_SHOW_LOG;
  10169. }
  10170. else
  10171. {
  10172. _log = 'target does not exist';
  10173. _log call FN_SHOW_LOG;
  10174. };
  10175. };
  10176. fnc_get_reason = {
  10177. disableSerialization;
  10178. if(_this isEqualTo [])exitWith{systemChat 'no input';};
  10179. if(isNull findDisplay -1341)then{(findDisplay MAIN_DISPLAY_ID) closeDisplay 0;createdialog 'infiSTAR_EDITBOX';};
  10180. _display = findDisplay -1341;
  10181. _ctrl = [_display,'RSCButton',7337] call fnc_createctrl;
  10182. _ctrl ctrlSetText 'SUBMIT REASON';
  10183. _ctrl ctrlSetPosition [
  10184. 0.5,
  10185. 0.75,
  10186. 0.25,
  10187. 0.033 * safezoneH
  10188. ];
  10189. _ctrl ctrlSetEventHandler['ButtonClick','
  10190. _input = '+str _this+';
  10191. _adminreq = _input select 0;
  10192. _opt = _input select 1;
  10193. _TNAME = _input select 2;
  10194. _TUID = _input select 3;
  10195. _what = _input select 4;
  10196.  
  10197. _txt = ctrlText ((findDisplay -1341) displayCtrl 1336);
  10198. _txt = if(_txt isEqualTo '''')then{''ADMIN DECISION''}else{_txt select [0,300]};
  10199. _adminreq pushBack (toArray _txt);
  10200. _adminreq call fnc_AdminReq;
  10201.  
  10202. if(_opt isEqualTo 1)then
  10203. {
  10204. _msg = format[''%1 has been %2!'',_TNAME,_what];
  10205. [8,toArray _msg] call fnc_AdminReq;
  10206. };
  10207. _log = format[''%4 %1(%2): %3'',_TNAME,_TUID,_txt,_what];
  10208. _log call FN_SHOW_LOG;
  10209. true;'];
  10210. _ctrl ctrlCommit 0;
  10211. _ctrl = [_display,'RSCButton',7338] call fnc_createctrl;
  10212. _ctrl ctrlSetText 'STOP';
  10213. _ctrl ctrlSetPosition [
  10214. 0.25,
  10215. 0.75,
  10216. 0.25,
  10217. 0.033 * safezoneH
  10218. ];
  10219. _ctrl ctrlSetEventHandler['ButtonClick','closeDialog 0;true'];
  10220. _ctrl ctrlCommit 0;
  10221. };
  10222. fnc_do_target = {
  10223. _target = _this select 0;
  10224. _option = _this select 1;
  10225. _suboption = _this select 1;
  10226.  
  10227. if(!isNull _target)then
  10228. {
  10229. _TUID = getPlayerUID _target;
  10230. if(_TUID != '')then
  10231. {
  10232. _TNAME = name _target;
  10233. _input = call {
  10234. if(_option isEqualTo 0)exitWith{[[-665,netId _target],_suboption,_TNAME,_TUID,'KICKED']};
  10235. if(_option isEqualTo 1)exitWith{[[-666,0,netId _target],_suboption,_TNAME,_TUID,'BANNED']};
  10236. if(_option isEqualTo 2)exitWith{[[-666,1,netId _target],_suboption,_TNAME,_TUID,'TEMP-BANNED']};
  10237. []
  10238. };
  10239. _input call fnc_get_reason;
  10240. };
  10241. }
  10242. else
  10243. {
  10244. _log = 'target does not exist';
  10245. _log call FN_SHOW_LOG;
  10246. };
  10247. };
  10248. fnc_ATTACH_TO = {
  10249. if(isNil'LastAttachedObject')then{LastAttachedObject=objNull;};
  10250. if(!isNull LastAttachedObject)exitWith{detach LastAttachedObject;LastAttachedObject = nil;};
  10251.  
  10252. _target = _this select 0;
  10253. if(typeName _target != 'OBJECT')then
  10254. {
  10255. _target = cursorTarget;
  10256. };
  10257. if(isNull _target)then{_target = cursorObject;};
  10258. if(!isNull _target)then
  10259. {
  10260. _bbr = boundingBoxReal _target;
  10261. _p1 = _bbr select 0;
  10262. _p2 = _bbr select 1;
  10263. _offset = 5;
  10264. _maxWidth = abs ((_p2 select 0) - (_p1 select 0));
  10265. _maxLength = abs ((_p2 select 1) - (_p1 select 1));
  10266. if(_maxWidth > _offset)then{_offset = _maxWidth;};
  10267. if(_maxLength > _offset)then{_offset = _maxLength;};
  10268.  
  10269. _bbr = boundingBoxReal vehicle player;
  10270. _p1 = _bbr select 0;
  10271. _p2 = _bbr select 1;
  10272. _maxHeight = abs ((_p2 select 2) - (_p1 select 2));
  10273.  
  10274. [5,netId _target,_offset,_maxHeight] call fnc_AdminReq;
  10275. LastAttachedObject = _target;
  10276.  
  10277. _log = format['Attaching %1 to player',typeOf _target];
  10278. _log call FN_SHOW_LOG;
  10279. }
  10280. else
  10281. {
  10282. _log = 'target does not exist';
  10283. _log call FN_SHOW_LOG;
  10284. };
  10285. };
  10286. fnc_ReviveTarget = {
  10287. _target = _this select 0;
  10288. if(!isNull _target)then
  10289. {
  10290. if(alive _target)exitWith
  10291. {
  10292. _log = 'target already alive..!';
  10293. _log call FN_SHOW_LOG;
  10294. };
  10295. if(getPlayerUID _target != '')then
  10296. {
  10297. moveOut _target;
  10298. unassignVehicle _target;
  10299. _target action ['eject', (vehicle _target)];
  10300.  
  10301. _log = format['Revived %1(%2) @%3',name _target,getPlayerUID _target,mapGridPosition _target];
  10302. _log call FN_SHOW_LOG;
  10303. [19,netId _target] call fnc_AdminReq;
  10304. };
  10305. }
  10306. else
  10307. {
  10308. _log = 'target does not exist';
  10309. _log call FN_SHOW_LOG;
  10310. };
  10311. };
  10312. fnc_HealTarget = {
  10313. _target = _this select 0;
  10314. if(typeName _target != 'OBJECT')then
  10315. {
  10316. _target = cursorTarget;
  10317. };
  10318. if(isNull _target)then{_target = cursorObject;};
  10319. if(!isNull _target)then
  10320. {
  10321. _log = format['Healed %1 @%2',typeOf _target,mapGridPosition _target];
  10322. if(getPlayerUID _target != '')then
  10323. {
  10324. _log = format['Healed %1(%2) @%3',name _target,getPlayerUID _target,mapGridPosition _target];
  10325. };
  10326. _log call FN_SHOW_LOG;
  10327.  
  10328. [9,netId _target] call fnc_AdminReq;
  10329. }
  10330. else
  10331. {
  10332. _log = 'target does not exist';
  10333. _log call FN_SHOW_LOG;
  10334. };
  10335. };
  10336. fnc_RepairTarget = {
  10337. _target = _this select 0;
  10338. if(typeName _target != 'OBJECT')then
  10339. {
  10340. _target = cursorTarget;
  10341. };
  10342. if(isNull _target)then{_target = cursorObject;};
  10343. if(!isNull _target)then
  10344. {
  10345. _log = format['%1 @%2 - Repaired & Refueled',typeOf _target,mapGridPosition _target];
  10346. if(getPlayerUID _target != '')then
  10347. {
  10348. _log = format['%1 @%2 - Repaired & Refueled @%3',name _target,getPlayerUID _target,mapGridPosition _target];
  10349. };
  10350. _log call FN_SHOW_LOG;
  10351.  
  10352. [9,netId (vehicle _target)] call fnc_AdminReq;
  10353. }
  10354. else
  10355. {
  10356. _log = 'target does not exist';
  10357. _log call FN_SHOW_LOG;
  10358. };
  10359. };
  10360. infiSTAR_A3Heal = {
  10361. [9,netId cameraOn] call fnc_AdminReq;
  10362. _log = format['Healed %1(%2)',name cameraOn,getPlayerUID cameraOn];
  10363. _log call FN_SHOW_LOG;
  10364. };
  10365. infiSTAR_A3RestoreNear = {
  10366. _done = [];
  10367. {
  10368. _crewandobject = [_x];
  10369. _crewandobject append (crew _x);
  10370.  
  10371. {
  10372. _id = _done pushBackUnique _x;
  10373. if(_id > -1)then
  10374. {
  10375. [9,netId _x] call fnc_AdminReq;
  10376. };
  10377. } forEach _crewandobject;
  10378. } forEach (cameraOn nearEntities ['AllVehicles',15]);
  10379.  
  10380. _log = format['Restored Near %1(%2)',name cameraOn,getPlayerUID cameraOn];
  10381. _log call FN_SHOW_LOG;
  10382. };
  10383. fn_addArsenalAction = {
  10384. if('Arsenal' call ADMINLEVELACCESS)then
  10385. {
  10386. _log = '';
  10387. _id = player getVariable ['arsenal_action_id',-1];
  10388. if(_id > -1)then
  10389. {
  10390. player removeAction _id;
  10391. _id = -1;
  10392. _log = 'Arsenal Action removed from player.';
  10393. }
  10394. else
  10395. {
  10396. _id = player addAction ['Arsenal',{['Open',true] call BIS_fnc_arsenal;}];
  10397. _log = 'Arsenal Action added to player.';
  10398. };
  10399. player setVariable ['arsenal_action_id',_id];
  10400. _log call FN_SHOW_LOG;
  10401. _log call fnc_adminLog;
  10402. };
  10403. };
  10404. infiSTAR_A3addAmmo = {
  10405. if(isNil'SELECTED_TARGET_PLAYER')then{SELECTED_TARGET_PLAYER=player;};
  10406. if(isNull SELECTED_TARGET_PLAYER)then{SELECTED_TARGET_PLAYER=player;};
  10407. if(!alive SELECTED_TARGET_PLAYER)then{SELECTED_TARGET_PLAYER=player;};
  10408. _log = '';
  10409. _veh = vehicle SELECTED_TARGET_PLAYER;
  10410. if(_veh == SELECTED_TARGET_PLAYER)then
  10411. {
  10412. _muzzle = currentWeapon SELECTED_TARGET_PLAYER;
  10413. _magArray = getArray(configFile >> 'CfgWeapons' >> _muzzle >> 'magazines');
  10414. if((((toLower _muzzle) find '_gl' != -1) && {((toLower _muzzle) find '_glock' == -1)})||((toLower _muzzle) find 'm203' != -1))then
  10415. {
  10416. _pewpews = [];
  10417. {
  10418.  
  10419. if(((toLower _x) select [0,4] in ['1rnd','3rnd'])||((toLower _x) find 'ugl_' != -1))then
  10420. {
  10421. _pewpews pushBack _x;
  10422. };
  10423. } forEach ALL_MAGS_TO_SEARCH_C;
  10424. _magArray append _pewpews;
  10425. };
  10426. if(_magArray isEqualTo [])exitWith{};
  10427. [] call fnc_FULLinit;
  10428. LASTSUBBUTTON = 0;
  10429. FILLMAINSTATE = 6;
  10430. disableSerialization;
  10431. _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_SHIFT_ID;
  10432. lbclear _ctrl;
  10433. _ctrl lbAdd '==== Magazines ====';
  10434. {
  10435. _lbid = _ctrl lbAdd format['%1 (%2)',getText(configFile >> 'CfgMagazines' >> _x >> 'displayName'),_x];
  10436. _ctrl lbSetData [_lbid,_x];
  10437. _x call fnc_addpic;
  10438. } forEach _magArray;
  10439. [] call fnc_colorizeMain;
  10440. for '_i' from 0 to 12 do {_ctrl lbAdd '';};
  10441. }
  10442. else
  10443. {
  10444. _log = format['%1 added Ammo to %2',name SELECTED_TARGET_PLAYER,typeOf _veh];
  10445. {
  10446. _wep = _x;
  10447. {
  10448. [_veh,_x] call fnc_reallyAdditem;
  10449. } forEach (getArray (configFile >> 'CfgWeapons' >> _wep >> 'magazines'));
  10450. } forEach (weapons _veh);
  10451. };
  10452. _log call FN_SHOW_LOG;
  10453. _log call fnc_adminLog;
  10454. };
  10455. infiSTAR_A3Invulnerability = {
  10456. if(isNil 'A3Invulnerability')then
  10457. {
  10458. _code = {
  10459. player allowDamage false;
  10460. player removeAllEventhandlers 'HandleDamage';
  10461. player addEventhandler ['HandleDamage', {false}];
  10462. ExileClientPlayerAttributes = [100,100,100,100,0,37,0];
  10463. ExileClientPlayerAttributesASecondAgo = ExileClientPlayerAttributes;
  10464. ExileClientPlayerLastHpRegenerationAt = diag_tickTime;
  10465. ExileClientPlayerIsOverburdened = false;
  10466. ExileClientPlayerOxygen = 100;
  10467. ExileClientPlayerIsAbleToBreathe = true;
  10468. ExileClientPlayerIsDrowning = false;
  10469. ExileClientPlayerIsInjured = false;
  10470. ExileClientPlayerIsBurning = false;
  10471. ExileClientPlayerIsBleeding = false;
  10472. ExileClientPlayerIsExhausted = false;
  10473. ExileClientPlayerIsHungry = false;
  10474. ExileClientPlayerIsThirsty = false;
  10475. player setBleedingRemaining 0;
  10476. player setOxygenRemaining 1;
  10477. player setFatigue 0;
  10478. if(damage player > 0)then{player setDamage 0;};
  10479. if(!isNil'ExileRadiationThreadHandle')then
  10480. {
  10481. [] call ExileClient_system_radiation_event_onPlayerDied;
  10482. ExilePlayerRadiation = 0;
  10483. ExilePlayerRadiationLastCheck = 0;
  10484. };
  10485. };
  10486. A3Invulnerability = [0.1, _code, [], true] call ExileClient_system_thread_addtask;
  10487. }
  10488. else
  10489. {
  10490. if(!isNil'A3Invulnerability')then{[A3Invulnerability] call ExileClient_system_thread_removeTask;A3Invulnerability=nil;};
  10491. player allowDamage true;
  10492. player removeAllEventhandlers 'HandleDamage';
  10493. player addEventHandler ['HandleDamage',{_this call ExileClient_object_player_event_onHandleDamage}];
  10494. [] call ExileClient_system_radiation_event_onPlayerSpawned;
  10495. };
  10496. };
  10497. infiSTAR_A3Invulnerability2 = {
  10498. if(isNil 'A3Invulnerability2')then
  10499. {
  10500. _code = {
  10501. player allowDamage false;
  10502. player removeAllEventhandlers 'HandleDamage';
  10503. player addEventhandler ['HandleDamage', {false}];
  10504. if(damage player > 0)then{player setDamage 0;};
  10505. };
  10506. A3Invulnerability2 = [0.1, _code, [], true] call ExileClient_system_thread_addtask;
  10507. }
  10508. else
  10509. {
  10510. if(!isNil'A3Invulnerability2')then{[A3Invulnerability2] call ExileClient_system_thread_removeTask;A3Invulnerability2=nil;};
  10511. player allowDamage true;
  10512. player removeAllEventhandlers 'HandleDamage';
  10513. player addEventHandler ['HandleDamage',{_this call ExileClient_object_player_event_onHandleDamage}];
  10514. };
  10515. };
  10516. fnc_draw3dhandlerAI = ""
  10517. if(!isNull cameraOn)then
  10518. {
  10519. ALLVEHICLES_OBJECTS_1500m = cameraOn nearEntities ['Allvehicles',1500];
  10520. {
  10521. if(!isNull _x)then
  10522. {
  10523. if(alive _x)then
  10524. {
  10525. _PUIDX = getPlayerUID _x;
  10526. if(_PUIDX == '')then
  10527. {
  10528. if(_x isKindOf 'Animal_Base_F')exitWith{};
  10529. _crew = crew _x;
  10530. if!(_crew isEqualTo [])then
  10531. {
  10532. _distance = cameraOn distance _x;
  10533. _txt = 'AI';
  10534. _type = typeOf _x;
  10535. if(_x isKindOf 'Man')then
  10536. {
  10537. if(_type select [0,11] in ['Exile_Trade','Exile_Guard'])then
  10538. {
  10539. _txt = format['%1 (%2m)',_type,round _distance];
  10540. }
  10541. else
  10542. {
  10543. _txt = format['AI (%1m)',round _distance];
  10544. };
  10545. }
  10546. else
  10547. {
  10548. _txt = format['AI - %1 (%2m)',gettext (configFile >> 'CfgVehicles' >> _type >> 'displayName'),round _distance];
  10549. };
  10550.  
  10551. _grp = group _x;
  10552. if(!isNull _grp)then
  10553. {
  10554. _txt = format['%1 GRP:%2 UNITS:%3',_txt,allGroups find _grp,count units _grp];
  10555. };
  10556. _pos = ASLToATL eyepos _x;
  10557. if(surfaceIsWater _pos)then{_pos = eyepos _x;};
  10558. drawIcon3D['',[1,0,0.75,0.7],_pos,.1,.1,0,_txt,1,.03];
  10559. };
  10560. };
  10561. };
  10562. };
  10563. } forEach ALLVEHICLES_OBJECTS_1500m;
  10564. };
  10565. "";
  10566. fnc_draw3dhandlerDEAD = ""
  10567. {
  10568. if(!isNull _x)then
  10569. {
  10570. if!(getPlayerUID _x isEqualTo '')exitWith{};
  10571.  
  10572. _distance = cameraOn distance _x;
  10573. if(_distance < 500)then
  10574. {
  10575. _name = _x getVariable['ExileName',''];
  10576. if(_name != '')then
  10577. {
  10578. _clr = [1,1,1,0.7];
  10579. _txt = format['%1 %2m',_name,round _distance];
  10580. _pos = _x modelToWorld [0,0,1];
  10581. drawIcon3D['',_clr,_pos,0,0,45,_txt,0,.032];
  10582. };
  10583. };
  10584. };
  10585. } forEach allDeadMen;
  10586. "";
  10587. fnc_call_single_esps = {
  10588. if(!isNil'infiSTAREspEHVAR')then{
  10589. removeMissionEventHandler ['Draw3D',infiSTAREspEHVAR];
  10590. infiSTAREspEHVAR=nil;
  10591. };
  10592. _string = '';
  10593. if(!isNil 'fnc_infiESP_stateAI')then
  10594. {
  10595. _string = _string + fnc_draw3dhandlerAI;
  10596. };
  10597. if(!isNil 'fnc_infiESP_stateDEAD')then
  10598. {
  10599. _string = _string + fnc_draw3dhandlerDEAD;
  10600. };
  10601. if(_string != '')then
  10602. {
  10603. _string = ('if(!isNull findDisplay 49)exitWith{true};'+_string);
  10604. infiSTAREspEHVAR = addMissionEventHandler ['Draw3D',_string];
  10605. };
  10606. };
  10607. fnc_PlayerESP_NORM_CODE = {
  10608. private['_distance','_alpha','_clr','_crew','_pos'];
  10609.  
  10610. {
  10611. _distance = round(cameraOn distance _x);
  10612. if(_distance < 2000)then
  10613. {
  10614. _alpha = (1-(_distance/2000/1.5));
  10615. _isOnFoot = isNull objectParent _x;
  10616. if(_isOnFoot)then
  10617. {
  10618. _name = _x call FN_GET_NAME;
  10619. _clr = _x call FN_GET_CLR;
  10620. _curwep = currentWeapon _x;
  10621. _hp = round((damage _x - 1) * -100);
  10622. _txt = format['unarmed - %1HP',_hp];
  10623.  
  10624. _pos = _x modelToWorldVisual (_x selectionPosition 'head');
  10625. _pos2D = worldToScreen _pos;
  10626.  
  10627.  
  10628. _txt2 = '';
  10629. if(alive _x)then
  10630. {
  10631. _txt2 = format['%1 - %2m',_name,_distance];
  10632. }
  10633. else
  10634. {
  10635. _txt2 = format['%1 - %2m (DEAD, but still watching)',_name,_distance];
  10636. };
  10637. if(abs(_pos2D select 0) < 1)then
  10638. {
  10639. if(_curwep != '')then
  10640. {
  10641. _txt = format['%1 - [%2/%3] - %4HP',gettext(configFile >> 'CfgWeapons' >> _curwep >> 'displayName'),_x ammo _curwep,getNumber(configFile >> 'CfgMagazines' >> currentMagazine _x >> 'count'),_hp];
  10642. };
  10643.  
  10644. _dir = [_x,cameraOn] call BIS_fnc_relativeDirTo;
  10645. drawIcon3D['iconManMedic',_clr,_pos,.5,.5,if(_x isEqualTo cameraOn)then{_dir}else{_dir+180},_txt,1,0.03,'PuristaMedium','',true];
  10646. drawIcon3D['',_clr,_pos,.5,0,0,_txt2,1,0.03,'PuristaMedium','',true];
  10647. }
  10648. else
  10649. {
  10650. drawIcon3D['iconManMedic',_clr,_pos,.5,.5,([_x,cameraOn] call BIS_fnc_relativeDirTo)+180,_txt2,1,0.03,'PuristaMedium','',true];
  10651. };
  10652. }
  10653. else
  10654. {
  10655. _veh = vehicle _x;
  10656. _class = typeOf _veh;
  10657. _speed = round(speed _veh*100)/100;
  10658. _maxSpeed = getNumber(configFile >> 'CfgVehicles' >> _class >> 'maxSpeed');
  10659. _typename = gettext(configFile >> 'CfgVehicles' >> _class >> 'displayName');
  10660. _icon = gettext(configFile >> 'CfgVehicles' >> _class >> 'Picture');
  10661.  
  10662. _crew = crew _veh;
  10663. _vehclr = [0.047,0.502,1,_alpha];
  10664. if(!alive _veh)then{_vehclr = [1,1,1,_alpha]};
  10665.  
  10666. _pos = _veh modelToWorldVisual [0,0,0];
  10667. _pos2D = worldToScreen _pos;
  10668. if(abs(_pos2D select 0) < 1)then
  10669. {
  10670. _cnt = count _crew;
  10671. if(_cnt > 0)then
  10672. {
  10673. _num = _cnt * -1;
  10674. {
  10675. _height = _num + _forEachIndex;
  10676. _role = assignedVehicleRole _x;
  10677. if(_role isEqualTo [])then{_role = 'Passenger';}else{_role = _role select 0;};
  10678. _txt = format['%1. %2 - %3 %4HP',_forEachIndex,_role,_x call FN_GET_NAME,round((1-(damage _x))*100)];
  10679. drawIcon3D['\A3\ui_f\data\map\Markers\Military\dot_ca.paa',[1,0.17,0.17,_alpha],_x modelToWorldVisual (_x selectionPosition 'head'),0,0,0,format['%1',_forEachIndex],1,0.03,'PuristaMedium','',true];
  10680. drawIcon3D['',_x call FN_GET_CLR,_pos,.5,_height,0,_txt,1,0.03,'PuristaMedium','',true];
  10681. } forEach _crew;
  10682. };
  10683.  
  10684. _txt = format['%1 - %2m',_typename,_distance];
  10685. drawIcon3D['',_vehclr,_pos,.5,0,0,_txt,1,0.03,'PuristaMedium','',true];
  10686.  
  10687. _txt = format['%1/%2km/h %3HP',_speed,_maxSpeed,round((1-(damage _veh))*100)];
  10688. drawIcon3D[_icon,_vehclr,_pos,.5,.5,0,_txt,1,0.03,'PuristaMedium','',true];
  10689. }
  10690. else
  10691. {
  10692. _crewnames = '';
  10693. {
  10694. if(_crewnames == '')then
  10695. {
  10696. _crewnames = _x call FN_GET_NAME;
  10697. }
  10698. else
  10699. {
  10700. _crewnames = format['%1, %2',_crewnames,_x call FN_GET_NAME];
  10701. };
  10702. } forEach _crew;
  10703.  
  10704. _txt = format['%1 - %2 - %3HP - %4m',_crewnames,_typename,round((1-(damage _veh))*100),_distance];
  10705. drawIcon3D[_icon,_vehclr,_pos,.5,.5,0,_txt,1,0.03,'PuristaMedium','',true];
  10706. };
  10707. };
  10708. };
  10709. } forEach plr_in_sd;
  10710. true
  10711. };
  10712. fnc_PlayerESP_NORM = {
  10713. if(!isNil'plr_in_sd_task')then{[plr_in_sd_task] call ExileClient_system_thread_removeTask;plr_in_sd_task=nil;};
  10714. if(isNil'fnc_PlayerESP_NORM_ID')then
  10715. {
  10716. plr_in_sd = (call fnc_get_plr);
  10717. _code = {
  10718. plr_in_sd = [];{if(cameraOn distance _x < 3000)then{plr_in_sd pushBackUnique _x;};} forEach (call fnc_get_plr);
  10719. };
  10720. plr_in_sd_task = [3, _code, [], true] call ExileClient_system_thread_addtask;
  10721. fnc_PlayerESP_NORM_ID = addMissionEventHandler ['Draw3D', { if(isNull findDisplay 49)then{[] call fnc_PlayerESP_NORM_CODE;};true } ];
  10722. }
  10723. else
  10724. {
  10725. plr_in_sd = [];
  10726. removeMissionEventHandler ['Draw3D', fnc_PlayerESP_NORM_ID];fnc_PlayerESP_NORM_ID=nil;
  10727. };
  10728. };
  10729. fnc_PlayerESP_SS_CODE = {
  10730. private['_espRenderRange','_distance','_alpha','_clr','_crew','_pos'];
  10731. _espRenderRange = _this;
  10732. if (!isNull cameraOn) then
  10733. {
  10734. {
  10735. if(!isNull _x)then
  10736. {
  10737. if(isPlayer _x)then
  10738. {
  10739. _distance = round(cameraOn distance _x);
  10740. _alpha = (1-(_distance/_espRenderRange/1.5));
  10741. _clr = [1,1,1,_alpha];
  10742. _crew = crew (vehicle _x);
  10743. _name = '';
  10744. {
  10745. if(_forEachIndex == 0) then
  10746. {
  10747. _name = format['%1(%2m)',_x call FN_GET_NAME,_distance];
  10748. }
  10749. else
  10750. {
  10751. _name = _name + format[', %1(%2m)',_x call FN_GET_NAME,_distance];
  10752. };
  10753. } forEach _crew;
  10754. _pos = _x modelToWorldVisual (_x selectionPosition 'head');
  10755. drawIcon3D['\A3\ui_f\data\map\Markers\Military\dot_ca.paa',_clr,_pos,.3,.3,0,_name,1,0.03];
  10756. };
  10757. };
  10758. } forEach ((cameraOn nearEntities[['Exile_Unit_Player', 'LandVehicle', 'Ship', 'Air'], _espRenderRange]) - [cameraOn]);
  10759. };
  10760. };
  10761. fnc_PlayerESP_SS = {
  10762. if(isNil'fnc_PlayerESP_SS_ID')then
  10763. {
  10764. fnc_PlayerESP_SS_ID = addMissionEventHandler ['Draw3D', { if(isNull findDisplay 49)then{2000 call fnc_PlayerESP_SS_CODE;};true } ];
  10765. }
  10766. else
  10767. {
  10768. removeMissionEventHandler ['Draw3D', fnc_PlayerESP_SS_ID];fnc_PlayerESP_SS_ID=nil;
  10769. };
  10770. };
  10771. iconTextSize = 250 * pixelH;
  10772. nameTextSize = 15 * pixelH;
  10773. fnc_LootESP_CODE = {
  10774. if (!isNull cameraOn) then
  10775. {
  10776. _pos = getPos cameraOn;
  10777. _distance = 300;
  10778.  
  10779. _getinfo = {
  10780. _cnt = count weaponCargo _this;if(_cnt > 0)exitWith{[[1,0,0,1],'Weapon',_cnt]};
  10781. _cnt = count magazineCargo _this;if(_cnt > 0)exitWith{[[1,1,0,1],'Magazine',_cnt]};
  10782. _cnt = count itemCargo _this;if(_cnt > 0)exitWith{[[0,0,1,1],'Item',_cnt]};
  10783. _cnt = count backpackCargo _this;if(_cnt > 0)exitWith{[[0,1,0,1],'Backpack',_cnt]};
  10784. [[1,1,1,1],typeOf _this,1]
  10785. };
  10786.  
  10787. {
  10788. _ret = _x call _getinfo;
  10789. _clr = _ret select 0;
  10790. _txt = _ret select 1;
  10791. _cnt = _ret select 2;
  10792. drawIcon3D['A3\ui_f\data\map\Markers\Military\dot_ca.paa',_clr,getPosATL _x,iconTextSize,iconTextSize,0,format['%1(%2)',_txt,_cnt],0,nameTextSize,'PuristaMedium','',true];
  10793. } forEach (nearestObjects [cameraOn, ['LootWeaponHolder', 'GroundWeaponHolder', 'WeaponHolderSimulated'],_distance]);
  10794. };
  10795. };
  10796. fnc_LootESP = {
  10797. if(isNil'LootESPid')then
  10798. {
  10799. LootESPid = addMissionEventHandler ['Draw3D', { if(isNull findDisplay 49)then{call fnc_LootESP_CODE;};true } ];
  10800. systemChat '<infiSTAR.de> Loot ESP showing loot within 300m';
  10801. }
  10802. else
  10803. {
  10804. removeMissionEventHandler ['Draw3D',LootESPid];
  10805. LootESPid=nil;
  10806. };
  10807. };
  10808. fnc_draw_MapIcons = {
  10809. _icon = '';
  10810. _alpha = 1;
  10811. _iscale = ((1 - ctrlMapScale _ctrl) max .2) * 28;
  10812. if(mapiconsshowplayer)then
  10813. {
  10814. _shown = [];
  10815. {
  10816. if(!isNull _x)then
  10817. {
  10818. _veh = vehicle _x;
  10819. if(_veh in _shown)exitWith{};
  10820. _shown pushBack _veh;
  10821. _PUIDX = getPlayerUID _x;
  10822. if(_PUIDX != '')then
  10823. {
  10824. _name = _x getVariable['ExileName',name _x];
  10825. _type = typeOf _veh;
  10826. _dist = round(_veh distance player);
  10827. _clr = _x call FN_GET_CLR;
  10828. _txt = format['%1 (%2m) (DEAD, but still watching)',_name,_dist];
  10829. if(alive _x)then
  10830. {
  10831. if(_x isEqualTo _veh)then
  10832. {
  10833. _txt = format['%1 (%2m)',_name,_dist];
  10834. }
  10835. else
  10836. {
  10837. _names = '';
  10838. {
  10839. if(_forEachIndex isEqualTo 0)then
  10840. {
  10841. _names = _names + format['%1',_x getVariable['ExileName',name _x]];
  10842. }
  10843. else
  10844. {
  10845. _names = _names + format[', %1',_x getVariable['ExileName',name _x]];
  10846. };
  10847. } forEach (crew _veh);
  10848. _typename = gettext (configFile >> 'CfgVehicles' >> _type >> 'displayName');
  10849. _txt = format['%1 - %2 (%3m)',_names,_typename,_dist];
  10850. };
  10851. };
  10852.  
  10853. _icon = getText(configFile >> 'CfgVehicles' >> _type >> 'icon');
  10854. _grpx = group _x;
  10855. if(!isNull _grpx)then
  10856. {
  10857. _alive = {alive _x} count units _grpx;
  10858. if(_alive > 1)then
  10859. {
  10860. _txt = _txt + format[' GRP:%1 PLR:%2',allGroups find _grpx,_alive];
  10861. };
  10862. };
  10863.  
  10864. _ctrl drawIcon [_icon, _clr, getPosASL _veh, _iscale, _iscale, getDir _veh,_txt];
  10865. };
  10866. };
  10867. } forEach (call fnc_get_plr);
  10868. };
  10869. if(mapiconsshowvehicles||mapiconsshowai)then
  10870. {
  10871. {
  10872. if(!isNull _x)then
  10873. {
  10874. _PUIDX = getPlayerUID _x;
  10875. if(_PUIDX isEqualTo '')then
  10876. {
  10877. _veh = vehicle _x;
  10878. _type = typeOf _veh;
  10879. if(mapiconsshowvehicles)then
  10880. {
  10881. if!(_veh isKindOf 'Man')then
  10882. {
  10883. _icon = getText(configFile >> 'CfgVehicles' >> _type >> 'icon');
  10884. _drawcode = [_icon, [0.67,0.97,0.97,1], getPosASL _veh, _iscale, _iscale, getDir _veh];
  10885. _displayName = '';
  10886. if(mapiconsshowvehiclestypes)then
  10887. {
  10888. _displayName = gettext (configFile >> 'CfgVehicles' >> _type >> 'displayName');
  10889. _drawcode pushBack _displayName;
  10890. };
  10891. if(mapiconsshowvehicleslockstate)then
  10892. {
  10893. _locked = locked _veh;
  10894. if!(_locked isEqualTo 1)then
  10895. {
  10896. if(_locked isEqualTo 0)then
  10897. {
  10898. _drawcode set[1,[0,0.55,0.15,1]];
  10899. }
  10900. else
  10901. {
  10902. _drawcode set[1,[1,0.4,0,1]];
  10903. };
  10904. };
  10905. };
  10906. _ctrl drawIcon _drawcode;
  10907. };
  10908. };
  10909. if(mapiconsshowai)then
  10910. {
  10911. if(_x isKindOf 'Animal_Base_F')exitWith{};
  10912. _crew = crew _x;
  10913. if!(_crew isEqualTo [])then
  10914. {
  10915. _distance = cameraOn distance _x;
  10916. _txt = 'AI';
  10917. _type = typeOf _x;
  10918. if(_x isKindOf 'Man')then
  10919. {
  10920. if(_type select [0,11] in ['Exile_Trade','Exile_Guard'])then
  10921. {
  10922. _txt = format['%1 (%2m)',_type,round _distance];
  10923. }
  10924. else
  10925. {
  10926. _txt = format['AI (%1m)',round _distance];
  10927. };
  10928. }
  10929. else
  10930. {
  10931. _txt = format['AI - %1 (%2m)',gettext (configFile >> 'CfgVehicles' >> _type >> 'displayName'),round _distance];
  10932. };
  10933.  
  10934. _grp = group _x;
  10935. if(!isNull _grp)then
  10936. {
  10937. _txt = format['%1 GRP:%2 UNITS:%3',_txt,allGroups find _grp,count units _grp];
  10938. };
  10939. _icon = getText(configFile >> 'CfgVehicles' >> _type >> 'icon');
  10940. _ctrl drawIcon [_icon, [1,0,0.75,1], getPosASL _x, _iscale, _iscale, getDir _x,_txt];
  10941. };
  10942. };
  10943. };
  10944. };
  10945. } forEach ([0,0,0] nearEntities ['Allvehicles',1000000]);
  10946. };
  10947. if(mapiconsshowdeadvehicles)then
  10948. {
  10949. {
  10950. if((_x isKindOf 'Air')||(_x isKindOf 'Landvehicle'))then
  10951. {
  10952. _veh = vehicle _x;
  10953. _type = typeOf _veh;
  10954. _clr = [1,1,1,1];
  10955. if(_x isEqualTo SELECTED_TARGET_PLAYER)then{_clr = [1,0.7,0.15,1];};
  10956. _icon = getText(configFile >> 'CfgVehicles' >> _type >> 'icon');
  10957. _ctrl drawIcon [_icon, _clr, getPosASL _x, _iscale, _iscale, getDir _x];
  10958. };
  10959. } forEach allDead;
  10960. };
  10961. if(mapiconsshowdeadplayer)then
  10962. {
  10963. {
  10964. if(!isNull _x)then
  10965. {
  10966. _name = _x getVariable['ExileName',''];
  10967. if(_name != '')then
  10968. {
  10969. _veh = vehicle _x;
  10970. _dist = round(_veh distance player);
  10971. _txt = format['%1 (%2m)',_name,_dist];
  10972. if(getPlayerUID _x != '')then
  10973. {
  10974. _txt = format['%1 (%2m) (DEAD, but still watching)',_name,_dist];
  10975. };
  10976. _type = typeOf _veh;
  10977. _clr = [1,1,1,1];
  10978. _icon = getText(configFile >> 'CfgVehicles' >> _type >> 'icon');
  10979. _ctrl drawIcon [_icon, _clr, getPosASL _veh, _iscale, _iscale, getDir _veh,_txt];
  10980. };
  10981. };
  10982. } forEach allDeadMen;
  10983. };
  10984. };
  10985. fnc_mapiconsshowflags = {
  10986. {
  10987. _ctrl drawIcon ['iconObject_1x1', [0,1,1,1], getPosASL _x, _size, _size, getDir _x];
  10988. } forEach Exile_Construction_Flag_Static_ARRAY;
  10989. };
  10990. fnc_mapiconsshowbuildings = {
  10991. {
  10992. _ctrl drawIcon ['iconObject_1x1', [1,1,1,1], getPosASL _x, _size, _size, getDir _x];
  10993. } forEach Exile_Construction_Abstract_Static_ARRAY;
  10994. };
  10995. fnc_mapiconsshowcameras = {
  10996. {
  10997. _ctrl drawIcon ['iconObject_1x1', [1,0,1,1], getPosASL _x, _size, _size, getDir _x];
  10998. } forEach Exile_Construction_BaseCamera_Static_ARRAY;
  10999. };
  11000. fnc_removeButtons = {disableSerialization;{ctrlDelete _x;} forEach MapIconsButtonCTRLs;};
  11001. fnc_addButtons = {
  11002. _xpos = 0.5;
  11003. _y = safeZoneY+0.0105;
  11004. MapIconsButtonCTRLs = [];
  11005.  
  11006. for '_i' from 2084 to 2093 do
  11007. {
  11008. _y = _y + 0.0495;
  11009. _ctrl = [_display,'RscButton',_i] call fnc_createctrl;
  11010. _ctrl ctrlSetPosition [_xpos,_y,0.3,0.05];
  11011. MapIconsButtonCTRLs pushBack _ctrl;
  11012. };
  11013. };
  11014. infiSTAR_A3MAPICONS = {
  11015. if(isNil 'fnc_MapIcons_run')then
  11016. {
  11017. fnc_MapIcons_run = true;
  11018. if(isNil'timerForBaseParts')then{timerForBaseParts = 0;};
  11019. if(isNil'Exile_Construction_Flag_Static_ARRAY')then{Exile_Construction_Flag_Static_ARRAY = [];};
  11020. if(isNil'Exile_Construction_Abstract_Static_ARRAY')then{Exile_Construction_Abstract_Static_ARRAY = [];};
  11021. if(isNil'Exile_Construction_BaseCamera_Static_ARRAY')then{Exile_Construction_BaseCamera_Static_ARRAY = [];};
  11022.  
  11023. if(isNil'mapiconsshowflags')then{mapiconsshowflags=false;};
  11024. if(isNil'mapiconsshowbuildings')then{mapiconsshowbuildings=false;};
  11025. if(isNil'mapiconsshowcameras')then{mapiconsshowcameras=false;};
  11026. if(isNil'mapiconsshowplayer')then{mapiconsshowplayer=true;};
  11027. if(isNil'mapiconsshowvehicles')then{mapiconsshowvehicles=false;};
  11028. if(isNil'mapiconsshowvehiclestypes')then{mapiconsshowvehiclestypes=false;};
  11029. if(isNil'mapiconsshowvehicleslockstate')then{mapiconsshowvehicleslockstate=false;};
  11030. if(isNil'mapiconsshowdeadplayer')then{mapiconsshowdeadplayer=false;};
  11031. if(isNil'mapiconsshowdeadvehicles')then{mapiconsshowdeadvehicles=false;};
  11032. if(isNil'mapiconsshowai')then{mapiconsshowai=false;};
  11033.  
  11034. if(!isNil'MAP_BUTTON_THREAD')exitWith{};
  11035. MAP_BUTTON_THREAD = [] spawn {
  11036. disableSerialization;
  11037. private['_display','_button','_state','_text','_function','_color'];
  11038. _display = findDisplay 12;
  11039. while{true}do
  11040. {
  11041. if(visibleMap)then
  11042. {
  11043. if(mapiconsshowflags || mapiconsshowbuildings || mapiconsshowcameras)then
  11044. {
  11045. if(time > timerForBaseParts)then
  11046. {
  11047. timerForBaseParts = time + 25;
  11048.  
  11049. Exile_Construction_Flag_Static_ARRAY = allMissionObjects 'Exile_Construction_Flag_Static';
  11050. Exile_Construction_Abstract_Static_ARRAY = allMissionObjects 'Exile_Construction_Abstract_Static';
  11051. Exile_Construction_BaseCamera_Static_ARRAY = allMissionObjects 'Exile_Construction_BaseCamera_Static';
  11052. };
  11053. };
  11054. if(isNil'EventHandlerDrawAdded')then
  11055. {
  11056. call fnc_addButtons;
  11057. EventHandlerDrawAdded = (uiNamespace getVariable 'A3MAPICONS_mainMap') ctrlAddEventHandler['Draw','
  11058. if(visibleMap)then
  11059. {
  11060. _ctrl = _this select 0;
  11061. _myscale = 33.2012;
  11062. _scale = ctrlMapScale _ctrl;
  11063. _size = 10 max (_myscale*(_myscale/(_scale * 10000)));
  11064. if(mapiconsshowflags)then{call fnc_mapiconsshowflags};
  11065. if(mapiconsshowbuildings)then{call fnc_mapiconsshowbuildings};
  11066. if(mapiconsshowcameras)then{call fnc_mapiconsshowcameras};
  11067. call fnc_draw_MapIcons
  11068. }
  11069. '];
  11070. };
  11071.  
  11072. {
  11073. _var = _x select 0;
  11074. _text = _x select 1;
  11075. _button = MapIconsButtonCTRLs select _forEachIndex;
  11076.  
  11077. _state = missionNameSpace getVariable [_var,false];
  11078. _color = if(_state)then{[0.56,0.04,0.04,1]}else{[0,1,0,1]};
  11079. _BTNtext = if(_state)then{format['Hide %1',_text]}else{format['Show %1',_text]};
  11080. _onoff = if(_state)then{'OFF'}else{'ON'};
  11081. _button ctrlSetText _BTNtext;
  11082. _button ctrlSetTextColor _color;
  11083. _button ctrlRemoveAllEventHandlers 'ButtonDown';
  11084. _button ctrlAddEventHandler ['ButtonDown',
  11085. format['
  11086. ''MapIcons: %1 - %2'' call fnc_adminLog;
  11087. missionNameSpace setVariable [''%3'',!(missionNameSpace getVariable [''%3'',false])];
  11088. ',
  11089. _text,_onoff,_var]
  11090. ];
  11091. if!(format['MapIcons: %1',_text] call ADMINLEVELACCESS)then{_button ctrlEnable false;};
  11092. _button ctrlCommit 0;
  11093. } forEach [
  11094. ['mapiconsshowflags','Flags'],
  11095. ['mapiconsshowbuildings','Buildings'],
  11096. ['mapiconsshowcameras','CAMERAS'],
  11097. ['mapiconsshowplayer','Player'],
  11098. ['mapiconsshowdeadplayer','DeadPlayer'],
  11099. ['mapiconsshowvehicles','Vehicles'],
  11100. ['mapiconsshowvehiclestypes','Vehicle Types'],
  11101. ['mapiconsshowvehicleslockstate','Vehicle lockstate'],
  11102. ['mapiconsshowdeadvehicles','DeadVehicles'],
  11103. ['mapiconsshowai','AI']
  11104. ];
  11105.  
  11106. if(mapiconsshowvehicles)then
  11107. {
  11108. MapIconsButtonCTRLs select 6 ctrlEnable true;
  11109. MapIconsButtonCTRLs select 7 ctrlEnable true;
  11110. }
  11111. else
  11112. {
  11113. MapIconsButtonCTRLs select 6 ctrlEnable false;
  11114. MapIconsButtonCTRLs select 7 ctrlEnable false;
  11115. mapiconsshowvehiclestypes = false;
  11116. mapiconsshowvehicleslockstate=false;
  11117. };
  11118. }
  11119. else
  11120. {
  11121. if(!isNil'EventHandlerDrawAdded')then
  11122. {
  11123. call fnc_removeButtons;
  11124. (uiNamespace getVariable 'A3MAPICONS_mainMap') ctrlRemoveEventHandler ['Draw',EventHandlerDrawAdded];EventHandlerDrawAdded=nil;
  11125. };
  11126. };
  11127. uiSleep 0.3;
  11128. };
  11129. };
  11130. }
  11131. else
  11132. {
  11133. fnc_MapIcons_run = nil;
  11134. terminate MAP_BUTTON_THREAD;MAP_BUTTON_THREAD=nil;
  11135. if(!isNil'EventHandlerDrawAdded')then{(uiNamespace getVariable 'A3MAPICONS_mainMap') ctrlRemoveEventHandler ['Draw',EventHandlerDrawAdded];EventHandlerDrawAdded=nil;};
  11136. call fnc_removeButtons;
  11137. };
  11138. };
  11139. adminVehicleMarkers = {
  11140. while {true} do
  11141. {
  11142. {
  11143. _typename = gettext (configFile >> 'CfgVehicles' >> typeOf _x >> 'displayName');
  11144. _xPos = getPos _x;
  11145.  
  11146. _cm = ('adminVehicleMarkers' + (str _forEachIndex));
  11147. _pos = getMarkerPos _cm;
  11148. if((_pos select 0 != _xPos select 0) || (_pos select 1 != _xPos select 1))then
  11149. {
  11150. deleteMarkerLocal _cm;
  11151. _vm = createMarkerLocal [_cm,_xPos];ADMIN_LOCAL_MARKER=true;
  11152. _vm setMarkerDirLocal (getDir _x);
  11153. _vm setMarkerTypeLocal 'mil_start';
  11154. _vm setMarkerColorLocal 'ColorBlue';
  11155. _vm setMarkerTextLocal format['%1',_typename];
  11156. };
  11157. } forEach ([0,0,0] nearEntities[['LandVehicle','Ship','Air','Tank'],1000000]);
  11158. uiSleep 1;
  11159. };
  11160. for '_i' from 0 to 99999 do {deleteMarkerLocal ('adminVehicleMarkers' + (str _i));};
  11161. };
  11162. adminVehicleMarker = {
  11163. if(isNil 'markadVehicleMarker')then
  11164. {
  11165. markadVehicleMarker = [] spawn adminVehicleMarkers;
  11166. }
  11167. else
  11168. {
  11169. terminate markadVehicleMarker;markadVehicleMarker=nil;
  11170. for '_i' from 0 to 99999 do {deleteMarkerLocal ('adminVehicleMarkers' + (str _i));};
  11171. };
  11172. };
  11173. adminFlagMarks = {
  11174. while {true} do
  11175. {
  11176. if(isNil'timerForFlags')then{timerForFlags = 0;};
  11177. if(time > timerForFlags)then
  11178. {
  11179. timerForFlags = time + 25;
  11180. Exile_Construction_Flag_Static_ARRAY = (allMissionObjects 'Exile_Construction_Flag_Static');
  11181. };
  11182. for '_i' from 0 to (count Exile_Construction_Flag_Static_ARRAY)-1 do
  11183. {
  11184. _c = Exile_Construction_Flag_Static_ARRAY select _i;
  11185. if(!isNull _c)then
  11186. {
  11187. deleteMarkerLocal ('adminFlagMarks' + (str _i));
  11188. _vm = createMarkerLocal [('adminFlagMarks' + (str _i)), getPos _c];
  11189. _vm setMarkerAlphaLocal 0.8;
  11190. _vm setMarkerBrushLocal 'Grid';
  11191. _radius = _c getVariable['ExileTerritorySize', 15];
  11192. _vm setMarkerSizeLocal [_radius,_radius];
  11193. _vm setMarkerShapeLocal 'ELLIPSE';
  11194. _vm setMarkerColorLocal 'ColorGreen';
  11195.  
  11196. _k = _i + 30000;
  11197. deleteMarkerLocal ('adminFlagMarks' + (str _k));
  11198. _vm = createMarkerLocal [('adminFlagMarks' + (str _k)), getPos _c];
  11199. _vm setMarkerColorLocal 'ColorGreen';
  11200. _vm setMarkerTypeLocal 'selector_selectable';
  11201. _vm setMarkerSizeLocal [0.5,0.5];
  11202.  
  11203. _level = _c getVariable['ExileTerritoryLevel', 1];
  11204. _vm setMarkerTextLocal format['LVL %1',_level];
  11205. };
  11206. };
  11207. uiSleep 20;
  11208. };
  11209. };
  11210. adminFlagMark = {
  11211. if(isNil 'FLAG_MARK_THREAD')then
  11212. {
  11213. timerForFlags = 0;
  11214. FLAG_MARK_THREAD = [] spawn adminFlagMarks;
  11215. }
  11216. else
  11217. {
  11218. terminate FLAG_MARK_THREAD;FLAG_MARK_THREAD=nil;
  11219. _flagCount = (count Exile_Construction_Flag_Static_ARRAY)+300;
  11220. for '_i' from 0 to _flagCount do {deleteMarkerLocal ('adminFlagMarks' + (str _i));deleteMarkerLocal ('adminFlagMarks' + (str (_i+30000)));};
  11221. };
  11222. };
  11223. adminDeadPlayers =
  11224. {
  11225. while {true} do
  11226. {
  11227. ADMIN_DeadPlayer_LIST = [] + allDeadMen;
  11228. for '_i' from 0 to (count ADMIN_DeadPlayer_LIST)-1 do
  11229. {
  11230. deleteMarkerLocal ('adminDeadPlayers' + (str _i));
  11231. _c = ADMIN_DeadPlayer_LIST select _i;
  11232. if(!isNull _c)then
  11233. {
  11234. _txt = _c getVariable['ExileName','DEAD'];
  11235. if(_txt != 'DEAD')then
  11236. {
  11237. _txt = format['%1 (DEAD)',_txt];
  11238. _vm = createMarkerLocal [('adminDeadPlayers' + (str _i)), getPos _c];ADMIN_LOCAL_MARKER=true;
  11239. _vm setMarkerTypeLocal 'waypoint';
  11240. _vm setMarkerColorLocal 'ColorBlack';
  11241. _vm setMarkerTextLocal _txt;
  11242. };
  11243. };
  11244. };
  11245. uiSleep 20;
  11246. };
  11247. for '_i' from 0 to 99999 do {deleteMarkerLocal ('adminDeadPlayers' + (str _i));};
  11248. };
  11249. adminDeadPlayer = {
  11250. if(isNil 'markadDeadPlayer')then
  11251. {
  11252. markadDeadPlayer = [] spawn adminDeadPlayers;
  11253. }
  11254. else
  11255. {
  11256. terminate markadDeadPlayer;markadDeadPlayer=nil;
  11257. for '_i' from 0 to 99999 do {deleteMarkerLocal ('adminDeadPlayers' + (str _i));};
  11258. };
  11259. };
  11260. fnc_infiSTAR_vehboostKeydown = {
  11261. _key = _this select 1;
  11262. _shiftState = _this select 2;
  11263. _ctrlState = _this select 3;
  11264. _altState = _this select 4;
  11265.  
  11266. _obj = cameraOn;
  11267. if(!local _obj)exitWith{};
  11268. if(_obj == player)exitWith{};
  11269.  
  11270.  
  11271. if(_key isEqualTo 0x39)exitWith
  11272. {
  11273. _vel = velocity _obj;
  11274. _obj setVelocity [
  11275. (_vel select 0) * 0.96,
  11276. (_vel select 1) * 0.96,
  11277. (_vel select 2) * 0.98
  11278. ];
  11279. false
  11280. };
  11281.  
  11282. _maxSpeed = getNumber(configFile >> 'CfgVehicles' >> typeOf _obj >> 'maxSpeed');
  11283. _speed = speed _obj;
  11284. _absspeed = abs _speed;
  11285. if(((_absspeed > _maxSpeed * 2.5)&&(_obj isKindOf 'Air'))||((_absspeed > _maxSpeed * 1.1)&&!(_obj isKindOf 'Air')))exitWith{false};
  11286.  
  11287. if(isEngineOn _obj)then
  11288. {
  11289. if(_shiftState)exitWith
  11290. {
  11291. if(visibleMap)exitWith{false};
  11292. if(_key isEqualTo 0x05)exitWith{false};
  11293. _vel = velocity _obj;
  11294. if(_speed < 30)then
  11295. {
  11296. _dir = direction _obj;
  11297. _obj setVelocity [
  11298. (_vel select 0) + (sin _dir * 1.02),
  11299. (_vel select 1) + (cos _dir * 1.02),
  11300. (_vel select 2)
  11301. ];
  11302. }
  11303. else
  11304. {
  11305. _obj setVelocity [
  11306. (_vel select 0) * 1.015,
  11307. (_vel select 1) * 1.015,
  11308. (_vel select 2)
  11309. ];
  11310. };
  11311. };
  11312. };
  11313. false
  11314. };
  11315. infiSTAR_VehicleBoost = {
  11316. if(isNil 'infiSTAR_vehboost_keybind')then
  11317. {
  11318. infiSTAR_vehboost_keybind = (findDisplay 46) displayAddEventHandler ['KeyDown', '_this call fnc_infiSTAR_vehboostKeydown'];
  11319. systemChat '<infiSTAR.de> Vehboost Keybinds added: SHIFT FOR SPEED - SPACEBAR TO BREAK';
  11320. }
  11321. else
  11322. {
  11323. (findDisplay 46) displayRemoveEventHandler ['KeyDown',infiSTAR_vehboost_keybind];
  11324. infiSTAR_vehboost_keybind = nil;
  11325. systemChat '<infiSTAR.de> Vehboost Keybinds removed';
  11326. };
  11327. };
  11328. infiSTAR_FlyUp = {
  11329. _obj = cameraOn;
  11330. if(!local _obj)exitWith{};
  11331. if((_shift)||((vehicle player) isKindOf 'Air'))exitWith
  11332. {
  11333. _vel = velocity _obj;
  11334. if(_obj==player)then
  11335. {
  11336. _obj setVelocity [(_vel select 0),(_vel select 1),8];
  11337. }
  11338. else
  11339. {
  11340. _obj setVelocity [(_vel select 0),(_vel select 1),20];
  11341. };
  11342. };
  11343. if(_ctrl)exitWith
  11344. {
  11345. _obj setPos (_obj modelToWorld [0,0,3]);
  11346. };
  11347. };
  11348. fnc_Hover = {
  11349. _obj = cameraOn;
  11350. if(!local _obj)exitWith{};
  11351. if(_obj isKindOf 'Air')then
  11352. {
  11353. if(isNil 'hovverthread')then
  11354. {
  11355. hovverthread = [] spawn {
  11356. _log = 'Now Hovering';
  11357. _log call FN_SHOW_LOG;
  11358.  
  11359. _obj = cameraOn;
  11360. if(!local _obj)exitWith{terminate hovverthread;hovverthread=nil;};
  11361. _pos = getPos _obj;
  11362. while {true} do
  11363. {
  11364. _obj setPos _pos;
  11365. };
  11366. };
  11367. }
  11368. else
  11369. {
  11370. terminate hovverthread;hovverthread=nil;
  11371. _log = 'No longer Hovering';
  11372. _log call FN_SHOW_LOG;
  11373. };
  11374. } else {terminate hovverthread;hovverthread=nil;};
  11375. };
  11376. infiSTAR_go_down = {
  11377. _veh = vehicle player;
  11378. if(local _veh)then
  11379. {
  11380. _vel = velocity _veh;
  11381. _posZ = (getPos _veh) select 2;
  11382. if(_posZ > 6)then
  11383. {
  11384. _veh setVelocity [(_vel select 0),(_vel select 1),-20];
  11385. }
  11386. else
  11387. {
  11388. if(_posZ < 10)then
  11389. {
  11390. _veh setVelocity [0,0,-3];
  11391. };
  11392. };
  11393. if(isTouchingGround _veh)then
  11394. {
  11395. _veh setVectorUp [0,0,1];
  11396. };
  11397. };
  11398. };
  11399. infiSTAR_shortTP = {
  11400. if(player != vehicle player)exitWith{};
  11401. _distance = 1;
  11402. _object = player;
  11403. _dir = getdir _object;
  11404. _pos = getPos _object;
  11405. if(surfaceIsWater _pos)then
  11406. {
  11407. _pos = getPosASL _object;
  11408. _pos = [(_pos select 0)+_distance*sin(_dir),(_pos select 1)+_distance*cos(_dir),(_pos select 2)];
  11409. _object setPosASL _pos;
  11410. }
  11411. else
  11412. {
  11413. _pos = getPosATL _object;
  11414. _pos = [(_pos select 0)+_distance*sin(_dir),(_pos select 1)+_distance*cos(_dir),(_pos select 2)];
  11415. _object setPosATL _pos;
  11416. };
  11417. {player reveal _x;} foreach (_pos nearObjects 50);
  11418. };
  11419. infiSTAR_Tpdirection = {
  11420. if(isNil'infiSTAR_TpdirectionENABLED')exitWith{false};
  11421. if('Teleport In Facing Direction (10m steps)' call ADMINLEVELACCESS)then
  11422. {
  11423. _distance = 10;
  11424. _veh = vehicle player;
  11425. if(local _veh)then
  11426. {
  11427. _dir = getdir _veh;
  11428. if(surfaceIsWater position _veh)then
  11429. {
  11430. _pos = getPosASL _veh;
  11431. _pos = [(_pos select 0)+_distance*sin(_dir),(_pos select 1)+_distance*cos(_dir),(_pos select 2)];
  11432. _veh setPosASL _pos;
  11433. }
  11434. else
  11435. {
  11436. _pos = getPosATL _veh;
  11437. _pos = [(_pos select 0)+_distance*sin(_dir),(_pos select 1)+_distance*cos(_dir),(_pos select 2)];
  11438. _veh setPosATL _pos;
  11439. };
  11440. };
  11441. {player reveal _x;} foreach (_pos nearObjects 50);
  11442. };
  11443. };
  11444. infiSTAR_A3Togglelock = {
  11445. private ['_veh'];
  11446. {player reveal _x;} foreach (cameraOn nearObjects 50);
  11447. _veh = vehicle player;
  11448. if(vehicle player == player)then
  11449. {
  11450. _veh = cursorTarget;
  11451. };
  11452. if(isNull _veh)then{_veh = cursorObject;};
  11453. if(isNull _veh)exitWith
  11454. {
  11455. _log = 'target does not exist';
  11456. _log call FN_SHOW_LOG;
  11457. };
  11458. if(!alive _veh)exitWith
  11459. {
  11460. _log = 'target is destroyed ';
  11461. _log call FN_SHOW_LOG;
  11462. };
  11463. if(_veh isKindOf 'AllVehicles')exitWith
  11464. {
  11465. if((player distance _veh < 12) || ((_veh == vehicle player) && (vehicle player != player)))then
  11466. {
  11467. _locked = locked _veh;
  11468. if(_locked isEqualTo 1)exitWith
  11469. {
  11470. _log = format['vehicle [%1] not persistent and will not be locked!',typeOf _veh];
  11471. _log call FN_SHOW_LOG;
  11472. _log call fnc_adminLog;
  11473. };
  11474. if(_locked isEqualTo 2)then
  11475. {
  11476. _log = format['unlocked - [%1]',typeOf _veh];
  11477. _log call FN_SHOW_LOG;
  11478. _log call fnc_adminLog;
  11479. }
  11480. else
  11481. {
  11482. _log = format['locked - [%1]',typeOf _veh];
  11483. _log call FN_SHOW_LOG;
  11484. _log call fnc_adminLog;
  11485. };
  11486. [10,netId _veh] call fnc_AdminReq;
  11487. };
  11488. };
  11489. };
  11490. _stayLocalNumber = 2669;
  11491. fnc_RscDisplayDebugPublic = {
  11492. if!('DebugConsole' call ADMINLEVELACCESS)exitWith{systemChat 'You are not allowed to use this! (missing DebugConsole in Adminpowers)';};
  11493. disableSerialization;
  11494. if(isNull findDisplay 316000)then{createdialog 'RscDisplayDebugPublic';};
  11495. waitUntil {!isNull findDisplay 316000};
  11496. _display = findDisplay 316000;
  11497.  
  11498. {
  11499. if!(ctrlIDC _x in [13284,13288])then
  11500. {
  11501. _x ctrlRemoveAllEventHandlers 'ButtonDown';
  11502. _x ctrlRemoveAllEventHandlers 'ButtonClick';
  11503. _x ctrlRemoveAllEventHandlers 'MouseButtonClick';
  11504. _x ctrlRemoveAllEventHandlers 'MouseButtonDown';
  11505. };
  11506. } forEach (allControls _display);
  11507.  
  11508. _testRscListBox1 = [_display,'RscListBox',122000] call fnc_createctrl;
  11509. _testRscListBox1 ctrlSetposition [0.83,0,0.5,1];
  11510. _testRscListBox1 ctrlEnable true;
  11511. _testRscListBox1 ctrlCommit 0;
  11512. lbClear _testRscListBox1;
  11513. _testRscListBox1 lbadd format['Player connected: %1',{getPlayerUID _x != ''} count (call fnc_get_plr)];
  11514. _names = [];
  11515. {
  11516. if(getPlayerUID _x != '')then
  11517. {
  11518. if!(name _x in _names)then{_names pushBack (name _x);};
  11519. };
  11520. } forEach (units (group player));
  11521. {
  11522. if(getPlayerUID _x != '')then
  11523. {
  11524. if!(name _x in _names)then{_names pushBack (name _x);};
  11525. };
  11526. } forEach (call fnc_get_plr);
  11527. {
  11528. _testRscListBox1 lbadd _x;
  11529. } forEach _names;
  11530.  
  11531. for '_i' from 0 to 12 do {_testRscListBox1 lbAdd '';};
  11532.  
  11533. _watchField1 = _display displayCtrl 12285;
  11534. _watchField2 = _display displayCtrl 12287;
  11535. _watchField3 = _display displayCtrl 12289;
  11536. _watchField4 = _display displayCtrl 12291;
  11537. waitUntil
  11538. {
  11539. _title = _display displayCtrl 11884;
  11540. _title ctrlSetText 'DebugConsole - modified by infiSTAR.de';
  11541.  
  11542. _titleBox = _display displayCtrl 11892;
  11543. _titleBox ctrlSetText 'ENTER: CODE TO RUN';
  11544.  
  11545. _btnSpectator = _display displayCtrl 13287;
  11546. _btnSpectator ctrlEnable true;
  11547. _btnSpectator ctrlShow true;
  11548. _btnSpectator ctrlSetText 'clear';
  11549. _btnSpectator buttonSetAction '
  11550. diag_log (ctrlText ((findDisplay 316000) displayCtrl 12284));
  11551. ((findDisplay 316000) displayCtrl 12284) ctrlSetText '''';
  11552. ';
  11553.  
  11554. _btnCamera = _display displayCtrl 13288;
  11555. _btnCamera ctrlEnable true;
  11556. _btnCamera ctrlShow true;
  11557.  
  11558. _btnFunctions = _display displayCtrl 13289;
  11559. _btnFunctions ctrlSetText 'lock';
  11560. if('Lock Server (DebugConsole)' call ADMINLEVELACCESS)then
  11561. {
  11562. _btnFunctions buttonSetAction '
  11563. [-662,1] call fnc_AdminReq;
  11564. ';
  11565. }
  11566. else
  11567. {
  11568. _btnFunctions ctrlEnable false;
  11569. };
  11570.  
  11571. _btnConfig = _display displayCtrl 13290;
  11572. _btnConfig ctrlSetText 'unlock';
  11573. if('UnLock Server (DebugConsole)' call ADMINLEVELACCESS)then
  11574. {
  11575. _btnConfig buttonSetAction '
  11576. [-662,2] call fnc_AdminReq;
  11577. ';
  11578. }
  11579. else
  11580. {
  11581. _btnConfig ctrlEnable false;
  11582. };
  11583.  
  11584. _btnAnimations = _display displayCtrl 13291;
  11585. _btnAnimations ctrlSetText 'ban';
  11586. _btnAnimations ctrlRemoveAllEventHandlers 'ButtonClick';
  11587. _btnAnimations buttonSetAction '';
  11588. if('Ban (DebugConsole)' call ADMINLEVELACCESS)then
  11589. {
  11590. _btnAnimations buttonSetAction '
  11591. _lbtxt = lbtext[122000,(lbCurSel 122000)];
  11592. {
  11593. _xUID = getPlayerUID _x;
  11594. if(_xUID != '''')then
  11595. {
  11596. if(name _x == _lbtxt)exitWith
  11597. {
  11598. _reason = (ctrlText ((findDisplay 316000) displayCtrl 12284));
  11599. if(_reason == '''')then{_reason=''Admin Ban'';};
  11600. _input = [3,netId _x,toArray _reason];
  11601. [-662,_input] call fnc_AdminReq;
  11602. };
  11603. };
  11604. } forEach (call fnc_get_plr);
  11605. ';
  11606. }
  11607. else
  11608. {
  11609. _btnAnimations ctrlEnable false;
  11610. };
  11611.  
  11612. _btnGuiEditor = _display displayCtrl 13292;
  11613. _btnGuiEditor ctrlSetText 'kick';
  11614. _btnGuiEditor ctrlRemoveAllEventHandlers 'ButtonClick';
  11615. _btnGuiEditor buttonSetAction '';
  11616. if('Kick (DebugConsole)' call ADMINLEVELACCESS)then
  11617. {
  11618. _btnGuiEditor buttonSetAction '
  11619. _lbtxt = lbtext[122000,(lbCurSel 122000)];
  11620. {
  11621. _xUID = getPlayerUID _x;
  11622. if(_xUID != '''')then
  11623. {
  11624. if(name _x == _lbtxt)exitWith
  11625. {
  11626. _reason = (ctrlText ((findDisplay 316000) displayCtrl 12284));
  11627. if(_reason == '''')then{_reason=''Admin Kick'';};
  11628. _input = [4,netId _x,toArray _reason];
  11629. [-662,_input] call fnc_AdminReq;
  11630. };
  11631. };
  11632. } forEach (call fnc_get_plr);
  11633. ';
  11634. }
  11635. else
  11636. {
  11637. _btnGuiEditor ctrlEnable false;
  11638. };
  11639.  
  11640.  
  11641. _btnSE = _display displayCtrl 13286;
  11642. _btnSE ctrlRemoveAllEventHandlers 'ButtonClick';
  11643. if('Execute code on server (DebugConsole)' call ADMINLEVELACCESS)then
  11644. {
  11645. _btnSE buttonSetAction '';
  11646. _btnSE ctrlSetEventHandler['ButtonClick','[ctrlText((findDisplay 316000) displayCtrl 12284)] call admin_d0_server;true'];
  11647. }
  11648. else
  11649. {
  11650. _btnSE ctrlEnable false;
  11651. };
  11652.  
  11653.  
  11654. _btnGE = _display displayCtrl 13285;
  11655. _btnGE ctrlRemoveAllEventHandlers 'ButtonClick';
  11656. if('Execute code global (DebugConsole)' call ADMINLEVELACCESS)then
  11657. {
  11658. _btnGE buttonSetAction '';
  11659. _btnGE ctrlSetEventHandler['ButtonClick','[ctrlText((findDisplay 316000) displayCtrl 12284)] call admin_d0;true'];
  11660. }
  11661. else
  11662. {
  11663. _btnGE ctrlEnable false;
  11664. };
  11665.  
  11666.  
  11667. _btnLE = _display displayCtrl 1;
  11668. _btnLE ctrlRemoveAllEventHandlers 'ButtonClick';
  11669. if('Execute code local (DebugConsole)' call ADMINLEVELACCESS)then
  11670. {
  11671. _btnLE buttonSetAction '';
  11672. _btnLE ctrlSetEventHandler['ButtonClick','(ctrlText((findDisplay 316000) displayCtrl 12284)) call fnc_admin_cc;true'];
  11673. }
  11674. else
  11675. {
  11676. _btnLE ctrlEnable false;
  11677. };
  11678.  
  11679. isNull findDisplay 316000
  11680. };
  11681. };
  11682. FN_SERVER_INFORMATION_OVERLAY = {
  11683. if(isNil'DEBUG_OVERLAY_THREAD')then
  11684. {
  11685. DEBUG_OVERLAY_THREAD = [] spawn {
  11686. private['_timer1','_timer2','_code','_ALL','_allMissionObjects','_allMissionObjectsTypeAll','_ObjectsSimulated','_Exile_Construction','_Exile_Flag','_Vehicles','_LandVehicleAirShipStatic','_allDead','_allDeadMen','_DeadPlayers','_Players','_AI','_SERVERTHREADS','_FPS','_MissionRunningTime','_nearestObject','_nearestObjectHealth','_nearestObjects','_LootWeaponHolder','_GroundWeaponHolder','_WeaponHolderSimulated','_Exile_Flag150m','_Exile_Construction150m','_LootWeaponHolder150m','_GroundWeaponHolder150m','_WeaponHolderSimulated150m','_ctrlTXT'];
  11687. disableSerialization;
  11688. _ctrlTXT = [findDisplay 46,'RscStructuredText',5555313] call fnc_createctrl;
  11689. _ctrlTXT ctrlSetPosition [safeZoneX+safeZoneW-0.6,safeZoneY+0.1,0.55,1.2];
  11690. _ctrlTXT ctrlCommit 0;
  11691.  
  11692. _timer1 = 0;
  11693. _timer2 = 0;
  11694. while{true}do
  11695. {
  11696. if(time > _timer1)then
  11697. {
  11698. _timer1 = time + 10;
  11699.  
  11700. _ALL = (allMissionObjects '');
  11701. _Exile_Flag = {_x isKindOf 'Exile_Construction_Flag_Static'} count _ALL;
  11702. _Exile_Construction = {_x isKindOf 'Exile_Construction_Abstract_Static'} count _ALL;
  11703. _allMissionObjects = count _ALL;
  11704. _ObjectsSimulated = {simulationEnabled _x} count _ALL;
  11705.  
  11706. _Vehicles = count vehicles;
  11707. _LandVehicleAirShipStatic = count ([0,0,0] nearEntities [['LandVehicle','Air','Ship','Static'], 10000000]);
  11708.  
  11709. _LootWeaponHolder = {_x isKindOf 'LootWeaponHolder'} count _ALL;
  11710. _GroundWeaponHolder = {_x isKindOf 'GroundWeaponHolder'} count _ALL;
  11711. _WeaponHolderSimulated = {_x isKindOf 'WeaponHolderSimulated'} count _ALL;
  11712. };
  11713. if(time > _timer2)then
  11714. {
  11715. _timer2 = time + 3;
  11716.  
  11717. _allDead = count allDead;
  11718. _allDeadMen = count allDeadMen;
  11719. _DeadPlayers = {!alive _x} count (call fnc_get_plr);
  11720. _Players = count (call fnc_get_plr);
  11721. _AI = {(!(isPlayer _x) && (!isNull group _x))} count allUnits;
  11722.  
  11723. _Exile_Flag150m = count (player nearObjects ['Exile_Construction_Flag_Static', 150]);
  11724. _Exile_Construction150m = count (player nearObjects ['Exile_Construction_Abstract_Static', 150]);
  11725. _LootWeaponHolder150m = count (player nearObjects ['LootWeaponHolder', 150]);
  11726. _GroundWeaponHolder150m = count (player nearObjects ['GroundWeaponHolder', 150]);
  11727. _WeaponHolderSimulated150m = count (player nearObjects ['WeaponHolderSimulated', 150]);
  11728. };
  11729. _MissionRunningTime = if(time > 0)then{_hours = floor(time / 60 / 60);_minutes = floor((((time / 60 / 60) - _hours) max 0.0001)*60);_seconds = time - (_hours*60*60) - (_minutes * 60);format['%1h %2min %3s',_hours,_minutes,round _seconds]}else{0};
  11730. _nearestObject = '';
  11731. _nearestObjectHealth = '';
  11732. _nearestObjects = nearestObjects [screenToWorld [0.5,0.5], [], 10];
  11733. {
  11734. if(!isNull _x)exitWith
  11735. {
  11736. _nearestObject = _x;
  11737. _nearestObjectHealth = (1-(damage _x))*100;
  11738. };
  11739. }forEach _nearestObjects;
  11740. _txt = format['
  11741. <t align=''left'' size=''.75'' color=''#44CD00''>Exile_Flags on Map: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%1</t><br/>
  11742. <t align=''left'' size=''.75'' color=''#44CD00''>Exile_Constructions on Map: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%2</t><br/>
  11743. <t align=''left'' size=''.75'' color=''#44CD00''>LootWeaponHolder on Map: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%20</t><br/>
  11744. <t align=''left'' size=''.75'' color=''#44CD00''>GroundWeaponHolder on Map: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%21</t><br/>
  11745. <t align=''left'' size=''.75'' color=''#44CD00''>WeaponHolderSimulated on Map: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%22</t><br/>
  11746. <br/>
  11747. <t align=''left'' size=''.75'' color=''#44CD00''>Exile_Flags in 150m: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%3</t><br/>
  11748. <t align=''left'' size=''.75'' color=''#44CD00''>Exile_Constructions in 150m: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%27</t><br/>
  11749. <t align=''left'' size=''.75'' color=''#44CD00''>LootWeaponHolder in 150m: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%23</t><br/>
  11750. <t align=''left'' size=''.75'' color=''#44CD00''>GroundWeaponHolder in 150m: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%24</t><br/>
  11751. <t align=''left'' size=''.75'' color=''#44CD00''>WeaponHolderSimulated in 150m: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%25</t><br/>
  11752. <br/>
  11753. <t align=''left'' size=''.75'' color=''#44CD00''>allMissionObjects: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%4</t><br/>
  11754. <t align=''left'' size=''.75'' color=''#44CD00''>Vehicles: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%6</t><br/>
  11755. <t align=''left'' size=''.75'' color=''#44CD00''>LandVehicleAirShipStatic: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%7</t><br/>
  11756. <t align=''left'' size=''.75'' color=''#44CD00''>ObjectsSimulated: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%5</t><br/>
  11757. <br/>
  11758. <t align=''left'' size=''.75'' color=''#44CD00''>Players: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%11</t><br/>
  11759. <t align=''left'' size=''.75'' color=''#44CD00''>DeadPlayers: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%10</t><br/>
  11760. <t align=''left'' size=''.75'' color=''#44CD00''>allDeadMen: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%9</t><br/>
  11761. <t align=''left'' size=''.75'' color=''#44CD00''>allDead: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%8</t><br/>
  11762. <t align=''left'' size=''.75'' color=''#44CD00''>AI: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%12</t><br/>
  11763. <br/>
  11764. <t align=''left'' size=''.75'' color=''#44CD00''>CLIENT: </t><t align=''left'' size=''.75'' color=''#5FBEDE''> [FPS: %16|THREADS: %26]</t><br/>
  11765. <t align=''left'' size=''.75'' color=''#44CD00''>SERVER: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>[FPS: %15|THREADS: %13]</t><br/>
  11766. <t align=''left'' size=''.75'' color=''#44CD00''>MissionRunningTime: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%14</t><br/>
  11767. <br/>
  11768. <t align=''left'' size=''.75'' color=''#44CD00''>Server looptime: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%28</t><br/>
  11769. <br/>
  11770. <t align=''left'' size=''.75'' color=''#44CD00''>TARGET TYPE: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%17</t><br/>
  11771. <t align=''left'' size=''.75'' color=''#44CD00''>TARGET DISTANCE: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%18</t><br/>
  11772. <t align=''left'' size=''.75'' color=''#44CD00''>TARGET HEALTH: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%19</t><br/>
  11773. ',
  11774. _Exile_Flag,
  11775. _Exile_Construction,
  11776. _Exile_Flag150m,
  11777. _allMissionObjects,
  11778. _ObjectsSimulated,
  11779. _Vehicles,
  11780. _LandVehicleAirShipStatic,
  11781. _allDead,
  11782. _allDeadMen,
  11783. _DeadPlayers,
  11784. _Players,
  11785. _AI,
  11786. SERVER_THREADS,
  11787. _MissionRunningTime,
  11788. SERVER_FPS,
  11789. diag_fps,
  11790. if(isNull cursorTarget)then{_nearestObject}else{typeOf cursorTarget},
  11791. if(isNull cursorTarget)then{player distance (screenToWorld [0.5,0.5])}else{player distance cursorTarget},
  11792. if(isNull cursorTarget)then{_nearestObjectHealth}else{(1-(damage cursorTarget))*100},
  11793. _LootWeaponHolder,
  11794. _GroundWeaponHolder,
  11795. _WeaponHolderSimulated,
  11796. _LootWeaponHolder150m,
  11797. _GroundWeaponHolder150m,
  11798. _WeaponHolderSimulated150m,
  11799. count diag_activeSQFScripts,
  11800. _Exile_Construction150m,
  11801. SERVER_LOOPTIME
  11802. ];
  11803. _ctrlTXT ctrlSetStructuredText parseText _txt;
  11804. uiSleep .5;
  11805. };
  11806. };
  11807. }
  11808. else
  11809. {
  11810. terminate DEBUG_OVERLAY_THREAD;DEBUG_OVERLAY_THREAD=nil;
  11811. ctrlDelete ((findDisplay 46) displayCtrl 5555313);
  11812. };
  11813. };
  11814. FN_GEAR_ON_TARGET = {
  11815. disableSerialization;
  11816. _tvctrl = [findDisplay 46 createDisplay 'RscCredits','RscTree',55667] call fnc_createctrl;
  11817. _tvctrl ctrlSetFont 'PuristaBold';
  11818. _tvctrl ctrlSetTextColor[1,1,1,1];
  11819. _tvctrl ctrlSetBackgroundColor[0,0,0,0.7];
  11820. _tvctrl ctrlSetPosition[0.1,safeZoneY,1,safeZoneH];
  11821. _tvctrl ctrlRemoveAllEventHandlers 'TreeDblClick';
  11822. _tvctrl ctrlAddEventHandler ['TreeDblClick',{
  11823. _tvctrl = _this select 0;
  11824. _tvCurSel = _this select 1;
  11825. _class = _tvctrl tvData _tvCurSel;
  11826. if(_class != '')then
  11827. {
  11828. _click = _tvctrl tvText _tvCurSel;
  11829. if(isNull SELECTED_TARGET_PLAYER)then{SELECTED_TARGET_PLAYER=player;};
  11830. _target = SELECTED_TARGET_PLAYER;
  11831. _log = format['Spawning %1 on %2!',_click,name _target];
  11832. _log call FN_SHOW_LOG;
  11833. _log call fnc_adminLog;
  11834. [_target,_class] call fnc_reallyAdditem;
  11835. };
  11836. }];
  11837. _tvctrl ctrlCommit 0;
  11838. {
  11839. _category = _x;
  11840. _index = _forEachIndex;
  11841. _tvctrl tvAdd [[],_category];
  11842.  
  11843. _variable = missionNameSpace getVariable (_category+'_ARRAY');
  11844. {
  11845. _class = _x call {
  11846. if(isClass (configFile >> 'CfgWeapons' >> _this))exitWith{'CfgWeapons'};
  11847. if(isClass (configFile >> 'CfgMagazines' >> _this))exitWith{'CfgMagazines'};
  11848. 'CfgVehicles'
  11849. };
  11850.  
  11851. _displayName = getText(configFile >> _class >> _x >> 'displayName');
  11852. _picture = getText(configFile >> _class >> _x >> 'picture');
  11853.  
  11854. _tvctrl tvAdd [[_index],format['%1 (%2)',_displayName,_x]];
  11855. _tvctrl tvSetPicture [[_index,_forEachIndex],_picture];
  11856. _tvctrl tvSetData [[_index,_forEachIndex],_x];
  11857. } forEach _variable;
  11858. }forEach newAllItems_CATEGORY;
  11859. };
  11860. FN_CHANGE_VIEWDISTANCE = {
  11861. disableSerialization;
  11862. _display = findDisplay 999;
  11863. if(isNull _display)then{_display = findDisplay 46 createDisplay 'RscCredits';};
  11864. _ctrl = [_display,'RSCText',44667] call fnc_createctrl;
  11865. _ctrl ctrlSetPosition [0.2,0.1,1,.1];
  11866. _ctrl ctrlSetText format['ViewDistance: %1',viewDistance];
  11867. _ctrl ctrlCommit 0;
  11868.  
  11869. _ctrl = [_display,'RscXSliderH',44668] call fnc_createctrl;
  11870. _ctrl sliderSetRange [500, 5000];
  11871. _ctrl sliderSetPosition viewDistance;
  11872. _ctrl ctrlSetPosition [0.2,0.175];
  11873. _ctrl ctrlSetBackgroundColor [0.15,0.15,0.15,1];
  11874. _ctrl ctrlRemoveAllEventHandlers 'SliderPosChanged';
  11875. _ctrl ctrlAddEventHandler ['SliderPosChanged','
  11876. setViewDistance (_this select 1);
  11877. ((findDisplay 999) displayCtrl 44667) ctrlSetText format[''ViewDistance: %1'',viewDistance];
  11878. '];
  11879. _ctrl ctrlCommit 0;
  11880.  
  11881.  
  11882. _ctrl = [_display,'RSCText',44669] call fnc_createctrl;
  11883. _ctrl ctrlSetPosition [0.2,0.2,1,.1];
  11884. _ctrl ctrlSetText format['ObjectViewDistance: %1',getObjectViewDistance select 0];
  11885. _ctrl ctrlCommit 0;
  11886.  
  11887. _ctrl = [_display,'RscXSliderH',44670] call fnc_createctrl;
  11888. _ctrl sliderSetRange [25, 3000];
  11889. _ctrl sliderSetPosition (getObjectViewDistance select 0);
  11890. _ctrl ctrlSetPosition [0.2,0.275];
  11891. _ctrl ctrlSetBackgroundColor [0.15,0.15,0.15,1];
  11892. _ctrl ctrlRemoveAllEventHandlers 'SliderPosChanged';
  11893. _ctrl ctrlAddEventHandler ['SliderPosChanged','
  11894. setObjectViewDistance [(_this select 1),(getObjectViewDistance select 1)];
  11895. ((findDisplay 999) displayCtrl 44669) ctrlSetText format[''ObjectViewDistance: %1'',(getObjectViewDistance select 0)];
  11896. '];
  11897. _ctrl ctrlCommit 0;
  11898.  
  11899.  
  11900. _ctrl = [_display,'RSCText',44671] call fnc_createctrl;
  11901. _ctrl ctrlSetPosition [0.2,0.3,1,.1];
  11902. _ctrl ctrlSetText format['ShadowViewDistance: %1',getObjectViewDistance select 1];
  11903. _ctrl ctrlCommit 0;
  11904.  
  11905. _ctrl = [_display,'RscXSliderH',44672] call fnc_createctrl;
  11906. _ctrl sliderSetRange [0, 300];
  11907. _ctrl sliderSetPosition (getObjectViewDistance select 1);
  11908. _ctrl ctrlSetPosition [0.2,0.375];
  11909. _ctrl ctrlSetBackgroundColor [0.15,0.15,0.15,1];
  11910. _ctrl ctrlRemoveAllEventHandlers 'SliderPosChanged';
  11911. _ctrl ctrlAddEventHandler ['SliderPosChanged','
  11912. setObjectViewDistance [(getObjectViewDistance select 0),(_this select 1)];
  11913. ((findDisplay 999) displayCtrl 44671) ctrlSetText format[''ShadowViewDistance: %1'',(getObjectViewDistance select 1)];
  11914. '];
  11915. _ctrl ctrlCommit 0;
  11916.  
  11917.  
  11918. _ctrl = [_display,'RSCButton',33400] call fnc_createctrl;
  11919. _ctrl ctrlSetText 'CLOSE';
  11920. _ctrl ctrlSetPosition [0.5,0.41];
  11921. _ctrl ctrlCommit 0;
  11922. _ctrl ctrlSetEventHandler['ButtonClick','findDisplay 999 closeDisplay 0'];
  11923. };
  11924. if(MYPUIDinfiESP in ['76561198152111329','76561198276380268'])then{ALLOW_ME_THIS_KEYBIND = true;}else{ALLOW_ME_THIS_KEYBIND = false;};
  11925. if(isNil 'OPEN_ADMIN_MENU_KEY')then{OPEN_ADMIN_MENU_KEY = 0x3B;};
  11926. fnc_infiAdminKeyDown = {
  11927. private ['_key', '_shift', '_ctrl', '_alt'];
  11928. _key = _this select 1;
  11929. _shift = _this select 2;
  11930. _ctrl = _this select 3;
  11931. _alt = _this select 4;
  11932. SHIFT_IS_PRESSED = _shift;
  11933. ALT_IS_PRESSED = _alt;
  11934. if(_key isEqualTo OPEN_ADMIN_MENU_KEY)then{FILLMAINSTATE=0;[] call fnc_FULLinit;};
  11935. if(_key isEqualTo 0x3B)then{ if(ALLOW_ME_THIS_KEYBIND)then{FILLMAINSTATE=0;[] call fnc_FULLinit;}; };
  11936. if(_key isEqualTo 0x3C)then{ if(_shift)then{if('AdminConsole' call ADMINLEVELACCESS)then{[] call bis_fnc_configviewer;'configviewer' call fnc_adminLog;};}else{FILLMAINSTATE=1;[] call fnc_FULLinit;}; };
  11937. if(_key isEqualTo 0x3D)then{ if(_shift)then{if(ALLOW_ME_THIS_KEYBIND)then{[''] call fnc_ATTACH_TO;};}else{if('AdminConsole' call ADMINLEVELACCESS)then{[] call fnc_workplace;};}; };
  11938. if(_key isEqualTo 0x3E)then{ if('Items spawn menu' call ADMINLEVELACCESS)then{call FN_GEAR_ON_TARGET;}; };
  11939. if(_key isEqualTo 0x3F)then{ if('Change ViewDistance' call ADMINLEVELACCESS)then{if(_shift || _ctrl || _alt)exitWith{};call FN_CHANGE_VIEWDISTANCE;}; };
  11940. if(_key isEqualTo 0x17)then{ if(('showinfo' call ADMINLEVELACCESS)&&(_shift))then{if(!isNull cursortarget)then{[] spawn admin_showinfo;};}; };
  11941. if(_key isEqualTo 0xD3)then{ if('Delete Vehicle' call ADMINLEVELACCESS)then{[''] call fnc_deleteVeh_selected;}; };
  11942. if(_key isEqualTo 0x42)then{ if('Flip Vehicle' call ADMINLEVELACCESS)then{[''] call fnc_flipVeh;}; };
  11943. if(_key isEqualTo 0x02)then{ if(ALLOW_ME_THIS_KEYBIND || 'Light' call ADMINLEVELACCESS)then{ if(_ctrl)then{[''] call fnc_Light_selected; };}; };
  11944. if(_key isEqualTo 0x03)then{ if(ALLOW_ME_THIS_KEYBIND)then{ if(_ctrl)then{[''] call fnc_Kill_selected; };}; };
  11945. if(_key isEqualTo 0x05)then{ if('FlyUp' call ADMINLEVELACCESS)then{call infiSTAR_FlyUp}; };
  11946. if(_key isEqualTo 0x06)then{ if(_shift)then{ [] call infiSTAR_Tpdirection;}; };
  11947. if(_key isEqualTo 0x08)then{ if('UnlockLockVehicle' call ADMINLEVELACCESS)then{[] call infiSTAR_A3Togglelock;}; };
  11948. if(_key isEqualTo 0x43)then{ if('ShowGear' call ADMINLEVELACCESS)then{[] call admin_showGear;}; };
  11949. if(_key isEqualTo 0x44)then{ call fnc_endspectate; };
  11950. if(_key isEqualTo 0x2F)then{ if(ALLOW_ME_THIS_KEYBIND)then{if(_shift)then{[] call infiSTAR_shortTP;};if(_ctrl)then{[] call infiSTAR_go_down;};}; };
  11951. if(_key isEqualTo 0x30)then{ if(ALLOW_ME_THIS_KEYBIND)then{[] call fnc_Hover;}; };
  11952. if(_key isEqualTo 0x40)then{ if('HealSelf' call ADMINLEVELACCESS)then{[] call infiSTAR_A3Heal;'HealSelf' call fnc_adminLog;playsound 'AddItemOK';}; };
  11953. if(_key isEqualTo 0x41)then{ if('HealRepairNear' call ADMINLEVELACCESS)then{[] call infiSTAR_A3RestoreNear;'HealRepairNear' call fnc_adminLog;playsound 'AddItemOK';}; };
  11954. if(_key isEqualTo 0x0F)then{ if(_shift)then{openMap true;}; };
  11955. if(_key isEqualTo 0x57)then{ if('Spawn Ammo' call ADMINLEVELACCESS)then{[] call infiSTAR_A3addAmmo;}; };
  11956. if(_key isEqualTo 0x0E)then{ if(!isNil'prevLoc')then{[1,netId player,prevLoc] call fnc_AdminReq;prevLoc = nil;}; };
  11957. if(_key isEqualTo 83)then{ [] call fn_addArsenalAction; };
  11958. false
  11959. };
  11960. fnc_infiAdminKeyUp = {
  11961. private ['_key', '_shift', '_ctrl', '_alt'];
  11962. _key = _this select 1;
  11963. _shift = _this select 2;
  11964. _ctrl = _this select 3;
  11965. _alt = _this select 4;
  11966. SHIFT_IS_PRESSED = false;
  11967. ALT_IS_PRESSED = false;
  11968. false
  11969. };
  11970. _oldValues = profileNamespace getVariable ['infiSTAR_saveToggle',[]];
  11971. if!(_oldValues isEqualTo [])then
  11972. {
  11973. {
  11974. if(_x call ADMINLEVELACCESS)then
  11975. {
  11976. if!(_x in infiSTAR_toggled_A)then
  11977. {
  11978. _x call fnc_toggleables;
  11979. };
  11980. };
  11981. } forEach _oldValues;
  11982. };
  11983. HTML_LOAD_URL_EXILE = 'http://htmlload.infistar.de/admin.php';
  11984.  
  11985. _log = format['<infiSTAR.de> %1 - Menu Loaded - press F1 (default Key) to open it!',call GET_TIME_TIME];systemchat _log;diag_log _log;
  11986.  
  11987. if(!isNil 'infiAdminKeyDown')then{(findDisplay 46) displayRemoveEventHandler ['KeyDown',infiAdminKeyDown];infiAdminKeyDown = nil;};
  11988. infiAdminKeyDown = (findDisplay 46) displayAddEventHandler ['KeyDown',{ _this call fnc_infiAdminKeyDown }];
  11989.  
  11990. if(!isNil 'infiAdminKeyUp')then{(findDisplay 46) displayRemoveEventHandler ['KeyUp',infiAdminKeyUp];infiAdminKeyUp = nil;};
  11991. infiAdminKeyUp = (findDisplay 46) displayAddEventHandler ['KeyUp',{ _this call fnc_infiAdminKeyUp }];
  11992.  
  11993. if('Teleport On Map Click' call ADMINLEVELACCESS)then
  11994. {
  11995. if(!isNil'infiAdminMouseButtonDown')then{(uiNamespace getVariable 'A3MAPICONS_mainMap') ctrlRemoveEventHandler ['MouseButtonDown',infiAdminMouseButtonDown];infiAdminMouseButtonDown=nil;};
  11996. infiAdminMouseButtonDown = (uiNamespace getVariable 'A3MAPICONS_mainMap') ctrlAddEventHandler['MouseButtonDown','call fnc_MouseButtonDown'];
  11997.  
  11998. if(!isNil'infiAdminMouseButtonUp')then{(uiNamespace getVariable 'A3MAPICONS_mainMap') ctrlRemoveEventHandler ['MouseButtonUp',infiAdminMouseButtonUp];infiAdminMouseButtonUp=nil;};
  11999. infiAdminMouseButtonUp = (uiNamespace getVariable 'A3MAPICONS_mainMap') ctrlAddEventHandler['MouseButtonUp','call fnc_MouseButtonUp'];
  12000. };
  12001. ";
  12002. /* ********************************************************************************* */
  12003. /* *********************************www.infiSTAR.de********************************* */
  12004. /* *******************Developed by infiSTAR (infiSTAR23@gmail.com)****************** */
  12005. /* **************infiSTAR Copyright®© 2011 - 2016 All rights reserved.************** */
  12006. /* ****DayZAntiHack.com***DayZAntiHack.de***ArmaAntiHack.com***Arma3AntiHack.com**** *//*
  12007. Author: Chris(tian) "infiSTAR" Lorenzen
  12008. Contact: infiSTAR23@gmail.com // www.infiSTAR.de
  12009.  
  12010. Copyright infiSTAR - 2011 - 2016. All rights reserved.
  12011. Christian (Chris) L. (infiSTAR23@gmail.com) Developer of infiSTAR
  12012.  
  12013. Description:
  12014. Arma AntiHack & AdminTools - infiSTAR.de
  12015.  
  12016. UPDATEEMAIL for http://update.infiSTAR.de is:
  12017. 'bullred1989@gmail.com'
  12018.  
  12019. Last download was on:
  12020. '05-Jul-2016 23-52-40';
  12021.  
  12022. NOTE:
  12023. THIS FILE SHOULD NOT BE TOUCHED UNLESS YOU REALLY KNOW WHAT YOU ARE DOING!
  12024. */
  12025.  
  12026.  
  12027.  
  12028.  
  12029.  
  12030.  
  12031.  
  12032.  
  12033.  
  12034.  
  12035.  
  12036.  
  12037.  
  12038.  
  12039.  
  12040.  
  12041.  
  12042.  
  12043.  
  12044.  
  12045.  
  12046.  
  12047.  
  12048.  
  12049.  
  12050.  
  12051.  
  12052.  
  12053.  
  12054.  
  12055.  
  12056.  
  12057.  
  12058.  
  12059.  
  12060.  
  12061.  
  12062.  
  12063.  
  12064.  
  12065.  
  12066.  
  12067.  
  12068.  
  12069.  
  12070.  
  12071.  
  12072.  
  12073. /* FIX PROBLEMS IN ARMA / OTHER ADDONS */
  12074. cba_common_setVehVarName = compileFinal "diag_log 'blocked RE exploit';";
  12075. BIS_fnc_parsenumber = compileFinal '
  12076. _number = param [0,-1,[0,"",{},configfile]];
  12077. switch (typename _number) do {
  12078. case (typename {}): {
  12079. _number = call _number;
  12080. if (isnil {_number}) then {_number = -1;};
  12081. _number
  12082. };
  12083. case (typename ""): {
  12084. _number = parseNumber _number;
  12085. if (isnil {_number}) then {_number = -1;};
  12086. _number
  12087. };
  12088. case (typename configfile): {
  12089. if (isnumber _number) then {
  12090. getnumber _number
  12091. } else {
  12092. if (istext _number) then {
  12093. parseNumber (gettext _number)
  12094. } else {
  12095. -1
  12096. };
  12097. };
  12098. };
  12099. default {_number};
  12100. };
  12101. ';
  12102.  
  12103.  
  12104.  
  12105. /* START INFISTAR */
  12106. if(!isNil "infiSTAR_IS_RUN_ON_THIS_SERVER")exitWith{diag_log format["<infiSTAR.de> %1 - is already started %1 seconds ago..",time - infiSTAR_IS_RUN_ON_THIS_SERVER];};
  12107. infiSTAR_IS_RUN_ON_THIS_SERVER = time;
  12108. _found = false;
  12109. diag_log format["<infiSTAR.de> %1 - checking for EXILE_SERVER..",time];
  12110. _cfgPatches = configFile >> "CfgPatches";
  12111. for "_i" from 0 to (count _cfgPatches - 1) do
  12112. {
  12113. _patchClass = _cfgPatches select _i;
  12114. if(toLower(configName _patchClass) isEqualTo "exile_server")exitWith
  12115. {
  12116. _found = true;
  12117. };
  12118. };
  12119. if(!_found)exitWith
  12120. {
  12121. for "_i" from 0 to 10 do
  12122. {
  12123. diag_log format["<infiSTAR.de> %1 - Could not find EXILE_SERVER, infiSTAR will not start!",time];
  12124. };
  12125. };
  12126. diag_log format["<infiSTAR.de> %1 - EXILE_SERVER has been found, STARTING",time];
  12127. _found = false;
  12128. diag_log format["<infiSTAR.de> %1 - checking for Cfg_infiSTAR_settings..",time];
  12129. _configFile = configFile;
  12130. for "_i" from 0 to (count _configFile - 1) do
  12131. {
  12132. _patchClass = _configFile select _i;
  12133. if(configName _patchClass == "Cfg_infiSTAR_settings")exitWith
  12134. {
  12135. _found = true;
  12136. };
  12137. };
  12138. if(!_found)exitWith
  12139. {
  12140. for "_i" from 0 to 10 do
  12141. {
  12142. diag_log format["<infiSTAR.de> %1 - Could not find Cfg_infiSTAR_settings, infiSTAR will not start!",time];
  12143. };
  12144. };
  12145. diag_log format["<infiSTAR.de> %1 - Cfg_infiSTAR_settings has been found, STARTING",time];
  12146. fnc_infiSTAR_cfg = compileFinal '
  12147. private["_inputclassname","_path","_default","_defaultT","_return"];
  12148. _inputclassname = _this select 0;
  12149. _path = (configfile >> "Cfg_infiSTAR_settings" >> _inputclassname);
  12150. _default = _this select 1;
  12151. _defaultT = typename _default;
  12152. _return = call {
  12153. if(_defaultT isEqualTo "BOOL")exitWith{(getText _path)=="true"};
  12154. if(_defaultT isEqualTo "ARRAY")exitWith{getArray _path};
  12155. if(_defaultT isEqualTo "SCALAR")exitWith{getNumber _path};
  12156. if(_defaultT isEqualTo "STRING")exitWith{getText _path};
  12157. diag_log format["<infiSTAR.de> fnc_infiSTAR_cfg inputclassname: %1, default: %2, default type: %3 - was used!",_inputclassname,_default,_defaultT];
  12158. _default
  12159. };
  12160. _return
  12161. ';
  12162. _devs = ['76561198152111329']; /* infiSTAR UID */
  12163. _admins = [];
  12164. _serverCommandPassword = ["serverCommandPassword","changeme"] call fnc_infiSTAR_cfg;
  12165. _passwordAdmin = ["passwordAdmin","changeme"] call fnc_infiSTAR_cfg;
  12166. _OPEN_ADMIN_MENU_KEY = ["OPEN_ADMIN_MENU_KEY",0x3B] call fnc_infiSTAR_cfg;
  12167. _HIDE_FROM_PLAYERS = ["HIDE_FROM_PLAYERS",false] call fnc_infiSTAR_cfg;
  12168. _announce_adminstate_changed = ["announce_adminstate_changed",false] call fnc_infiSTAR_cfg;
  12169. _use_html_load_on_adminmenu = ["use_html_load_on_adminmenu",true] call fnc_infiSTAR_cfg;
  12170. LOG_PATH = ["LOG_PATH",""] call fnc_infiSTAR_cfg;
  12171. _LogAdminActions = ["LogAdminActions",true] call fnc_infiSTAR_cfg;
  12172. _enableIngameLogs = ["enableIngameLogs",true] call fnc_infiSTAR_cfg;
  12173. _needAdminNameTag = ["needAdminNameTag",false] call fnc_infiSTAR_cfg;
  12174. _AdminNameTag = ["AdminNameTag","[Admin]"] call fnc_infiSTAR_cfg;
  12175. _chatCommands = ["chatCommands",[]] call fnc_infiSTAR_cfg;
  12176. _chatCommandsP = ["chatCommandsP",[]] call fnc_infiSTAR_cfg;
  12177.  
  12178. _ENABLE_NOTIFICATION_MESSAGES = ["ENABLE_NOTIFICATION_MESSAGES",true] call fnc_infiSTAR_cfg;
  12179. if(_ENABLE_NOTIFICATION_MESSAGES)then{
  12180. NOTIFY_MSG_ARRAY = ["NOTIFY_MSG_ARRAY",[]] call fnc_infiSTAR_cfg;
  12181. publicVariable "NOTIFY_MSG_ARRAY";
  12182. };
  12183.  
  12184. _pathToCustomBillBoardTextures = ["pathToCustomBillBoardTextures",[]] call fnc_infiSTAR_cfg;
  12185. _startAsNormal = ["startAsNormal",[]] call fnc_infiSTAR_cfg;
  12186. _hiddenSuperAdmin = ["hiddenSuperAdmin",[]] call fnc_infiSTAR_cfg;
  12187. _adminUIDandAccess = ["adminUIDandAccess",[]] call fnc_infiSTAR_cfg;
  12188.  
  12189.  
  12190. _USE_DATABASE_WHITELIST = ["USE_DATABASE_WHITELIST",false] call fnc_infiSTAR_cfg;
  12191. _USE_UID_WHITELIST = ["USE_UID_WHITELIST",false] call fnc_infiSTAR_cfg;
  12192. _UID_WHITELIST = ["UID_WHITELIST",[]] call fnc_infiSTAR_cfg;
  12193.  
  12194.  
  12195. _ExileDevFriendlyMode = ["ExileDevFriendlyMode",false] call fnc_infiSTAR_cfg;
  12196. _ESCMNUTOP = ["ESCMNUTOP","AntiHack & AdminTools"] call fnc_infiSTAR_cfg;
  12197. _ESCMNUBOT = ["ESCMNUBOT","by infiSTAR.de"] call fnc_infiSTAR_cfg;
  12198. _BRIEFING_MSG = ["BRIEFING_MSG",false] call fnc_infiSTAR_cfg;
  12199. _HTML_LOAD_URL = ["HTML_LOAD_URL",""] call fnc_infiSTAR_cfg;
  12200. _ENABLE_PRIVATE_CHAT_MENU = ["ENABLE_PRIVATE_CHAT_MENU",false] call fnc_infiSTAR_cfg;
  12201. _PRIVATE_CHAT_MENU_8GNETWORK = ["PRIVATE_CHAT_MENU_8GNETWORK",false] call fnc_infiSTAR_cfg;
  12202. _USE_RESTART_TIMER = ["USE_RESTART_TIMER",true] call fnc_infiSTAR_cfg;
  12203. _RESTART_TIME_IN_M = ["RESTART_TIME_IN_M",180] call fnc_infiSTAR_cfg;
  12204. _SHOW_TIMER_IN_MIN = ["SHOW_TIMER_IN_MIN",[1,2,3,5,10]] call fnc_infiSTAR_cfg;
  12205. _USE_RESTART_TIMER_SHUTDOWN = ["USE_RESTART_TIMER_SHUTDOWN",false] call fnc_infiSTAR_cfg;
  12206. _DayNightVote = ["DayNightVote",true] call fnc_infiSTAR_cfg;
  12207. _MRV = ["MRV",0.3] call fnc_infiSTAR_cfg;
  12208. _MVP = ["MVP",0.51] call fnc_infiSTAR_cfg;
  12209. _VCT = ["VCT",300] call fnc_infiSTAR_cfg;
  12210. _TGV = ["TGV",40] call fnc_infiSTAR_cfg;
  12211. _VDV = ["VDV",900] call fnc_infiSTAR_cfg;
  12212. _VOV = ["VOV",750] call fnc_infiSTAR_cfg;
  12213. _SVD = ["SVD",100] call fnc_infiSTAR_cfg;
  12214.  
  12215. _fix_uniform_and_vest = ["fix_uniform_and_vest",false] call fnc_infiSTAR_cfg;
  12216. _experimental_dupe_check = ["experimental_dupe_check",false] call fnc_infiSTAR_cfg;
  12217. _stopSafeGlitchAndCorpseDupe = ["stopSafeGlitchAndCorpseDupe",false] call fnc_infiSTAR_cfg;
  12218.  
  12219. _URC = ["URC",true] call fnc_infiSTAR_cfg;
  12220. _LVC = ["LVC",true] call fnc_infiSTAR_cfg;
  12221. _CAP = ["CAP",false] call fnc_infiSTAR_cfg;
  12222.  
  12223. _KCM = ["KCM",true] call fnc_infiSTAR_cfg;
  12224. _CMC = ["CMC",true] call fnc_infiSTAR_cfg;
  12225. _allowedCommandingMenus = ["allowedCommandingMenus",[]] call fnc_infiSTAR_cfg;
  12226. _allowedCommandingMenus = _allowedCommandingMenus - ["#user:example"];
  12227. _allowedCommandingMenus = _allowedCommandingMenus - ["#user:example2"];
  12228.  
  12229. _check_Notifications = ["check_Notifications",false] call fnc_infiSTAR_cfg;
  12230. _disconnect_dupe_check = ["disconnect_dupe_check",false] call fnc_infiSTAR_cfg;
  12231. _wall_look = ["wall_look",false] call fnc_infiSTAR_cfg;
  12232. _wall_glitch_object = ["wall_glitch_object",false] call fnc_infiSTAR_cfg;
  12233. _wall_glitch_vehicle = ["wall_glitch_vehicle",false] call fnc_infiSTAR_cfg;
  12234. _check_doors_n_gates = ["check_doors_n_gates",false] call fnc_infiSTAR_cfg;
  12235. _checkHiddenObjects = ["checkHiddenObjects",false] call fnc_infiSTAR_cfg;
  12236. _attach_to_check = ["attach_to_check",false] call fnc_infiSTAR_cfg;
  12237. _slingload_check = ["slingload_check",false] call fnc_infiSTAR_cfg;
  12238. _checkFilePatchingEnabled = ["checkFilePatchingEnabled",true] call fnc_infiSTAR_cfg;
  12239. _CMM = ["CMM",true] call fnc_infiSTAR_cfg;
  12240. _maxMapMenuEntries = ["maxMapMenuEntries",6] call fnc_infiSTAR_cfg;
  12241. _check_steam_ban = ["check_steam_ban",false] call fnc_infiSTAR_cfg;
  12242. _ban_for_steam_ban = ["ban_for_steam_ban",false] call fnc_infiSTAR_cfg;
  12243.  
  12244. _UAT = ["UAT",true] call fnc_infiSTAR_cfg;
  12245. _allowTPcfg = (getArray(configfile >> "Cfg_infiSTAR_settings" >> "allowTP" >> "custom"));
  12246.  
  12247. _CHECK_DRAWING = ["CHECK_DRAWING",false] call fnc_infiSTAR_cfg;
  12248. _CGM = ["CGM",false] call fnc_infiSTAR_cfg;
  12249. _CLM = ["CLM",false] call fnc_infiSTAR_cfg;
  12250. _UMW = ["UMW",false] call fnc_infiSTAR_cfg;
  12251. _aLocalM = ["aLocalM",[]] call fnc_infiSTAR_cfg;
  12252. _badChat = ["badChat",[]] call fnc_infiSTAR_cfg;
  12253. _badNamesFull = ["badNamesFull",[]] call fnc_infiSTAR_cfg;
  12254. _badNamesPartial = ["badNamesPartial",[]] call fnc_infiSTAR_cfg;
  12255. _badGroupNames = ["badGroupNames",[]] call fnc_infiSTAR_cfg;
  12256. _badIDDsToKick = ["badIDDsToKick",[]] call fnc_infiSTAR_cfg;
  12257. _badIDDsToClose = ["badIDDsToClose",[]] call fnc_infiSTAR_cfg;
  12258. _UDW = ["UDW",true] call fnc_infiSTAR_cfg;
  12259. _allowedIDDs = ["allowedIDDs",[]] call fnc_infiSTAR_cfg;
  12260.  
  12261. _useBlacklistedVariableCheck = ["useBlacklistedVariableCheck",false] call fnc_infiSTAR_cfg;
  12262. _blacklistedVariables = [];
  12263. if(_useBlacklistedVariableCheck)then{_blacklistedVariables = ["blacklistedVariables",[]] call fnc_infiSTAR_cfg;};
  12264.  
  12265.  
  12266. _UVC = ["UVC",true] call fnc_infiSTAR_cfg;
  12267. _UVC_adminspawn = ["UVC_adminspawn",true] call fnc_infiSTAR_cfg;
  12268. _VehicleWhiteList_check = ["VehicleWhiteList_check",true] call fnc_infiSTAR_cfg;
  12269. _VehicleWhiteList = ["VehicleWhiteList",[]] call fnc_infiSTAR_cfg;
  12270. _ForbiddenVehicles_check = ["ForbiddenVehicles_check",true] call fnc_infiSTAR_cfg;
  12271. _ForbiddenVehicles = ["ForbiddenVehicles",[]] call fnc_infiSTAR_cfg;
  12272. _LocalWhitelist = ["LocalWhitelist",[]] call fnc_infiSTAR_cfg;
  12273.  
  12274.  
  12275. _UFI = ["UFI",false] call fnc_infiSTAR_cfg;
  12276. _UIW = ["UIW",false] call fnc_infiSTAR_cfg;
  12277. _ItemWhiteList = ["ItemWhiteList",[]] call fnc_infiSTAR_cfg;
  12278. _ForbiddenItems = ["ForbiddenItems",[]] call fnc_infiSTAR_cfg;
  12279. _allSupportBoxes = ["allSupportBoxes",[]] call fnc_infiSTAR_cfg;
  12280. _allSupportBoxesNames = [];
  12281. {
  12282. if!(_x isEqualTo [])then
  12283. {
  12284. _allSupportBoxesNames pushBack (_x select 0);
  12285. };
  12286. } forEach _allSupportBoxes;
  12287. _KYLE_MODE = ["KYLE_MODE",false] call fnc_infiSTAR_cfg;
  12288. if(!_ExileDevFriendlyMode)then{_ExileDevFriendlyMode = getNumber(configFile >> "CfgSettings" >> "ServerSettings" >> "devFriendyMode") isEqualTo 1;};
  12289. if(_ExileDevFriendlyMode)then
  12290. {
  12291. _devs pushBackUnique "76561198022879703"; /* Grim */
  12292. };
  12293. {if(count _x > 5)then{_devs pushBackUnique _x;};} forEach _hiddenSuperAdmin;
  12294. {if(count _x > 5)then{_admins pushBackUnique _x;};} forEach _devs;
  12295. fnc_CompilableString = {
  12296. _input = _this select 0;
  12297. _output = call {
  12298. if(_input isEqualType {})exitWith{(str(_input)) select [1,((count(str(_input)))-2)]};
  12299. if(_input isEqualType "")exitWith{_input};
  12300. ""
  12301. };
  12302. _output
  12303. };
  12304. fnc_CompilableString = compileFinal ([fnc_CompilableString] call fnc_CompilableString);
  12305. publicVariable "fnc_CompilableString";
  12306. _testserver = (((toLower servername) find 'mgt exile' isEqualTo -1)||((toLower servername) find 'test' isEqualTo -1));
  12307.  
  12308.  
  12309.  
  12310.  
  12311.  
  12312.  
  12313.  
  12314. fn_antidupedisabler = compileFinal "
  12315. disableSerialization;
  12316. _timer = diag_tickTime + _this;
  12317. while{(!isNull (findDisplay 602))}do
  12318. {
  12319. _ctrl = ((findDisplay 602) displayCtrl 632);
  12320. _ctrl ctrlEnable false;
  12321.  
  12322. _size = lbSize _ctrl;
  12323. if(_size > 0)then
  12324. {
  12325. for '_i' from 0 to _size do
  12326. {
  12327. _ctrl lbSetColor [_i, [1,0,0,1]];
  12328. };
  12329. };
  12330. if(diag_tickTime > _timer)exitWith
  12331. {
  12332. ((findDisplay 602) displayCtrl 632) ctrlEnable true;
  12333.  
  12334. if(_size > 0)then
  12335. {
  12336. for '_i' from 0 to _size do
  12337. {
  12338. _ctrl lbSetColor [_i, [1,1,1,1]];
  12339. };
  12340. };
  12341. };
  12342. };
  12343. ";
  12344. publicVariable "fn_antidupedisabler";
  12345. fn_onPlayerTake = compileFinal "
  12346. if(!isNil'antidupedisabler')then{terminate antidupedisabler;antidupedisabler=nil;};
  12347. antidupedisabler = 0.3 spawn fn_antidupedisabler;
  12348.  
  12349. _this call ExileClient_object_player_event_onTake
  12350. ";
  12351. publicVariable "fn_onPlayerTake";
  12352.  
  12353.  
  12354.  
  12355.  
  12356.  
  12357.  
  12358.  
  12359. if(_stopSafeGlitchAndCorpseDupe)then{
  12360. fn_onInventoryOpened = compileFinal "
  12361. _ret = _this call ExileClient_object_player_event_onInventoryOpened;
  12362. ((findDisplay 602) displayCtrl 111) ctrlSetText format['%1 (%2)',groupId(group player),profileName];
  12363. if(!_ret)then
  12364. {
  12365. _container = _this select 1;
  12366.  
  12367. _locked = locked _container isEqualTo 2;
  12368. _ExileIsLocked = _container getVariable ['ExileIsLocked', 1] isEqualTo -1;
  12369. _lockedNear = false;
  12370.  
  12371. if(!_locked && !_ExileIsLocked)then
  12372. {
  12373. if((_container isKindOf 'GroundWeaponHolder')||(_container isKindOf 'WeaponHolderSimulated')||(_container isKindOf 'LootWeaponHolder')||(_container isKindOf 'Man'))then
  12374. {
  12375. _vehicles = player nearObjects ['AllVehicles', 7];
  12376. if(!_lockedNear)then
  12377. {
  12378. {
  12379. _lockedxx = locked _x isEqualTo 2;
  12380. _ExileIsLockedxx = _x getVariable ['ExileIsLocked', 1] isEqualTo -1;
  12381. if((_lockedxx || _ExileIsLockedxx) && !(_x in [_container,vehicle _container]))exitWith
  12382. {
  12383. _lockedNear = true;
  12384. systemChat '<infiSTAR.de> locked vehicle to close.. gear menu will not show the cargo tab!';
  12385. };
  12386. } forEach _vehicles;
  12387. };
  12388. if(!_lockedNear)then
  12389. {
  12390. {
  12391. _obj = _x;
  12392. if(!(_obj isKindOf 'Man')&&(_container isKindOf 'Man')&&(!alive _container))exitWith
  12393. {
  12394. _lockedNear = true;
  12395. systemChat '<infiSTAR.de> vehicle to close to dead body.. gear menu will not show the cargo tab!';
  12396. };
  12397. } forEach _vehicles;
  12398. };
  12399. if(!_lockedNear)then
  12400. {
  12401. {
  12402. _lockedx = locked _x isEqualTo 2;
  12403. _ExileIsLockedx = _x getVariable ['ExileIsLocked', 1] isEqualTo -1;
  12404. if(_lockedx || _ExileIsLockedx)exitWith
  12405. {
  12406. _lockedNear = true;
  12407. systemChat '<infiSTAR.de> locked supply close.. gear menu will not show the cargo tab!';
  12408. };
  12409. } forEach (player nearSupplies 5);
  12410. };
  12411. };
  12412. };
  12413. if(_locked || _ExileIsLocked || _lockedNear)then
  12414. {
  12415. if(!isNil'checkGearDisplayThread')then{terminate checkGearDisplayThread;checkGearDisplayThread=nil;};
  12416. checkGearDisplayThread = [] spawn {
  12417. disableSerialization;
  12418. _fn_hide_cargo = {
  12419. ((findDisplay 602) displayCtrl 6401) ctrlEnable false;
  12420. ctrlSetFocus ((findDisplay 602) displayCtrl 6321);
  12421. ctrlActivate ((findDisplay 602) displayCtrl 6321);
  12422. };
  12423. waitUntil {call _fn_hide_cargo;!isNull findDisplay 602};
  12424. waitUntil {call _fn_hide_cargo;isNull findDisplay 602};
  12425. };
  12426. };
  12427. };
  12428. _ret
  12429. ";
  12430. publicVariable "fn_onInventoryOpened";
  12431. }
  12432. else
  12433. {
  12434. fn_onInventoryOpened = compileFinal "
  12435. _ret = _this call ExileClient_object_player_event_onInventoryOpened;
  12436. ((findDisplay 602) displayCtrl 111) ctrlSetText format['%1 (%2)',groupId(group player),profileName];
  12437. _ret
  12438. ";
  12439. publicVariable "fn_onInventoryOpened";
  12440. };
  12441.  
  12442.  
  12443.  
  12444.  
  12445. fnc_exile_revive_client = compileFinal "
  12446. params[['_target',objNull],['_newUnit',objNull]];
  12447. if(isNull _target)exitWith{systemChat 'dead body gone..!';};
  12448. if(isNull _newUnit)exitWith{systemChat 'new body not ready..!';};
  12449.  
  12450. _weaponholder = nearestObject [_target, 'WeaponHolderSimulated'];
  12451. if(!isNull _weaponholder)then
  12452. {
  12453. _weaponsItemsCargo = weaponsItemsCargo _weaponholder;
  12454. if(count _weaponsItemsCargo > 0)then
  12455. {
  12456. _weaponsItemsCargo = _weaponsItemsCargo select 0;
  12457.  
  12458. {
  12459. if(_x isEqualType '')then
  12460. {
  12461. _target addweapon _x;
  12462. _target addPrimaryWeaponItem _x;
  12463. }
  12464. else
  12465. {
  12466. _target addMagazine _x;
  12467. };
  12468. } forEach _weaponsItemsCargo;
  12469. };
  12470. deleteVehicle _weaponholder;
  12471. };
  12472. if(local _target)then
  12473. {
  12474. _loadout = getUnitLoadout _target;
  12475. deleteVehicle _target;
  12476. _newUnit setUnitLoadout _loadout;
  12477. };
  12478.  
  12479. _layer = 'BIS_fnc_respawnCounter' call bis_fnc_rscLayer;
  12480. _layer cutText ['', 'plain'];
  12481. if !(ExileClientBleedOutThread isEqualTo -1) then
  12482. {
  12483. [ExileClientBleedOutThread] call ExileClient_system_thread_removeTask;
  12484. ExileClientBleedOutThread = -1;
  12485. };
  12486. cutText['', 'BLACK IN',3];
  12487. titleText['', 'BLACK IN',3];
  12488. true call ExileClient_gui_hud_toggle;
  12489. ExileClientLoadedIn = true;
  12490. showChat true;
  12491. setGroupIconsVisible [true, true];
  12492. if(ExileClientPlayerIsBambi)then{call ExileClient_object_player_bambiStateEnd;};
  12493. if(userInputDisabled)then{disableUserInput false;};
  12494. true
  12495. ";
  12496. publicVariable "fnc_exile_revive_client";
  12497.  
  12498.  
  12499. fnc_exile_revive_server = compileFinal "
  12500. _target = _this select 0;
  12501. _targetID = _this select 1;
  12502.  
  12503. _posATL = getPosATL _target;
  12504. _direction = getDir _target;
  12505. _playerUID = getPlayerUID _target;
  12506. _name = _target getVariable['ExileName',''];
  12507.  
  12508. _accountData = format['getAccountStats:%1', _playerUID] call ExileServer_system_database_query_selectSingle;
  12509. _group = call ExileServer_system_group_getOrCreateLoneWolfGroup;
  12510. _newUnit = _group createUnit ['Exile_Unit_Player', _posATL, [], 0, 'CAN_COLLIDE'];
  12511. removeHeadgear _newUnit;
  12512.  
  12513. _clanID = (_accountData select 3);
  12514. _clanData = missionNamespace getVariable [format ['ExileServer_clan_%1',_clanID],[]];
  12515. if !((typeName _clanID) isEqualTo 'SCALAR') then
  12516. {
  12517. _clanID = -1;
  12518. }
  12519. else
  12520. {
  12521. if(isNull (_clanData select 5))then
  12522. {
  12523. _clanGroup = createGroup independent;
  12524. _clanData set [5,_clanGroup];
  12525. _clanGroup setGroupIdGlobal [_clanData select 0];
  12526. missionNameSpace setVariable [format ['ExileServer_clan_%1',_clanID],_clanData];
  12527. }
  12528. else
  12529. {
  12530. _clanGroup = (_clanData select 5);
  12531. };
  12532. [_newUnit] joinSilent _clanGroup;
  12533. };
  12534. _newUnit disableAI 'FSM';
  12535. _newUnit disableAI 'MOVE';
  12536. _newUnit disableAI 'AUTOTARGET';
  12537. _newUnit disableAI 'TARGET';
  12538. _newUnit disableAI 'CHECKVISIBLE';
  12539. _newUnit setName _name;
  12540. _newUnit setVariable ['ExileMoney', 0, true];
  12541. _newUnit setVariable ['ExileScore', (_accountData select 0)];
  12542. _newUnit setVariable ['ExileKills', (_accountData select 1)];
  12543. _newUnit setVariable ['ExileDeaths', (_accountData select 2)];
  12544. _newUnit setVariable ['ExileClanID', _clanID];
  12545. _newUnit setVariable ['ExileClanData', _clanData];
  12546. _newUnit setVariable ['ExileHunger', 100];
  12547. _newUnit setVariable ['ExileThirst', 100];
  12548. _newUnit setVariable ['ExileTemperature', 37];
  12549. _newUnit setVariable ['ExileWetness', 0];
  12550. _newUnit setVariable ['ExileAlcohol', 0];
  12551. _newUnit setVariable ['ExileName', _name];
  12552. _newUnit setVariable ['ExileOwnerUID', _playerUID];
  12553. _newUnit setVariable ['ExileIsBambi', true];
  12554. _newUnit setVariable ['ExileXM8IsOnline', false, true];
  12555. _newUnit setVariable ['ExileLocker', (_accountData select 4), true];
  12556. _newUnit addMPEventHandler ['MPKilled', {_this call ExileServer_object_player_event_onMpKilled}];
  12557. _newUnit call ExileServer_object_player_database_insert;
  12558.  
  12559.  
  12560.  
  12561. _createPlayerResponse = [
  12562. _newUnit,
  12563. '',
  12564. str (_accountData select 0),
  12565. (_accountData select 1),
  12566. (_accountData select 2),
  12567. 100,
  12568. 100,
  12569. 0,
  12570. (getNumber (configFile >> 'CfgSettings' >> 'BambiSettings' >> 'protectionDuration')) * 60,
  12571. _clanData,
  12572. 0
  12573. ];
  12574.  
  12575. [
  12576. [_createPlayerResponse,[_target,_newUnit]],
  12577. {
  12578. (_this select 0) call ExileClient_object_player_network_createPlayerResponse;
  12579. (_this select 1) call fnc_exile_revive_client;
  12580. },
  12581. _targetID,
  12582. false
  12583. ] call FN_infiSTAR_S;
  12584.  
  12585.  
  12586.  
  12587. _sessionId = call ExileServer_system_session_createId;
  12588. ExileSessionIDs pushBack _sessionId;
  12589. [_sessionID, _newUnit] call ExileServer_system_session_update;
  12590. _newUnit call ExileServer_object_player_database_update;
  12591. _newUnit spawn {uiSleep 10;if(!isNull _this)then{_this call ExileServer_object_player_database_update;};};
  12592.  
  12593. _newUnit setPosATL _posATL;
  12594. _newUnit setDir _direction;
  12595. true
  12596. ";
  12597.  
  12598.  
  12599.  
  12600.  
  12601.  
  12602.  
  12603.  
  12604.  
  12605. fnc_infiSTAR_stopvaultglitch = compileFinal "
  12606. _key = _this select 1;
  12607. if(_key in actionKeys 'GetOver')exitWith
  12608. {
  12609. _exiledist = 4;
  12610.  
  12611. if(cursorTarget distance player < _exiledist && (cursorTarget isKindOf 'Exile_Construction_Abstract_Static' || cursorTarget isKindOf 'AbstractConstruction'))exitWith
  12612. {
  12613. if(isNil'vaultblockcounter')then{vaultblockcounter=0;};
  12614. vaultblockcounter = vaultblockcounter + 1;
  12615. cutText [format['<infiSTAR.de>%1: Blocked VAULT - Exile Basepart close #1!',vaultblockcounter],'PLAIN'];
  12616. true
  12617. };
  12618.  
  12619. _close = nearestObjects [player, ['Exile_Construction_Abstract_Static','AbstractConstruction'],_exiledist];
  12620. if!(_close isEqualTo [])exitWith
  12621. {
  12622. if(isNil'vaultblockcounter')then{vaultblockcounter=0;};
  12623. vaultblockcounter = vaultblockcounter + 1;
  12624. cutText [format['<infiSTAR.de>%1: Blocked VAULT - Exile Basepart close #2!',vaultblockcounter],'PLAIN'];
  12625. true
  12626. };
  12627.  
  12628. cutText ['','PLAIN'];
  12629. };
  12630. false
  12631. ";
  12632. publicVariable "fnc_infiSTAR_stopvaultglitch";
  12633.  
  12634.  
  12635.  
  12636.  
  12637.  
  12638.  
  12639.  
  12640.  
  12641.  
  12642.  
  12643.  
  12644. fnc_debugbox_new = compileFinal (preprocessFileLineNumbers '\a3_infiSTAR_Exile\debug.sqf');
  12645. diag_log format["<infiSTAR.de> %1 - STARTUP - including AdminTools",time];
  12646. #include "EXILE_AT.sqf"
  12647. diag_log format["<infiSTAR.de> %1 - STARTUP - AdminTools included!",time];
  12648. diag_log format["<infiSTAR.de> %1 - STARTUP - including AntiHack",time];
  12649. #include "EXILE_AH.sqf"
  12650. diag_log format["<infiSTAR.de> %1 - STARTUP - AntiHack included!",time];
  12651. comment "Antihack & AdminTools - Christian Lorenzen - www.infiSTAR.de";
  12652. truea3_infiSTAR_Exile ÌÏhŽÌNën©GA”ú=6h†n
Add Comment
Please, Sign In to add comment