Guest User

Untitled

a guest
Oct 20th, 2017
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 55.67 KB | None | 0 0
  1. /*
  2. Author: Chris(tian) "infiSTAR" Lorenzen
  3. Contact: infiSTAR23@gmail.com // www.infiSTAR.de
  4.  
  5. Copyright infiSTAR - 2011 - 2017. All rights reserved.
  6. Christian (Chris) L. (infiSTAR23@gmail.com) Developer of infiSTAR
  7.  
  8. Description:
  9. Arma AntiHack & AdminTools - infiSTAR.de
  10.  
  11. UPDATEEMAIL for http://update.infiSTAR.de is:
  12. 'leonshaddick@gmail.com'
  13.  
  14. Last download was on:
  15. '05-09-2017 14-29-26';
  16.  
  17. NOTE:
  18. THIS FILE SHOULD NOT BE TOUCHED UNLESS YOU REALLY KNOW WHAT YOU ARE DOING!
  19. */
  20. if(uiNameSpace getVariable ["infistar_run",false])exitWith{
  21. diag_log format["<infiSTAR.de> infiSTAR was already started! Make sure that your mission is not looping due to config errors.."];
  22. diag_log format["<infiSTAR.de> You need to restart your server properly to start infiSTAR. Just restarting the mission does not work."];
  23. };
  24. uiNameSpace setVariable ["infistar_run",true];
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73. /****************************************************************************************************/
  74. /****************************************************************************************************/
  75. /****************************************************************************************************/
  76. fnc_CompilableString = {
  77. _input = _this select 0;
  78. _output = call {
  79. if(_input isEqualType {})exitWith{(str(_input)) select [1,((count(str(_input)))-2)]};
  80. if(_input isEqualType "")exitWith{_input};
  81. ""
  82. };
  83. _output
  84. };
  85. fnc_CompilableString = compileFinal ([fnc_CompilableString] call fnc_CompilableString);
  86. publicVariable "fnc_CompilableString";
  87. fn_clean_bad = {
  88. private _clean = _this;
  89. _clean = toArray _clean;
  90. _clean = _clean - [35];
  91. _clean = toString _clean;
  92. _clean
  93. };
  94. fn_clean_bad = compileFinal ([fn_clean_bad] call fnc_CompilableString);
  95. IAH_fnc_getIntFromString = {
  96. params [["_input", "", [""]], ["_pos", 0, [0]]];
  97. if (_input isEqualTo "") exitWith {-1};
  98. private _n = (toArray (_input select [_pos, 1])) select 0;
  99. _n
  100. };
  101. IAH_fnc_getIntFromString = compileFinal ([IAH_fnc_getIntFromString] call fnc_CompilableString);
  102. infiSTAR_DLL_Name = "armalog";
  103. _response = infiSTAR_DLL_Name callExtension ("1a25e727245ad&l=1211f5eeea8ca8c120ae21526f655d5c&sn="+str(toArray serverName));
  104. _isWindows = (productVersion param [6, "", [""]]) isEqualTo "Windows";
  105. if(_isWindows && _response isEqualTo "")exitWith{
  106. diag_log "<infiSTAR.de> Can not load infiSTAR";
  107. diag_log "<infiSTAR.de> DLLs not found!";
  108. };
  109. _armalog = ([_response] call IAH_fnc_getIntFromString isEqualTo 0x01);
  110. if(_isWindows && !_armalog)exitWith{
  111. diag_log "<infiSTAR.de> Can not load infiSTAR";
  112. diag_log "<infiSTAR.de> a25e727245ad";
  113. diag_log "<infiSTAR.de> 1211f5eeea8ca8c120ae21526f655d5c";
  114. diag_log format["<infiSTAR.de> %1",serverName];
  115. diag_log format["<infiSTAR.de> %1",_response select [1]];
  116. };
  117. if(_isWindows && _armalog)then{
  118. diag_log "<infiSTAR.de> infiSTAR dll loaded successfully";
  119. diag_log format["<infiSTAR.de> %1",serverName];
  120. _response = _response select [1];
  121. diag_log format["<infiSTAR.de> %1",_response];
  122. diag_log "<infiSTAR.de> Loading infiSTAR code..";
  123.  
  124. FN_CALL_LOG_DLL = {
  125. params [["_filename", "LOG", [""]], ["_logentry", "", [""]]];
  126. _filename = format["A3_%1_%2_%3", briefingName select [0,10], worldName select [0,10], _filename];
  127. infiSTAR_DLL_Name callExtension ("2"+_filename+"|"+_logentry);
  128. };
  129. FN_CALL_LOG_DLL = compileFinal ([FN_CALL_LOG_DLL] call fnc_CompilableString);
  130.  
  131. FN_ARMA_FETCHDATA = {
  132. params [["_url", "", [""]]];
  133. _url = _url call fn_clean_bad;
  134. if (_url isEqualTo "") exitWith {""};
  135. private _response = infiSTAR_DLL_Name callExtension format["3%1", _url];
  136. if !(([_response] call IAH_fnc_getIntFromString) isEqualTo 0x01) exitWith {""};
  137. private _id = _response select [1];
  138. _timeOut = diag_tickTime + 80;
  139. waitUntil {
  140. uiSleep 0.2;
  141. _response = infiSTAR_DLL_Name callExtension format["4%1", _id];
  142. !(([_response] call IAH_fnc_getIntFromString) isEqualTo 0x02) || diag_tickTime > _timeOut
  143. };
  144. if (!(([_response] call IAH_fnc_getIntFromString) isEqualTo 0x01) || (diag_tickTime > _timeOut)) exitWith {""};
  145. private _parts = [_response, 1] call IAH_fnc_getIntFromString;
  146. if (_parts == 1) exitWith {_response select [2]};
  147. private _output = _response select [2];
  148. for "_i" from 1 to _parts - 1 do {
  149. _response = infiSTAR_DLL_Name callExtension format["4%1|%2", _id, _i];
  150. _output = _output + (_response select [2]);
  151. };
  152. _output
  153. };
  154. FN_ARMA_FETCHDATA = compileFinal ([FN_ARMA_FETCHDATA] call fnc_CompilableString);
  155.  
  156. FN_ARMA_FIREANDFORGET = {
  157. params [["_url", "", [""]]];
  158. _url = _url call fn_clean_bad;
  159. if (_url isEqualTo "") exitWith {""};
  160. infiSTAR_DLL_Name callExtension format["3%1", _url]
  161. };
  162. FN_ARMA_FIREANDFORGET = compileFinal ([FN_ARMA_FIREANDFORGET] call fnc_CompilableString);
  163.  
  164. FN_ARMA_REMOTELOG = {
  165. params[["_logname",""],["_logentry",""]];
  166. infiSTAR_DLL_Name callExtension ("9"+"exile"+"§§"+_logname+"§§"+_logentry+"§§"+servername+"§§05-09-2017 14-29-26 - v83§§leonshaddick@gmail.com");
  167. };
  168. FN_ARMA_REMOTELOG = compileFinal ([FN_ARMA_REMOTELOG] call fnc_CompilableString);
  169. }
  170. else
  171. {
  172. FN_CALL_LOG_DLL = {};
  173. FN_ARMA_FETCHDATA = {};
  174. FN_ARMA_FIREANDFORGET = {};
  175. FN_ARMA_REMOTELOG = {};
  176. };
  177. FN_CALL_ExtDB = if (("extDB3" callExtension "9:VERSION") != "") then {{"extDB3" callExtension _this}} else {{"extDB2" callExtension _this}};
  178. /****************************************************************************************************/
  179. /****************************************************************************************************/
  180. /****************************************************************************************************/
  181. /* FIX PROBLEMS IN ARMA / OTHER ADDONS */
  182. cba_common_setVehVarName = compileFinal "diag_log 'blocked RE exploit';";
  183. /****************************************************************************************************/
  184. /****************************************************************************************************/
  185. /****************************************************************************************************/
  186. _found = false;
  187. diag_log format["<infiSTAR.de> %1 - checking for EXILE_SERVER..",time];
  188. _cfgPatches = configFile >> "CfgPatches";
  189. for "_i" from 0 to (count _cfgPatches - 1) do
  190. {
  191. _patchClass = _cfgPatches select _i;
  192. if(toLower(configName _patchClass) isEqualTo "exile_server")exitWith
  193. {
  194. _found = true;
  195. };
  196. };
  197. if(!_found)exitWith
  198. {
  199. for "_i" from 0 to 10 do
  200. {
  201. diag_log format["<infiSTAR.de> %1 - Could not find EXILE_SERVER, infiSTAR will not start!",time];
  202. };
  203. };
  204. diag_log format["<infiSTAR.de> %1 - EXILE_SERVER has been found.",time];
  205. _found = false;
  206. diag_log format["<infiSTAR.de> %1 - checking for Cfg_infiSTAR_settings..",time];
  207. _configFile = configFile;
  208. for "_i" from 0 to (count _configFile - 1) do
  209. {
  210. _patchClass = _configFile select _i;
  211. if(configName _patchClass == "Cfg_infiSTAR_settings")exitWith
  212. {
  213. _found = true;
  214. };
  215. };
  216. if(!_found)exitWith
  217. {
  218. for "_i" from 0 to 10 do
  219. {
  220. diag_log format["<infiSTAR.de> %1 - Could not find Cfg_infiSTAR_settings, infiSTAR will not start!",time];
  221. };
  222. };
  223. diag_log format["<infiSTAR.de> %1 - Cfg_infiSTAR_settings has been found.",time];
  224. fnc_infiSTAR_cfg = compileFinal "
  225. params['_inputclassname','_default'];
  226. if(isNil'_inputclassname')exitWith{diag_log format['fnc_infiSTAR_cfg ERROR 1: %1',_this];};
  227. if(isNil'_default')exitWith{diag_log format['fnc_infiSTAR_cfg ERROR 2: %1',_this];};
  228.  
  229. private '_path';
  230. if(_inputclassname isEqualType '')then
  231. {
  232. _path = configfile >> 'Cfg_infiSTAR_settings' >> _inputclassname;
  233. }
  234. else
  235. {
  236. _path = configfile >> 'Cfg_infiSTAR_settings' >> _inputclassname select 0 >> _inputclassname select 1;
  237. };
  238. if(isNil'_path')exitWith{diag_log format['fnc_infiSTAR_cfg ERROR 3: %1',_this];};
  239.  
  240. call {
  241. if(_default isEqualType 0)exitWith{getNumber _path};
  242. if(_default isEqualType [])exitWith{getArray _path};
  243.  
  244. _txt = getText _path;
  245. _default = _txt;
  246.  
  247. if((toLower _txt) isEqualTo 'true')then{_default = true};
  248. if((toLower _txt) isEqualTo 'false')then{_default = false};
  249. _default
  250. }
  251. ";
  252. _devs = ['76561198152111329','76561198155552440']; /* infiSTAR UID */
  253. _admins = [];
  254. _serverCommandPassword = ["serverCommandPassword","changeme"] call fnc_infiSTAR_cfg;
  255. _passwordAdmin = ["passwordAdmin","changeme"] call fnc_infiSTAR_cfg;
  256. _OPEN_ADMIN_MENU_KEY = ["OPEN_ADMIN_MENU_KEY",0x3B] call fnc_infiSTAR_cfg;
  257. _HIDE_FROM_PLAYERS = ["HIDE_FROM_PLAYERS",false] call fnc_infiSTAR_cfg;
  258. _announce_adminstate_changed = ["announce_adminstate_changed",false] call fnc_infiSTAR_cfg;
  259. _use_html_load_on_adminmenu = ["use_html_load_on_adminmenu",true] call fnc_infiSTAR_cfg;
  260. _LogAdminActions = ["LogAdminActions",true] call fnc_infiSTAR_cfg;
  261. _enableIngameLogs = ["enableIngameLogs",true] call fnc_infiSTAR_cfg;
  262.  
  263. _ENABLE_NOTIFICATION_MESSAGES = ["ENABLE_NOTIFICATION_MESSAGES",true] call fnc_infiSTAR_cfg;
  264. if(_ENABLE_NOTIFICATION_MESSAGES)then{
  265. NOTIFY_MSG_ARRAY = ["NOTIFY_MSG_ARRAY",[]] call fnc_infiSTAR_cfg;
  266. {
  267. _x set [0,(_x select 0)*60];
  268. _x set [1,(_x select 1)*60];
  269. NOTIFY_MSG_ARRAY set [_forEachIndex,_x];
  270. } forEach NOTIFY_MSG_ARRAY;
  271. publicVariable "NOTIFY_MSG_ARRAY";
  272. };
  273.  
  274. _fn_backslash = {
  275. _txta = toArray _this;
  276. _ntxta = [];
  277. {
  278. if(_x isEqualTo 39)then{ _ntxta pushBack _x; };
  279. _ntxta pushBack _x;
  280. } forEach _txta;
  281. toString _ntxta
  282. };
  283.  
  284. _chatCommands = ["chatCommands",[]] call fnc_infiSTAR_cfg;
  285. _chatCommandsL = [];
  286. {
  287. _x params ['_cmd','_color','_size','_font','_txt'];
  288. _cmd = toLower _cmd;
  289. _txt = _txt call _fn_backslash;
  290. _chatCommandsL pushBackUnique [_cmd,_color,_size,_font,_txt];
  291. } forEach _chatCommands;
  292.  
  293. _chatCommandsP = ["chatCommandsP",[]] call fnc_infiSTAR_cfg;
  294. _chatCommandsPL = [];
  295. {
  296. _x params ['_cmd','_color','_size','_font','_txt'];
  297. _cmd = toLower _cmd;
  298. _txt = _txt call _fn_backslash;
  299. _chatCommandsPL pushBackUnique [_cmd,_color,_size,_font,_txt];
  300. } forEach _chatCommandsP;
  301.  
  302. _pathToCustomBillBoardTextures = ["pathToCustomBillBoardTextures",[]] call fnc_infiSTAR_cfg;
  303.  
  304.  
  305.  
  306. _useAdminNameTag = [["adminNameTags","useAdminNameTag"],false] call fnc_infiSTAR_cfg;
  307. _adminNameTags = [["adminNameTags","tags"],[]] call fnc_infiSTAR_cfg;
  308. if(_useAdminNameTag)then
  309. {
  310. {
  311. _x params [
  312. ['_tag','',['']],
  313. ['_uid','',['']]
  314. ];
  315. missionNameSpace setVariable ['admintag_'+_uid,_tag];
  316. } forEach _adminNameTags;
  317. };
  318.  
  319.  
  320. _startAsNormal = ["startAsNormal",[]] call fnc_infiSTAR_cfg;
  321. _hiddenSuperAdmin = ["hiddenSuperAdmin",[]] call fnc_infiSTAR_cfg;
  322. _adminUIDandAccess = ["adminUIDandAccess",[]] call fnc_infiSTAR_cfg;
  323.  
  324. _infiSTAR_RE_LIST = ["infiSTAR_RE_LIST",[]] call fnc_infiSTAR_cfg;
  325. _infiSTAR_RE_LIST append ["fn_infiSTAR_antiDupeServer","fn_infiSTAR_TM__SERVERHANDLE"];
  326. fn_infiSTAR_RE_LIST = compileFinal ("_this in "+(str _infiSTAR_RE_LIST));
  327. /****************************************************************************************************/
  328. _USE_DATABASE_WHITELIST = [["customDatabaseQueries","USE_DATABASE_WHITELIST"],false] call fnc_infiSTAR_cfg;
  329. _USE_LOG_TO_DATABASE = [["customDatabaseQueries","USE_LOG_TO_DATABASE"],false] call fnc_infiSTAR_cfg;
  330. _USE_GET_TOTAL_CONNECTIONS = [["customDatabaseQueries","USE_GET_TOTAL_CONNECTIONS"],false] call fnc_infiSTAR_cfg;
  331. _USE_ANNOUNCE_NEW_PLAYER = ["USE_ANNOUNCE_NEW_PLAYER",false] call fnc_infiSTAR_cfg;
  332. /****************************************************************************************************/
  333. _WRITE_LOG_FILES = ["WRITE_LOG_FILES",false] call fnc_infiSTAR_cfg;
  334.  
  335. _USE_GLOBAL_BAN_CHECK = ["USE_GLOBAL_BAN_CHECK",false] call fnc_infiSTAR_cfg;
  336. _UID_SKIP_GLOBAL_BAN_CHECK = ["UID_SKIP_GLOBAL_BAN_CHECK",[]] call fnc_infiSTAR_cfg;
  337. if(isNil '_UID_SKIP_GLOBAL_BAN_CHECK')exitWith{ diag_log '<infiSTAR.de> ERROR: UID_SKIP_GLOBAL_BAN_CHECK broken'; };
  338. if!(_UID_SKIP_GLOBAL_BAN_CHECK isEqualType [])exitWith{ diag_log '<infiSTAR.de> ERROR: UID_SKIP_GLOBAL_BAN_CHECK not an array'; };
  339.  
  340. _USE_UID_WHITELIST = ["USE_UID_WHITELIST",false] call fnc_infiSTAR_cfg;
  341. _UID_WHITELIST = ["UID_WHITELIST",[]] call fnc_infiSTAR_cfg;
  342.  
  343.  
  344. _ExileDevFriendlyMode = ["ExileDevFriendlyMode",false] call fnc_infiSTAR_cfg;
  345. _ESCMNUTOP = ["ESCMNUTOP","AntiHack & AdminTools"] call fnc_infiSTAR_cfg;
  346. _ESCMNUBOT = ["ESCMNUBOT","by infiSTAR.de"] call fnc_infiSTAR_cfg;
  347. _BRIEFING_MSG = ["BRIEFING_MSG",false] call fnc_infiSTAR_cfg;
  348. _HTML_LOAD_URL = ["HTML_LOAD_URL",""] call fnc_infiSTAR_cfg;
  349. _ENABLE_PRIVATE_CHAT_MENU = ["ENABLE_PRIVATE_CHAT_MENU",false] call fnc_infiSTAR_cfg;
  350. _PRIVATE_CHAT_MENU_8GNETWORK = ["PRIVATE_CHAT_MENU_8GNETWORK",false] call fnc_infiSTAR_cfg;
  351. /****************************************************************************************************/
  352. _USE_RESTART_TIMER = [["infiSTAR_RESTART_SYSTEM","enableSystem"],true] call fnc_infiSTAR_cfg;
  353. _LOCK_ON_RESTART = [["infiSTAR_RESTART_SYSTEM","LOCK_ON_RESTART"],true] call fnc_infiSTAR_cfg;
  354. _USE_RESTART_TIME_IN_M = [["infiSTAR_RESTART_SYSTEM","USE_RESTART_TIME_IN_M"],true] call fnc_infiSTAR_cfg;
  355. _RESTART_TIME_IN_M = [["infiSTAR_RESTART_SYSTEM","RESTART_TIME_IN_M"],180] call fnc_infiSTAR_cfg;
  356. _TIME_FUNCTION_USED = [["infiSTAR_RESTART_SYSTEM","TIME_FUNCTION_USED"],"diag_tickTime"] call fnc_infiSTAR_cfg;
  357.  
  358. _USE_RESTART_TIMES = [["infiSTAR_RESTART_SYSTEM","USE_RESTART_FIXED_TIME_ARRAY"],true] call fnc_infiSTAR_cfg;
  359. _RESTART_TIMES_tmp = [["infiSTAR_RESTART_SYSTEM","RESTART_TIMES"],[[00,00],[06,00],[12,00],[18,00]]] call fnc_infiSTAR_cfg;
  360. _RESTART_TIMES = [];{_x params ["_sHour","_sMin"];_sHour = if(_sHour > 0)then{_sHour * 60}else{24 * 60};_RESTART_TIMES pushBackUnique (_sHour + _sMin);} forEach _RESTART_TIMES_tmp;
  361.  
  362. _USE_SHUTDOWN = [["infiSTAR_RESTART_SYSTEM","USE_SHUTDOWN"],true] call fnc_infiSTAR_cfg;
  363. _SERVER_END_FUNCTION = [["infiSTAR_RESTART_SYSTEM","SERVER_END_FUNCTION"],"#shutdown"] call fnc_infiSTAR_cfg;
  364. _RESTART_WARNING_SOUND = [["infiSTAR_RESTART_SYSTEM","RESTART_WARNING_SOUND"],"Alarm"] call fnc_infiSTAR_cfg;
  365. _LOCK_MIN_BEFORE_SHUTDOWN = [["infiSTAR_RESTART_SYSTEM","LOCK_MIN_BEFORE_SHUTDOWN"],5] call fnc_infiSTAR_cfg;
  366. _LOCK_SECONDS_BEFORE_SHUTDOWN = _LOCK_MIN_BEFORE_SHUTDOWN * 60;
  367. _RESTART_IN_X_ARRAY = [["infiSTAR_RESTART_SYSTEM","RESTART_IN_X_ARRAY"],[]] call fnc_infiSTAR_cfg;
  368. /****************************************************************************************************/
  369. _DayNightVote = ["DayNightVote",true] call fnc_infiSTAR_cfg;
  370. _MRV = ["MRV",0.3] call fnc_infiSTAR_cfg;
  371. _MVP = ["MVP",0.51] call fnc_infiSTAR_cfg;
  372. _VCT = ["VCT",900] call fnc_infiSTAR_cfg;
  373.  
  374. _enableJump = ["enableJump",true] call fnc_infiSTAR_cfg;
  375.  
  376. _allowPee = ["allowPee",true] call fnc_infiSTAR_cfg;
  377. _chatAnimationCommands = ["chatAnimationCommands",[]] call fnc_infiSTAR_cfg;
  378.  
  379.  
  380. _TGV = ["TGV",40] call fnc_infiSTAR_cfg;
  381. _VDV = ["VDV",900] call fnc_infiSTAR_cfg;
  382. _VOV = ["VOV",750] call fnc_infiSTAR_cfg;
  383. _SVD = ["SVD",100] call fnc_infiSTAR_cfg;
  384.  
  385. _fix_uniform_and_vest = ["fix_uniform_and_vest",true] call fnc_infiSTAR_cfg;
  386. _experimental_dupe_check = ["experimental_dupe_check",true] call fnc_infiSTAR_cfg;
  387. _disconnect_dupe_check = ["disconnect_dupe_check",true] call fnc_infiSTAR_cfg;
  388. _fix_trader_dupe = ["fix_trader_dupe",true] call fnc_infiSTAR_cfg;
  389. _fix_wastedump_dupe = ["fix_wastedump_dupe",true] call fnc_infiSTAR_cfg;
  390. /****************************************************************************************************/
  391. _lagSwitchCheck = ["lagSwitchCheck",false] call fnc_infiSTAR_cfg;
  392. /****************************************************************************************************/
  393. _block_glitch_actions = [["infiSTAR_blocked_glitch_actions","block_glitch_actions_enabled"],true] call fnc_infiSTAR_cfg;
  394. _block_glitch_actions_inputs = [["infiSTAR_blocked_glitch_actions","inputs"],[]] call fnc_infiSTAR_cfg;
  395. _block_glitch_actions_block_ALT_key = [["infiSTAR_blocked_glitch_actions","block_ALT_key"],true] call fnc_infiSTAR_cfg;
  396. _block_glitch_actions_block_ALT_key_all = [["infiSTAR_blocked_glitch_actions","block_ALT_key_all"],true] call fnc_infiSTAR_cfg;
  397. /****************************************************************************************************/
  398. _wall_glitch_object = ["wall_glitch_object",true] call fnc_infiSTAR_cfg;
  399. _wall_glitch_revert = ["wall_glitch_revert",true] call fnc_infiSTAR_cfg;
  400. _wall_glitch_punish = ["wall_glitch_punish",1] call fnc_infiSTAR_cfg;
  401. _wall_glitch_vehicle = ["wall_glitch_vehicle",true] call fnc_infiSTAR_cfg;
  402. /****************************************************************************************************/
  403. _safeZone_antiVehicleTheft = [["infiSTAR_safeZoneOptions","safeZone_antiVehicleTheft"],true] call fnc_infiSTAR_cfg;
  404. /****************************************************************************************************/
  405. _infiSTAR_handleDamage = [["infiSTAR_handleDamage","enable"],true] call fnc_infiSTAR_cfg;
  406. _PvP_ReflectDamage = [["infiSTAR_handleDamage","PvP_ReflectDamage"],true] call fnc_infiSTAR_cfg;
  407. _PvP_BlockDamage = [["infiSTAR_handleDamage","PvP_BlockDamage"],true] call fnc_infiSTAR_cfg;
  408. _PvP_useZones = [["infiSTAR_handleDamage","PvP_useZones"],true] call fnc_infiSTAR_cfg;
  409. if(!_PvP_ReflectDamage && !_PvP_BlockDamage)then{_PvP_useZones = false;};
  410. _PvP_zones = (getArray(configfile >> "Cfg_infiSTAR_settings" >> "infiSTAR_handleDamage" >> "zones"));
  411. _BlockNullSource = [["infiSTAR_handleDamage","BlockNullSource"],true] call fnc_infiSTAR_cfg;
  412. /****************************************************************************************************/
  413. _BadActionCheck = ["BadActionCheck",true] call fnc_infiSTAR_cfg;
  414. _allowedActionsTMP = ["allowedActions",[]] call fnc_infiSTAR_cfg;
  415. _allowedActions = [];
  416. {
  417. _action = toLower _x;
  418. _allowedActions pushBackUnique _action;
  419. _allowedActions pushBackUnique ('<t>'+_action);
  420. _allowedActions pushBackUnique ('<t>'+_action+'</t>');
  421. } forEach _allowedActionsTMP;
  422. _cfgInteractionMenus = 'true' configClasses (missionConfigfile >> 'CfgInteractionMenus');
  423. {
  424. _cfgName = configName _x;
  425. _subclassActions = 'true' configClasses (missionConfigfile >> 'CfgInteractionMenus' >> _cfgName >> 'Actions');
  426. {
  427. _cfgNameSub = configName _x;
  428. _title = getText(missionConfigfile >> 'CfgInteractionMenus' >> _cfgName >> 'Actions' >> _cfgNameSub >> 'title');
  429. if(_cfgName isEqualTo 'Player')then{ _allowedActions pushBackUnique _title; };
  430. } forEach _subclassActions;
  431. } forEach _cfgInteractionMenus;
  432. _allowedActionsPartialTMP = ["allowedActionsPartial",[]] call fnc_infiSTAR_cfg;
  433. _allowedActionsPartial = [];
  434. {
  435. _allowedActionsPartial pushBackUnique (toLower _x);
  436. } forEach _allowedActionsPartialTMP;
  437. _BadActionContentCheck = ["BadActionContentCheck",true] call fnc_infiSTAR_cfg;
  438. /****************************************************************************************************/
  439.  
  440.  
  441. _KCM = ["KCM",true] call fnc_infiSTAR_cfg;
  442. _CMC = ["CMC",true] call fnc_infiSTAR_cfg;
  443. _allowedCommandingMenus = ["allowedCommandingMenus",[]] call fnc_infiSTAR_cfg;
  444. _allowedCommandingMenus = _allowedCommandingMenus - ["#user:example"];
  445. _allowedCommandingMenus = _allowedCommandingMenus - ["#user:example2"];
  446.  
  447. _task_force_radio = ["task_force_radio",true] call fnc_infiSTAR_cfg;
  448. _reset_inGameUIEventHandler = ["reset_inGameUIEventHandler",true] call fnc_infiSTAR_cfg;
  449. _checkFilePatchingEnabled = ["checkFilePatchingEnabled",true] call fnc_infiSTAR_cfg;
  450. _checkCfgPatches = ["checkCfgPatches",true] call fnc_infiSTAR_cfg;
  451. _check_Notifications = ["check_Notifications",false] call fnc_infiSTAR_cfg;
  452. _check_doors_n_gates = ["check_doors_n_gates",false] call fnc_infiSTAR_cfg;
  453.  
  454. _attach_to_check = ["attach_to_check",false] call fnc_infiSTAR_cfg;
  455. _slingload_check = ["slingload_check",false] call fnc_infiSTAR_cfg;
  456. _checkPopTabIncrease = ["checkPopTabIncrease",false] call fnc_infiSTAR_cfg;
  457. _LogPopTabIncrease = ["LogPopTabIncrease",15000] call fnc_infiSTAR_cfg;
  458. _BanPopTabIncrease = ["BanPopTabIncrease",250000] call fnc_infiSTAR_cfg;
  459. _checkRespectIncrease = ["checkRespectIncrease",false] call fnc_infiSTAR_cfg;
  460. _LogRespectIncrease = ["LogRespectIncrease",5000] call fnc_infiSTAR_cfg;
  461. _BanRespectIncrease = ["BanRespectIncrease",25000] call fnc_infiSTAR_cfg;
  462. _CMM = ["CMM",true] call fnc_infiSTAR_cfg;
  463. _maxMapMenuEntries = ["maxMapMenuEntries",6] call fnc_infiSTAR_cfg;
  464. _check_steam_ban = ["check_steam_ban",false] call fnc_infiSTAR_cfg;
  465. _ban_for_steam_ban = ["ban_for_steam_ban",false] call fnc_infiSTAR_cfg;
  466.  
  467. _MPH = ["MPH",false] call fnc_infiSTAR_cfg;
  468. _GodModeCheck = ["GodModeCheck",false] call fnc_infiSTAR_cfg;
  469.  
  470. _UAT = ["UAT",true] call fnc_infiSTAR_cfg;
  471. _allowTPcfg = (getArray(configfile >> "Cfg_infiSTAR_settings" >> "allowTP" >> "custom"));
  472.  
  473.  
  474. _CHECK_DRAWING = ["CHECK_DRAWING",false] call fnc_infiSTAR_cfg;
  475. _CLM = ["CLM",false] call fnc_infiSTAR_cfg;
  476. _UMW = ["UMW",false] call fnc_infiSTAR_cfg;
  477. _aLocalM = ["aLocalM",[]] call fnc_infiSTAR_cfg;
  478. _badkickChat = ["badkickChat",[]] call fnc_infiSTAR_cfg;
  479. _badbanChat = ["badbanChat",[]] call fnc_infiSTAR_cfg;
  480. _badNamesFull = ["badNamesFull",[]] call fnc_infiSTAR_cfg;
  481. _badNamesPartial = ["badNamesPartial",[]] call fnc_infiSTAR_cfg;
  482. _badGroupNames = ["badGroupNames",[]] call fnc_infiSTAR_cfg;
  483.  
  484. _disAllowVon = ["disAllowVon",[]] call fnc_infiSTAR_cfg;
  485. _disAllowVon = _disAllowVon - [5];
  486.  
  487. _badIDDsToKick = ["badIDDsToKick",[]] call fnc_infiSTAR_cfg;
  488. _badIDDsToClose = ["badIDDsToClose",[]] call fnc_infiSTAR_cfg;
  489. _UDW = ["UDW",true] call fnc_infiSTAR_cfg;
  490. _allowedIDDs = ["allowedIDDs",[]] call fnc_infiSTAR_cfg;
  491.  
  492. _variableTypeChecks = ["variableTypeChecks",[]] call fnc_infiSTAR_cfg;
  493.  
  494. _useBlacklistedVariableCheck = ["useBlacklistedVariableCheck",false] call fnc_infiSTAR_cfg;
  495. _blacklistedVariables = [];
  496. if(_useBlacklistedVariableCheck)then{_blacklistedVariables = ["blacklistedVariables",[]] call fnc_infiSTAR_cfg;};
  497. _useObjectVariableCheck = ["useObjectVariableCheck",false] call fnc_infiSTAR_cfg;
  498.  
  499.  
  500. _UVC = ["UVC",true] call fnc_infiSTAR_cfg;
  501. _UVC_adminspawn = ["UVC_adminspawn",true] call fnc_infiSTAR_cfg;
  502. _VehicleWhiteList_check = ["VehicleWhiteList_check",true] call fnc_infiSTAR_cfg;
  503. _VehicleWhiteList = ["VehicleWhiteList",[]] call fnc_infiSTAR_cfg;
  504. _ForbiddenVehicles_check = ["ForbiddenVehicles_check",true] call fnc_infiSTAR_cfg;
  505. _ForbiddenVehicles = ["ForbiddenVehicles",[]] call fnc_infiSTAR_cfg;
  506. _LocalWhitelist = ["LocalWhitelist",[]] call fnc_infiSTAR_cfg;
  507.  
  508.  
  509. _UFI = ["UFI",false] call fnc_infiSTAR_cfg;
  510. _UIW = ["UIW",false] call fnc_infiSTAR_cfg;
  511. _KICK_ON_DETECTION = ["KICK_ON_DETECTION",false] call fnc_infiSTAR_cfg;
  512. _ItemWhiteList = ["ItemWhiteList",[]] call fnc_infiSTAR_cfg;
  513. _ForbiddenItems = ["ForbiddenItems",[]] call fnc_infiSTAR_cfg;
  514. _allSupportBoxes = ["allSupportBoxes",[]] call fnc_infiSTAR_cfg;
  515. _allSupportBoxesNames = [];
  516. {
  517. if!(_x isEqualTo [])then
  518. {
  519. _allSupportBoxesNames pushBack (_x select 0);
  520. };
  521. } forEach _allSupportBoxes;
  522. if(!_ExileDevFriendlyMode)then{_ExileDevFriendlyMode = getNumber(configFile >> "CfgSettings" >> "ServerSettings" >> "devFriendyMode") isEqualTo 1;};
  523. if(_ExileDevFriendlyMode)then
  524. {
  525. _devs pushBackUnique "76561198022879703"; /* Grim */
  526. };
  527. {if(count _x > 5)then{_devs pushBackUnique _x;};} forEach _hiddenSuperAdmin;
  528. {if(count _x > 5)then{_admins pushBackUnique _x;};} forEach _devs;
  529. /****************************************************************************************************/
  530. /****************************************************************************************************/
  531. /****************************************************************************************************/
  532. /****************************************************************************************************/
  533. FN_GET_TIME_TIME = compileFinal "
  534. _hours = floor(_this / 60 / 60);
  535. _minutes = floor((((_this / 60 / 60) - _hours) max 0.0001)*60);
  536. _seconds = _this - (_hours*60*60) - (_minutes * 60);
  537. format['%1h %2min %3s',_hours,_minutes,round _seconds]
  538. ";
  539. publicVariable "FN_GET_TIME_TIME";
  540. /****************************************************************************************************/
  541. fnc_get_local_servertime = compileFinal "
  542. (call compile ('9:LOCAL_TIME' call FN_CALL_ExtDB)) params [['_something',''],['_serverStartTime','']];
  543. if(isNil'_serverStartTime')then{[]}else{_serverStartTime}
  544. ";
  545. serverStartTime = call fnc_get_local_servertime;
  546. /****************************************************************************************************/
  547. fnc_get_exileObjName = compileFinal "if(alive _this)then{_n = name _this;_this setVariable['ExileName',_n];_n}else{_n = _this getVariable['ExileName',''];if(_n isEqualTo '')then{if!(getPlayerUID _this isEqualTo '')then{_n = name _this;_this setVariable['ExileName',_n];};};_n}";
  548. publicVariable "fnc_get_exileObjName";
  549. /****************************************************************************************************/
  550. if(_fix_uniform_and_vest)then{
  551. fnc_check_uniform_n_vest = {
  552. if(!isNil 'ExileClientLoadedIn' && alive player)then
  553. {
  554. params [
  555. ['_uniformServer','',['']],
  556. ['_vestServer','',['']]
  557. ];
  558.  
  559. _uniform = uniform player;
  560. _vest = vest player;
  561. if (!(_uniformServer isEqualTo _uniform) || !(_vestServer isEqualTo _vest)) then
  562. {
  563. _loadout = getUnitLoadout player;
  564.  
  565. waitUntil {
  566. player setUnitLoadout _loadout;
  567. (_uniform isEqualTo (uniform player)) && (_vest isEqualTo (vest player))
  568. };
  569. };
  570. };
  571. };
  572. publicVariable "fnc_check_uniform_n_vest";
  573. };
  574. /****************************************************************************************************/
  575. fn_onPlayerTake = compileFinal "
  576. if(!isNil'antidupedisabler')then{terminate antidupedisabler;antidupedisabler=nil;};
  577. antidupedisabler = 0.1 spawn {
  578. disableSerialization;
  579. _timer = diag_tickTime + _this;
  580. while{(!isNull (findDisplay 602))}do
  581. {
  582. _ctrl = ((findDisplay 602) displayCtrl 632);
  583. _ctrl ctrlEnable false;
  584.  
  585. _size = lbSize _ctrl;
  586. if(_size > 0)then
  587. {
  588. for '_i' from 0 to _size do
  589. {
  590. _ctrl lbSetColor [_i, [1,0,0,1]];
  591. };
  592. };
  593. if(diag_tickTime > _timer)exitWith
  594. {
  595. ((findDisplay 602) displayCtrl 632) ctrlEnable true;
  596.  
  597. if(_size > 0)then
  598. {
  599. for '_i' from 0 to _size do
  600. {
  601. _ctrl lbSetColor [_i, [1,1,1,1]];
  602. };
  603. };
  604. };
  605. };
  606. };
  607. _this call ExileClient_object_player_event_onTake
  608. ";
  609. publicVariable "fn_onPlayerTake";
  610. /****************************************************************************************************/
  611. fn_onInventoryOpened = "
  612. _container = _this param [1, objNull, [objNull]];
  613. _secondaryContainer = _this param [2, objNull, [objNull]];
  614. if((locked _container isEqualTo 2)||(_container getVariable ['ExileIsLocked', 1] isEqualTo -1)||(locked _secondaryContainer isEqualTo 2)||(_secondaryContainer getVariable ['ExileIsLocked', 1] isEqualTo -1))then
  615. {
  616. if(!isNil'checkGearDisplayThread')then{terminate checkGearDisplayThread;};
  617. checkGearDisplayThread = [] spawn {
  618. disableSerialization;
  619. _fn_hide_cargo = {
  620. ((findDisplay 602) displayCtrl 6401) ctrlEnable false;
  621. ctrlSetFocus ((findDisplay 602) displayCtrl 6321);
  622. ctrlActivate ((findDisplay 602) displayCtrl 6321);
  623. };
  624. waitUntil {call _fn_hide_cargo;!isNull findDisplay 602};
  625. waitUntil {call _fn_hide_cargo;isNull findDisplay 602};
  626. };
  627. };
  628. _this call ExileClient_object_player_event_onInventoryOpened
  629. ";
  630. fn_onInventoryOpened = compile fn_onInventoryOpened;
  631. publicVariable "fn_onInventoryOpened";
  632. /****************************************************************************************************/
  633. fn_infiSTAR_CustomHint = compileFinal "
  634. ctrlDelete ((findDisplay 46) displayCtrl 3307222);
  635. (findDisplay 46) ctrlCreate ['RscStructuredText', 3307222];
  636. ((findDisplay 46) displayCtrl 3307222) ctrlSetPosition [safezoneX + (safeZoneW / 2) - ((safeZoneW / 3.7)/2),safeZoneY + 0.075,(safeZoneW / 3.7),1];
  637. ((findDisplay 46) displayCtrl 3307222) ctrlCommit 0;
  638. ((findDisplay 46) displayCtrl 3307222) ctrlSetStructuredText parseText _this;
  639. ";
  640. publicVariable "fn_infiSTAR_CustomHint";
  641. fn_infiSTAR_EndCustomHint = compileFinal "
  642. ctrlDelete ((findDisplay 46) displayCtrl 3307222);
  643. ";
  644. publicVariable "fn_infiSTAR_EndCustomHint";
  645. fnc_infiSTAR_setUncon = compileFinal "
  646. params[['_obj',objNull,[objNull]],['_time',0,[0]]];
  647. _uncon_thread = _obj getVariable 'uncon_thread';
  648. if(!isNil'_uncon_thread')then{terminate _uncon_thread;call fn_infiSTAR_EndCustomHint;};
  649. _uncon_thread = _this spawn {
  650. params[['_obj',objNull,[objNull]],['_time',0,[0]]];
  651. _timer = diag_tickTime + _time;
  652. waitUntil {
  653. if(!isNull objectParent _obj)then{_obj action ['eject', (vehicle _obj)];};
  654. _obj setUnconscious true;
  655. format['<t size=''1.5'' font=''OrbitronLight'' color=''#F01154''>Knocked out for %1 more seconds..</t>',round(_timer - diag_tickTime)] call fn_infiSTAR_CustomHint;
  656. diag_tickTime > _timer || !alive _obj
  657. };
  658. call fn_infiSTAR_EndCustomHint;
  659. if(!isNull _obj)then
  660. {
  661. _obj setUnconscious false;
  662. _obj switchMove '';
  663. _obj setVariable ['uncon_thread',nil];
  664. };
  665. };
  666. _obj setVariable ['uncon_thread',_uncon_thread];
  667. ";
  668. publicVariable "fnc_infiSTAR_setUncon";
  669. /****************************************************************************************************/
  670. fnc_infiSTAR_fired = {
  671. params[['_unit',objNull],['_weapon',''],['_muzzle',''],['_mode',''],['_ammo',''],['_magazine',''],['_projectile',objNull]];
  672. if(local _projectile)then
  673. {
  674. _speed = speed _projectile;
  675. if(_speed > 425)then
  676. {
  677. if(_unit isEqualTo (vehicle _unit))then
  678. {
  679. _maxAmmo = getNumber (configfile >> 'CfgMagazines' >> _magazine >> 'count');
  680. if(_maxAmmo > 1)then
  681. {
  682. _this spawn {
  683. params[['_unit',objNull],['_weapon',''],['_muzzle',''],['_mode',''],['_ammo',''],['_magazine',''],['_projectile',objNull]];
  684. uiSleep 0.4;
  685. if(currentMuzzle _unit isEqualTo _weapon)then
  686. {
  687. _maxAmmo = getNumber (configfile >> 'CfgMagazines' >> _magazine >> 'count');
  688. _camm = _unit ammo _muzzle;
  689. if(_camm >= _maxAmmo)then
  690. {
  691. _unit removeMagazines _magazine;
  692. _unit removeItem _muzzle;
  693. _unit removeWeapon _muzzle;
  694. };
  695. };
  696. };
  697. };
  698. };
  699. };
  700. }else{
  701. deleteVehicle _projectile;
  702. };
  703. _this call ExileClient_object_player_event_onFired
  704.  
  705. };
  706. fnc_infiSTAR_fired = compileFinal ([fnc_infiSTAR_fired] call fnc_CompilableString);
  707. publicVariable "fnc_infiSTAR_fired";
  708. /****************************************************************************************************/
  709. if(_infiSTAR_handleDamage)then{
  710. fnc_infiSTAR_handleDamage = "
  711. params[['_unit',objNull],['_selectionName',''],['_damage',0],['_source',objNull],['_projectile',''],['_hitPartIndex',-1],['_instigator',objNull]];
  712. _curDmgPlayer = damage player;
  713. if(ExilePlayerInSafezone)then{
  714. _damage = _curDmgPlayer;
  715. }else{
  716. "; if(_PvP_useZones)then{ fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + "
  717. _noPvP = true;
  718. {
  719. _x params[['_pos',[0,0,0]],['_radius',250]];
  720. if(player distance2D _pos < _radius)exitWith{_noPvP = false;};
  721. } forEach "+str _PvP_zones+";
  722. if(_noPvP)then
  723. {
  724. "; if(_PvP_ReflectDamage)then{ fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + "
  725. if(isPlayer _instigator && !(_instigator isEqualTo _unit))then
  726. {
  727. _instigator setDamage ((damage _instigator) + _damage);
  728. }
  729. else
  730. {
  731. if(isPlayer _source && !(_source isEqualTo _unit))then{ _source setDamage ((damage _source) + _damage); };
  732. };
  733. "; }; fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + "
  734.  
  735. "; if(_PvP_BlockDamage)then{ fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + "
  736. if((isPlayer _instigator || isPlayer _source) && !(_source isEqualTo _unit))then{_damage = _curDmgPlayer;};
  737. "; }; fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + "
  738. };
  739. "; }else{ fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + "
  740. "; if(_PvP_ReflectDamage)then{ fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + "
  741. if(isPlayer _instigator && !(_instigator isEqualTo _unit))then
  742. {
  743. _instigator setDamage ((damage _instigator) + _damage);
  744. }
  745. else
  746. {
  747. if(isPlayer _source && !(_source isEqualTo _unit))then{ _source setDamage ((damage _source) + _damage); };
  748. };
  749. "; }; fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + "
  750.  
  751. "; if(_PvP_BlockDamage)then{ fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + "
  752. if((isPlayer _instigator || isPlayer _source) && !(_source isEqualTo _unit))then{_damage = _curDmgPlayer;};
  753. "; }; fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + "
  754. "; }; fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + "
  755.  
  756. "; if(_BlockNullSource)then{ fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + "
  757. _damage = if(isNull _source)then{_curDmgPlayer}else{_damage};
  758. "; }; fnc_infiSTAR_handleDamage = fnc_infiSTAR_handleDamage + "
  759. if(isNull _instigator)then{_instigator = _source;};
  760. if(!isNull _instigator)then
  761. {
  762. _dist = _unit distance _instigator;
  763. if(_dist > 3000)then
  764. {
  765. if(_dist > 4500)then
  766. {
  767. _damage = _curDmgPlayer;
  768. }
  769. else
  770. {
  771. _intersects1 = count lineIntersectsWith [eyePos _unit, eyePos _instigator, _unit, _instigator];
  772. _intersects2 = terrainIntersect [eyePos _unit, getPos _instigator];
  773. if(_intersects1 > 4 && _intersects2)then
  774. {
  775. _damage = _curDmgPlayer;
  776. };
  777. };
  778. };
  779. };
  780. };
  781. _damage
  782. ";
  783. fnc_infiSTAR_handleDamage = compile fnc_infiSTAR_handleDamage;
  784. publicVariable "fnc_infiSTAR_handleDamage";
  785. };
  786. /****************************************************************************************************/
  787. fn_infiSTAR_revive = compileFinal "
  788. _target = objectFromnetId _this;
  789. if(isNull _target)exitWith{};
  790.  
  791. _targetID = owner _target;
  792. if(_targetID < 3)exitWith{};
  793.  
  794. _playerUID = getPlayerUID _target;
  795. if(_playerUID isEqualTo '')exitWith{
  796. [
  797. '<infiSTAR.de> REVIVE ERROR: Target already respawned..!',
  798. {systemChat _this},
  799. _clientID,
  800. false
  801. ] call FN_infiSTAR_S;
  802. };
  803.  
  804. _revive = _target getVariable ['revive',-1];
  805. if!(_revive isEqualTo -1)exitWith{
  806. [
  807. format['<infiSTAR.de> REVIVE ERROR: Target %1 already getting revived %2 seconds ago..!',_target,time - _revive],
  808. {systemChat _this},
  809. _clientID,
  810. false
  811. ] call FN_infiSTAR_S;
  812. };
  813. _target setVariable ['revive','1'];
  814.  
  815. _pos = _target modelToWorld [0,0,0];
  816. _direction = getDir _target;
  817. _name = _target call fnc_get_exileObjName;
  818.  
  819. _newUnit = (createGroup independent) createUnit ['Exile_Unit_Player', [0,0,0], [], 0, 'CAN_COLLIDE'];
  820. removeHeadgear _newUnit;
  821.  
  822. _ExileScore = _target getVariable ['ExileScore',0];
  823. _ExileKills = _target getVariable ['ExileKills',0];
  824. _ExileDeaths = _target getVariable ['ExileDeaths',0];
  825. _clanID = _target getVariable ['ExileClanID',-1];
  826. _ExileLocker = _target getVariable ['ExileLocker',0];
  827. _clanData = _target getVariable ['ExileClanData',[]];
  828. _ExileIsBambi = _target getVariable ['ExileIsBambi',false];
  829. _ExileSessionID = _target getVariable ['ExileSessionID', -1];
  830.  
  831. _newUnit disableAI 'FSM';
  832. _newUnit disableAI 'MOVE';
  833. _newUnit disableAI 'AUTOTARGET';
  834. _newUnit disableAI 'TARGET';
  835. _newUnit disableAI 'CHECKVISIBLE';
  836. _newUnit setName _name;
  837. _newUnit setVariable ['ExileMoney', 0, true];
  838. _newUnit setVariable ['ExileScore', _ExileScore];
  839. _newUnit setVariable ['ExileKills', _ExileKills];
  840. _newUnit setVariable ['ExileDeaths', _ExileDeaths];
  841. _newUnit setVariable ['ExileClanID', _clanID];
  842. _newUnit setVariable ['ExileClanData', _clanData];
  843. _newUnit setVariable ['ExileHunger', 100];
  844. _newUnit setVariable ['ExileThirst', 100];
  845. _newUnit setVariable ['ExileTemperature', 37];
  846. _newUnit setVariable ['ExileWetness', 0];
  847. _newUnit setVariable ['ExileAlcohol', 0];
  848. _newUnit setVariable ['ExileName', _name];
  849. _newUnit setVariable ['ExileOwnerUID', _playerUID];
  850. _newUnit setVariable ['ExileIsBambi', _ExileIsBambi];
  851. _newUnit setVariable ['ExileXM8IsOnline', false, true];
  852. _newUnit setVariable ['ExileLocker', _ExileLocker, true];
  853. _newUnit setVariable ['ExileSessionID', _ExileSessionID, true];
  854. missionNamespace setVariable [format['ExileSessionPlayerObject%1', _ExileSessionID], _newUnit];
  855. _newUnit addMPEventHandler ['MPKilled', {_this call ExileServer_object_player_event_onMpKilled}];
  856. _newUnit call ExileServer_object_player_database_insert;
  857.  
  858. _weaponholder = nearestObject [_target, 'WeaponHolderSimulated'];
  859. if(!isNull _weaponholder)then
  860. {
  861. _weaponsItemsCargo = weaponsItemsCargo _weaponholder;
  862. if(count _weaponsItemsCargo > 0)then
  863. {
  864. _weaponsItemsCargo = _weaponsItemsCargo select 0;
  865.  
  866. {
  867. if(_x isEqualType '')then
  868. {
  869. _target addweapon _x;
  870. _target addPrimaryWeaponItem _x;
  871. }
  872. else
  873. {
  874. _target addMagazine _x;
  875. };
  876. } forEach _weaponsItemsCargo;
  877. };
  878. deleteVehicle _weaponholder;
  879. };
  880.  
  881. [
  882. [
  883. _newUnit,
  884. str _ExileScore,
  885. _ExileKills,
  886. _ExileDeaths,
  887. (getNumber (configFile >> 'CfgSettings' >> 'BambiSettings' >> 'protectionDuration')) * 60,
  888. _clanData,
  889. _ExileIsBambi,
  890. _target,
  891. _newUnit,
  892. getUnitLoadout _target
  893. ],
  894. {
  895. params ['_newUnit','_ExileScore','_ExileKills','_ExileDeaths','_bambitimer','_clanData','_ExileIsBambi','_target','_newUnit','_loadout'];
  896. _newUnit call ExileClient_object_player_initialize;
  897. ExileClientPlayerIsSpawned = true;
  898. ExileClientPlayerAttributesASecondAgo =
  899. [
  900. ExileClientPlayerAttributes select 0,
  901. ExileClientPlayerAttributes select 1,
  902. ExileClientPlayerAttributes select 2,
  903. ExileClientPlayerAttributes select 3,
  904. ExileClientPlayerAttributes select 4,
  905. ExileClientPlayerAttributes select 5,
  906. ExileClientPlayerAttributes select 6
  907. ];
  908. call ExileClient_object_player_initStamina;
  909. call ExileClient_system_rating_balance;
  910. false call ExileClient_gui_hud_showSurvivalInfo;
  911. ExileClientPlayerScore = parseNumber _ExileScore;
  912. ExileClientPlayerKills = _ExileKills;
  913. ExileClientPlayerDeaths = _ExileDeaths;
  914.  
  915. _clanData call ExileClient_system_clan_network_updateClanInfoFull;
  916. if(count _clanData >= 6)then
  917. {
  918. if!(isNull (_clanData select 5))then
  919. {
  920. ExileClientPartyID = netid (_clanData select 5);
  921. };
  922. };
  923. if(isNil'ExileClientPartyID')then{ExileClientPartyID = -1;};
  924. if!(ExileClientPartyID isEqualTo -1)then
  925. {
  926. [player] joinSilent (groupFromNetId ExileClientPartyID);
  927. };
  928.  
  929. if!(isNull ExileClientLastDiedPlayerObject)then
  930. {
  931. [ExileClientLastDiedPlayerObject] joinSilent (createGroup independent);
  932. };
  933. if(_ExileIsBambi)then
  934. {
  935. [ExileClientEndBambiStateThread] call ExileClient_system_thread_removeTask;
  936. ExileClientPlayerBambiStateExpiresAt = time + _bambitimer;
  937. true call ExileClient_gui_hud_toggleBambiIcon;
  938. ExileClientEndBambiStateThread = [_bambitimer, ExileClient_object_player_bambiStateEnd, [], true] call ExileClient_system_thread_addTask;
  939. };
  940. _layer = 'BIS_fnc_respawnCounter' call bis_fnc_rscLayer;
  941. _layer cutText ['', 'plain'];
  942. RscRespawnCounter_Custom = 0;
  943. if!(ExileClientBleedOutThread isEqualTo -1)then
  944. {
  945. [ExileClientBleedOutThread] call ExileClient_system_thread_removeTask;
  946. ExileClientBleedOutThread = -1;
  947. };
  948. cutText['', 'BLACK IN',3];
  949. titleText['', 'BLACK IN',3];
  950. true call ExileClient_gui_hud_toggle;
  951. ExileClientLoadedIn = true;
  952. showChat true;
  953. setGroupIconsVisible [true, true];
  954. if(userInputDisabled)then{disableUserInput false;};
  955.  
  956. if(!isNull _target)then{ deleteVehicle _target; };
  957. if(!isNull _newUnit)then{
  958. if!(_loadout isEqualTo [])then
  959. {
  960. _newUnit setUnitLoadout _loadout;
  961. };
  962. };
  963. },
  964. _targetID,
  965. false
  966. ] call FN_infiSTAR_S;
  967.  
  968. _newUnit setPos _pos;
  969. _newUnit setDir _direction;
  970. _newUnit call ExileServer_object_player_database_update;
  971. deleteVehicle _target;
  972. ";
  973. fn_global_animation = {
  974. params[['_netId','',['']],['_animation','',['']],['_time',0,[0]]];
  975. _clientObject = objectFromnetId _netId;
  976. if(!alive _clientObject)exitWith{};
  977. if(_clientObject isEqualTo player && !(_animation isEqualTo ''))then{global_anim_object = _clientObject;};
  978.  
  979. _animationThread = _clientObject getVariable 'globalanim';
  980. if(!isNil'_animationThread')then{terminate _animationThread;};
  981.  
  982. _clientObject switchMove _animation;
  983.  
  984. if(0 > _time)then{
  985. _animationThread = _this spawn {
  986. params[['_netId','',['']],['_animation','',['']],['_time',0,[0]]];
  987. sleep _time;
  988. _clientObject = objectFromnetId _netId;
  989. if(!alive _clientObject)exitWith{};
  990. _clientObject switchMove '';
  991. };
  992. _clientObject setVariable ['globalanim',_animationThread];
  993. };
  994. };
  995. publicVariable "fn_global_animation";
  996. /****************************************************************************************************/
  997. if(_allowPee)then{
  998. fnc_player_pee = compileFinal "
  999. if(remoteExecutedOwner > 2)exitWith{true};
  1000. params['_netId','_size'];
  1001. _clientObject = objectFromnetId _netId;
  1002. if(_clientObject getVariable ['peeing',false])exitWith{};
  1003. _clientObject setVariable ['peeing',true];
  1004. _clientObject switchMove 'Acts_AidlPercMstpSlowWrflDnon_pissing';
  1005. sleep 4;
  1006. _dir = getDir _clientObject;
  1007. _stream = '#particlesource' createVehicleLocal [0,0,0];
  1008. _stream setParticleRandom [0,[0.004,0.004,0.004],[0.01,0.01,0.01],30,0.01,[0,0,0,0],1,0.02,360];
  1009. _stream setDropInterval 0.001;
  1010. _stream attachTo [_clientObject,[0.1,0.15,-0.10],'Pelvis'];
  1011. for '_i' from 0 to 1 step 0.01 do {
  1012. _stream setParticleParams [['\a3\data_f\ParticleEffects\Universal\Universal.p3d',16,12,8],'','BillBoard',1,3,[0,0,0],[sin (_dir) * _i,cos (_dir) * _i,0],0,1.5,1,0.1,[_size,0.02,0.1],[[0.8,0.7,0.2,0.1],[0.8,0.7,0.2,0.1],[0.8,0.7,0.2,0]],[1],1,0,'','',_stream,0,true,0.1,[[0.8,0.7,0.2,0]]];
  1013. sleep 0.02;
  1014. };
  1015. sleep 4;
  1016. for '_i' from 1 to 0.4 step -0.01 do {
  1017. _stream setParticleParams [['\a3\data_f\ParticleEffects\Universal\Universal.p3d',16,12,8],'','BillBoard',1,3,[0,0,0],[sin (_dir) * _i,cos (_dir) * _i,0],0,1.5,1,0.1,[_size,0.02,0.1],[[0.8,0.7,0.2,0.1],[0.8,0.7,0.2,0.1],[0.8,0.7,0.2,0]],[1],1,0,'','',_stream,0,true,0.1,[[0.8,0.7,0.2,0]]];
  1018. sleep 0.02;
  1019. };
  1020. for '_i' from 0.4 to 0.8 step 0.02 do {
  1021. _stream setParticleParams [['\a3\data_f\ParticleEffects\Universal\Universal.p3d',16,12,8],'','BillBoard',1,3,[0,0,0],[sin (_dir) * _i,cos (_dir) * _i,0],0,1.5,1,0.1,[_size,0.02,0.1],[[0.8,0.7,0.2,0.1],[0.8,0.7,0.2,0.1],[0.8,0.7,0.2,0]],[1],1,0,'','',_stream,0,true,0.1,[[0.8,0.7,0.2,0]]];
  1022. sleep 0.02;
  1023. };
  1024. for '_i' from 0.8 to 0.2 step -0.01 do {
  1025. _stream setParticleParams [['\a3\data_f\ParticleEffects\Universal\Universal.p3d',16,12,8],'','BillBoard',1,3,[0,0,0],[sin (_dir) * _i,cos (_dir) * _i,0],0,1.5,1,0.1,[_size,0.02,0.1],[[0.8,0.7,0.2,0.1],[0.8,0.7,0.2,0.1],[0.8,0.7,0.2,0]],[1],1,0,'','',_stream,0,true,0.1,[[0.8,0.7,0.2,0]]];
  1026. sleep 0.02;
  1027. };
  1028. for '_i' from 0.2 to 0.3 step 0.02 do {
  1029. _stream setParticleParams [['\a3\data_f\ParticleEffects\Universal\Universal.p3d',16,12,8],'','BillBoard',1,3,[0,0,0],[sin (_dir) * _i,cos (_dir) * _i,0],0,1.5,1,0.1,[_size,0.02,0.1],[[0.8,0.7,0.2,0.1],[0.8,0.7,0.2,0.1],[0.8,0.7,0.2,0]],[1],1,0,'','',_stream,0,true,0.1,[[0.8,0.7,0.2,0]]];
  1030. sleep 0.02;
  1031. };
  1032. for '_i' from 0.3 to 0.1 step -0.01 do {
  1033. _stream setParticleParams [['\a3\data_f\ParticleEffects\Universal\Universal.p3d',16,12,8],'','BillBoard',1,3,[0,0,0],[sin (_dir) * _i,cos (_dir) * _i,0],0,1.5,1,0.1,[_size,0.02,0.1],[[0.8,0.7,0.2,0.1],[0.8,0.7,0.2,0.1],[0.8,0.7,0.2,0]],[1],1,0,'','',_stream,0,true,0.1,[[0.8,0.7,0.2,0]]];
  1034. sleep 0.02;
  1035. };
  1036. for '_i' from 0.1 to 0 step -0.01 do {
  1037. _stream setParticleParams [['\a3\data_f\ParticleEffects\Universal\Universal.p3d',16,12,8],'','BillBoard',1,3,[0,0,0],[sin (_dir) * _i,cos (_dir) * _i,0],0,1.5,1,0.1,[_size,0.02,0.1],[[0.8,0.7,0.2,_i],[0.8,0.7,0.2,_i],[0.8,0.7,0.2,0]],[1],1,0,'','',_stream,0,true,0.1,[[0.8,0.7,0.2,0]]];
  1038. sleep 0.02;
  1039. };
  1040. deleteVehicle _stream;
  1041. _clientObject setVariable ['peeing',false];
  1042. ";
  1043. publicVariable "fnc_player_pee";
  1044. };
  1045. /****************************************************************************************************/
  1046. if(_block_glitch_actions || _wall_glitch_object || _wall_glitch_vehicle)then{
  1047. fnc_check_if_enemy_base = compileFinal "
  1048. if(isNil'last_check_if_enemy_base')then{last_check_if_enemy_base=0;};
  1049. if(isNil'last_ret_check_if_enemy_base')then{last_ret_check_if_enemy_base=true;};
  1050. if(last_check_if_enemy_base < diag_tickTime)then
  1051. {
  1052. _ret = call {
  1053. _flags = player nearObjects ['Exile_Construction_Flag_Static', 90];
  1054. if(_flags isEqualTo [])exitWith{false};
  1055.  
  1056. _grp = group player;
  1057. _groupID = groupID _grp;
  1058.  
  1059. _uids = [getPlayerUID player];
  1060. if!(_groupID isEqualTo '')then
  1061. {
  1062. {
  1063. _xuid = getPlayerUID _x;
  1064. if!(_xuid isEqualTo '')then
  1065. {
  1066. _uids pushBackUnique _xuid;
  1067. };
  1068. } forEach (units _grp);
  1069. };
  1070.  
  1071. scopeName 'MAIN_FLAG';
  1072. _val = true;
  1073. {
  1074. _flag = _x;
  1075. _flagStolen = _flag getvariable ['ExileFlagStolen',-999];
  1076. if(_flagStolen isEqualTo 1)exitWith{_val = false;breakTo 'MAIN_FLAG';};
  1077.  
  1078. _radius = _flag getVariable['ExileTerritorySize', 15];
  1079. if((player distance _flag) < _radius)then
  1080. {
  1081. _buildRights = _flag getVariable['ExileTerritoryBuildRights', []];
  1082. {
  1083. if(_x in _buildRights)exitWith
  1084. {
  1085. _val = false;breakTo 'MAIN_FLAG';
  1086. };
  1087. } forEach _uids;
  1088. };
  1089. } forEach _flags;
  1090. _val
  1091. };
  1092. last_check_if_enemy_base = diag_tickTime + 10;
  1093. last_ret_check_if_enemy_base = _ret;
  1094. _ret
  1095. } else {
  1096. last_ret_check_if_enemy_base
  1097. };
  1098. ";
  1099. publicVariable "fnc_check_if_enemy_base";
  1100. };
  1101. /****************************************************************************************************/
  1102. if(_wall_glitch_vehicle)then{
  1103. fn_infiSTAR_getInMan_WallGlitch = {
  1104. params['_unit','_position','_vehicle','_turret'];
  1105. if(_unit isEqualTo player && _vehicle isEqualTo (vehicle player) && alive _unit)then
  1106. {
  1107. _modelToWorldVisual = player modelToWorldVisual [0,0,1];
  1108. _lineintersectsobjs = lineintersectsobjs[AGLtoASL _modelToWorldVisual, AGLtoASL player_pos_no_vehicle, player, _vehicle, false, 32];
  1109.  
  1110. _eject = false;
  1111. if(!((typeOf _vehicle) isEqualTo 'Steerable_Parachute_F') && (((locked _vehicle) isEqualTo 2)||(_vehicle getVariable ['ExileIsLocked', 1] isEqualTo -1)))then
  1112. {
  1113. [
  1114. 'ErrorTitleAndText',
  1115. [
  1116. 'infiSTAR',
  1117. 'You can not get into a locked vehicle!'
  1118. ]
  1119. ] call ExileClient_gui_toaster_addTemplateToast;
  1120. _eject = true;
  1121. }
  1122. else
  1123. {
  1124. {
  1125. if(_x isKindOf 'Exile_Construction_Abstract_Static')exitWith
  1126. {
  1127. _eject = false;
  1128.  
  1129. [
  1130. 'ErrorTitleAndText',
  1131. [
  1132. 'infiSTAR ANTI-GLITCH:',
  1133. format['You just glitched through %1.. be careful!',typeOf _x]
  1134. ]
  1135. ] call ExileClient_gui_toaster_addTemplateToast;
  1136. };
  1137. } forEach _lineintersectsobjs;
  1138. };
  1139. if(_eject)then{ player action ['eject',_vehicle]; };
  1140. };
  1141. };
  1142. publicVariable 'fn_infiSTAR_getInMan_WallGlitch';
  1143.  
  1144. fn_infiSTAR_getOutMan_WallGlitch = {
  1145. params['_unit','_position','_vehicle','_turret'];
  1146. if(_unit isEqualTo player && alive _unit)then
  1147. {
  1148. if(isNull (ropeAttachedTo _vehicle))then
  1149. {
  1150. _visualPos = getPosATLVisual _vehicle;
  1151. _visualPos set[2, (_visualPos select 2) + 1];
  1152. _dirTo = [_vehicle, player] call BIS_fnc_dirTo;
  1153. _secondPos = [_visualPos, (_vehicle distance player) + 1, _dirTo] call BIS_fnc_relPos;
  1154. {
  1155. if(_x isKindOf 'Exile_Construction_Abstract_Static')exitWith
  1156. {
  1157. player moveInAny _vehicle;
  1158.  
  1159. _log = format['WALL GLITCH CHECK (getOut/ejected from vehicle) - @%1 %2',mapGridPosition _visualPos,_visualPos];
  1160. ['+str _name+','+str _puid+','SLOG_GLITCH',toArray(_log)] call '+str _AHKickLog+';
  1161.  
  1162. [
  1163. 'ErrorTitleAndText',
  1164. [
  1165. 'infiSTAR ANTI-GLITCH:',
  1166. format['You just glitched through %1.. be careful!',typeOf _x]
  1167. ]
  1168. ] call ExileClient_gui_toaster_addTemplateToast;
  1169. };
  1170. } forEach lineintersectsobjs[ATLToASL _visualPos, ATLToASL _secondPos, player, _vehicle, true, 2];
  1171. }
  1172. else
  1173. {
  1174. player moveInAny _vehicle;
  1175.  
  1176. [
  1177. 'ErrorTitleAndText',
  1178. [
  1179. 'infiSTAR ANTI-GLITCH:',
  1180. 'Can not leave vehicle when it is rope attached!'
  1181. ]
  1182. ] call ExileClient_gui_toaster_addTemplateToast;
  1183. };
  1184. };
  1185. };
  1186. publicVariable 'fn_infiSTAR_getOutMan_WallGlitch';
  1187. };
  1188. /****************************************************************************************************/
  1189. if(_safeZone_antiVehicleTheft)then{
  1190. fn_infiSTAR_antiVehicleTheft = {
  1191. params [
  1192. ['_playerNetId','',['']],
  1193. ['_vehicleNetId','',['']],
  1194. ['_inTrader',false,[false]],
  1195. ['_knowsCode',true,[true]]
  1196. ];
  1197. _player = objectFromNetId _playerNetId;
  1198. if(!alive _player)exitWith{};
  1199. if!(remoteExecutedOwner isEqualTo (owner _player))exitWith{};
  1200.  
  1201. _vehicle = objectFromNetId _vehicleNetId;
  1202. _ExileOwnerUID = _vehicle getVariable ['ExileOwnerUID', ''];
  1203. if(_ExileOwnerUID isEqualTo '')exitWith{};
  1204.  
  1205. _vehicleOwnerPlayerObject = _vehicle getVariable ['ExileVehicleOwnerObj',objNull];
  1206. if(!alive _vehicleOwnerPlayerObject)then
  1207. {
  1208. _ExileOwnerByUID = missionNameSpace getVariable [format['object_by_uid_%1',_ExileOwnerUID],objNull];
  1209. if(!alive _ExileOwnerByUID)then
  1210. {
  1211. { if(getPlayerUID _x isEqualTo _ExileOwnerUID)exitWith{ _ExileOwnerByUID = _x; }; } forEach allPlayers;
  1212. };
  1213. if(alive _ExileOwnerByUID)then
  1214. {
  1215. _vehicle setVariable ['ExileVehicleOwnerObj',_ExileOwnerByUID];
  1216. _vehicleOwnerPlayerObject = _ExileOwnerByUID;
  1217. }
  1218. else
  1219. {
  1220. _vehicle setVariable ['ExileVehicleOwnerObj',_player];
  1221. _vehicleOwnerPlayerObject = _player;
  1222. };
  1223. };
  1224.  
  1225.  
  1226. if(alive _vehicleOwnerPlayerObject && _inTrader && !_knowsCode)then
  1227. {
  1228. if ((groupOwner (group _player)) isEqualTo (groupOwner (group _vehicleOwnerPlayerObject))) exitWith{};
  1229.  
  1230. _playerClanID = _player getVariable ['ExileClanID',-1];
  1231. _vehicleOwnerPlayerObjectClanID = _vehicleOwnerPlayerObject getVariable ['ExileClanID',-1];
  1232. if (_playerClanID > -1 && _playerClanID isEqualTo _vehicleOwnerPlayerObjectClanID) exitWith{};
  1233.  
  1234.  
  1235. _playerName = _player call fnc_get_exileObjName;
  1236. _playerNameUID = getPlayerUID _player;
  1237.  
  1238.  
  1239. [
  1240. [_player,_vehicle],
  1241. {
  1242. _vehicle setVariable ['ExileVehicleKickOutTimer',time + 60];
  1243.  
  1244. if(!isNil'infiSTAR_antiTheftThread')then{terminate infiSTAR_antiTheftThread;infiSTAR_antiTheftThread=nil;};
  1245. infiSTAR_antiTheftThread = _this spawn {
  1246. params [
  1247. ['_player',objNull,[objNull]],
  1248. ['_vehicle',objNull,[objNull]]
  1249. ];
  1250. ['ErrorTitleAndText', ['infiSTAR.de', 'This is not your vehicle! Stop being a troll, your actions are being logged..']] call ExileClient_gui_toaster_addTemplateToast;
  1251.  
  1252. _timeOut = time + 25;
  1253. waitUntil {
  1254. if(!userInputDisabled)then{disableUserInput true;};
  1255.  
  1256. moveOut _player;
  1257. unassignVehicle _player;
  1258. _player action ['eject', _vehicle];
  1259. _player setPosASL (_vehicle modelToWorld [0,-5,0]);
  1260. _vehicle lock 2;
  1261.  
  1262. uiSleep 0.1;
  1263. time > _timeOut || !((vehicle player) isEqualTo _vehicle)
  1264. };
  1265.  
  1266. _timeOut = time + 3;
  1267. waitUntil {
  1268. if(!userInputDisabled)then{disableUserInput true;};
  1269. time > _timeOut
  1270. };
  1271.  
  1272. if(userInputDisabled)then{disableUserInput false;};
  1273. };
  1274. }
  1275. ] remoteExecCall ['call',_player,false];
  1276.  
  1277.  
  1278. _owner = owner _vehicleOwnerPlayerObject;
  1279. [_player,_vehicle,_owner] spawn {
  1280. params ['_player','_vehicle','_owner'];
  1281.  
  1282. _timeOut = time + 15;
  1283. waitUntil {
  1284. moveOut _player;
  1285. unassignVehicle _player;
  1286. _player action ['eject', _vehicle];
  1287. _player setPosASL (_vehicle modelToWorld [0,-5,0]);
  1288.  
  1289. _vehicle setOwner 2;
  1290. _vehicle lock 2;
  1291. (time > _timeOut || (locked _vehicle) isEqualTo 2)
  1292. };
  1293. if((locked _vehicle) isEqualTo 2)then{_vehicle setVariable ['ExileIsLocked',-1];};
  1294.  
  1295.  
  1296. _timeOut = time + 30;
  1297. waitUntil {
  1298. uiSleep 0.1;
  1299. _vehicle setOwner _owner;
  1300. time > _timeOut || (((owner _vehicle) isEqualTo _owner) && (isNull objectParent _player))
  1301. };
  1302. _vehicle setOwner _owner;
  1303. };
  1304.  
  1305. _vehicleClass = typeOf _vehicle;
  1306. _vehicleOwnerPlayerName = _vehicleOwnerPlayerObject call fnc_get_exileObjName;
  1307. _vehicleOwnerPlayerUID = getPlayerUID _vehicleOwnerPlayerObject;
  1308. _log = format [
  1309. '%1(%2) was kicked from %3 (%4) owned by %5(%6)',
  1310. _playerName,
  1311. _playerNameUID,
  1312. getText(configFile >> 'CfgVehicles' >> _vehicleClass >> 'displayName'),
  1313. _vehicleClass,
  1314. _vehicleOwnerPlayerName,
  1315. _vehicleOwnerPlayerUID
  1316. ];
  1317. ['SafeZone_AntiVehicleTheft',_log] call FNC_A3_CUSTOMLOG;
  1318.  
  1319. [
  1320. [
  1321. if(_playerName isEqualTo '')then{'A player'}else{_playerName},
  1322. mapGridPosition _vehicle,
  1323. _vehicle
  1324. ],
  1325. {
  1326. params['_playerName','_grid','_vehicle'];
  1327. _vehicle engineOn false;
  1328. ['ErrorTitleAndText', ['infiSTAR.de', format['%1 just got kicked from your vehicle @%2',_playerName, _grid]]] call ExileClient_gui_toaster_addTemplateToast;
  1329. }
  1330. ] remoteExecCall ['spawn',_vehicleOwnerPlayerObject,false];
  1331. };
  1332. };
  1333. fn_infiSTAR_getInMan = {
  1334. params['_unit','_position','_vehicle','_turret'];
  1335. if(_unit isEqualTo player && alive _unit)then
  1336. {
  1337. _inTrader = _unit call ExileClient_util_world_isInTraderZone;
  1338. _knowsCode = _vehicle getVariable ['ExileAlreadyKnownCode',''] isEqualTo '';
  1339. [4,[[netId _unit, netId _vehicle,_inTrader,_knowsCode],'fn_infiSTAR_antiVehicleTheft']] call FN_infiSTAR_CS;
  1340.  
  1341. if(_inTrader && _knowsCode)then
  1342. {
  1343. if((_vehicle getVariable ['ExileVehicleKickOutTimer',0]) > time)then
  1344. {
  1345. moveOut _unit;
  1346. unassignVehicle _unit;
  1347. _unit action ['eject', _vehicle];
  1348. _unit setPosASL (_vehicle modelToWorld [0,-5,0]);
  1349. };
  1350. };
  1351. };
  1352. };
  1353. publicVariable 'fn_infiSTAR_getInMan';
  1354. };
  1355. /****************************************************************************************************/
  1356. diag_log format['<infiSTAR.de> %1 - TESTING IF serverCommandPassword IS SET PROPERLY',time];
  1357. _return = _serverCommandPassword serverCommand '#exec users';
  1358. if(!_return)then{_serverCommandPassword = getText(configfile >> 'CfgSettings' >> 'RCON' >> 'serverPassword');};
  1359. _return = _serverCommandPassword serverCommand '#exec users';
  1360. if(!_return)exitWith
  1361. {
  1362. diag_log format['<infiSTAR.de> %1 - serverCommandPassword NOT SET! [1000MS - 05-09-2017 14-29-26 - v83 - %2 - %3]',time,serverName,productVersion];
  1363. diag_log format['<infiSTAR.de> %1 - serverCommandPassword in EXILE_AHAT_CONFIG.hpp is %2',time,_serverCommandPassword];
  1364. diag_log format['<infiSTAR.de> %1 - serverCommandPassword is defined in your servers config.cfg',time];
  1365. diag_log format['<infiSTAR.de> %1 - serverCommandPassword has to be set it in EXILE_AHAT_CONFIG.hpp where it says serverCommandPassword = "changeme";',time];
  1366. diag_log format['<infiSTAR.de> %1 - infiSTAR will NOT START if passwords are not set properly!',time];
  1367. };
  1368. FN_GET_SERVERPW = compileFinal (str _serverCommandPassword);
  1369. fn_serverCommand = compileFinal "(call FN_GET_SERVERPW) serverCommand _this";
  1370. diag_log format['<infiSTAR.de> %1 - serverCommandPassword IS FINE',time];
  1371. /****************************************************************************************************/
  1372. if(_LOCK_ON_RESTART)then{
  1373. '#lock' call fn_serverCommand;
  1374. infiSTAR_SERVERSTART_PlayerConnected_id = addMissionEventHandler ['PlayerConnected', {
  1375. params['_id','_uid','_name','_jip','_owner'];
  1376. if(_owner > 2)then{ format['#kick %1',_owner] call fn_serverCommand; };
  1377. }];
  1378. { format['#kick %1',owner _x] call fn_serverCommand; } forEach allPlayers;
  1379. };
  1380. /****************************************************************************************************/
  1381. _ryanzombies = !(getArray(configfile >> 'CfgPatches' >> 'Ryanzombies' >> 'units') isEqualTo []);
  1382. /****************************************************************************************************/
  1383. fnc_debugbox_new = {
  1384. #include "debug.sqf"
  1385. };
  1386. diag_log format["<infiSTAR.de> %1 - STARTUP - including AdminTools",time];
  1387. #include "EXILE_AT.sqf"
  1388. diag_log format["<infiSTAR.de> %1 - STARTUP - AdminTools included!",time];
  1389. diag_log format["<infiSTAR.de> %1 - STARTUP - including AntiHack",time];
  1390. #include "EXILE_AH.sqf"
  1391. diag_log format["<infiSTAR.de> %1 - STARTUP - AntiHack included!",time];
  1392. comment "Antihack & AdminTools - Christian Lorenzen - www.infiSTAR.de";
  1393. true
Add Comment
Please, Sign In to add comment