Guest User

Untitled

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