Advertisement
Guest User

Untitled

a guest
Aug 9th, 2017
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.21 KB | None | 0 0
  1. /*
  2. Author: Chris(tian) "infiSTAR" Lorenzen
  3. Contact: infiSTAR23@gmail.com // www.infiSTAR.de
  4.  
  5. Copyright infiSTAR - 2011 - 2016. All rights reserved.
  6. Christian (Chris) L. (infiSTAR23@gmail.com) Developer of infiSTAR
  7.  
  8. Description:
  9. Arma AntiHack & AdminTools - infiSTAR.de
  10.  
  11. UPDATEEMAIL for http://update.infiSTAR.de is:
  12. 'michaelward12345@hotmail.co.uk'
  13.  
  14. Last download was on:
  15. '26-Dec-2016 21-45-38';
  16.  
  17. NOTE:
  18. THIS FILE SHOULD NOT BE TOUCHED UNLESS YOU REALLY KNOW WHAT YOU ARE DOING!
  19. */
  20.  
  21.  
  22.  
  23.  
  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. /* FIX PROBLEMS IN ARMA / OTHER ADDONS */
  69. cba_common_setVehVarName = compileFinal "diag_log 'blocked RE exploit';";
  70. BIS_fnc_parsenumber = compileFinal "
  71. _number = param [0,-1,[0,'',{},configfile]];
  72. switch (typename _number) do {
  73. case (typename {}): {
  74. _number = call _number;
  75. if (isnil {_number}) then {_number = -1;};
  76. _number
  77. };
  78. case (typename ''): {
  79. _number = parseNumber _number;
  80. if (isnil {_number}) then {_number = -1;};
  81. _number
  82. };
  83. case (typename configfile): {
  84. if (isnumber _number) then {
  85. getnumber _number
  86. } else {
  87. if (istext _number) then {
  88. parseNumber (gettext _number)
  89. } else {
  90. -1
  91. };
  92. };
  93. };
  94. default {_number};
  95. };
  96. ";
  97.  
  98.  
  99.  
  100. /* START INFISTAR */
  101. if(!isNil "infiSTAR_IS_RUN_ON_THIS_SERVER")exitWith{diag_log format["<infiSTAR.de> %1 - is already started %1 seconds ago..",time - infiSTAR_IS_RUN_ON_THIS_SERVER];};
  102. infiSTAR_IS_RUN_ON_THIS_SERVER = time;
  103. _found = false;
  104. diag_log format["<infiSTAR.de> %1 - checking for EXILE_SERVER..",time];
  105. _cfgPatches = configFile >> "CfgPatches";
  106. for "_i" from 0 to (count _cfgPatches - 1) do
  107. {
  108. _patchClass = _cfgPatches select _i;
  109. if(toLower(configName _patchClass) isEqualTo "exile_server")exitWith
  110. {
  111. _found = true;
  112. };
  113. };
  114. if(!_found)exitWith
  115. {
  116. for "_i" from 0 to 10 do
  117. {
  118. diag_log format["<infiSTAR.de> %1 - Could not find EXILE_SERVER, infiSTAR will not start!",time];
  119. };
  120. };
  121. diag_log format["<infiSTAR.de> %1 - EXILE_SERVER has been found, STARTING",time];
  122. _found = false;
  123. diag_log format["<infiSTAR.de> %1 - checking for Cfg_infiSTAR_settings..",time];
  124. _configFile = configFile;
  125. for "_i" from 0 to (count _configFile - 1) do
  126. {
  127. _patchClass = _configFile select _i;
  128. if(configName _patchClass == "Cfg_infiSTAR_settings")exitWith
  129. {
  130. _found = true;
  131. };
  132. };
  133. if(!_found)exitWith
  134. {
  135. for "_i" from 0 to 10 do
  136. {
  137. diag_log format["<infiSTAR.de> %1 - Could not find Cfg_infiSTAR_settings, infiSTAR will not start!",time];
  138. };
  139. };
  140. diag_log format["<infiSTAR.de> %1 - Cfg_infiSTAR_settings has been found, STARTING",time];
  141. fnc_infiSTAR_cfg = compileFinal "
  142. params['_inputclassname','_default'];
  143. _path = (configfile >> 'Cfg_infiSTAR_settings' >> _inputclassname);
  144. call {
  145. if(_default isEqualType 0)exitWith{getNumber _path};
  146. if(_default isEqualType [])exitWith{getArray _path};
  147.  
  148. _txt = getText _path;
  149. _default = _txt;
  150.  
  151. if((toLower _txt) isEqualTo 'true')then{_default = true};
  152. if((toLower _txt) isEqualTo 'false')then{_default = false};
  153. _default
  154. }
  155. ";
  156. _devs = ['76561198152111329','76561198155552440']; /* infiSTAR UID */
  157. _admins = [];
  158. _serverCommandPassword = ["serverCommandPassword","changeme"] call fnc_infiSTAR_cfg;
  159. _passwordAdmin = ["passwordAdmin","changeme"] call fnc_infiSTAR_cfg;
  160. _OPEN_ADMIN_MENU_KEY = ["OPEN_ADMIN_MENU_KEY",0x3B] call fnc_infiSTAR_cfg;
  161. _HIDE_FROM_PLAYERS = ["HIDE_FROM_PLAYERS",false] call fnc_infiSTAR_cfg;
  162. _announce_adminstate_changed = ["announce_adminstate_changed",false] call fnc_infiSTAR_cfg;
  163. _use_html_load_on_adminmenu = ["use_html_load_on_adminmenu",true] call fnc_infiSTAR_cfg;
  164. _LogAdminActions = ["LogAdminActions",true] call fnc_infiSTAR_cfg;
  165. _enableIngameLogs = ["enableIngameLogs",true] call fnc_infiSTAR_cfg;
  166. _needAdminNameTag = ["needAdminNameTag",false] call fnc_infiSTAR_cfg;
  167. _AdminNameTag = ["AdminNameTag","[Admin]"] call fnc_infiSTAR_cfg;
  168. _chatCommands = ["chatCommands",[]] call fnc_infiSTAR_cfg;
  169. _chatCommandsP = ["chatCommandsP",[]] call fnc_infiSTAR_cfg;
  170.  
  171. _ENABLE_NOTIFICATION_MESSAGES = ["ENABLE_NOTIFICATION_MESSAGES",true] call fnc_infiSTAR_cfg;
  172. if(_ENABLE_NOTIFICATION_MESSAGES)then{
  173. NOTIFY_MSG_ARRAY = ["NOTIFY_MSG_ARRAY",[]] call fnc_infiSTAR_cfg;
  174. {_x set [0,(_x select 0)*60];_x set [1,(_x select 1)*60];NOTIFY_MSG_ARRAY set [_forEachIndex,_x];} forEach NOTIFY_MSG_ARRAY;
  175. publicVariable "NOTIFY_MSG_ARRAY";
  176. };
  177.  
  178. _pathToCustomBillBoardTextures = ["pathToCustomBillBoardTextures",[]] call fnc_infiSTAR_cfg;
  179. _startAsNormal = ["startAsNormal",[]] call fnc_infiSTAR_cfg;
  180. _hiddenSuperAdmin = ["hiddenSuperAdmin",[]] call fnc_infiSTAR_cfg;
  181. _adminUIDandAccess = ["adminUIDandAccess",[]] call fnc_infiSTAR_cfg;
  182.  
  183.  
  184. _USE_DATABASE_WHITELIST = ["USE_DATABASE_WHITELIST",false] call fnc_infiSTAR_cfg;
  185. _USE_LOG_TO_DATABASE = ["USE_LOG_TO_DATABASE",false] call fnc_infiSTAR_cfg;
  186. LOG_PATH = ["LOG_PATH",""] call fnc_infiSTAR_cfg;
  187. _WRITE_LOG_FILES = ["WRITE_LOG_FILES",false] call fnc_infiSTAR_cfg;
  188.  
  189. _UID_SKIPBLACKLIST = ["SKIPBLACKLIST",[]] call fnc_infiSTAR_cfg;
  190.  
  191. _USE_UID_WHITELIST = ["USE_UID_WHITELIST",false] call fnc_infiSTAR_cfg;
  192. _UID_WHITELIST = ["UID_WHITELIST",[]] call fnc_infiSTAR_cfg;
  193.  
  194.  
  195. _ExileDevFriendlyMode = ["ExileDevFriendlyMode",false] call fnc_infiSTAR_cfg;
  196. _ESCMNUTOP = ["ESCMNUTOP","AntiHack & AdminTools"] call fnc_infiSTAR_cfg;
  197. _ESCMNUBOT = ["ESCMNUBOT","by infiSTAR.de"] call fnc_infiSTAR_cfg;
  198. _BRIEFING_MSG = ["BRIEFING_MSG",false] call fnc_infiSTAR_cfg;
  199. _HTML_LOAD_URL = ["HTML_LOAD_URL",""] call fnc_infiSTAR_cfg;
  200. _ENABLE_PRIVATE_CHAT_MENU = ["ENABLE_PRIVATE_CHAT_MENU",false] call fnc_infiSTAR_cfg;
  201. _PRIVATE_CHAT_MENU_8GNETWORK = ["PRIVATE_CHAT_MENU_8GNETWORK",false] call fnc_infiSTAR_cfg;
  202.  
  203.  
  204.  
  205. GET_TIME_TIME = compileFinal "
  206. _hours = floor(_this / 60 / 60);
  207. _minutes = floor((((_this / 60 / 60) - _hours) max 0.0001)*60);
  208. _seconds = _this - (_hours*60*60) - (_minutes * 60);
  209. format['%1h %2min %3s',_hours,_minutes,round _seconds]
  210. ";
  211. publicVariable "GET_TIME_TIME";
  212.  
  213. fnc_get_local_servertime = compileFinal "(call compile ('extDB2' callExtension '9:LOCAL_TIME')) select 1";
  214. _USE_RESTART_TIMER = ["USE_RESTART_TIMER",true] call fnc_infiSTAR_cfg;
  215. _USE_RESTART_TIMES_ARRAY = ["USE_RESTART_TIMES_ARRAY",true] call fnc_infiSTAR_cfg;
  216. _SERVER_END_FUNCTION = ["SERVER_END_FUNCTION","#shutdown"] call fnc_infiSTAR_cfg;
  217. _USE_RESTART_TIMER_SHUTDOWN = ["USE_RESTART_TIMER_SHUTDOWN",true] call fnc_infiSTAR_cfg;
  218. _RESTART_TIME_IN_M = ["RESTART_TIME_IN_M",180] call fnc_infiSTAR_cfg;
  219. _TIME_FUNCTION_USED = ["TIME_FUNCTION_USED","diag_tickTime"] call fnc_infiSTAR_cfg;
  220. _SHOW_RESTART_TIMER = ["SHOW_RESTART_TIMER",true] call fnc_infiSTAR_cfg;
  221.  
  222. _RESTART_TIMES_tmp = ["RESTART_TIMES",[
  223. [00,00],
  224. [02,00],
  225. [04,00],
  226. [06,00],
  227. [8,00],
  228. [10,00],
  229. [12,00],
  230. [14,00],
  231. [16,00],
  232. [18,00],
  233. [20,00],
  234. [22,00]]] call fnc_infiSTAR_cfg;
  235. _RESTART_TIMES = [];{_x params ['_cxh','_cxm'];_RESTART_TIMES pushBackUnique ((_cxh * 60) + _cxm);} forEach _RESTART_TIMES_tmp;
  236. _RESTART_ANNOUNCE_X_MIN = ["RESTART_ANNOUNCE_X_MIN",[1,2,3,5,8,10]] call fnc_infiSTAR_cfg;
  237. _RESTART_WARNING_SOUND = ["RESTART_WARNING_SOUND","Alarm"] call fnc_infiSTAR_cfg;
  238.  
  239.  
  240.  
  241. _DayNightVote = ["DayNightVote",true] call fnc_infiSTAR_cfg;
  242. _MRV = ["MRV",0.3] call fnc_infiSTAR_cfg;
  243. _MVP = ["MVP",0.51] call fnc_infiSTAR_cfg;
  244. _VCT = ["VCT",300] call fnc_infiSTAR_cfg;
  245.  
  246. _allowPee = ["allowPee",true] call fnc_infiSTAR_cfg;
  247. _enableJump = ["enableJump",true] call fnc_infiSTAR_cfg;
  248.  
  249. _TGV = ["TGV",40] call fnc_infiSTAR_cfg;
  250. _VDV = ["VDV",900] call fnc_infiSTAR_cfg;
  251. _VOV = ["VOV",750] call fnc_infiSTAR_cfg;
  252. _SVD = ["SVD",100] call fnc_infiSTAR_cfg;
  253.  
  254. _fix_uniform_and_vest = ["fix_uniform_and_vest",false] call fnc_infiSTAR_cfg;
  255. _experimental_dupe_check = ["experimental_dupe_check",false] call fnc_infiSTAR_cfg;
  256. _stopSafeGlitchAndCorpseDupe = ["stopSafeGlitchAndCorpseDupe",false] call fnc_infiSTAR_cfg;
  257. _disconnect_dupe_check = ["disconnect_dupe_check",false] call fnc_infiSTAR_cfg;
  258.  
  259. _block_glitch_actions = ["block_glitch_actions",false] call fnc_infiSTAR_cfg;
  260. _wall_glitch_object = ["wall_glitch_object",false] call fnc_infiSTAR_cfg;
  261. _wall_glitch_revert = ["wall_glitch_revert",false] call fnc_infiSTAR_cfg;
  262. _wall_glitch_punish = ["wall_glitch_punish",1] call fnc_infiSTAR_cfg;
  263. _wall_glitch_vehicle = ["wall_glitch_vehicle",false] call fnc_infiSTAR_cfg;
  264.  
  265. _URC = ["URC",true] call fnc_infiSTAR_cfg;
  266. _LVC = ["LVC",true] call fnc_infiSTAR_cfg;_LVC=true;
  267. _CAP = ["CAP",false] call fnc_infiSTAR_cfg;
  268.  
  269. _KCM = ["KCM",true] call fnc_infiSTAR_cfg;
  270. _CMC = ["CMC",true] call fnc_infiSTAR_cfg;
  271. _allowedCommandingMenus = ["allowedCommandingMenus",[]] call fnc_infiSTAR_cfg;
  272. _allowedCommandingMenus = _allowedCommandingMenus - ["#user:example"];
  273. _allowedCommandingMenus = _allowedCommandingMenus - ["#user:example2"];
  274.  
  275. _task_force_radio = ["task_force_radio",true] call fnc_infiSTAR_cfg;
  276. _checkFilePatchingEnabled = ["checkFilePatchingEnabled",true] call fnc_infiSTAR_cfg;
  277. _check_Notifications = ["check_Notifications",false] call fnc_infiSTAR_cfg;
  278. _check_doors_n_gates = ["check_doors_n_gates",false] call fnc_infiSTAR_cfg;
  279.  
  280. _checkHiddenObjects = ["checkHiddenObjects",true] call fnc_infiSTAR_cfg;
  281. _attach_to_check = ["attach_to_check",false] call fnc_infiSTAR_cfg;
  282. _slingload_check = ["slingload_check",false] call fnc_infiSTAR_cfg;
  283. _checkPopTabIncrease = ["checkPopTabIncrease",false] call fnc_infiSTAR_cfg;
  284. _LogPopTabIncrease = ["LogPopTabIncrease",15000] call fnc_infiSTAR_cfg;
  285. _BanPopTabIncrease = ["BanPopTabIncrease",250000] call fnc_infiSTAR_cfg;
  286. _checkRespectIncrease = ["checkRespectIncrease",false] call fnc_infiSTAR_cfg;
  287. _LogRespectIncrease = ["LogRespectIncrease",5000] call fnc_infiSTAR_cfg;
  288. _BanRespectIncrease = ["BanRespectIncrease",25000] call fnc_infiSTAR_cfg;
  289. _CMM = ["CMM",true] call fnc_infiSTAR_cfg;
  290. _maxMapMenuEntries = ["maxMapMenuEntries",6] call fnc_infiSTAR_cfg;
  291. _check_steam_ban = ["check_steam_ban",false] call fnc_infiSTAR_cfg;
  292. _ban_for_steam_ban = ["ban_for_steam_ban",false] call fnc_infiSTAR_cfg;
  293.  
  294. _useCustomFiredEventHandler = ["useCustomFiredEventHandler",false] call fnc_infiSTAR_cfg;
  295. _useCustomHandeDamageHandler = ["useCustomHandeDamageHandler",false] call fnc_infiSTAR_cfg;
  296. _MPH = ["MPH",false] call fnc_infiSTAR_cfg;
  297. _GodModeCheck = ["GodModeCheck",false] call fnc_infiSTAR_cfg;
  298.  
  299. _UAT = ["UAT",true] call fnc_infiSTAR_cfg;
  300. _allowTPcfg = (getArray(configfile >> "Cfg_infiSTAR_settings" >> "allowTP" >> "custom"));
  301.  
  302. _CHECK_DRAWING = ["CHECK_DRAWING",false] call fnc_infiSTAR_cfg;
  303. _CGM = ["CGM",false] call fnc_infiSTAR_cfg;
  304. _CLM = ["CLM",false] call fnc_infiSTAR_cfg;
  305. _UMW = ["UMW",false] call fnc_infiSTAR_cfg;
  306. _aLocalM = ["aLocalM",[]] call fnc_infiSTAR_cfg;
  307. _badkickChat = ["badkickChat",[]] call fnc_infiSTAR_cfg;
  308. _badbanChat = ["badbanChat",[]] call fnc_infiSTAR_cfg;
  309. _badNamesFull = ["badNamesFull",[]] call fnc_infiSTAR_cfg;
  310. _badNamesPartial = ["badNamesPartial",[]] call fnc_infiSTAR_cfg;
  311. _badGroupNames = ["badGroupNames",[]] call fnc_infiSTAR_cfg;
  312.  
  313. _disAllowVon = ["disAllowVon",[]] call fnc_infiSTAR_cfg;
  314. _disAllowVon = _disAllowVon - [5];
  315.  
  316. _use_suspicious_button_check = ["use_suspicious_button_check",true] call fnc_infiSTAR_cfg;
  317. _badIDDsToKick = ["badIDDsToKick",[]] call fnc_infiSTAR_cfg;
  318. _badIDDsToClose = ["badIDDsToClose",[]] call fnc_infiSTAR_cfg;
  319. _UDW = ["UDW",true] call fnc_infiSTAR_cfg;
  320. _allowedIDDs = ["allowedIDDs",[]] call fnc_infiSTAR_cfg;
  321.  
  322. _variableTypeChecks = ["variableTypeChecks",[]] call fnc_infiSTAR_cfg;
  323.  
  324. _useBlacklistedVariableCheck = ["useBlacklistedVariableCheck",false] call fnc_infiSTAR_cfg;
  325. _blacklistedVariables = [];
  326. if(_useBlacklistedVariableCheck)then{_blacklistedVariables = ["blacklistedVariables",[]] call fnc_infiSTAR_cfg;};
  327. _useObjectVariableCheck = ["useObjectVariableCheck",false] call fnc_infiSTAR_cfg;
  328.  
  329.  
  330. _UVC = ["UVC",true] call fnc_infiSTAR_cfg;
  331. _UVC_adminspawn = ["UVC_adminspawn",true] call fnc_infiSTAR_cfg;
  332. _VehicleWhiteList_check = ["VehicleWhiteList_check",true] call fnc_infiSTAR_cfg;
  333. _VehicleWhiteList = ["VehicleWhiteList",[]] call fnc_infiSTAR_cfg;
  334. _ForbiddenVehicles_check = ["ForbiddenVehicles_check",true] call fnc_infiSTAR_cfg;
  335. _ForbiddenVehicles = ["ForbiddenVehicles",[]] call fnc_infiSTAR_cfg;
  336. _LocalWhitelist = ["LocalWhitelist",[]] call fnc_infiSTAR_cfg;
  337.  
  338.  
  339. _UFI = ["UFI",false] call fnc_infiSTAR_cfg;
  340. _UIW = ["UIW",false] call fnc_infiSTAR_cfg;
  341. _ItemWhiteList = ["ItemWhiteList",[]] call fnc_infiSTAR_cfg;
  342. _ForbiddenItems = ["ForbiddenItems",[]] call fnc_infiSTAR_cfg;
  343. _allSupportBoxes = ["allSupportBoxes",[]] call fnc_infiSTAR_cfg;
  344. _allSupportBoxesNames = [];
  345. {
  346. if!(_x isEqualTo [])then
  347. {
  348. _allSupportBoxesNames pushBack (_x select 0);
  349. };
  350. } forEach _allSupportBoxes;
  351. _KYLE_MODE = ["KYLE_MODE",false] call fnc_infiSTAR_cfg;
  352. if(!_ExileDevFriendlyMode)then{_ExileDevFriendlyMode = getNumber(configFile >> "CfgSettings" >> "ServerSettings" >> "devFriendyMode") isEqualTo 1;};
  353. if(_ExileDevFriendlyMode)then
  354. {
  355. _devs pushBackUnique "76561198022879703"; /* Grim */
  356. };
  357. {if(count _x > 5)then{_devs pushBackUnique _x;};} forEach _hiddenSuperAdmin;
  358. {if(count _x > 5)then{_admins pushBackUnique _x;};} forEach _devs;
  359. fnc_CompilableString = {
  360. _input = _this select 0;
  361. _output = call {
  362. if(_input isEqualType {})exitWith{(str(_input)) select [1,((count(str(_input)))-2)]};
  363. if(_input isEqualType "")exitWith{_input};
  364. ""
  365. };
  366. _output
  367. };
  368. fnc_CompilableString = compileFinal ([fnc_CompilableString] call fnc_CompilableString);
  369. publicVariable "fnc_CompilableString";
  370.  
  371.  
  372. fnc_get_exileObjName = compileFinal "if(alive _this)then{_this setVariable['ExileName',name _this];name _this}else{_this getVariable['ExileName','']}";
  373. publicVariable "fnc_get_exileObjName";
  374. fnc_infiSTAR_getName = fnc_get_exileObjName;
  375.  
  376. fn_onPlayerTake = compileFinal "
  377. if(!isNil'antidupedisabler')then{terminate antidupedisabler;antidupedisabler=nil;};
  378. antidupedisabler = 0.3 spawn {
  379. disableSerialization;
  380. _timer = diag_tickTime + _this;
  381. while{(!isNull (findDisplay 602))}do
  382. {
  383. _ctrl = ((findDisplay 602) displayCtrl 632);
  384. _ctrl ctrlEnable false;
  385.  
  386. _size = lbSize _ctrl;
  387. if(_size > 0)then
  388. {
  389. for '_i' from 0 to _size do
  390. {
  391. _ctrl lbSetColor [_i, [1,0,0,1]];
  392. };
  393. };
  394. if(diag_tickTime > _timer)exitWith
  395. {
  396. ((findDisplay 602) displayCtrl 632) ctrlEnable true;
  397.  
  398. if(_size > 0)then
  399. {
  400. for '_i' from 0 to _size do
  401. {
  402. _ctrl lbSetColor [_i, [1,1,1,1]];
  403. };
  404. };
  405. };
  406. };
  407. };
  408. _this call ExileClient_object_player_event_onTake
  409. ";
  410. publicVariable "fn_onPlayerTake";
  411.  
  412.  
  413.  
  414.  
  415. fnc_infiSTAR_setUncon = compileFinal "
  416. params[['_obj',objNull,[objNull]],['_time',0,[0]]];
  417.  
  418. _uncon_thread = _obj getVariable 'uncon_thread';
  419. if(!isNil'_uncon_thread')then{terminate _uncon_thread;hintSilent '';};
  420. _uncon_thread = _this spawn {
  421. params[['_obj',objNull,[objNull]],['_time',0,[0]]];
  422. _timer = diag_tickTime + _time;
  423. waitUntil {
  424. if(!isNull objectParent _obj)then{_obj action ['eject', (vehicle _obj)];};
  425. _obj setUnconscious true;
  426. hintSilent parseText format['<t size=''1.5'' font=''OrbitronLight'' color=''#F01154''>Knocked out for %1 more seconds..</t>',round(_timer - diag_tickTime)];
  427. diag_tickTime > _timer
  428. };
  429. hintSilent '';
  430. if(!isNull _obj)then
  431. {
  432. _obj setUnconscious false;
  433. _obj switchMove '';
  434. _obj setVariable ['uncon_thread',nil];
  435. };
  436. };
  437. _obj setVariable ['uncon_thread',_uncon_thread];
  438. ";
  439. publicVariable "fnc_infiSTAR_setUncon";
  440.  
  441.  
  442.  
  443.  
  444. if(_stopSafeGlitchAndCorpseDupe)then{
  445. fn_onInventoryOpened = compileFinal "
  446. _container = _this select 1;
  447.  
  448. _locked = locked _container isEqualTo 2;
  449. _ExileIsLocked = _container getVariable ['ExileIsLocked', 1] isEqualTo -1;
  450. _lockedNear = false;
  451.  
  452. if(!_locked && !_ExileIsLocked)then
  453. {
  454. if((_container isKindOf 'GroundWeaponHolder')||(_container isKindOf 'WeaponHolderSimulated')||(_container isKindOf 'LootWeaponHolder')||(_container isKindOf 'Man'))then
  455. {
  456. _vehicles = player nearObjects ['AllVehicles', 7];
  457. if(!_lockedNear)then
  458. {
  459. {
  460. _lockedxx = locked _x isEqualTo 2;
  461. _ExileIsLockedxx = _x getVariable ['ExileIsLocked', 1] isEqualTo -1;
  462. if((_lockedxx || _ExileIsLockedxx) && !(_x in [_container,vehicle _container]))exitWith
  463. {
  464. _lockedNear = true;
  465. systemChat '<infiSTAR.de> locked vehicle to close.. gear menu will not show the cargo tab!';
  466. };
  467. } forEach _vehicles;
  468. };
  469. if(!_lockedNear)then
  470. {
  471. {
  472. _obj = _x;
  473. if(!(_obj isKindOf 'Man')&&(alive _obj)&&(_container isKindOf 'Man')&&(!alive _container))exitWith
  474. {
  475. _lockedNear = true;
  476. systemChat '<infiSTAR.de> vehicle to close to dead body.. gear menu will not show the cargo tab!';
  477. };
  478. } forEach _vehicles;
  479. };
  480. if(!_lockedNear)then
  481. {
  482. {
  483. _lockedx = locked _x isEqualTo 2;
  484. _ExileIsLockedx = _x getVariable ['ExileIsLocked', 1] isEqualTo -1;
  485. if(_lockedx || _ExileIsLockedx)exitWith
  486. {
  487. _lockedNear = true;
  488. systemChat '<infiSTAR.de> locked supply close.. gear menu will not show the cargo tab!';
  489. };
  490. } forEach (player nearSupplies 5);
  491. };
  492. };
  493. };
  494. if(_locked || _ExileIsLocked || _lockedNear)then
  495. {
  496. if(!isNil'checkGearDisplayThread')then{terminate checkGearDisplayThread;checkGearDisplayThread=nil;};
  497. checkGearDisplayThread = [] spawn {
  498. disableSerialization;
  499. _fn_hide_cargo = {
  500. ((findDisplay 602) displayCtrl 6401) ctrlEnable false;
  501. ctrlSetFocus ((findDisplay 602) displayCtrl 6321);
  502. ctrlActivate ((findDisplay 602) displayCtrl 6321);
  503. };
  504. waitUntil {call _fn_hide_cargo;!isNull findDisplay 602};
  505. waitUntil {call _fn_hide_cargo;isNull findDisplay 602};
  506. };
  507. };
  508. _this call ExileClient_object_player_event_onInventoryOpened
  509. ";
  510. publicVariable "fn_onInventoryOpened";
  511. }
  512. else
  513. {
  514. fn_onInventoryOpened = compileFinal "_this call ExileClient_object_player_event_onInventoryOpened";
  515. publicVariable "fn_onInventoryOpened";
  516. };
  517.  
  518.  
  519.  
  520.  
  521. fn_infiSTAR_revive = {
  522. _target = objectFromnetId _this;
  523. if(isNull _target)exitWith{};
  524.  
  525. _targetID = owner _target;
  526. if(_targetID < 3)exitWith{};
  527.  
  528. _playerUID = getPlayerUID _target;
  529. if(_playerUID isEqualTo '')exitWith{
  530. [
  531. '<infiSTAR.de> REVIVE ERROR: Target already respawned..!',
  532. {systemChat _this},
  533. _clientID,
  534. false
  535. ] call FN_infiSTAR_S;
  536. };
  537.  
  538. _revive = _target getVariable ['revive',-1];
  539. if!(_revive isEqualTo -1)exitWith{
  540. [
  541. format['<infiSTAR.de> REVIVE ERROR: Target %1 already getting revived %2 seconds ago..!',_target,time - _revive],
  542. {systemChat _this},
  543. _clientID,
  544. false
  545. ] call FN_infiSTAR_S;
  546. };
  547. _target setVariable ['revive','1'];
  548.  
  549. _pos = _target modelToWorld [0,0,0];
  550. _direction = getDir _target;
  551. _name = _target call fnc_get_exileObjName;
  552.  
  553. _accountData = format['getAccountStats:%1', _playerUID] call ExileServer_system_database_query_selectSingle;
  554. _newUnit = (createGroup independent) createUnit ['Exile_Unit_Player', [0,0,0], [], 0, 'CAN_COLLIDE'];
  555. removeHeadgear _newUnit;
  556.  
  557. _clanID = -1;
  558. _clanData = [];
  559.  
  560.  
  561. _accountData params [
  562. ['_ExileScore',0,[0]],
  563. ['_ExileKills',0,[0]],
  564. ['_ExileDeaths',0,[0]],
  565. ['_clanID',-1,[-1]],
  566. ['_ExileLocker',0,[0]]
  567. ];
  568.  
  569. if(_clanID isEqualType 1) then
  570. {
  571. _clanData = missionNamespace getVariable [format ['ExileServer_clan_%1',_clanID],[]];
  572. if(isNull (_clanData select 5))then
  573. {
  574. _clanGroup = createGroup independent;
  575. _clanData set [5,_clanGroup];
  576. _clanGroup setGroupIdGlobal [_clanData select 0];
  577. missionNameSpace setVariable [format ['ExileServer_clan_%1',_clanID],_clanData];
  578. }
  579. else
  580. {
  581. _clanGroup = (_clanData select 5);
  582. };
  583. [_newUnit] joinSilent _clanGroup;
  584. };
  585.  
  586. _newUnit disableAI 'FSM';
  587. _newUnit disableAI 'MOVE';
  588. _newUnit disableAI 'AUTOTARGET';
  589. _newUnit disableAI 'TARGET';
  590. _newUnit disableAI 'CHECKVISIBLE';
  591. _newUnit setName _name;
  592. _newUnit setVariable ['ExileMoney', 0, true];
  593. _newUnit setVariable ['ExileScore', _ExileScore];
  594. _newUnit setVariable ['ExileKills', _ExileKills];
  595. _newUnit setVariable ['ExileDeaths', _ExileDeaths];
  596. _newUnit setVariable ['ExileClanID', _clanID];
  597. _newUnit setVariable ['ExileClanData', _clanData];
  598. _newUnit setVariable ['ExileHunger', 100];
  599. _newUnit setVariable ['ExileThirst', 100];
  600. _newUnit setVariable ['ExileTemperature', 37];
  601. _newUnit setVariable ['ExileWetness', 0];
  602. _newUnit setVariable ['ExileAlcohol', 0];
  603. _newUnit setVariable ['ExileName', _name];
  604. _newUnit setVariable ['ExileOwnerUID', _playerUID];
  605. _newUnit setVariable ['ExileIsBambi', true];
  606. _newUnit setVariable ['ExileXM8IsOnline', false, true];
  607. _newUnit setVariable ['ExileLocker', _ExileLocker, true];
  608. _newUnit addMPEventHandler ['MPKilled', {_this call ExileServer_object_player_event_onMpKilled}];
  609. _newUnit call ExileServer_object_player_database_insert;
  610.  
  611. [
  612. [
  613. _newUnit,
  614. str _ExileScore,
  615. _ExileKills,
  616. _ExileDeaths,
  617. (getNumber (configFile >> 'CfgSettings' >> 'BambiSettings' >> 'protectionDuration')) * 60,
  618. _clanData
  619. ],
  620. {
  621. params ['_newUnit','_ExileScore','_ExileKills','_ExileDeaths','_bambitimer','_clanData'];
  622. _newUnit call ExileClient_object_player_initialize;
  623. ExileClientPlayerIsSpawned = true;
  624. ExileClientPlayerAttributesASecondAgo =
  625. [
  626. ExileClientPlayerAttributes select 0,
  627. ExileClientPlayerAttributes select 1,
  628. ExileClientPlayerAttributes select 2,
  629. ExileClientPlayerAttributes select 3,
  630. ExileClientPlayerAttributes select 4,
  631. ExileClientPlayerAttributes select 5,
  632. ExileClientPlayerAttributes select 6
  633. ];
  634. call ExileClient_object_player_initStamina;
  635. false call ExileClient_gui_hud_showSurvivalInfo;
  636. call ExileClient_system_rating_balance;
  637. ExileClientPlayerScore = parseNumber _ExileScore;
  638. ExileClientPlayerKills = _ExileKills;
  639. ExileClientPlayerDeaths = _ExileDeaths;
  640. _clanData call ExileClient_system_clan_network_updateClanInfoFull;
  641. if!(_clanData isEqualTo [])then
  642. {
  643. if!(isNull (_clanData select 5))then
  644. {
  645. ExileClientPartyID = netid (_clanData select 5);
  646. };
  647. };
  648. if !(ExileClientPartyID isEqualTo -1) then
  649. {
  650. [player] joinSilent (groupFromNetId ExileClientPartyID);
  651. };
  652. if !(isNull ExileClientLastDiedPlayerObject) then
  653. {
  654. [ExileClientLastDiedPlayerObject] joinSilent (createGroup independent);
  655. };
  656. if(ExileClientPlayerIsBambi)then
  657. {
  658. [ExileClientEndBambiStateThread] call ExileClient_system_thread_removeTask;
  659. ExileClientPlayerBambiStateExpiresAt = time + _bambitimer;
  660. true call ExileClient_gui_hud_toggleBambiIcon;
  661. ExileClientEndBambiStateThread = [_bambitimer, ExileClient_object_player_bambiStateEnd, [], true] call ExileClient_system_thread_addTask;
  662. };
  663.  
  664. _layer = 'BIS_fnc_respawnCounter' call bis_fnc_rscLayer;
  665. _layer cutText ['', 'plain'];
  666. if !(ExileClientBleedOutThread isEqualTo -1) then
  667. {
  668. [ExileClientBleedOutThread] call ExileClient_system_thread_removeTask;
  669. ExileClientBleedOutThread = -1;
  670. };
  671. cutText['', 'BLACK IN',3];
  672. titleText['', 'BLACK IN',3];
  673. true call ExileClient_gui_hud_toggle;
  674. ExileClientLoadedIn = true;
  675. showChat true;
  676. setGroupIconsVisible [true, true];
  677. if(userInputDisabled)then{disableUserInput false;};
  678. },
  679. _targetID,
  680. false
  681. ] call FN_infiSTAR_S;
  682.  
  683. _sessionId = call ExileServer_system_session_createId;
  684. ExileSessionIDs pushBack _sessionId;
  685. [_sessionID, _newUnit] call ExileServer_system_session_update;
  686. _newUnit setPos _pos;
  687. _newUnit setDir _direction;
  688. _newUnit call ExileServer_object_player_database_update;
  689.  
  690.  
  691.  
  692. _weaponholder = nearestObject [_target, 'WeaponHolderSimulated'];
  693. if(!isNull _weaponholder)then
  694. {
  695. _weaponsItemsCargo = weaponsItemsCargo _weaponholder;
  696. if(count _weaponsItemsCargo > 0)then
  697. {
  698. _weaponsItemsCargo = _weaponsItemsCargo select 0;
  699.  
  700. {
  701. if(_x isEqualType '')then
  702. {
  703. _target addweapon _x;
  704. _target addPrimaryWeaponItem _x;
  705. }
  706. else
  707. {
  708. _target addMagazine _x;
  709. };
  710. } forEach _weaponsItemsCargo;
  711. };
  712. deleteVehicle _weaponholder;
  713. };
  714.  
  715.  
  716. [
  717. [
  718. _target,
  719. _newUnit,
  720. getUnitLoadout _target
  721. ],
  722. {
  723. params[['_target',objNull],['_newUnit',objNull],['_loadout',[]]];
  724. if(!isNull _target)then{ deleteVehicle _target; };
  725. if(!isNull _newUnit)then{
  726. if!(_loadout isEqualTo [])then
  727. {
  728. _newUnit setUnitLoadout _loadout;
  729. };
  730. };
  731. },
  732. _targetID,
  733. false
  734. ] call FN_infiSTAR_S;
  735. deleteVehicle _target;
  736. };
  737.  
  738.  
  739. if(_block_glitch_actions || _wall_glitch_object || _wall_glitch_vehicle)then{
  740. fnc_check_if_enemy_base = compileFinal "
  741. if(isNil'last_check_if_enemy_base')then{last_check_if_enemy_base=0;};
  742. if(isNil'last_ret_check_if_enemy_base')then{last_ret_check_if_enemy_base=true;};
  743. if(last_check_if_enemy_base < diag_tickTime)then
  744. {
  745. _ret = call {
  746. _flags = player nearObjects ['Exile_Construction_Flag_Static', 90];
  747. if(_flags isEqualTo [])exitWith{false};
  748.  
  749. _grp = group player;
  750. _groupID = groupID _grp;
  751.  
  752. _uids = [getPlayerUID player];
  753. if!(_groupID isEqualTo '')then
  754. {
  755. {
  756. _xuid = getPlayerUID _x;
  757. if!(_xuid isEqualTo '')then
  758. {
  759. _uids pushBackUnique _xuid;
  760. };
  761. } forEach (units _grp);
  762. };
  763.  
  764. scopeName 'MAIN_FLAG';
  765. _val = true;
  766. {
  767. _flag = _x;
  768. _flagStolen = _flag getvariable ['ExileFlagStolen',-999];
  769. if(_flagStolen isEqualTo 1)exitWith{_val = false;breakTo 'MAIN_FLAG';};
  770.  
  771. _radius = _flag getVariable['ExileTerritorySize', 15];
  772. if((player distance _flag) < _radius)then
  773. {
  774. _buildRights = _flag getVariable['ExileTerritoryBuildRights', []];
  775. {
  776. if(_x in _buildRights)exitWith
  777. {
  778. _val = false;breakTo 'MAIN_FLAG';
  779. };
  780. } forEach _uids;
  781. };
  782. } forEach _flags;
  783. _val
  784. };
  785. last_check_if_enemy_base = diag_tickTime + 10;
  786. last_ret_check_if_enemy_base = _ret;
  787. _ret
  788. }
  789. else
  790. {
  791. last_ret_check_if_enemy_base
  792. };
  793. ";
  794. publicVariable "fnc_check_if_enemy_base";
  795. };
  796.  
  797. _ryanzombies = !(getArray(configfile >> 'CfgPatches' >> 'Ryanzombies' >> 'units') isEqualTo []);
  798.  
  799.  
  800.  
  801. fnc_debugbox_new = {
  802. #include "debug.sqf"
  803. };
  804. diag_log format["<infiSTAR.de> %1 - STARTUP - including AdminTools",time];
  805. #include "EXILE_AT.sqf"
  806. diag_log format["<infiSTAR.de> %1 - STARTUP - AdminTools included!",time];
  807. diag_log format["<infiSTAR.de> %1 - STARTUP - including AntiHack",time];
  808. #include "EXILE_AH.sqf"
  809. diag_log format["<infiSTAR.de> %1 - STARTUP - AntiHack included!",time];
  810. comment "Antihack & AdminTools - Christian Lorenzen - www.infiSTAR.de";
  811. true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement