From 8cc9c1f58880467372ae3edc526e48579800659c Mon Sep 17 00:00:00 2001 From: fallingsheep Date: Mon, 9 Feb 2015 20:06:49 +1100 Subject: [PATCH] NEW admin tool and antihack --- MPMissions/epoch.Altis/adminmenu/A3AH.sqf | 1714 ++++++++++++ MPMissions/epoch.Altis/adminmenu/A3AT.sqf | 2870 +++++++++++++++++++++ MPMissions/epoch.Altis/adminmenu/run.sqf | 175 ++ MPMissions/epoch.Altis/init.sqf | 38 +- 4 files changed, 4787 insertions(+), 10 deletions(-) create mode 100644 MPMissions/epoch.Altis/adminmenu/A3AH.sqf create mode 100644 MPMissions/epoch.Altis/adminmenu/A3AT.sqf create mode 100644 MPMissions/epoch.Altis/adminmenu/run.sqf diff --git a/MPMissions/epoch.Altis/adminmenu/A3AH.sqf b/MPMissions/epoch.Altis/adminmenu/A3AH.sqf new file mode 100644 index 0000000..fbf3320 --- /dev/null +++ b/MPMissions/epoch.Altis/adminmenu/A3AH.sqf @@ -0,0 +1,1714 @@ +VERSION = '26-10-2014 Bob.de AHAT 0006';diag_log format['Bob.de VERSION: %1',VERSION]; +diag_log format['Bob.de %1 - STARTING',diag_tickTime]; + +if ((preProcessFileLineNumbers ('blacklist.sqf')) != '') then { + _tmpBL = call compile preProcessFileLineNumbers 'blacklist.sqf'; + if (!isNil '_tmpBL') then + { + if (typeName _tmpBL == 'ARRAY') then + { + if (str _tmpBL != '[]') then + { + _BlackList = _BlackList + _tmpBL; + }; + }; + }; +}; +_fnc_RandomGen = +{ + _arr = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','1','2','3','4']; + _gen = 'A3RANDVAR'; + for '_i' from 1 to 6 do {_gen = _gen + (_arr select (random ((count _arr)-1)));}; + _gen = _gen + '_' + _gen; + _gen +};diag_log format['Bob.de - _fnc_RandomGen: %1',_fnc_RandomGen]; +_randvar3 = call _fnc_RandomGen;diag_log format['Bob.de - _randvar3: %1',_randvar3]; +_AH_MAIN_BLOCK = call _fnc_RandomGen;diag_log format['Bob.de - _AH_MAIN_BLOCK: %1',_AH_MAIN_BLOCK]; +_RunOnClients = call _fnc_RandomGen;diag_log format['Bob.de - _RunOnClients: %1',_RunOnClients]; +_AHrunCheck = call _fnc_RandomGen;diag_log format['Bob.de - _AHrunCheck: %1',_AHrunCheck]; +_AH_AnnounceAdmin = call _fnc_RandomGen;diag_log format['Bob.de - _AH_AnnounceAdmin: %1',_AH_AnnounceAdmin]; +_AHKickOFF = call _fnc_RandomGen;diag_log format['Bob.de - _AHKickOFF: %1',_AHKickOFF]; +_AH_RunCheck = call _fnc_RandomGen;diag_log format['Bob.de - _AH_RunCheck: %1',_AH_RunCheck]; +_AH_RunCheck2 = call _fnc_RandomGen;diag_log format['Bob.de - _AH_RunCheck2: %1',_AH_RunCheck2]; +_FiredCheck = call _fnc_RandomGen;diag_log format['Bob.de - _FiredCheck: %1',_FiredCheck]; +_TMPBAN = call _fnc_RandomGen;diag_log format['Bob.de - _TMPBAN: %1',_TMPBAN]; +_randvar29 = call _fnc_RandomGen;diag_log format['Bob.de - _randvar29: %1',_randvar29]; +_randvar30 = call _fnc_RandomGen;diag_log format['Bob.de - _randvar30: %1',_randvar30]; +_massMessage = call _fnc_RandomGen;diag_log format['Bob.de - _massMessage: %1',_massMessage]; +_AHpos = call _fnc_RandomGen;diag_log format['Bob.de - _AHpos: %1',_AHpos]; +_adjust = call _fnc_RandomGen;diag_log format['Bob.de - _adjust: %1',_adjust]; +_fnc_RandomGen = +{ + _arr = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']; + _gen = 'PVAHR_0_'; + for '_i' from 1 to 6 do {_gen = _gen + (_arr select (random ((count _arr)-1)));}; + _gen = _gen + '_' + _gen; + _gen +}; +_AH_KICKLOG = call _fnc_RandomGen;diag_log format['Bob.de - _AH_KICKLOG: %1',_AH_KICKLOG]; +diag_log format['Bob.de %1 - loading AntiHack..',diag_tickTime]; +_CE0 = toArray (getText(configFile >> 'RscDisplayDSinterface' >> 'onLoad')); +_CE1 = toArray (getText(configFile >> 'RscDisplayOptionsVideo' >> 'onLoad')); +_CE2 = toArray (getText(configFile >> 'RscDisplayOptionsVideo' >> 'onUnload')); +_CE3 = toArray (getText(configFile >> 'RscDisplayOptionsVideo' >> 'controls' >> 'G_VideoOptionsControls' >> 'controls' >> 'HideAdvanced' >> 'OnButtonClick')); +_CE4 = toArray (getText(configFile >> 'RscDisplayOptions' >> 'controls' >> 'BCredits' >> 'OnButtonClick')); +_CE5 = toArray (getText(configFile >> 'EPOCH_createGroup' >> 'onLoad')); +_toCompilableString = { + _code = _this select 0; + _string = ''; + if(typename _code == 'CODE') then + { + _string = str(_code); + _arr = toArray(_string); + _arr set[0,32]; + _arr set[count(_arr)-1,32]; + _string = toString(_arr); + }; + _string; +}; +LysticCompilableString = compileFinal ([_toCompilableString] call _toCompilableString); +BIS_fnc_MP = compileFinal ([BIS_fnc_MP] call _toCompilableString); +BIS_fnc_spawn = compileFinal ([BIS_fnc_spawn] call _toCompilableString); +BIS_fnc_MPExec = compileFinal ([BIS_fnc_MPExec] call _toCompilableString); +BIS_fnc_getCfgData = compileFinal ([BIS_fnc_getCfgData] call _toCompilableString); +private['_cfgs','_displays','_selected']; +_displays = ['RscDisplayInventory','RscDisplayMainMap','RscDisplayDiary','RscDisplayOptions', +'RscDisplayGetReady','RscDisplayOptionsVideo','RscDisplayOptionsAudio', +'RscDisplayOptionsLayout','RscDisplayMicSensitivityOptions','RscDisplayConfigure', +'RscDisplayConfigureControllers','RscDisplayCustomizeController','RscDisplayJoystickSchemes', +'RscDisplayConfigureAction','RscDisplayGameOptions','RscMiniMap','RscMiniMapSmall', +'RscDisplayControlSchemes','RscDisplayFieldManual','RscDisplayPassword', +'RscDisplayPassword','RscDisplayServerGetReady','RscDisplayClientGetReady', +'RscDisplayRespawn','RscDisplayLoading','RscDisplayStart','RscDisplayClient']; +_selected = (count _displays) - 1; +_cfgs = []; +for '_i' from 0 to _selected do +{ + _cfgs = _cfgs + [(compile((configfile >> (_displays select _i) >> 'onLoad') call BIS_fnc_getCfgData))]; + _cfgs = _cfgs + [(compile((configfile >> (_displays select _i) >> 'onUnload') call BIS_fnc_getCfgData))]; +}; +CESCANARRAY = compileFinal (str(_cfgs)); +publicVariable 'CESCANARRAY'; +_devs = ADMIN_LIST;{if !(_x in _admins) then {_admins = _admins + [_x];};} forEach _devs; +call compile (" + "+_AH_MAIN_BLOCK+" = { + if (str(player) == '') then + { + _log = 'Player is '; + "+_AH_KICKLOG+" = [_name,_puid,'BAN',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + [] spawn {uiSleep 0.1;['Bob.de',false,false] spawn KickOFF;};[] spawn "+_AHKickOFF+"; + }; + if (isNil '"+_AH_RunCheck+"') then {"+_AH_RunCheck+" = [];} else {if (typeName "+_AH_RunCheck+" != 'ARRAY') then {"+_AH_RunCheck+" = [];};}; + if !(_puid in _admins) then + { + [_name,_puid] spawn { + _name = _this select 0; + _puid = _this select 1; + uiSleep 15; + if (isNil '"+_AH_RunCheck+"') then {"+_AH_RunCheck+" = [];} else {if (typeName "+_AH_RunCheck+" != 'ARRAY') then {"+_AH_RunCheck+" = [];};}; + _status = "+_AH_RunCheck+"; + for '_i' from 0 to 8 do + { + if !(_i in _status) then + { + if (str _status == '[]') then + { + _status = '- Not loaded at all..!'; + }; + _log = format['AntiHack RunCheck Error - %1 not Loaded! %2',_i,_status]; + "+_AH_KICKLOG+" = [_name,_puid,'BAN',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + (findDisplay 46) closeDisplay 0; + }; + }; + }; + }; + if !(0 in "+_AH_RunCheck+") then + { + [_name,_puid] spawn { + _name = _this select 0; + _puid = _this select 1; + disableSerialization; + while {1 == 1} do + { + _display49 = findDisplay 49; + if (!isNull _display49) then + { + { + _btn = _display49 displayCtrl _x; + if (!isNull _btn) then + { + _btn ctrlSetText 'Bob.de AntiHack & AdminTools'; + _btn ctrlEnable false; + _btn buttonSetAction ''; + _btn ctrlCommit 0; + }; + } forEach [16700,2]; + (_display49 displayCtrl 103) ctrlEnable false; + (_display49 displayCtrl 103) ctrlSetText 'by Bob.de'; + (_display49 displayCtrl 122) ctrlEnable false; + (_display49 displayCtrl 122) ctrlShow false; + (_display49 displayCtrl 523) ctrlSetText 'Bob.de'; + }; + _display24 = findDisplay 24; + if (!isNull _display24) then + { + _chat = _display24 displayCtrl 101; + _txt = ctrlText _chat; + if (_txt != '') then + { + _txtArray = toArray _txt; + if ((_txtArray select 0) in [44,36,37,38,92,124,194,176,45,95,60,62]) then {_chat ctrlSetText '';}; + _txt = toLower _txt; + if ("+str _VDN+") then + { + if (_txt in ['!vote day','/vote day','vote day']) then + { + (_display24) closeDisplay 0; + "+_AH_KICKLOG+" = [_name,_puid,'VOTE',toArray 'DAY'];publicVariableServer '"+_AH_KICKLOG+"'; + }; + if (_txt in ['!vote night','/vote night','vote night']) then + { + (_display24) closeDisplay 0; + "+_AH_KICKLOG+" = [_name,_puid,'VOTE',toArray 'NIGHT'];publicVariableServer '"+_AH_KICKLOG+"'; + }; + }; + }; + }; + if ((isNull _display49) && (isNull _display24)) then + { + uiSleep 0.2; + }; + }; + }; + "+_AH_RunCheck+" = "+_AH_RunCheck+" + [0]; + }; + if (isNil '"+_TMPBAN+"') then {"+_TMPBAN+" = [];} else {if (typeName "+_TMPBAN+" != 'ARRAY') then {"+_TMPBAN+" = [];};}; + if (_puid in _admins) exitWith {PVAH_AHTMPBAN = "+_TMPBAN+";'"+_TMPBAN+"' addpublicVariableEventhandler {PVAH_AHTMPBAN = _this select 1;};}; + if (_puid in "+str _BlackList+") then + { + [] spawn {uiSleep 0.1;['Bob.de',false,false] spawn KickOFF;};[] spawn "+_AHKickOFF+"; + }; + if (_puid in "+_TMPBAN+") then + { + [] spawn {uiSleep 0.1;['Bob.de',false,false] spawn KickOFF;};[] spawn "+_AHKickOFF+"; + }; + if !(1 in "+_AH_RunCheck+") then + { + [_name,_puid] spawn { + _name = _this select 0; + _puid = _this select 1; + "+_FiredCheck+" = + { + _cwep = _this select 1; + _muzzle = _this select 4; + _proojectile = _this select 6; + _cmag = currentMagazine player; + _camm = player ammo _cwep; + if (_muzzle in "+str _ForbiddenAmmo+") then + { + _log = format['ForbiddenAmmo: %1 with weapon %2',_muzzle,_cwep]; + "+_AH_KICKLOG+" = [name player,getPlayerUID player,'BAN',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + [] spawn {uiSleep 0.1;['Bob.de',false,false] spawn KickOFF;};[] spawn "+_AHKickOFF+"; + }; + if (!(_cwep in ['','Throw','Flare','Put']) && !(_proojectile in ['','PipeBomb']) && (player == vehicle player)) then + { + _cfgmuzzle = getText(configFile >> 'CfgMagazines' >> _cmag >> 'ammo'); + if (_muzzle != _cfgmuzzle) then + { + player removeMagazines _cmag; + player removeWeapon _cwep; + + _smuzzle = toArray _muzzle; + if (count _smuzzle > 6) then {_smuzzle resize 6;}; + _smuzzle = toString _smuzzle; + if !(_smuzzle in ['F_40mm','G_40mm','spear_']) then + { + _log = format['BadMuzzle: %1 with weapon %2',_muzzle,_cwep]; + "+_AH_KICKLOG+" = [name player,getPlayerUID player,'BAN',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + [] spawn {uiSleep 0.1;['Bob.de',false,false] spawn KickOFF;};[] spawn "+_AHKickOFF+"; + }; + }; + + _maxAmmo = getNumber (configFile >> 'CfgMagazines' >> _cmag >> 'count'); + if (_maxAmmo > 1) then + { + [_maxAmmo,_cwep] spawn { + uiSleep 0.2; + _maxAmmo = _this select 0; + _cwep = _this select 1; + _cmag = currentMagazine player; + _camm = player ammo _cwep; + if (_camm >= _maxAmmo) then + { + player removeMagazine _cmag; + _log = format['No Ammo Loss - Removed Current Magazine: %1 %2 %3 %4',_cwep,_cmag,_camm,_maxAmmo]; + "+_AH_KICKLOG+" = [name player,getPlayerUID player,'BAN',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + [] spawn {uiSleep 0.1;['Bob.de',false,false] spawn KickOFF;};[] spawn "+_AHKickOFF+"; + }; + }; + }; + }; + true + }; + disableSerialization; + while {1 == 1} do + { + _map = ((findDisplay 12) displayCtrl 51); + _map ctrlRemoveAllEventHandlers 'MouseButtonDown'; + _map ctrlRemoveAllEventHandlers 'MouseButtonUp'; + _map ctrlRemoveAllEventHandlers 'Draw'; + { + if !(isNull (findDisplay _x)) then + { + if (_x in [49,129]) then + { + (findDisplay _x) displayRemoveAllEventHandlers 'MouseZChanged'; + (findDisplay _x) displayRemoveAllEventHandlers 'KeyPress'; + (findDisplay _x) displayRemoveAllEventHandlers 'mousemoving'; + (findDisplay _x) displayRemoveAllEventHandlers 'mouseholding'; + (findDisplay _x) displayRemoveAllEventHandlers 'onMouseZChanged'; + }; + if !(_x in [-1,106]) then + { + (findDisplay _x) displayRemoveAllEventHandlers 'MouseButtonDown'; + (findDisplay _x) displayRemoveAllEventHandlers 'MouseButtonUp'; + }; + (findDisplay _x) displayRemoveAllEventHandlers 'KeyDown'; + (findDisplay _x) displayRemoveAllEventHandlers 'KeyUp'; + }; + } forEach [-1,12,18,49,106,129]; + _display46 = (findDisplay 46); + if (!isNull _display46) then + { + _display46 displayRemoveAllEventHandlers 'MouseButtonDown'; + _display46 displayRemoveAllEventHandlers 'MouseButtonUp'; + _display46 displayRemoveAllEventHandlers 'MouseZChanged'; + _display46 displayRemoveAllEventHandlers 'KeyPress'; + _display46 displayRemoveAllEventHandlers 'KeyDown'; + _display46 displayRemoveAllEventHandlers 'KeyUp'; + _display46 displayRemoveAllEventHandlers 'onMouseZChanged'; + _display46 displayRemoveAllEventHandlers 'mousemoving'; + _display46 displayRemoveAllEventHandlers 'mouseholding'; + if (isNil 'life_fnc_keyHandler') then {life_fnc_keyHandler = {};} else {if (typeName life_fnc_keyHandler != 'CODE') then {life_fnc_keyHandler = {};};_display46 displayAddEventHandler ['KeyDown','_this call life_fnc_keyHandler;'];}; + if (isNil 'EPOCH_KeyDown') then {EPOCH_KeyDown = {};} else {if (typeName EPOCH_KeyDown != 'CODE') then {EPOCH_KeyDown = {};};_display46 displayAddEventHandler ['KeyDown','_this call EPOCH_KeyDown;'];}; + }; + if (str(unitRecoilCoefficient player) != str(1)) then + { + _log = 'unitRecoilCoefficient Changed!'; + "+_AH_KICKLOG+" = [_name,_puid,'BAN',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + [] spawn {uiSleep 0.1;['Bob.de',false,false] spawn KickOFF;};[] spawn "+_AHKickOFF+"; + }; + vehicle player setUnitRecoilCoefficient 1; + player setUnitRecoilCoefficient 1; + uiSleep 0.1; + player removeAllEventhandlers 'Hit'; + player removeAllEventhandlers 'Dammaged'; + player removeAllEventhandlers 'Damaged'; + player removeAllEventHandlers 'Take'; + player removeAllEventHandlers 'Respawn'; + player removeAllEventHandlers 'Fired'; + player removeAllEventhandlers 'HandleDamage'; + player removeAllEventHandlers 'Killed'; + player addEventHandler ['Fired',{_this call "+_FiredCheck+"}]; + if (!isNil 'EPOCH_KeyDown') then + { + player addEventHandler ['Fired',{_this call EPOCH_fnc_playerFired}]; + player addEventHandler ['HandleDamage',{}]; + player addEventHandler ['Killed', {_this call EPOCH_fnc_playerDeath}]; + player removeAllEventHandlers 'Put'; + player addEventHandler ['Respawn', { (_this select 0) call EPOCH_clientRespawn }]; + player addEventHandler ['Put', {(_this select 1) call EPOCH_interact; _this call EPOCH_PutHandler}]; + player addEventHandler ['Take', {(_this select 1) call EPOCH_interact; _this call EPOCH_UnisexCheck}]; + _addCase = addMissionEventHandler ['Draw3D', {}]; + removeMissionEventHandler ['Draw3D',0]; + if (_addCase > 0) then + { + _log = format['MEH Draw3D: %1',_addCase]; + "+_AH_KICKLOG+" = [_name,_puid,'BAN',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + [] spawn {uiSleep 0.1;['Bob.de',false,false] spawn KickOFF;};[] spawn "+_AHKickOFF+"; + }; + }; + if (!isNil 'life_adminlevel') then + { + player removeAllEventhandlers 'InventoryClosed'; + player removeAllEventhandlers 'InventoryOpened'; + player addEventHandler['HandleDamage',{_this call life_fnc_HandleDamage;}]; + player addEventHandler['Killed', {_this spawn life_fnc_onPlayerKilled}]; + player addEventHandler['Respawn', {_this call life_fnc_onPlayerRespawn}]; + player addEventHandler['Take',{_this call life_fnc_onTakeItem}]; + player addEventHandler['Fired',{_this call life_fnc_onFired}]; + player addEventHandler['InventoryClosed', {_this call life_fnc_inventoryClosed}]; + player addEventHandler['InventoryOpened', {_this call life_fnc_inventoryOpened}]; + }; + }; + }; + "+_AH_RunCheck+" = "+_AH_RunCheck+" + [1]; + }; + if !(2 in "+_AH_RunCheck+") then + { + [_name,_puid] spawn { + _name = _this select 0; + _puid = _this select 1; + _badDialogsClose = "+str _badDialogsClose+"; + _badDialogsBAN = "+str _badDialogsBAN+"; + _allowedDialogs = "+str _allowedDialogs+"; + while {1 == 1} do + { + { + if (!isNull (_x select 0)) then + { + _log = _x select 1; + "+_AH_KICKLOG+" = [_name,_puid,'BAN',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + [] spawn {uiSleep 0.1;['Bob.de',false,false] spawn KickOFF;};[] spawn "+_AHKickOFF+"; + closeDialog 0; + }; + } forEach [ + [(findDisplay 64) displayCtrl 101,'MenuBasedHack_DISPLAY_64_C_101'], + [(findDisplay 64) displayCtrl 1002,'MenuBasedHack_DISPLAY_64_C_1002'], + [(findDisplay 49) displayCtrl 0,'MenuBasedHack_DISPLAY_49_C_0'], + [uiNamespace getVariable 'RscDisplayDebugPublic','MenuBasedHack_RscDisplayDebugPublic'], + [uiNamespace getVariable 'RscDisplayRemoteMissions','MenuBasedHack_RscDisplayRemoteMissions'], + [uiNamespace getVariable 'RscDisplayArsenal','MenuBasedHack_RscDisplayArsenal'], + [missionnamespace getvariable 'BIS_fnc_showNotification_queue','MenuBasedHack_showNotification'] + ]; + if (!isNull (findDisplay 148)) then + { + if ((lbSize 104)-1 > 3) then + { + _log = 'MenuBasedHack_MenuBasedHack_RscDisplayConfigureControllers'; + "+_AH_KICKLOG+" = [_name,_puid,'BAN',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + [] spawn {uiSleep 0.1;['Bob.de',false,false] spawn KickOFF;};[] spawn "+_AHKickOFF+"; + closeDialog 0; + }; + }; + if (!isNull (uiNamespace getVariable 'RscDisplayInsertMarker')) then + { + _action = buttonAction 1; + _action2 = buttonAction 2; + _title = ctrlText 1001; + if(_action != '' OR _title != localize '$STR_A3_RscDisplayInsertMarker_Title' OR _action2 != '') then + { + _log = 'MenuBasedHack_RscDisplayInsertMarker'; + "+_AH_KICKLOG+" = [_name,_puid,'BAN',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + [] spawn {uiSleep 0.1;['Bob.de',false,false] spawn KickOFF;};[] spawn "+_AHKickOFF+"; + closeDialog 0; + }; + }; + if (!isNull (uiNamespace getVariable 'RscDisplayConfigureAction')) then + { + (findDisplay 131) displayCtrl 102 ctrlRemoveallEVenthandlers 'LBDblClick'; + (findDisplay 131) displayCtrl 102 ctrlRemoveallEVenthandlers 'LBSelChanged'; + _actions = [buttonAction 1, buttonAction 107, buttonAction 104, buttonAction 106, buttonAction 109, buttonAction 105, buttonAction 108]; + _title = ctrlText 1000; + if(_title != localize '$STR_A3_RscDisplayConfigureAction_Title') exitWith { + _log = 'MenuBasedHack_RscDisplayConfigureAction'; + "+_AH_KICKLOG+" = [_name,_puid,'BAN',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + [] spawn {uiSleep 0.1;['Bob.de',false,false] spawn KickOFF;};[] spawn "+_AHKickOFF+"; + closeDialog 0; + }; + { + if(_x != '') exitWith { + _log = 'MenuBasedHack_RscDisplayConfigureAction'; + "+_AH_KICKLOG+" = [_name,_puid,'BAN',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + [] spawn {uiSleep 0.1;['Bob.de',false,false] spawn KickOFF;};[] spawn "+_AHKickOFF+"; + closeDialog 0; + }; + } foreach _actions; + }; + _fbd = 'no';{if (!isNull (findDisplay _x)) exitWith {_fbd = str _x;};} forEach _badDialogsBAN; + if (_fbd != 'no') then + { + _log = format['MenuBasedHack_DISPLAY_%1',_fbd]; + "+_AH_KICKLOG+" = [_name,_puid,'BAN',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + [] spawn {uiSleep 0.1;['Bob.de',false,false] spawn KickOFF;};[] spawn "+_AHKickOFF+"; + closeDialog 0; + }; + {if (!isNull (findDisplay _x)) then {(findDisplay _x) closeDisplay 0;closeDialog 0;};} forEach _badDialogsClose; + if ("+str _UDW+") then + { + _checkAllowed = _allowedDialogs; + if (!isNil 'EPOCH_KeyDown') then + { + _checkAllowed = _allowedDialogs + [300,303,-666,-1200,-1300,-1400,419999,420001,420002,420003,420004,420005,420006]; + }; + if (!isNil 'life_adminlevel') then + { + _checkAllowed = _allowedDialogs + [2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2300,2400,2520,2600,2620,2650,2700,2800,2900,3000,3100,3500,7300,37400,38200,38300,38400,38500,39400]; + }; + _break = true; + {if (!isNull (findDisplay _x)) exitWith {_break = false;};} forEach _checkAllowed; + if (_break) then {closeDialog 0;closeDialog 0;closeDialog 0;}; + }; + uiSleep 0.25; + }; + }; + [_name,_puid,_admins] spawn { + _name = _this select 0; + _puid = _this select 1; + _admins = _this select 2; + if (isNil 'life_cash') then {life_cash = 0;};_life_cash = 0; + if (isNil 'life_atmcash') then {life_atmcash = 0;};_life_atmcash = 0; + while {1 == 1} do + { + if (!isNil 'life_adminlevel') then + { + if (typeName life_adminlevel == 'SCALAR') then + { + if (life_adminlevel > 0) then + { + _log = format['life_adminlevel: %1',life_adminlevel]; + "+_AH_KICKLOG+" = [_name,_puid,'BAN',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + [] spawn {uiSleep 0.1;['Bob.de',false,false] spawn KickOFF;};[] spawn "+_AHKickOFF+"; + closeDialog 0; + }; + }; + }; + _life_cash = life_cash; + _life_atmcash = life_atmcash; + + uiSleep 2; + + _one = life_cash+life_atmcash; + _two = _life_cash+_life_atmcash; + if (_one > (_two + 100000)) then + { + _log = format['life_cash+life_atmcash increased from %1 to %2 within 2seconds..',_one,_two]; + "+_AH_KICKLOG+" = [_name,_puid,'HLOG',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + }; + + { + if (!isNull _x) then {(vehicle player) enableCollisionWith _x;removeAllActions _x;}; + true; + } count ((vehicle player) nearObjects 30); + + { + if (!isNull _x) then {if (isPlayer _x) then {if !(getPlayerUID _x in _admins) then {_x hideObject false;};};}; + true; + } count (vehicle player nearEntities ['AllVehicles',150]); + }; + }; + "+_AH_RunCheck+" = "+_AH_RunCheck+" + [2]; + }; + if !(3 in "+_AH_RunCheck+") then + { + [_name,_puid] spawn { + _name = _this select 0; + _puid = _this select 1; + _badVariables = + [ + 'typeName','lbClear','closedialog','startloadingscreen','endLoadingScreen','findDisplay','setposATL','getPos','to', + 'closeDisplay','getPlayerUID','publicVariableServer','setPos','toArray','setposASL','getPosASL','allowDamage', + 'endMission','str','isNil','diag_log','format','removeMagazines','getPosATL','from','ctrlEnabled','uiNameSpace', + 'removeMagazine','failMission','diag_ticktime','publicvariable','profileNamespace','for','toString','resize','toLower', + 'displayRemoveAllEventHandlers','ctrlRemoveAllEventHandlers','removeWeapon','&&','||','removeAction','in','spawn', + 'do','displayCtrl','player','select','saveProfileNamespace','exitWith','or','and','visibleMap','uiSleep','alive', + 'isNull','typeOf','distance','true','false','isDedicated','unitRecoilCoefficient','call','setunitRecoilCoefficient', + 'waitUntil','speed','while','if','isServer','then','primaryWeapon','unitBackpack','magazines','weapons','getMagazineCargo', + 'getWeaponCargo','isPlayer','dialog','disableSerialization','count','ctrlSetText','ctrlText','systemChat','commandingMenu', + 'showcommandingMenu','disableUserInput','diag_tickTime','local','forEach','nearEntities','round','onEachFrame','a','imgoingnukeyou', + 'Status_BB','TZ_BB_A3','TZ_BB_KB_Hint','TZ_BB_BindHandler','AH_BRAZZERS_TZ_BB','kamakazi_lystic','fuckfest','LYSTIC_MENU_LOADED','D_AMEZ_COA', + 'Intro','Repair','Heal','Cash','T3le','TNK','I_like_turtles','BIGM','GMod','E3p','Does_Tonic_Like_to_take_Turtle_penis_in_the_ass_LODESTARS', + 'lel','vars','PSwap','toLower_new','BCast','thfile','tlmadminrq','BobBLACK','name','carepkg','scrollAim','BlurExec','sbpc','CALLRE', + 'quake','menu_run','ZedProtect','actid1','vehicles1','MapClicked','MapClickedPosX','MouseUpEvent','scrollPlayerlist','keypress_xxx','D_AMEZ_COA', + 'envi','G_A_N_G_S_T_A','ZoombiesCar','timebypass','returnString_z','isori','tangrowth27','PVAH_AdminRequest','AH_OFF_LOL','b','Bob_fillRE', + 'qwak','infoe','font','title_dialog','sexymenu_adds_Star','boolean_1','initre337','skype_option','bleh','magnetomortal','fnc_allunits','sbp', + 'PV_IAdminMenuCode','PVAH_WriteLogRequest','skype_img','Lhacks','Lpic','LtToTheRacker','Lexstr','take1','Called','epochExec','sdgff4535hfgvcxghn', + 'adadawer24_1337','fsdddInfectLOL','W_O_O_K_I_E_Car_RE','kW_O_O_K_I_E_Go_Fast','epchDeleted','lystobindkeys','lystoKeypress', + 'toggle_1','shiftMenu','dbClicked','b_loop','re_loop','v_bowen','bowen','melee_startAttack','asdasdasd','antihax2','PV_AdminMenuCode','AdminLoadOK', + 'AdminLoadOKAY','PV_TMPBAN','T_o_g_g_l_e_BB','fixMenu','PV_AdminMenuCodee','AdminPlayer','PVAH_AdminRequestVariable','epochBackpack','JME_Red', + 'JME_MENU_Sub','JME_menu_title','JME_Sub','JME_OPTIONS','god','heal','grass','fatguybeingchasedbyalion','night','day','infammo','nvg','thermal', + 'Keybinds','fredtargetkill','loopfredtpyoutome','epochTp','AdminLst','BB_Pr0_Esp','BBProEsp','epochMapMP','CALLRESVR', + 'adminlite','adminlitez','antihacklite','bp','inSub','scroll_m_init_star','markerCount','zombies','startmenu_star','LystoDone','MOD_EPOCH', + 'Admin_Lite_Menu','admingod','adminESPicons','fnc_MapIcons_Bob','BIS_MPF_remoteExecutionServer4','adminadd','shnext','Bob_fill_Weapons', + 'adminZedshld','adminAntiAggro','admin_vehicleboost','admin_low_terrain','admin_debug','admincrate','exstr','nlist','PV_AdminMainCode','TPCOUNTER', + 'PVDZ_Hangender','fn_filter','vehiList','Remexec_Bitch','zeus_star','igodokxtt','tmmenu','AntihackScrollwheel','survcam','infiniteammo','PVAH_AHTEMPBAN', + 'lalf','toggle','iammox','telep','dayzlogin3','dayzlogin4','changeBITCHinstantly','antiAggro_zeds','BigFuckinBullets','abcdefGEH','adminicons', + 'fn_esp','aW5maVNUQVI_re_1','passcheck','isInSub','qodmotmizngoasdommy','ozpswhyx','xdistance','wiglegsuckscock','diz_is_real__i_n_f_i_S_T_A_R', + 'pic','veh','unitList','list_wrecked','addgun','ESP','BIS_fnc_3dCredits_n','dayzforce_save','ViLayer','blackhawk_sex','activeITEMlist','items1', + 'adgnafgnasfnadfgnafgn','Metallica_Bob_hax_toggled','activeITEMlistanzahl','xyzaa','iBeFlying','rem','DAYZ_CA1_Lollipops','HMDIR','vehC', + 'HDIR','carg0d','init_Fncvwr_menu_star','altstate','black1ist','ARGT_JUMP','ARGT_KEYDOWN','ARGT_JUMP_w','ARGT_JUMP_a','bpmenu','color_black', + 'p','fffffffffff','markPos','pos','TentS','VL','MV','monky','qopfkqpofqk','monkytp','pbx','nametagThread','spawnmenu','sceptile15','sandshrew', + 'mk2','i','j','v','fuckmegrandma','mehatingjews','TTT5OptionNR','zombieDistanceScreen','cargodz','R3m0te_RATSifni','wepmenu','admin_d0','RAINBOWREMEXECVEH', + 'omgwtfbbq','namePlayer','thingtoattachto','HaxSmokeOn','testIndex','g0d','spawnvehicles_star','kill_all_star','sCode','dklilawedve','peter_so_fly_CUS', + 'selecteditem','moptions','delaymenu','gluemenu','g0dmode','cargod','Bob_fillHax','itemmenu','gmadmin','fapEsp','mapclick', + 'spawnweapons1','abcd','skinmenu','playericons','changebackpack','keymenu','godall','theKeyControl','Bob_FILLPLAYER','whitelist','pfEpochTele', + 'custom_clothing','img','surrmenu','footSpeedIndex','ctrl_onKeyDown','plrshldblcklst','DEV_ConsoleOpen','executeglobal','cursoresp','Asdf','planeGroup', + 'teepee','spwnwpn','musekeys','dontAddToTheArray','morphtoanimals','aesp','LOKI_GUI_Key_Color','Monky_initMenu','tMenu','recon','curPos','pilot', + 'playerDistanceScreen','ihatelife','debugConsoleIndex','MY_KEYDOWN_FNC','pathtoscrdir','Bowen_RANDSTR','ProDayz','idonteven','walrein820','RandomEx', + 'TAG_onKeyDown','changestats','derp123','heel','rangelol','unitsmenu','xZombieBait','plrshldblckls','ARGT_JUMP_s','ARGT_JUMP_d','globalplaya','ALL_MAGS_TO_SEARCH', + 'shnmenu','xtags','pm','lmzsjgnas','vm','bowonkys','glueallnigga','hotkeymenu','Monky_hax_toggled','espfnc','playeresp','zany','dfgjafafsafccccasd', + 'atext','boost','nd','vspeed','Ug8YtyGyvguGF','inv','rspwn','pList','loldami','T','bowonky','aimbott','Admin_Layout','markeresp','allMrk','MakeRandomSpace', + 'helpmenu','godlol','rustlinginit','qofjqpofq','invall','initarr','reinit','byebyezombies','admin_toggled','fn_ProcessDiaryLink','ALexc','DAYZ_CREATEVEHICLE', + 'Monky_funcs_inited','FUK_da_target','damihakeplz','damikeyz_veryhawt','mapopt','hangender','slag','jizz','kkk','ebay_har','sceptile279','TargetPlayer', + 'tell_me_more_Bob','airborne_spawn_vehicle_Bob','sxy_list_stored','advert_SSH','antiantiantiantih4x','Flare8','Flare7','SuperAdmin_MENU', + 'bl4ck1ist','keybinds','actualunit','mark_player','unitList_vec','yo2','actualunit_vec','typeVec','mark','r_menu','hfghfg','vhnlist','work','Intro', + 'yo3','q','yo4','k','cTargetPos','cpbLoops','cpLoopsDelay','Flare','Flare1','Flare2','Flare3','Flare4','Flare5','Flare6','kanghaskhan','palkia', + 'eExec_commmand','cockasdashdioh','fsdandposanpsdaon','antiloop','anti','spawn_explosion_target_ebay','whatisthis4','ratingloop_star','epochRemoteNukeAll', + 'PVAH_admin_rq','PVAH_writelog_rq','sandslash','muk','pidgeotto','charmeleon','pidgey','lapras','LYST1C_UB3R_L33T_Item','MathItem','fapLayer','cooldown', + 'raichu','Bob_chewSTAR_dayz_1','infi_STAR_output','infi_STAR_code_stored','keybindings','keypress','menu_toggle_on','dayz_godmode','aiUnit', + 'MENUTITLE','wierdo','runHack','Dwarden','poalmgoasmzxuhnotx','ealxogmniaxhj','firstrun','ohhpz','fn_genStrFront','shazbot1','cip','Armor1','GMod', + 'kickable','stop','possible','friendlies','hacks','main','mapscanrad','maphalf','DelaySelected','SelectDelay','GlobalSleep','isAdmin','vehD','ALL_WEPS_TO_SEARCH', + 'jopamenu','ggggg','tlm','Listw','toggle_keyEH','infammoON','pu','chute','dayzforce_savex','PVDZ_AdminMenuCode','PVDZ_SUPER_AdminList','DarkwrathBackpack', + 'PVDZ_hackerLog','BP_OnPlayerLogin','material','mapEnabled','markerThread','addedPlayers','playershield','spawnitems1','sceptile27','Proceed_BB', + 'ESPEnabled','wpnbox','fnc_temp','MMYmenu_stored','VMmenu_stored','LVMmenu_stored','BIS_MPF_ServerPersistentCallsArray','PV_CHECK','admin_animate1', + 'patharray','diag_tickTime','ZobieDistanceStat','BobBOTxxx','keyspressed','fT','tpTarget','HumanityVal','yanma','absol','SimpleMapHackCount','keyp', + 'aggron','magazines_spawn','weapons_spawn','backpack_spawn','backpackitem_spawn','keybindings_exec','keypress_exec','MajorHageAssFuckinfBulletsDude', + 'Wannahaveexplosivesforbullets','TheTargetedFuckingPlayerDude','haHaFuckAntiHakcsManIbypasDatShit','aintNoAntiHackCatchMyVars','objMYPlayer', + 'Awwwinvisibilty','vehiclebro','wtfyisthisshithere','terrainchangintime','Stats','menu','ssdfsdhsdfh','onisinfiniteammobra','youwantgodmodebro', + 'yothefuckingplayerishere','Namey','sendmsg12','jkh','DELETE_THIS','move_forward','leftAndRight','forwardAndBackward','upAndDown','distanceFromGround', + 'hoverPos','hovering','bulletcamon','cheatlist','espOn','removegrass','timeday','infammo','norekoil','nocollide','esp2ez','fastwalk','entupautowalk', + 'BensWalker','dropnear','executer','killme','magnetmenu','loadmain','magnet','A11','loadMenu','refreshPlayers','ALREADYRAN','players','BigBenBackpack', + 'sendMessage','newMessage','W34p0ns','amm0','Att4chm3nt','F0od_Dr1nk','M3d1c4l','T0ol_it3ms','B4ckp4cks','It3m5','Cl0th1ng','walkloc','nwaf','cherno', + 'cherno_resident','cherno_resident_2','dubky','oaks','swaf','swmb','getX','PlayerShowDistance','M_e_n_u_2','colorme','keybindloop','Tractor_Time', + 'murkrow','noctowl','isExecuted','piloswine','AddPlayersToMap','markers','miltank','GearAdd','GearRemove','Malvsm','Malcars','malfly','keyForward', + 'PermDialogSelected','TempDialogSelected','AdminDialogList','pfKeygen','pfScanUnits','pfPickPlayer','pfshnext','pfnlist','pfselecteditem','pfshnmenu', + 'pfPlayerMonitor','pfPlayersToMonitor','pfShowPlayerMonitor','pfPlayerMonitorMutex','marker','JJJJ_MMMM___EEEEEEE_INIT_MENU','E_X_T_A_S_Y_Init_Menu', + 'monkaiinsalt','monkaiin','part88','adminKeybinds','PV_DevUIDs','fapEspGroup','Repair','RepairIT','rainbowTarget','rainbowTarget1','rainbowTarget2', + 'rainbowTarget3','letmeknow','VehicleMenue','Menue_Vehicle','my_anus_hurtz','life_no_injection','Tonic_has_a_gaping_vagina','teletoplr','telet', + 'ygurv1f2','BIGM','E3p','T3le','fnc_PVAH_AdminReq','Bob_MAIN_CODE','MAIN_CODE_INJECTED','D34DXH34RT_E5P','Arsenal','Jme_Is_God','B0X_CANN0N_T0GGLE', + 'PL4YER_CANN0N_T0GGLE','aim','HOLY_FUCK_FDKFHSDJFHSDKJ_vehicles_m','lazy_ILHA_is_lazy','POOP_Item','die_menu_esp_v1','XXMMWW_main_menu','MM_150', + 'BIS_tracedShooter','JME_HAS_A_GIANT_DONG','nuke_vars','nukepos','fuckfest','fuckfestv2','FAG_NEON' + ]; + while {1 == 1} do + { + { + if !(isNil _x) then + { + _log = format['BadVar: %1',_x]; + "+_AH_KICKLOG+" = [_name,_puid,'BAN',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + [] spawn {uiSleep 0.1;['Bob.de',false,false] spawn KickOFF;};[] spawn "+_AHKickOFF+"; + }; + } forEach _badVariables; + + if (isNil 'life_paycheck') then {life_paycheck = 0;}; + if (abs life_paycheck > 1000000) then + { + _log = format['Bad Paycheck: %1',life_paycheck]; + "+_AH_KICKLOG+" = [_name,_puid,'BAN',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + life_paycheck = 0; + }; + uiSleep 0.5; + }; + }; + "+_AH_RunCheck+" = "+_AH_RunCheck+" + [3]; + }; + if !(4 in "+_AH_RunCheck+") then + { + if ("+str _CMC+") then + { + [_name,_puid] spawn { + _name = _this select 0; + _puid = _this select 1; + _validMenus = "+str _cMenu+"; + while {1 == 1} do + { + _commandingMenu = commandingMenu; + if (_commandingMenu in ['#User:BIS_fnc_addCommMenuItem_menu']) then + { + showCommandingMenu ''; + }; + _commandingMenu = commandingMenu; + if (_commandingMenu != '') then + { + _A = toArray _commandingMenu; + _A resize 6; + _A; + _short = toString _A; + if !(_commandingMenu in _validMenus) then + { + showCommandingMenu ''; + if (_short in ['#USER:']) then + { + _log = format['BadCommandingMenu: %1',_commandingMenu]; + "+_AH_KICKLOG+" = [_name,_puid,'BAN',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + [] spawn {uiSleep 0.1;['Bob.de',false,false] spawn KickOFF;};[] spawn "+_AHKickOFF+"; + }; + }; + }; + uiSleep 0.5; + }; + }; + }; + "+_AH_RunCheck+" = "+_AH_RunCheck+" + [4]; + }; + if !(5 in "+_AH_RunCheck+") then + { + [_name,_puid,_admins] spawn { + _name = _this select 0; + _puid = _this select 1; + _admins = _this select 2; + uiSleep 1; + _mPos = getMarkerPos 'respawn_west'; + _oVeh = (vehicle player); + _oPos = getPos player; + _time = diag_tickTime; + _tps = 0; + if (isNil '"+_AHpos+"') then {"+_AHpos+" = [];}; + while {1 == 1} do + { + if ("+str _UVC+") then + { + _veh = vehicle player; + _type = typeOf _veh; + if (_type in "+str _ForbiddenVehicles+") then + { + player action ['GetOut',_veh]; + + _warn = format['%1 - YOU ARE IN A FORBIDDEN VEHICLE - LEAVE IT!',_name]; + hint _warn; + 1 cutText [_warn,'PLAIN DOWN']; + 2 cutText [_warn,'PLAIN']; + systemChat ('Bob.de: '+str _warn); + taskHint [_warn, [1,0,0.1,1], 'taskNew']; + + _log = format['Forbidden Vehicle: %1',_type]; + "+_AH_KICKLOG+" = [_name,_puid,'FVEH',toArray _log,_veh];publicVariableServer '"+_AH_KICKLOG+"'; + }; + }; + + if ("+str _UFI+") then + { + _inv = []; + _inv = _inv + (magazines player); + _inv = _inv + (weapons player); + if (!isNull (unitBackpack player)) then + { + _BW = (getWeaponCargo unitBackpack player) select 0; + _BM = (getMagazineCargo unitBackpack player) select 0; + _inv = _inv + _BW + _BM; + }; + + { + if ((_x in _inv) && (_x != '')) then + { + [_x] spawn { + _y = _this select 0; + for '_i' from 0 to ({_x == _y} count (weapons player)) do {player removeWeapon _y;}; + player removeMagazines _y; + for '_w' from 0 to 10 do {uiSleep 0.1;player removeWeapon _y;player removeMagazines _y;}; + }; + _log = format['BadItem: %1',_x]; + "+_AH_KICKLOG+" = [_name,_puid,'BAN',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + [] spawn {uiSleep 0.1;['Bob.de',false,false] spawn KickOFF;};[] spawn "+_AHKickOFF+"; + }; + } forEach ("+str _ForbiddenItems+"); + }; + + _doit = false; + if ("+str _UAT+") then + { + if (alive player) then + { + _oVeh = (vehicle player); + _oPos = getPos _oVeh; + _oPos = [_oPos select 0,_oPos select 1,0]; + _time = diag_tickTime; + _doit = true; + }; + }; + uiSleep 0.5; + if ("+str _UAT+") then + { + if (_doit) then + { + _veh = (vehicle player); + if (str _oVeh == str _veh) then + { + _driver = driver _veh; + if ((str _driver == str player) || (str _driver == '')) then + { + if (alive player) then + { + _maxdist = (getNumber (configFile >> 'CfgVehicles' >> typeOf _veh >> 'maxSpeed')) min 500; + if (str _veh == str player) then + { + _maxdist = _maxdist max 40; + _speed = abs(speed player); + if (_speed <= 0.1) then {_maxdist = 12;}; + }; + _cPos = getPos (vehicle player); + _cPos = [_cPos select 0,_cPos select 1,0]; + _dist = floor(_oPos distance _cPos); + _dist0 = _dist > _maxDist; + _dist1 = _mPos distance _oPos > 350; + _dist2 = _mPos distance _cPos > 350; + if (_dist0 && _dist1 && _dist2) then + { + if (str "+_AHpos+" != '[]') then + { + "+_AHpos+" = []; + _log = format['Admin Teleport: moved from %1(%2) to %3(%4) (%5m in %6s - speed: %7 - MapOpen?: %8 - type: %9)',mapGridPosition _oPos,_oPos,mapGridPosition _cPos,_cPos,_dist,diag_tickTime - _time,abs(floor(speed _veh)),visiblemap,typeOF _veh]; + "+_AH_KICKLOG+" = [_name,_puid,'HLOG',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + } + else + { + _log = format['Teleport?: moved from %1(%2) to %3(%4) (%5m in %6s - speed: %7 - MapOpen?: %8 - type: %9)',mapGridPosition _oPos,_oPos,mapGridPosition _cPos,_cPos,_dist,diag_tickTime - _time,abs(floor(speed _veh)),visiblemap,typeOF _veh]; + if (visiblemap) then + { + "+_AH_KICKLOG+" = [_name,_puid,'BAN',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + [] spawn {uiSleep 0.1;['Bob.de',false,false] spawn KickOFF;};[] spawn "+_AHKickOFF+"; + } + else + { + _tps = _tps + 1; + if (_tps > 1) then {(findDisplay 46) closeDisplay 0;}; + "+_AH_KICKLOG+" = [_name,_puid,'HLOG',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + "+_AH_RunCheck+" = "+_AH_RunCheck+" + [5]; + }; + if !(6 in "+_AH_RunCheck+") then + { + [_name,_puid] spawn { + _name = _this select 0; + _puid = _this select 1; + _CEA1 = ["+str _CE0+","+str _CE1+","+str _CE2+","+str _CE3+","+str _CE4+","+str _CE5+"]; + while {1 == 1} do + { + _CEC0 = (getText(configFile >> 'RscDisplayDSinterface' >> 'onLoad')); + _CEC1 = (getText(configFile >> 'RscDisplayOptionsVideo' >> 'onLoad')); + _CEC2 = (getText(configFile >> 'RscDisplayOptionsVideo' >> 'onUnload')); + _CEC3 = (getText(configFile >> 'RscDisplayOptionsVideo' >> 'controls' >> 'G_VideoOptionsControls' >> 'controls' >> 'HideAdvanced' >> 'OnButtonClick')); + _CEC4 = (getText(configFile >> 'RscDisplayOptions' >> 'controls' >> 'BCredits' >> 'OnButtonClick')); + _CEC5 = (getText(configFile >> 'EPOCH_createGroup' >> 'onLoad')); + _CECA2 = [_CEC0,_CEC1,_CEC2,_CEC3,_CEC4,_CEC5]; + for '_i' from 0 to (count _CEA1)-1 do + { + _a = _CEA1 select _i; + _a = _a - [32]; + _a = _a - [9]; + if (count _a > 120) then {_a resize 120;}; + _bs = _CECA2 select _i; + _b = toArray _bs; + _b = _b - [32]; + _b = _b - [9]; + if (count _b > 120) then {_b resize 120;}; + if (str _a != str _b) then + { + _log = format['CheatEngine %1: %2',_i,_bs]; + "+_AH_KICKLOG+" = [_name,_puid,'BAN',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + [] spawn {uiSleep 0.1;['Bob.de',false,false] spawn KickOFF;};[] spawn "+_AHKickOFF+"; + }; + }; + + uiSleep 1; + private['_cfgs','_displays','_selected']; + _displays = ['RscDisplayInventory','RscDisplayMainMap','RscDisplayDiary','RscDisplayOptions', + 'RscDisplayGetReady','RscDisplayOptionsVideo','RscDisplayOptionsAudio', + 'RscDisplayOptionsLayout','RscDisplayMicSensitivityOptions','RscDisplayConfigure', + 'RscDisplayConfigureControllers','RscDisplayCustomizeController','RscDisplayJoystickSchemes', + 'RscDisplayConfigureAction','RscDisplayGameOptions','RscMiniMap','RscMiniMapSmall', + 'RscDisplayControlSchemes','RscDisplayFieldManual','RscDisplayPassword','RscDisplayServerGetReady', + 'RscDisplayClientGetReady','RscDisplayRespawn','RscDisplayLoading','RscDisplayStart','RscDisplayClient']; + _cfgs = (call CESCANARRAY); + _selected = (count _displays) - 1; + for '_i' from 0 to _selected do + { + if !((compile((configfile >> (_displays select _i) >> 'onLoad') call BIS_fnc_getCfgData)) in _cfgs) exitWith + { + _log = format['%1 onLoad changed: %2',_displays select _i,(configfile >> (_displays select _i) >> 'onLoad') call BIS_fnc_getCfgData]; + "+_AH_KICKLOG+" = [_name,_puid,'BAN',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + [] spawn {uiSleep 0.1;['Bob.de',false,false] spawn KickOFF;};[] spawn "+_AHKickOFF+"; + }; + if !((compile((configfile >> (_displays select _i) >> 'onUnload') call BIS_fnc_getCfgData)) in _cfgs) exitWith + { + _log = format['%1 onUnload changed: %2',_displays select _i,(configfile >> (_displays select _i) >> 'onUnload') call BIS_fnc_getCfgData]; + "+_AH_KICKLOG+" = [_name,_puid,'BAN',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + [] spawn {uiSleep 0.1;['Bob.de',false,false] spawn KickOFF;};[] spawn "+_AHKickOFF+"; + }; + }; + + uiSleep 1; + _children = [configFile >> 'RscDisplayMPInterrupt' >> 'controls',0] call BIS_fnc_returnChildren; + _allowedChildren = ['Title','MissionTitle','DifficultyTitle','PlayersName','ButtonCancel','ButtonSAVE','ButtonSkip','ButtonRespawn','ButtonOptions', + 'ButtonVideo','ButtonAudio','ButtonControls','ButtonGame','ButtonTutorialHints','ButtonAbort','DebugConsole','Feedback','MessageBox','']; + { + _cfgName = configName _x; + if !(_cfgName in _allowedChildren) exitWith { + _log = format['Modified MPInterrupt: %1',_cfgName]; + "+_AH_KICKLOG+" = [_name,_puid,'BAN',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + [] spawn {uiSleep 0.1;['Bob.de',false,false] spawn KickOFF;};[] spawn "+_AHKickOFF+"; + }; + } foreach _children; + }; + }; + "+_AH_RunCheck+" = "+_AH_RunCheck+" + [6]; + }; + if !(7 in "+_AH_RunCheck+") then + { + [_name,_puid] spawn { + _name = _this select 0; + _puid = _this select 1; + while {1 == 1} do + { + if (isNil 'EPOCH_KeyDown') then + { + onEachFrame {}; + } + else + { + removeAllActions player; + removeAllActions (vehicle player); + }; + player allowDamage true; + (vehicle player) allowDamage true; + onMapSingleClick ''; + setTerrainGrid 25; + uiSleep 0.1; + }; + }; + "+_AH_RunCheck+" = "+_AH_RunCheck+" + [7]; + }; + if !(8 in "+_AH_RunCheck+") then + { + if ("+str _VON+") then { + [] spawn { + disableSerialization; + while {1 == 1} do + { + if ((!isNull findDisplay 63)&&(!isNull findDisplay 55)) then + { + if (ctrlText ((findDisplay 55) displayCtrl 101) == '\A3\ui_f\data\igui\rscingameui\rscdisplayvoicechat\microphone_ca.paa') then + { + if ((ctrlText ((findDisplay 63) displayCtrl 101) in ['Side channel'])) then + { + _msg = 'NO VOICE ON SIDE! (BYE)'; + systemChat ('Bob.de: '+str _msg); + hint _msg; + 1 cutText [format ['%1',_msg],'PLAIN DOWN']; + 2 cutText [format ['%1',_msg],'PLAIN']; + (findDisplay 46) closeDisplay 0; + }; + }; + }; + uiSleep 0.5; + }; + }; + }; + "+_AH_RunCheck+" = "+_AH_RunCheck+" + [8]; + }; + "+_AH_RunCheck2+" = 'k'; + }; + publicVariable '"+_AH_MAIN_BLOCK+"'; + "+_AH_RunCheck2+" = 'k'; + + + fnc_VoteTimeServer = + { + _clientUID = _this select 0; + _vote = _this select 1; + + if (isNil 'TimeVoteCooldown') then {TimeVoteCooldown = 300;}; + if (isNil 'LastVoteGoneThrough') then {LastVoteGoneThrough = 600;}; + if ((LastVoteGoneThrough == 0) || ((TimeVoteCooldown + LastVoteGoneThrough) < diag_ticktime)) then + { + if (isNil 'VoteArray') then {VoteArray = [];}; + if !(_clientUID in VoteArray) then + { + VoteArray = VoteArray + [_clientUID,_vote]; + _cntAll = count playableUnits; + _cntVoted = {getPlayerUID _x in VoteArray} count playableUnits; + if ((_cntAll > 0) && (_cntVoted > 0)) then + { + _cntday = 0; + _cntnight = 0; + if ((_cntVoted / _cntAll) > 0.49) then + { + _oUIDs = []; + { + _xUID = getPlayerUID _x; + if (_xUID != '') then + { + _oUIDs = _oUIDs + [_xUID]; + }; + } forEach playableUnits; + for '_i' from 0 to (count VoteArray)-1 step 2 do + { + _cUID = VoteArray select _i; + _cVOTE = VoteArray select (_i+1); + if (_cUID in _oUIDs) then + { + if (_cVOTE == 'DAY') then {_cntday = _cntday + 1;}; + if (_cVOTE == 'NIGHT') then {_cntnight = _cntnight + 1;}; + }; + }; + + _txt = format['%1 of %2 Players voted. %3 for Day and %4 for Night.',_cntVoted,_cntAll,_cntday,_cntnight]; + "+_massMessage+" = [''+(_txt)+'',safeZoneXAbs/safeZoneWAbs/4,SafeZoneY+0.02,10,0,0,3079]; + publicVariable '"+_massMessage+"'; + + _date = date; + _date set [3,11]; + if (_cntnight > _cntday) then + { + _date set [3,23]; + }; + EPOCH_StaticDateTime = _date; + setDate _date; + VoteArray = []; + LastVoteGoneThrough = diag_ticktime; + } + else + { + _txt = format['%1 of %2 Players voted (/vote day or /vote night).',_cntVoted,_cntAll]; + "+_massMessage+" = [''+(_txt)+'',safeZoneXAbs/safeZoneWAbs/4,SafeZoneY+0.02,10,0,0,3079]; + publicVariable '"+_massMessage+"'; + }; + }; + }; + } + else + { + _txt = format['Wait %1s more until next diag_tickTime vote can be done!',round((TimeVoteCooldown + LastVoteGoneThrough) - diag_ticktime)]; + "+_massMessage+" = [''+(_txt)+'',safeZoneXAbs/safeZoneWAbs/4,SafeZoneY+0.02,10,0,0,3079]; + publicVariable '"+_massMessage+"'; + }; + }; + fnc_VoteTimeServer = compileFinal ([fnc_VoteTimeServer] call LysticCompilableString); + + if (isNil '"+_AH_AnnounceAdmin+"') then {"+_AH_AnnounceAdmin+" = [];}; + '"+_AH_KICKLOG+"' addPublicVariableEventHandler + { + _array = _this select 1; + _name = _array select 0; + _puid = _array select 1; + _what = _array select 2; + _work = toString (_array select 3); + + if (_what == 'VOTE') exitWith + { + if (_work in ['DAY','NIGHT']) exitWith + { + [_puid,_work] call fnc_VoteTimeServer; + }; + }; + if (_what == 'T') exitWith + { + if (isNil 'Epoch_personalTokenARRAY') then {Epoch_personalTokenARRAY = [];}; + if !(_puid in Epoch_personalTokenARRAY) then + { + Epoch_personalTokenARRAY pushBack _puid; + Epoch_personalTokenARRAY pushBack _work; + publicVariable 'Epoch_personalTokenARRAY'; + }; + diag_log format['Bob.de EpochTokenCheck: %1(%2) Epoch_personalToken %3',_name,_puid,_work]; + }; + if (_what == 'M') exitWith + { + _logThose = _array select 4; + _clientMarker = [];{_clientMarker = _clientMarker + [toString _x];} forEach _logThose; + + { + if !(_x in allMapMarkers) then + { + _shortX = toArray _x; + _shortX resize 13; + _shortX = toString _shortX; + if (!(_shortX in ['_USER_DEFINED']) && ((str (mapGridPosition (getMarkerPos _x)) == '@000000') || (str (getMarkerSize _x) == '[0,0]'))) exitWith + { + _log = format['Bob.de MarkerCheck: %1(%2) LocalMarker @%3 %4 %5 %6',_name,_puid,mapGridPosition (getMarkerPos _x),markerText _x,getMarkerSize _x,_x]; + "+_AH_KICKLOG+" = [_name,_puid,'BAN',toArray(_log)];publicVariableServer '"+_AH_KICKLOG+"'; + }; + }; + } forEach _clientMarker; + }; + if (_what in ['BAN','HLOG','FVEH']) then + { + _stime = 0; + if(serverTime > 36000)then{_stime = diag_tickTime;}else{_stime = serverTime;}; + _hours = (_stime/60/60); + _hours = toArray (str _hours); + _hours resize 1; + _hours = toString _hours; + _hours = compile _hours; + _hours = call _hours; + _minutes = floor(_stime/60); + _minutes2 = ((_minutes - (_hours*60)) min 60) max 0;if (_minutes2 < 10) then {_minutes2 = format['0%1',_minutes2];}; + + _log = format['%1h %2min| %3(%4): %5',_hours,_minutes2,_name,_puid,_work]; + diag_log ('Bob.de '+_log); + 'A3_HACKLOG' callExtension _log; + + if (_what in ['BAN']) then + { + if (isNil '"+_TMPBAN+"') then {"+_TMPBAN+" = [];} else {if (typeName "+_TMPBAN+" != 'ARRAY') then {"+_TMPBAN+" = [];};}; + if !(_puid in "+_TMPBAN+") then + { + "+_TMPBAN+" = "+_TMPBAN+" + [_puid]; + publicVariable '"+_TMPBAN+"'; + 'BobwriteBan' callExtension _puid; + + _do = format[' + if ((getPlayerUID player == ''%1'') || (name player == ''%2'')) then + { + for ''_i'' from 0 to 101 do {(findDisplay _i) closeDisplay 0;}; + for ''_j'' from 0 to 101 do {disableUserInput true;}; + };',_puid,_name]; + _obj = 'C_man_1' createVehicle [0,0,0];_obj addMPEventHandler ['MPKilled',_do];_obj setDamage 5;deleteVehicle _obj; + }; + }; + if (_what == 'FVEH') then + { + _veh = _array select 4; + _veh setDamage 5; + }; + + "+_AH_AnnounceAdmin+" = "+_AH_AnnounceAdmin+" + [_log]; + publicVariable '"+_AH_AnnounceAdmin+"'; + }; + }; + + "+_RunOnClients+" = + { + if (getPlayerUID player == '') exitWith {}; + _name = name player; + _puid = getPlayerUID player; + _rv3 = player getVariable['"+_randvar3+"',_puid]; + if (_rv3 != _puid) then + { + _log = format['ClientUID is not equal to ServerUID (%1/%2)',_puid,_rv3]; + "+_AH_KICKLOG+" = [_name,_puid,'BAN',toArray (_log)];publicVariableServer '"+_AH_KICKLOG+"'; + }; + if (isNil 'VERSION') then { + VERSION = '26-10-2014 Bob.de AHAT 0006'; + diag_log format['Bob.de VERSION: %1',VERSION]; + }; + if (isNull (findDisplay 46)) exitWith {}; + _admins = "+str _admins+"; + _devs = "+str _devs+"; + call "+_AH_MAIN_BLOCK+"; + if (_puid in _admins) then + { + "+_AH_RunCheck2+" = 'k'; + Bob_ADMINS = _admins; + Bob_DEVS = _devs; + if (isNil '"+_adjust+"AdminLoaded') then + { + "+_adjust+"AdminLoaded = true; + [_puid] spawn { + _puid = _this select 0; + Bob_MAIN_CODE = nil; + PVAH_AdminReq = [1234,player,_puid]; + publicVariableServer 'PVAH_AdminReq'; + waitUntil {!isNil 'Bob_MAIN_CODE'}; + _tmpCode = Bob_MAIN_CODE; + Bob_MAIN_CODE = nil; + uiSleep 3; + OPEN_ADMIN_MENU_KEY = "+str _OPEN_ADMIN_MENU_KEY+"; + diag_log format['Bob.de OPEN_ADMIN_MENU_KEY: %1',OPEN_ADMIN_MENU_KEY]; + [] spawn _tmpCode; + ADMINLEVELACCESS = compileFinal ' + _level = []; + _PUID = getPlayerUID player; + if (_PUID in "+str _adminLevel1_UIDs+") then + { + _level = "+str _adminLevel1+"; + }; + if (_PUID in "+str _adminLevel2_UIDs+") then + { + _level = "+str _adminLevel2+"; + }; + if (_PUID in "+str _adminLevel3_UIDs+") then + { + _level = "+str _adminLevel3+"; + }; + if (_PUID in "+str _devs+") then + { + { + if !(_x in _level) then {_level = _level + [_x];}; + } forEach ("+str _adminLevel1+"+"+str _adminLevel2+"+"+str _adminLevel3+"); + }; + _level + '; + }; + }; + if (isNil '"+_AH_AnnounceAdmin+"') then {"+_AH_AnnounceAdmin+" = [];}; + if (isNil 'AH_HackLogArray') then {AH_HackLogArray = "+_AH_AnnounceAdmin+";}; + '"+_AH_AnnounceAdmin+"' addPublicVariableEventHandler + { + _array = _this select 1; + AH_HackLogArray = _array; + _log = _array select ((count _array)-1); + if (isNil 'AdminAnnounceDisabled') then + { + taskHint [_log, [1,0,0.1,1], 'taskNew']; + hint _log; + }; + diag_log _log; + }; + '"+_randvar30+"' addPublicVariableEventHandler {player setVariable['"+_randvar29+"',PVAH_AdminReq,true];}; + 'NewPlayerAnnounce' addPublicVariableEventHandler {if (isNil 'AdminAnnounceDisabled') then {systemchat (_this select 1);hint (_this select 1);};diag_log (_this select 1);}; + } + else + { + if (isNil '"+_adjust+"LastMarkerCheck') then {"+_adjust+"LastMarkerCheck = 0;}; + if (diag_tickTime > ("+_adjust+"LastMarkerCheck + 120)) then + { + "+_adjust+"LastMarkerCheck = diag_tickTime; + _logThose = [];{_logThose = _logThose + [toArray _x];} forEach allMapMarkers; + "+_AH_KICKLOG+" = [_name,_puid,'M',toArray ('log'),_logThose];publicVariableServer '"+_AH_KICKLOG+"'; + }; + }; + '"+_massMessage+"' addPublicVariableEventHandler {(_this select 1) spawn bis_fnc_dynamictext;}; + if ((!isNil 'Epoch_personalToken') && (!isNil 'Epoch_personalTokenARRAY')) then + { + _token = Epoch_personalToken; + if !(_puid in Epoch_personalTokenARRAY) then + { + "+_AH_KICKLOG+" = [_name,_puid,'T',toArray (_token)];publicVariableServer '"+_AH_KICKLOG+"'; + }; + }; + }; + publicVariable '"+_RunOnClients+"'; + + + KickOFF = compileFinal preProcessFileLineNumbers '\a3\functions_f\Misc\fn_endMission.sqf'; + publicVariable 'KickOFF'; + "+_AHKickOFF+" = compileFinal ' + uiSleep 0.1; + for ''_i'' from 0 to 101 do {(findDisplay _i) closeDisplay 0;}; + for ''_j'' from 0 to 101 do {disableUserInput true;}; + '; + publicVariable '"+_AHKickOFF+"'; + + + "+_AHrunCheck+" = + { + if (isNil '"+_AH_RunCheck2+"') then + { + if ((player == player) && (getPlayerUID player != '')) then + { + uiSleep 65; + if (isNil '"+_AH_RunCheck2+"') then + { + if ((player == player) && (getPlayerUID player != '')) then + { + if (isNil '"+_adjust+"LOGGED') then + { + "+_adjust+"LOGGED = true; + _log = 'AH Not Running! (Kicked to Lobby)'; + "+_AH_KICKLOG+" = [name player,getPlayerUID player,'HLOG',toArray(_log)];publicVariableServer '"+_AH_KICKLOG+"'; + }; + (findDisplay 46) closeDisplay 0; + }; + }; + }; + }; + }; + publicVariable '"+_AHrunCheck+"'; + + + + [] spawn { + diag_log format['Bob.de %1 - STARTING _RunOnClients LOOP',diag_tickTime]; + while {1 == 1} do + { + _obj = 'C_man_1' createVehicle [0,0,0];_obj addMPEventHandler ['MPKilled','if (!isServer) then {[] spawn "+_RunOnClients+";};[] spawn "+_AHrunCheck+";'];_obj setDamage 5;deleteVehicle _obj; + + uiSleep 15; + { + if (!isNull _x) then + { + _puid = getPlayerUID _x; + if (_puid != '') then + { + _name = name _x; + [_puid,_name,_x] call fnc_Bob_PlayerLog; + }; + }; + } forEach playableUnits; + uiSleep 15; + }; + diag_log format['Bob.de %1 - _RunOnClients LOOP - BROKEN!',diag_tickTime]; + }; + + diag_log format['Bob.de %1 - CHANGING onPlayerConnected',diag_tickTime]; + fnc_Bob_PlayerLog = { + _uid = _this select 0;_name = _this select 1; + if ((_uid == '') && (_name == '__SERVER__')) exitWith {}; + _unit = objNull; + if (count _this > 2) then + { + _x = _this select 2; + if (!isNull _x) then + { + _xuid = getPlayerUID _x; + if (_xuid != '') then + { + _unit = _x; + _rv3 = _x getVariable['"+_randvar3+"','-1']; + if (_rv3 != _uid) then + { + _x setVariable['"+_randvar3+"',_uid,true]; + }; + }; + }; + }; + if (isNil '"+_TMPBAN+"') then {"+_TMPBAN+" = [];} else {if (typeName "+_TMPBAN+" != 'ARRAY') then {"+_TMPBAN+" = [];};}; + if ((_uid in "+_TMPBAN+") || (_uid in "+str _BlackList+")) then + { + _do = format[' + if ((getPlayerUID player == ''%1'') || (name player == ''%2'')) then + { + for ''_i'' from 0 to 101 do {(findDisplay _i) closeDisplay 0;}; + for ''_j'' from 0 to 101 do {disableUserInput true;}; + };',_uid,_name]; + _obj = 'C_man_1' createVehicle [0,0,0];_obj addMPEventHandler ['MPKilled',_do];_obj setDamage 5;deleteVehicle _obj; + if (!isNull _unit) then + { + _unit setDamage 5; + }; + }; + if (isNil 'PlayerLogArrayMNS') then {PlayerLogArrayMNS = profileNamespace getVariable ['PlayerLogArrayMNS',[]];}; + if !(_uid in PlayerLogArrayMNS) then + { + PlayerLogArrayMNS = PlayerLogArrayMNS + [_uid]; + profileNamespace setVariable ['PlayerLogArrayMNS',PlayerLogArrayMNS];saveProfileNamespace; + + NewPlayerAnnounce = format['New Player: %1(%2)',_name,_uid]; + publicVariable 'NewPlayerAnnounce'; + + diag_log format['Bob.de New Player: %1(%2)',_name,_uid]; + }; + _obj = 'C_man_1' createVehicle [0,0,0];_obj addMPEventHandler ['MPKilled','if (!isDedicated) then {[] spawn "+_RunOnClients+";};[] spawn "+_AHrunCheck+";'];_obj setDamage 5;deleteVehicle _obj; + }; + fnc_Bob_PlayerLog = compileFinal ([fnc_Bob_PlayerLog] call LysticCompilableString); + + server_onPlayerConnect_Bob = + { + _log = format['Bob.de PlayerConnected: %1',_this]; + diag_log (_log); + _this spawn fnc_Bob_PlayerLog; + }; + server_onPlayerConnect_Bob = compileFinal ([server_onPlayerConnect_Bob] call LysticCompilableString); + + onPlayerConnected {[_uid,_name] call server_onPlayerConnect_Bob;}; + diag_log format['Bob.de %1 - onPlayerConnected changed!',diag_tickTime]; + + + + fnc_PVAH_AdminReq = { + diag_log format['Bob.de fnc_PVAH_AdminReq: %1',_this select 1]; + _playableUnits = "+str _admins+"; + + _array = _this select 1; + if (_array in ['']) exitWith {}; + if (typeName _array != 'ARRAY') exitWith {}; + + _option = _array select 0; + if (_option in ['']) exitWith {}; + if (typeName _option != 'SCALAR') exitWith {}; + + _playerObj = _array select 1; + if (_playerObj in ['']) exitWith {}; + if (typeName _playerObj != 'OBJECT') exitWith {}; + if (isNull _playerObj) exitWith {}; + + _clientID = (owner _playerObj); + _clientUID = (getPlayerUID _playerObj); + _clientName = (name _playerObj); + + if ((_clientUID in ['',' ','0']) || (typeName _clientUID != 'STRING')) exitWith + { + diag_log format['Bob.de fnc_AdminFirstReq %1(%2): !!!!!!ADMIN-LOGIN-ERROR!!!!!!',_clientName,_clientUID]; + }; + if !(_clientUID in _playableUnits) exitWith + { + diag_log format['Bob.de fnc_AdminFirstReq %1(%2): Attempted to Use the AdminMenu',_clientName,_clientUID]; + }; + "+_randvar30+" = '1'; + _clientID publicVariableClient '"+_randvar30+"'; + _var = _playerOb getVariable['"+_randvar29+"','-1']; + if !(_var in [_array]) exitWith + { + diag_log format['Bob.de fnc_AdminFirstReq %1(%2): AdminRequest Failed (Local %3/ Server %4)',_clientName,_clientUID,_var,_array]; + }; + + if (_option == 1234) then + { + _puid = _array select 2; + diag_log format['Bob.de ******ADMIN-LOGIN******: %1(%2)',_clientName,_clientUID]; + if ((_clientUID in _playableUnits) && (_puid == _clientUID)) then + { + _clientID PublicVariableClient 'Bob_MAIN_CODE'; + }; + }; + + _fncDoGlobal = + { + _obj = 'C_man_1' createVehicle [0,0,0]; + _obj addMPEventHandler ['MPKilled',_this select 0]; + _obj setDamage 5; + deleteVehicle _obj; + }; + if (_option == 69) then + { + if (_clientUID in _playableUnits) then + { + _obj = 'C_man_1' createVehicle [0,0,0]; + _obj addMPEventHandler ['MPKilled',MarkerText 'respawn_west']; + _obj setDamage 5; + deleteVehicle _obj; + }; + }; + if (_option == -667) then + { + _puid = _array select 2; + if (isNil '"+_TMPBAN+"') then {"+_TMPBAN+" = [];} else {if (typeName "+_TMPBAN+" != 'ARRAY') then {"+_TMPBAN+" = [];};}; + "+_TMPBAN+" = "+_TMPBAN+" - [_puid]; + publicVariable '"+_TMPBAN+"'; + }; + if (_option == -666) then + { + _puid = _array select 2; + if (isNil '"+_TMPBAN+"') then {"+_TMPBAN+" = [];} else {if (typeName "+_TMPBAN+" != 'ARRAY') then {"+_TMPBAN+" = [];};}; + if !(_puid in "+_TMPBAN+") then + { + "+_TMPBAN+" = "+_TMPBAN+" + [_puid]; + publicVariable '"+_TMPBAN+"'; + 'BobwriteBan' callExtension _puid; + }; + _do = format['if (!isServer) then + { + if (getPlayerUID player == ''%1'') then + { + (finddisplay 46) closeDisplay 0; + }; + };',_puid]; + [_do] call _fncDoGlobal; + }; + if (_option == -5) then + { + _target = _array select 2; + _do = format['if (!isServer) then + { + if (getPlayerUID player == ''%1'') then + { + (finddisplay 46) closeDisplay 0; + }; + };',getPlayerUID _target]; + [_do] call _fncDoGlobal; + }; + if (_option == -4) then + { + _delete = _array select 2; + if (typeName _delete != 'ARRAY') then {_delete = [_delete];}; + { + if (!isNil 'EPOCH_save_killedVehicle') then {_x setDamage 5;}; + [_x] spawn {uiSleep 0.5;deleteVehicle (_this select 0);}; + } forEach _delete; + }; + if (_option == -3) then + { + _target = _array select 2; + _do = format['if (!isServer) then + { + if (getPlayerUID player == ''%1'') then + { + for ''_i'' from 0 to 101 do {(findDisplay _i) closeDisplay 0;}; + for ''_j'' from 0 to 101 do {disableUserInput true;}; + }; + };',getPlayerUID _target]; + [_do] call _fncDoGlobal; + }; + if (_option == -2) then + { + _target = _array select 2; + _target setDamage 5; + }; + if (_option == -1) then + { + [_array select 2] spawn { + _pos = _this select 0; + _bolt = 'LightningBolt' createVehicle _pos; + _bolt setdamage 5; + _light = '#lightpoint' createVehicle _pos; + _light setposatl [_pos select 0,_pos select 1,(_pos select 2) + 10]; + _light setLightDayLight true; + _light setLightBrightness 300; + _light setLightAmbient [0.05, 0.05, 0.1]; + _light setlightcolor [1, 1, 2]; + uiSleep 0.1; + _light setLightBrightness 0; + uiSleep (random 0.1); + _class = ['lightning1_F','lightning2_F'] call bis_Fnc_selectrandom; + _lightning = _class createVehicle _pos; + _duration = if (isNull cursortarget) then {(3 + random 1)} else {1}; + for '_i' from 0 to _duration do + { + _time = diag_tickTime + 0.1; + _light setLightBrightness (100 + random 100); + waitUntil {diag_tickTime > _time}; + }; + deleteVehicle _lightning; + deleteVehicle _light; + }; + }; + if (_option == 0) then + { + if (!isNil 'EPOCH_localCleanup') then + { + private ['_velimit','_isAir','_isShip','_position','_dir','_marker','_vehObj','_slot','_vehClass','_colors','_color','_config','_selections','_textures','_forEachIndex','_textureSelectionIndex','_vehicleFound','_randomVehicleIndex','_randomVehicle','_vehicleCount','_count']; + _vehClass = _array select 2; + _position = _array select 3; + _dir = _array select 4; + + _vehObj = createVehicle [_vehClass, _position, [], 0, 'CAN_COLLIDE']; + _vehObj call EPX_server_setVToken; + _vehObj setdir _dir; + _vehObj setposATL _position; + _vehObj call EPOCH_server_vehicleInit; + + EPOCH_VehicleSlotsLimit = EPOCH_VehicleSlotsLimit + 1; + EPOCH_VehicleSlots pushBack str(EPOCH_VehicleSlotsLimit); + _slot = EPOCH_VehicleSlots select 0; + _vehObj setVariable ['VEHICLE_SLOT',_slot,true]; + EPOCH_VehicleSlots = EPOCH_VehicleSlots - [_slot]; + EPOCH_VehicleSlotCount = count EPOCH_VehicleSlots; + publicVariable 'EPOCH_VehicleSlotCount'; + + clearWeaponCargoGlobal _vehObj; + clearMagazineCargoGlobal _vehObj; + clearBackpackCargoGlobal _vehObj; + clearItemCargoGlobal _vehObj; + _config = (configFile >> 'CfgVehicles' >> _vehClass >> 'availableColors'); + if (isArray(_config)) then + { + _textureSelectionIndex = configFile >> 'CfgVehicles' >> _vehClass >> 'textureSelectionIndex'; + _selections = if (isArray(_textureSelectionIndex)) then {getArray(_textureSelectionIndex)} else { [0] }; + _colors = getArray(_config); + _textures = _colors select 0; + _color = floor (random (count _textures)); + _count = (count _colors)-1; + { + if (_count >= _forEachIndex) then + { + _textures = _colors select _forEachIndex; + }; + _vehObj setObjectTextureGlobal [_x, (_textures select _color)]; + } forEach _selections; + _vehObj setVariable ['VEHICLE_TEXTURE',_color]; + }; + _vehObj call EPX_server_save_vehicle; + } + else + { + _vehClass = _array select 2; + _position = _array select 3; + _dir = _array select 4; + _vehObj = _vehClass createVehicle _position; + _vehObj setdir _dir; + clearWeaponCargoGlobal _vehObj; + clearMagazineCargoGlobal _vehObj; + clearBackpackCargoGlobal _vehObj; + clearItemCargoGlobal _vehObj; + }; + }; + if (_option == 1) then + { + _unit = _array select 2; + _pos = _array select 3; + "+_AHpos+" = _pos; + (owner _unit) publicVariableClient '"+_AHpos+"'; + (vehicle _unit) setPos _pos; + }; + if (_option == 2) then + { + _state = _array select 2; + if (_state == 1) then + { + _playerObj hideObjectGlobal true; + } + else + { + _playerObj hideObjectGlobal false; + }; + }; + if (_option == 3) then + { + _pos = _array select 2; + _click = _array select 3; + _object = objNull; + + if (isNil 'LastWeaponHolderPos') then {LastWeaponHolderPos = [0,0,0];}; + if (_pos distance LastWeaponHolderPos < 5) then {_object = LastWeaponHolderObj;}; + if (isNull _object) then {_object = createVehicle ['groundWeaponHolder',_pos,[],1,'CAN_COLLIDE'];}; + + _object addItemCargoGlobal [_click,1]; + if (isClass (configFile >> 'CfgWeapons' >> _click)) then + { + _magazines = getArray (configFile >> 'CfgWeapons' >> _click >> 'magazines'); + if (str _magazines != '[]') then + { + {_object addItemCargoGlobal [_x,3];} forEach _magazines; + }; + }; + + LastWeaponHolderObj = _object; + LastWeaponHolderPos = _pos; + }; + if (_option == 4) then + { + _target = _array select 2; + _EVENT = _array select 3; + if (_EVENT == 'UAV') exitWith + { + [_target,0] call EPX_server_triggerEvent; + }; + EPOCH_SpawnUnit_PVC = _EVENT; + (owner _target) publicVariableClient 'EPOCH_SpawnUnit_PVC'; + }; + if (_option == 5) then + { + _target = _array select 2; + _offset = _array select 3; + _maxHeight = _array select 4; + + _target attachTo [_playerObj,[0,_offset,_maxHeight]]; + }; + if (_option == 6) then + { + _offset = _array select 2; + + _date = date; + _date set [3,_offset]; + EPOCH_StaticDateTime = _date; + setDate _date; + }; + if (_option == 7) then + { + _msg = _array select 2; + if (typeName _msg == 'ARRAY') then + { + _msg = toString _msg; + }; + "+_massMessage+" = [_msg,0,0.7,10,0]; + publicVariable '"+_massMessage+"'; + }; + if (_option == 8) then + { + _target = _array select 2; + + Epoch_canBeRevived = true; + (owner _target) publicVariableClient 'Epoch_canBeRevived'; + _target setVariable['REVIVE',true,true]; + + _token = _array select 3; + [_target,_playerObj,_token]call EPX_server_revivePlayer; + + [_target] spawn { + _target = _this select 0; + uiSleep 3; + _target setDamage 0; + _target setFatigue 0; + }; + }; + if (_option == 5000) then + { + _select = _array select 2; + _pos = _array select 3; + _crate = 'Box_NATO_Wps_F' createVehicle _pos; + _crate setPos _pos; + clearWeaponCargoGlobal _crate; + clearMagazineCargoGlobal _crate; + clearBackpackCargoGlobal _crate; + clearItemCargoGlobal _crate; + if (_select == 1) then + { + {_crate addItemCargoGlobal [_x,30];} forEach + [ + 'KitStudWall', + 'KitWoodFloor', + 'KitWoodStairs', + 'KitFirePlace', + 'KitTiPi', + 'KitShelf', + 'KitFoundation', + 'KitPlotPole', + 'KitCinderWall', + 'bulk', + 'ItemBriefcase100oz', + 'ItemBriefcaseS100oz', + 'ItemKeyKit', + 'ItemHotwireKit', + 'ItemComboLock', + 'ItemPole', + 'ItemFuelBarrel', + 'ItemVault', + 'ItemLockbox', + 'PartPlankPack', + 'CinderBlocks', + 'MortarBucket', + 'PartPlywoodPack', + 'PartWoodLumber', + 'PartWoodPlywood', + 'VehicleRepair', + 'VehicleRepairLg', + 'Hatchet', + 'hatchet_swing', + 'MeleeSledge', + 'sledge_swing', + 'MultiGun', + 'EnergyPackLg', + 'Heal_EPOCH', + 'Defib_EPOCH', + 'Repair_EPOCH', + 'ChainSawR', + 'CSGAS' + ]; + }; + }; + }; + fnc_PVAH_AdminReq = compileFinal ([fnc_PVAH_AdminReq] call LysticCompilableString); + 'PVAH_AdminReq' addPublicVariableEventHandler {_this call fnc_PVAH_AdminReq;}; + [] spawn { + _time = diag_tickTime; + while {1 == 1} do + { + if (diag_tickTime > _time + 15) then + { + _time = diag_tickTime; + { + _puidX = getPlayerUID _x; + if (_puidX != '') then + { + if (!isNull _x) then + { + _txt = _x getVariable['Bob_bodyName','DEAD']; + if (_txt == 'DEAD') then { + _x setVariable['Bob_bodyName',name _x,true]; + }; + }; + }; + } forEach playableUnits; + }; + uiSleep 15; + }; + }; +"); +diag_log format['Bob.de %1 - AntiHack loaded!',diag_tickTime]; +/* ********************************************************************************* */ +/* *********************************www.Bob.de********************************* */ +/* *******************Developed by Bob (Bob23@gmail.com)****************** */ +/* ******************Copyright © 2014 Bob all rights reserved****************** */ + +/* + { + if !((getMarkerSize _x) isEqualTo [1,1]) then + { + _MText = format ['MarkerText: %1',markerText _x]; + _MSize = format['MarkerSize: %1',_x]; + _log = format['BadMarker: Text %1 Size %2',_MText,_MSize]; + "+_AH_KICKLOG+" = ['SERVER','0','HLOG',toArray _log];publicVariableServer '"+_AH_KICKLOG+"'; + deleteMarker _x; + }; + } forEach allMapMarkers; +*/ \ No newline at end of file diff --git a/MPMissions/epoch.Altis/adminmenu/A3AT.sqf b/MPMissions/epoch.Altis/adminmenu/A3AT.sqf new file mode 100644 index 0000000..da6b8d6 --- /dev/null +++ b/MPMissions/epoch.Altis/adminmenu/A3AT.sqf @@ -0,0 +1,2870 @@ +Bob_MAIN_CODE = { + systemchat 'Loading Menu...'; + + if (isNil 'ALT_IS_PRESSED') then {ALT_IS_PRESSED = false;}; + if (isNil 'Bob_toggled_A') then {Bob_toggled_A = ['==== OnTarget ====','==== Toggleable ===='];}; + if (isNil 'ALL_VEHS_TO_SEARCH') then + { + ALL_VEHS_TO_SEARCH = []; + _cfgvehicles = configFile >> 'cfgVehicles'; + for '_j' from 0 to (count _cfgvehicles)-1 do + { + _vehicle = _cfgvehicles select _j; + if (isClass _vehicle) then + { + _veh_type = configName _vehicle; + if ((getNumber (_vehicle >> 'scope') == 2) && (getText (_vehicle >> 'picture') != '') && ((_veh_type isKindOf 'Air') || (_veh_type isKindOf 'LandVehicle') || (_veh_type isKindOf 'Ship'))) then + { + if !((_veh_type isKindOf 'ParachuteBase') || (_veh_type isKindOf 'BIS_Steerable_Parachute')) then + { + ALL_VEHS_TO_SEARCH = ALL_VEHS_TO_SEARCH + [_veh_type]; + }; + }; + }; + }; + }; + if (isNil 'ALL_WEPS_TO_SEARCH') then + { + ALL_WEPS_TO_SEARCH = []; + _CfgWeapons = configFile >> 'CfgWeapons'; + for '_i' from 0 to (count _CfgWeapons)-1 do + { + _weapon = _CfgWeapons select _i; + if (isClass _weapon) then + { + _wpn_type = configName _weapon; + if (((getNumber (_weapon >> 'scope') == 0) || (getNumber (_weapon >> 'scope') == 2)) && (getText (_weapon >> 'picture') != '')) then + { + if !(_wpn_type in ALL_WEPS_TO_SEARCH) then + { + ALL_WEPS_TO_SEARCH = ALL_WEPS_TO_SEARCH + [_wpn_type]; + }; + }; + }; + }; + }; + if (isNil 'ALL_MAGS_TO_SEARCH') then + { + ALL_MAGS_TO_SEARCH = []; + _CfgWeapons = configFile >> 'cfgmagazines'; + for '_i' from 0 to (count _CfgWeapons)-1 do + { + _weapon = _CfgWeapons select _i; + if (isClass _weapon) then + { + _wpn_type = configName(_weapon); + if (((getNumber (_weapon >> 'scope') == 0) || (getNumber (_weapon >> 'scope') == 2)) && (getText (_weapon >> 'picture') != '')) then + { + if !(_wpn_type in ALL_MAGS_TO_SEARCH) then + { + ALL_MAGS_TO_SEARCH = ALL_MAGS_TO_SEARCH + [_wpn_type]; + }; + }; + }; + }; + }; + fnc_cleanDialogs = { + {_ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl _x;lbclear _ctrl;} forEach [LEFT_CTRL_ID,RIGHT_CTRL_ID]; + }; + fnc_FULLinit = + { + disableSerialization; + MAIN_DISPLAY_ID = 2727; + LEFT_CTRL_ID = 1500; + RIGHT_CTRL_ID = 1501; + if (isNull findDisplay MAIN_DISPLAY_ID) then {createdialog 'RscDisplayLocWeaponInfo';}; + waitUntil {!isNull findDisplay MAIN_DISPLAY_ID}; + if (isNil 'Bob_Layout_Selected') then {Bob_Layout_Selected = 1}; + if (isNil 'KeyBindsWorking') then {KeyBindsWorking = true;}; + Bob_add_weapons = nil; + Bob_add_magazines = nil; + Bob_add_vehicles = nil; + uiSleep 0.1; + [] spawn fnc_initMenu; + }; + fnc_initMenu = + { + disableSerialization; + if (Bob_Layout_Selected == 1) exitWith { + _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl LEFT_CTRL_ID; + _ctrl ctrlSetFont 'TahomaB'; + _ctrl ctrlCommit 0; + ctrlSetFocus _ctrl; + _ctrl ctrlSetEventHandler ['LBDblClick', 'call fnc_LBDblClick_LEFT;']; + _ctrl ctrlSetEventHandler ['LBSelChanged', 'call fnc_LBSelChanged_LEFT;']; + [] spawn fnc_fill_Bob_Player; + + _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_CTRL_ID; + _ctrl ctrlSetFont 'TahomaB'; + _ctrl ctrlCommit 0; + ctrlSetFocus _ctrl; + _ctrl ctrlSetEventHandler ['LBDblClick', 'call fnc_LBDblClick_RIGHT;']; + _ctrl ctrlSetEventHandler ['LBSelChanged', 'call fnc_LBSelChanged_RIGHT;']; + call fnc_fill_Bob_MAIN; + + if (MAIN_DISPLAY_ID == 2727) then { + ctrlSetText [1000,format['AntiHack & AdminsTools by Bob.de %1',VERSION]]; + if (!isNil 'life_adminlevel') then {ctrlSetText [1000,format['by Bob.de | CASH: %1K - BANK: %2K',life_cash/1000,life_atmcash/1000]];}; + ctrlSetText [1001,format['Alive Players: %1',count playableUnits]]; + ctrlSetText [1002,'Functions --- by Bob.de']; + ctrlSetText [1100,'']; + ctrlSetText [1101,'']; + ctrlSetText [1400,'']; + ctrlSetText [1401,'']; + call fnc_bottom_RIGHT; + + _btnClose = (findDisplay MAIN_DISPLAY_ID) displayCtrl 2; + _btnClose ctrlShow false; + _btnClose ctrlEnable false; + _btnClose ctrlCommit 0; + }; + }; + if (Bob_Layout_Selected == 2) exitWith { + _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl LEFT_CTRL_ID; + _ctrl ctrlSetPosition [SafeZoneX,SafeZoneY+0.03,0.4,SafeZoneH-1.125]; + _ctrl ctrlSetFont 'TahomaB'; + _ctrl ctrlCommit 0; + ctrlSetFocus _ctrl; + _ctrl ctrlSetEventHandler ['LBDblClick', 'call fnc_LBDblClick_LEFT;']; + _ctrl ctrlSetEventHandler ['LBSelChanged', 'call fnc_LBSelChanged_LEFT;']; + [] spawn fnc_fill_Bob_Player; + + _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_CTRL_ID; + _ctrl ctrlSetPosition [SafeZoneX+0.4,SafeZoneY+0.03,2,SafeZoneH-1.125]; + _ctrl ctrlSetFont 'TahomaB'; + _ctrl ctrlCommit 0; + ctrlSetFocus _ctrl; + _ctrl ctrlSetEventHandler ['LBDblClick', 'call fnc_LBDblClick_RIGHT;']; + _ctrl ctrlSetEventHandler ['LBSelChanged', 'call fnc_LBSelChanged_RIGHT;']; + call fnc_fill_Bob_MAIN; + + if (MAIN_DISPLAY_ID == 2727) then { + _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl 1000; + _ctrl ctrlSetBackgroundColor [0,0,0,0.9]; + _ctrl ctrlSetPosition [SafeZoneX,SafeZoneY,SafeZoneW,0.03]; + _ctrl ctrlSetFont 'TahomaB'; + _ctrl ctrlCommit 0; + + ctrlSetText [1400,'']; + _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl 1400; + _ctrl ctrlSetPosition [SafeZoneX,(SafeZoneY+0.03)+(SafeZoneH-1.125),SafeZoneW/2,0.04]; + _ctrl ctrlSetFont 'TahomaB'; + _ctrl ctrlCommit 0; + + ctrlSetText [1401,'']; + _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl 1401; + _ctrl ctrlSetPosition [SafeZoneX+(SafeZoneW/2),(SafeZoneY+0.03)+(SafeZoneH-1.125),SafeZoneW/2,0.04]; + _ctrl ctrlSetFont 'TahomaB'; + _ctrl ctrlCommit 0; + call fnc_bottom_RIGHT; + + _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl 1100; + _ctrl ctrlSetBackgroundColor [0,0,0,0.5]; + _ctrl ctrlSetPosition [SafeZoneX,SafeZoneY+0.03,0.4,SafeZoneH-1.125]; + _ctrl ctrlEnable false; + _ctrl ctrlCommit 0; + + _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl 1101; + _ctrl ctrlSetBackgroundColor [0,0,0,0.5]; + _ctrl ctrlSetPosition [SafeZoneX+0.4,SafeZoneY+0.03,SafeZoneW - 0.4,SafeZoneH-1.125]; + _ctrl ctrlEnable false; + _ctrl ctrlCommit 0; + + ctrlSetText [1000,format['AntiHack & AdminsTools by Bob.de %1',VERSION]]; + if (!isNil 'life_adminlevel') then {ctrlSetText [1000,format['by Bob.de | CASH: %1K - BANK: %2K',life_cash/1000,life_atmcash/1000]];}; + + { + _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl _x; + if (!isNull _ctrl) then + { + _ctrl ctrlShow false; + _ctrl ctrlEnable false; + _ctrl ctrlSetPosition [0,0,0,0]; + _ctrl ctrlCommit 0; + }; + } forEach [2,1001,1002,11000,11001,11002,11100,11200,11201]; + }; + }; + }; + fnc_colorizeMain = + { + _lsize = lbSize RIGHT_CTRL_ID; + for '_i' from 0 to _lsize do + { + _lbtxt = lbtext [RIGHT_CTRL_ID,_i]; + if (_lbtxt in Bob_Toggleable) then + { + if (_lbtxt in Bob_toggled_A) then + { + _ctrl lbSetColor [_i,[0,1,0,1]]; + } + else + { + _ctrl lbSetColor [_i,[1,0,0,1]]; + }; + }; + if (_lbtxt in Bob_SubMenus) then + { + _ctrl lbSetColor [_i,[0,0.8,0.8,1]]; + }; + if (_lbtxt in Bob_OnTargetNICE) then + { + _ctrl lbSetColor [_i,COLORNICE]; + }; + if (_lbtxt in Bob_OnTargetEVIL) then + { + _ctrl lbSetColor [_i,COLOREVIL]; + }; + }; + }; + fnc_fill_Bob_MAIN = + { + lbclear _ctrl; + _ADMINLEVELACCESS = call ADMINLEVELACCESS; + COLORNICE = [0,0.8,1,1]; + COLOREVIL = [0.99,0.8,0.8,1]; + SHOWHACKLOG = format['==== HackLog %1 ====',count AH_HackLogArray]; + SHOWTBANLOG = format['==== TempBanned %1 ====',count PVAH_AHTMPBAN]; + + Bob_HEADER = []; + Bob_SubMenus = + [ + SHOWHACKLOG,SHOWTBANLOG, + '==== Weapons ====','==== Magazines ====','==== Vehicles ====', + '==== Loadouts ====','==== OnTarget ====','==== Toggleable ====', + '==== AltisLife Misc ====','==== AltisLife Money ====' + ]; + Bob_OnTargetNICE = + [ + 'Teleport Target To Me','Teleport To', + 'Revive','Heal','Repair', + 'Move In My Vehicle','Move In Target Vehicle' + ]; + if (isNil 'EPOCH_KeyDown') then + { + { + Bob_OnTargetNICE = Bob_OnTargetNICE - [_x]; + } forEach ['Revive']; + }; + Bob_OnTargetEVIL = + [ + 'Spawn UAV','Spawn Epoch_Cloak_F','Spawn Sapper_F','Spawn GreatWhite_F', + 'Eject','Eject Crew','Kill','Zeus','Delete Vehicle', + 'Force Disconnect','Kick','TempBan' + ]; + if (isNil 'EPOCH_KeyDown') then + { + { + Bob_OnTargetEVIL = Bob_OnTargetEVIL - [_x]; + } forEach ['Spawn UAV','Spawn Epoch_Cloak_F','Spawn Sapper_F','Spawn GreatWhite_F']; + }; + Bob_OnTarget = Bob_OnTargetNICE + Bob_OnTargetEVIL; + Bob_Toggleable = + [ + 'Box-ESP','Map-Icons','PlotPole Marker','Construction Marker','DeadPlayer Marker', + 'God Mode','Vehicle God Mode','Lower Terrain','Vehboost','UnlimAmmo','noRecoil','FastFire', + 'Stealth / Invisible','Disable Announces','Show FPS' + ]; + if (isNil 'EPOCH_KeyDown') then + { + { + Bob_Toggleable = Bob_Toggleable - [_x]; + } forEach ['PlotPole Marker','Construction Marker']; + }; + if (!isNil 'life_adminlevel') then + { + { + Bob_Toggleable = Bob_Toggleable - [_x]; + } forEach ['noRecoil']; + }; + Bob_AltisLifeMisc = + [ + 'Give All Liscenses' + ]; + Bob_AltisLifeMoney = + [ + 'CASH','BANK', + '---', + '50K Cash','100K Cash','250K Cash','500K Cash','750K Cash','1.150K Cash','2.500K Cash','5.000K Cash','10.000K Cash', + '50K Bank','100K Bank','250K Bank','500K Bank','750K Bank','1.150K Bank','2.500K Bank','5.000K Bank','10.000K Bank' + ]; + Bob_Loadouts = + [ + 'Epoch 1','Epoch 2', + 'Sub Machinegun Kit','Light Infantry Kit','Heavy Infantry Kit','DMR Sniper Kit','LLR Sniper Kit', + 'Normal Sniper Kit' + ]; + + + _ctrl lbAdd SHOWHACKLOG; + if (!isNil 'Bob_add_HackLog') then + { + { + _ctrl lbAdd _x; + } forEach AH_HackLogArray; + }; + + _ctrl lbAdd SHOWTBANLOG; + if (!isNil 'Bob_add_TempBanned') then + { + { + _ctrl lbAdd _x; + } forEach PVAH_AHTMPBAN; + }; + + if ('==== Weapons ====' in _ADMINLEVELACCESS) then + { + _ctrl lbAdd '==== Weapons ===='; + if (!isNil 'Bob_add_weapons') then + { + { + _ctrl lbAdd _x; + _ctrl lbSetPicture [(lbsize _ctrl)-1,(getText (configFile >> 'CfgWeapons' >> _x >> 'picture'))]; + } forEach ALL_WEPS_TO_SEARCH; + }; + }; + + if ('==== Magazines ====' in _ADMINLEVELACCESS) then + { + _ctrl lbAdd '==== Magazines ===='; + if (!isNil 'Bob_add_magazines') then + { + { + _ctrl lbAdd _x; + _ctrl lbSetPicture [(lbsize _ctrl)-1,(getText (configFile >> 'CfgMagazines' >> _x >> 'picture'))]; + } forEach ALL_MAGS_TO_SEARCH; + }; + }; + + if ('==== Vehicles ====' in _ADMINLEVELACCESS) then + { + _ctrl lbAdd '==== Vehicles ===='; + if (!isNil 'Bob_add_vehicles') then + { + { + _ctrl lbAdd _x; + _ctrl lbSetPicture [(lbsize _ctrl)-1,(getText (configFile >> 'CfgVehicles' >> _x >> 'picture'))]; + } forEach ALL_VEHS_TO_SEARCH; + }; + }; + + if ('==== Loadouts ====' in _ADMINLEVELACCESS) then + { + _ctrl lbAdd '==== Loadouts ===='; + if (!isNil 'Bob_add_Loadouts') then + { + { + _ctrl lbAdd _x; + } forEach Bob_Loadouts; + }; + }; + + _ctrl lbAdd '==== OnTarget ===='; + if (isNil 'Bob_add_OnTarget') then + { + { + if (_x in _ADMINLEVELACCESS) then + { + _ctrl lbAdd _x; + }; + } forEach Bob_OnTargetNICE; + _ctrl lbAdd '---'; + { + if (_x in _ADMINLEVELACCESS) then + { + _ctrl lbAdd _x; + }; + } forEach Bob_OnTargetEVIL; + }; + + _ctrl lbAdd '==== Toggleable ===='; + if (isNil 'Bob_add_Toggleable') then + { + { + if (_x in _ADMINLEVELACCESS) then + { + _ctrl lbAdd _x; + }; + } forEach Bob_Toggleable; + }; + + if (!isNil 'life_adminlevel') then + { + _ctrl lbAdd '==== AltisLife Misc ===='; + if (!isNil 'Bob_add_AltisLife') then + { + { + if (_x in _ADMINLEVELACCESS) then + { + _ctrl lbAdd _x; + }; + } forEach Bob_AltisLifeMisc; + }; + if ('==== AltisLife Money ====' in _ADMINLEVELACCESS) then + { + _ctrl lbAdd '==== AltisLife Money ===='; + if (!isNil 'Bob_add_AltisLifeMoney') then + { + { + _ctrl lbAdd _x; + } forEach Bob_AltisLifeMoney; + _ctrl lbAdd ''; + }; + }; + }; + + + if ('Mass Message' in _ADMINLEVELACCESS) then {_ctrl lbAdd 'Mass Message';}; + if ('DayTime' in _ADMINLEVELACCESS) then {_ctrl lbAdd 'DayTime';}; + if ('NightTime' in _ADMINLEVELACCESS) then {_ctrl lbAdd 'NightTime';}; + if ('Add 2500 Crypto' in _ADMINLEVELACCESS) then {if (!isNil 'EPOCH_KeyDown') exitWith {_ctrl lbAdd 'Add 2500 Crypto';};}; + if ('Spawn Epoch-Box' in _ADMINLEVELACCESS) then {if (!isNil 'EPOCH_KeyDown') exitWith {_ctrl lbAdd 'Spawn Epoch-Box';};}; + if ('Spawn Ammo' in _ADMINLEVELACCESS) then {_ctrl lbAdd 'Spawn Ammo';}; + _ctrl lbAdd ''; + _ctrl lbAdd 'Menu Layout 1'; + _ctrl lbAdd 'Menu Layout 2'; + _ctrl lbAdd ''; + _ctrl lbAdd 'Self Disconnect'; + + call fnc_colorizeMain; + }; + fnc_fill_Bob_Player = + { + disableSerialization; + _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl LEFT_CTRL_ID; + lbclear _ctrl; + + _unsorted = playableUnits+alldead; + _sorted = []; + { + if (str _unsorted != '[]') then + { + _closest = _unsorted select 0; + if (!isNil '_closest') then + { + {if ((getPos _x distance player) < (getPos _closest distance player)) then {_closest = _x}} forEach _unsorted; + _sorted = _sorted + [_closest]; + _unsorted = _unsorted - [_closest] + }; + }; + } forEach _unsorted; + _sorted; + _playableUnits = _sorted; + + lbclear _ctrl; + + _puid = getPlayerUID player; + { + if (!isNull _x) then + { + _PUIDX = getPlayerUID _x; + if (_PUIDX != '') then + { + _txt = name _x; + if (isNil 'EPOCH_KeyDown') then {_txt = format['%1 [%2]',name _x,side _x]}; + _ctrl lbAdd _txt; + _ctrl lbSetData [(lbsize _ctrl)-1,'1']; + _clr = [1,1,1,1]; + _veh = vehicle _x; + _plrpic = getText (configFile >> 'CfgVehicles' >> (typeOf _veh) >> 'picture'); + if (alive _x) then + { + _clr = [0.2,0.2,0.9,1]; + if (_x == _veh) then + { + _clr = [1,0.17,0.17,1]; + _wpnstate = weaponState _x; + _cwep = _wpnstate select 0; + if (_cwep != '') then + { + _plrpic = getText (configFile >> 'CfgWeapons' >> _cwep >> 'picture'); + }; + }; + }; + if (((_PUIDX in Bob_ADMINS) && !(_PUIDX in Bob_DEVS)) || ((_PUIDX in Bob_DEVS) && (_puid in Bob_DEVS)) || (_PUIDX == _puid)) then + { + _clr = [0,1,0,1]; + }; + _ctrl lbSetColor [(lbsize _ctrl)-1,_clr]; + _ctrl lbSetPicture [(lbsize _ctrl)-1,_plrpic]; + }; + }; + true + } count _playableUnits; + + _ctrl lbAdd '===================='; + _ctrl lbAdd 'Sorted by distance to you';_ctrl lbSetColor [(lbsize _ctrl)-1,[1,1,1,1]]; + _ctrl lbAdd 'Green -> Admin';_ctrl lbSetColor [(lbsize _ctrl)-1,[0,1,0,1]]; + _ctrl lbAdd 'Red -> Player';_ctrl lbSetColor [(lbsize _ctrl)-1,[1,0.17,0.17,1]]; + _ctrl lbAdd 'Blue -> Player in Vehicle';_ctrl lbSetColor [(lbsize _ctrl)-1,[0.2,0.2,0.9,1]]; + _ctrl lbAdd 'White -> Dead Player';_ctrl lbSetColor [(lbsize _ctrl)-1,[1,1,1,1]]; + }; + fnc_LBDblClick_LEFT = + { + _target = lbtext [LEFT_CTRL_ID, (lbCurSel LEFT_CTRL_ID)]; + SELECTED_DOUBLECLICK_TARGET = objNull; + if (!isNil 'SELECTED_TARGET_PLAYER') then + { + if (!isNull SELECTED_TARGET_PLAYER) then + { + SELECTED_DOUBLECLICK_TARGET = SELECTED_TARGET_PLAYER; + }; + }; + if (isNull SELECTED_DOUBLECLICK_TARGET) then + { + _break = false; + { + _puid = getPlayerUID _x; + if (_puid != '') then + { + _search = name _x; + if (isNil 'EPOCH_KeyDown') then {_search = format['%1 [%2]',name _x,side _x]}; + if (_search == _target) then + { + _break = true; + SELECTED_DOUBLECLICK_TARGET = _x; + }; + }; + if (_break) exitWith {true}; + true; + } count (playableUnits+allDead); + }; + _ADMINLEVELACCESS = call ADMINLEVELACCESS; + if ('spectating' in _ADMINLEVELACCESS) then {[] spawn adminspec;}; + }; + fnc_LBSelChanged_LEFT = + { + _target = lbtext [LEFT_CTRL_ID, (lbCurSel LEFT_CTRL_ID)]; + + _break = false; + _health = ''; + _distance = ''; + _data = ''; + _puid = ''; + SELECTED_TARGET_PLAYER = objNull; + { + _puid = getPlayerUID _x; + if (_puid != '') then + { + _search = name _x; + if (isNil 'EPOCH_KeyDown') then {_search = format['%1 [%2]',name _x,side _x]}; + if (_search == _target) then + { + _break = true; + SELECTED_TARGET_PLAYER = _x; + }; + }; + if (_break) exitWith {true}; + true; + } count (playableUnits+allDead); + + if (isNil 'SELECTED_TARGET_PLAYER') then {SELECTED_TARGET_PLAYER = objNull;}; + if (!isNull SELECTED_TARGET_PLAYER) then + { + _health = round(100 - ((damage SELECTED_TARGET_PLAYER)*100)); + _distance = round(SELECTED_TARGET_PLAYER distance player); + if (MAIN_DISPLAY_ID == 2727) then { + _log = format['%1m - HP: %2 - UID: %3',_distance,_health,_puid]; + ctrlSetText [1400,_log]; + }; + }; + }; + fnc_LBDblClick_RIGHT = + { + _click = format['%1',lbtext [RIGHT_CTRL_ID, (lbCurSel RIGHT_CTRL_ID)]]; + if (_click == '') exitWith {}; + if (_click in AH_HackLogArray) exitWith {}; + if (_click in Bob_Toggleable) then + { + if (_click == 'Box-ESP') then {[] spawn Bob_fnc_boxesp;}; + if (_click == 'Map-Icons') then {[] spawn Bob_A3MAPICONS;}; + if (_click == 'PlotPole Marker') then {[] spawn adminPlotPole;}; + if (_click == 'Construction Marker') then {[] spawn adminConstructions;}; + if (_click == 'DeadPlayer Marker') then {[] spawn adminDeadPlayer;}; + if (_click == 'God Mode') then {[] spawn Bob_A3Invulnerability;}; + if (_click == 'Vehicle God Mode') then {[] spawn fnc_Bob_A3cargod;}; + if (_click == 'Lower Terrain') then {[] spawn fnc_LowerTerrain;}; + if (_click == 'Vehboost') then {[] spawn Bob_VehicleBoost;}; + if (_click == 'UnlimAmmo') then {[] spawn fnc_Bob_A3UnlAmmo;}; + if (_click == 'noRecoil') then {[] spawn fnc_Bob_A3noRecoil;}; + if (_click == 'FastFire') then {[] spawn fnc_Bob_A3FF;}; + if (_click == 'Stealth / Invisible') then {[] spawn fnc_BobHIDE;}; + if (_click == 'Disable Announces') then {[] spawn fnc_DisableAnnouncements;}; + if (_click == 'Show FPS') then {[] call Bob_A3showfps;}; + + if !(_click in Bob_toggled_A) then + { + lbSetColor [RIGHT_CTRL_ID,_click,[0,1,0,1]]; + Bob_toggled_A = Bob_toggled_A + [_click]; + } + else + { + lbSetColor [RIGHT_CTRL_ID, _click, [1,0,0,1]]; + Bob_toggled_A = Bob_toggled_A - [_click]; + }; + }; + if (_click in Bob_SubMenus) then + { + lbSetColor [RIGHT_CTRL_ID,_click,[0,0.8,0.8,1]]; + }; + if (_click in Bob_OnTargetNICE) then + { + lbSetColor [RIGHT_CTRL_ID,_click,COLORNICE]; + }; + if (_click in Bob_OnTargetEVIL) then + { + lbSetColor [RIGHT_CTRL_ID,_click,COLOREVIL]; + }; + if (_click in Bob_OnTarget) then + { + _target = lbtext [LEFT_CTRL_ID, (lbCurSel LEFT_CTRL_ID)]; + if (_target == '') then + { + hint 'You did not select a Target!'; + } + else + { + if (isNil 'SELECTED_TARGET_PLAYER') then {SELECTED_TARGET_PLAYER = objNull;}; + _unit = SELECTED_TARGET_PLAYER; + if (isNull _unit) then + { + _unit = objNull; + _break = false; + { + if (getPlayerUID _x != '') then + { + _search = name _x; + if (isNil 'EPOCH_KeyDown') then {_search = format['%1 [%2]',name _x,side _x]}; + if (_search == _target) then + { + _break = true; + _unit = _x; + }; + }; + if (_break) exitWith {true}; + true + } count (playableUnits+allDead); + }; + if (!isNull _unit) then + { + if (_click == 'Teleport Target To Me') then {[_unit] call fnc_TP2ME;}; + if (_click == 'Teleport To') then {[_unit] call fnc_TPME2;}; + if (_click == 'Revive') then {[_unit] call fnc_ReviveTarget;}; + if (_click == 'Heal') then {[_unit] call fnc_HealTarget;}; + if (_click == 'Repair') then {[_unit] call fnc_RepairTarget;}; + if (_click == 'Move In My Vehicle') then {[_unit] call fnc_MoveInMyVehicle;}; + if (_click == 'Move In Target Vehicle') then {[_unit] call fnc_MoveInTargetVehicle;}; + + if (_click == 'Spawn UAV') then {[_unit,'UAV'] call fnc_spawn_EVENT;}; + if (_click == 'Spawn Epoch_Cloak_F') then {[_unit,'Epoch_Cloak_F'] call fnc_spawn_EVENT;}; + if (_click == 'Spawn Sapper_F') then {[_unit,'Epoch_Sapper_F'] call fnc_spawn_EVENT;}; + if (_click == 'Spawn GreatWhite_F') then {[_unit,'GreatWhite_F'] call fnc_spawn_EVENT;}; + if (_click == 'Eject') then {[_unit] call fnc_EjectTargetVeh;}; + if (_click == 'Eject Crew') then {[_unit] call fnc_EjectCrewTargetVeh;}; + if (_click == 'Kill') then {[_unit] call fnc_Kill_selected;}; + if (_click == 'Zeus') then {[_unit] spawn zeus_attack;}; + if (_click == 'Delete Vehicle') then {[_unit] call fnc_deleteVeh_selected;}; + if (_click == 'Force Disconnect') then {[_unit] call fnc_Disconnect_selected;}; + if (_click == 'Kick') then {[_unit] call fnc_Kick_selected;}; + if (_click == 'TempBan') then {[_unit] call fnc_TempBan_selected;}; + }; + }; + }; + if (!isNil 'life_adminlevel') then + { + if (_click in Bob_AltisLifeMisc) then + { + if (_click == 'Give All Liscenses') then {{missionnamespace setVariable[(_x select 0),true];} foreach life_licenses;}; + }; + if (_click in Bob_AltisLifeMoney) then + { + if (_click == '50K Cash') then {['cash',50000] call fnc_AltisLife_cash;}; + if (_click == '100K Cash') then {['cash',100000] call fnc_AltisLife_cash;}; + if (_click == '250K Cash') then {['cash',250000] call fnc_AltisLife_cash;}; + if (_click == '500K Cash') then {['cash',500000] call fnc_AltisLife_cash;}; + if (_click == '750K Cash') then {['cash',750000] call fnc_AltisLife_cash;}; + if (_click == '1.150K Cash') then {['cash',1150000] call fnc_AltisLife_cash;}; + if (_click == '2.500K Cash') then {['cash',2500000] call fnc_AltisLife_cash;}; + if (_click == '5.000K Cash') then {['cash',5000000] call fnc_AltisLife_cash;}; + if (_click == '10.000K Cash') then {['cash',10000000] call fnc_AltisLife_cash;}; + + if (_click == '50K Bank') then {['bank',50000] call fnc_AltisLife_cash;}; + if (_click == '100K Bank') then {['bank',100000] call fnc_AltisLife_cash;}; + if (_click == '250K Bank') then {['bank',250000] call fnc_AltisLife_cash;}; + if (_click == '500K Bank') then {['bank',500000] call fnc_AltisLife_cash;}; + if (_click == '750K Bank') then {['bank',750000] call fnc_AltisLife_cash;}; + if (_click == '1.150K Bank') then {['bank',1150000] call fnc_AltisLife_cash;}; + if (_click == '2.500K Bank') then {['bank',2500000] call fnc_AltisLife_cash;}; + if (_click == '5.000K Bank') then {['bank',5000000] call fnc_AltisLife_cash;}; + if (_click == '10.000K Bank') then {['bank',10000000] call fnc_AltisLife_cash;}; + }; + }; + if (_click in Bob_Loadouts) then + { + if (_click == 'Epoch 1') then {[0] call fnc_add_loadout;}; + if (_click == 'Epoch 2') then {[1] call fnc_add_loadout;}; + if (_click == 'Sub Machinegun Kit') then {[2] call fnc_add_loadout;}; + if (_click == 'Light Infantry Kit') then {[3] call fnc_add_loadout;}; + if (_click == 'Heavy Infantry Kit') then {[4] call fnc_add_loadout;}; + if (_click == 'DMR Sniper Kit') then {[5] call fnc_add_loadout;}; + if (_click == 'LLR Sniper Kit') then {[6] call fnc_add_loadout;}; + if (_click == 'Normal Sniper Kit') then {[7] call fnc_add_loadout;}; + }; + if (_click == '==== OnTarget ====') then {if (isNil 'Bob_add_OnTarget') then {Bob_add_OnTarget = true;} else {Bob_add_OnTarget = nil;};}; + if (_click == '==== Toggleable ====') then {if (isNil 'Bob_add_Toggleable') then {Bob_add_Toggleable = true;} else {Bob_add_Toggleable = nil;};}; + if (_click == '==== AltisLife Misc ====') then {if (isNil 'Bob_add_AltisLife') then {Bob_add_AltisLife = true;} else {Bob_add_AltisLife = nil;};}; + if (_click == '==== AltisLife Money ====') then {if (isNil 'Bob_add_AltisLifeMoney') then {Bob_add_AltisLifeMoney = true;} else {Bob_add_AltisLifeMoney = nil;};}; + if (_click == '==== Loadouts ====') then {if (isNil 'Bob_add_Loadouts') then {Bob_add_Loadouts = true;} else {Bob_add_Loadouts = nil;};}; + if (_click == '==== Weapons ====') then {if (isNil 'Bob_add_weapons') then {Bob_add_weapons = true;} else {Bob_add_weapons = nil;};}; + if (_click == '==== Magazines ====') then {if (isNil 'Bob_add_magazines') then {Bob_add_magazines = true;} else {Bob_add_magazines = nil;};}; + if (_click == '==== Vehicles ====') then {if (isNil 'Bob_add_vehicles') then {Bob_add_vehicles = true;} else {Bob_add_vehicles = nil;};}; + if (_click == SHOWHACKLOG) then {if (isNil 'Bob_add_HackLog') then {Bob_add_HackLog = true;} else {Bob_add_HackLog = nil;};}; + if (_click == SHOWTBANLOG) then {if (isNil 'Bob_add_TempBanned') then {Bob_add_TempBanned = true;} else {Bob_add_TempBanned = nil;};}; + if (_click in PVAH_AHTMPBAN) then + { + PVAH_AdminReq = [-667,player,_click]; + publicVariableServer 'PVAH_AdminReq'; + systemchat format['Removed %1 from TempBanList',_click]; + }; + if (_click == 'Mass Message') then {[] call fnc_mass_message;}; + if (_click == 'DayTime') then {[11] call fnc_spawn_timemachine;}; + if (_click == 'NightTime') then {[23] call fnc_spawn_timemachine;}; + if (_click == 'Add 2500 Crypto') then {[2500] call fnc_spawn_Crypto;}; + if (_click == 'Spawn Epoch-Box') then {[1] call fnc_spawn_Box;}; + if (_click == 'Spawn Ammo') then {[] call Bob_A3addAmmo;}; + if (_click == 'Menu Layout 1') then {closeDialog 0;Bob_Layout_Selected = 1;[] spawn fnc_FULLinit;}; + if (_click == 'Menu Layout 2') then {closeDialog 0;Bob_Layout_Selected = 2;[] spawn fnc_FULLinit;}; + if (_click == 'Self Disconnect') then {(finddisplay 46) closeDisplay 0;}; + if (_click in Bob_HEADER) then + { + lbSetColor [RIGHT_CTRL_ID, _click, [0.2,0.4,1,1]]; + }; + if ((isClass (configFile >> 'CfgWeapons' >> _click)) || (isClass (configFile >> 'CfgMagazines' >> _click)) || (_click in ALL_WEPS_TO_SEARCH) || (_click in ALL_MAGS_TO_SEARCH)) then + { + _pos = player modelToWorld [0,1,0]; + + _log = format['Spawning %1 on the ground infront of you!',_click]; + cutText [_log, 'PLAIN DOWN']; + hint _log; + + PVAH_AdminReq = [3,player,_pos,_click]; + publicVariableServer 'PVAH_AdminReq'; + }; + if ((isClass (configFile >> 'CfgVehicles' >> _click)) || (_click in ALL_VEHS_TO_SEARCH)) then + { + _position = player modelToWorld [0,8,0]; + NEW_VEHICLE_POS = _position; + _dir = getDir (vehicle player); + + _log = format['Spawning %1 infront of you!',_click]; + cutText [_log, 'PLAIN DOWN']; + hint _log; + + PVAH_AdminReq = [0,player,_click,_position,_dir]; + publicVariableServer 'PVAH_AdminReq'; + }; + _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_CTRL_ID; + lbclear _ctrl; + call fnc_fill_Bob_MAIN; + }; + fnc_LBSelChanged_RIGHT = + { + _ctrl = (findDisplay MAIN_DISPLAY_ID) displayCtrl RIGHT_CTRL_ID; + lbclear _ctrl; + call fnc_fill_Bob_MAIN; + if (MAIN_DISPLAY_ID == 2727) then {call fnc_bottom_RIGHT;}; + + _selected = lbtext [RIGHT_CTRL_ID, (lbCurSel RIGHT_CTRL_ID)]; + if (_selected in AH_HackLogArray) exitWith {systemchat _selected;}; + _status = 'no'; + if (isClass (configFile >> 'CfgWeapons' >> _selected)) then + { + _status = 'CfgWeapons'; + }; + if (isClass (configFile >> 'CfgMagazines' >> _selected)) then + { + _status = 'CfgMagazines'; + }; + if (isClass (configFile >> 'CfgVehicles' >> _selected)) then + { + _status = 'CfgVehicles'; + }; + if (_status != 'no') then + { + _pic = (getText (configFile >> _status >> _selected >> 'picture')); + [' + + ',0,safezoneY+0.01,15,0,0,8406] spawn bis_fnc_dynamicText; + + _txt = (gettext (configFile >> _status >> _selected >> 'Library' >> 'libTextDesc')); + [' + '+_txt+' + ',0,0.8 * safezoneH + safezoneY,15,0,0,8407] spawn bis_fnc_dynamicText; + }; + }; + fnc_bottom_RIGHT = + { + _selected = format['%1',lbtext [RIGHT_CTRL_ID, (lbCurSel RIGHT_CTRL_ID)]]; + if (!isNil 'life_adminlevel') then + { + _ctrlb = (findDisplay MAIN_DISPLAY_ID) displayCtrl 1401; + _ctrltxt = ctrlText _ctrlb; + _amount = parseNumber _ctrltxt; + if (_selected == 'CASH') exitWith + { + ctrlSetText [1400,'Enter amount and press CASH again -->']; + if (_amount > 0) exitWith {life_cash = _amount;}; + }; + if (_selected == 'BANK') exitWith + { + ctrlSetText [1400,'Enter amount and press BANK again -->']; + if (_amount > 0) exitWith {life_atmcash = _amount;}; + }; + }; + + _cfg = ''; + if (isClass (configFile >> 'CfgWeapons' >> _selected)) then + { + _cfg = 'CfgWeapons'; + } + else + { + if (isClass (configFile >> 'CfgMagazines' >> _selected)) then + { + _cfg = 'CfgMagazines'; + } + else + { + if (isClass (configFile >> 'CfgVehicles' >> _selected)) then + { + _cfg = 'CfgVehicles'; + }; + }; + }; + if (_cfg != '') then + { + _txt = getText (configFile >> _cfg >> _selected >> 'displayName'); + ctrlSetText [1401,format['%1 - %2',_selected,_txt]]; + }; + if (!isNil 'life_adminlevel') then {ctrlSetText [1000,format['by Bob.de | CASH: %1K - BANK: %2K',life_cash/1000,life_atmcash/1000,_selected]];}; + }; + admin_d0 = { + 'respawn_west' setMarkerText (_this select 0); + PVAH_AdminReq = [69,player]; + publicVariableServer 'PVAH_AdminReq'; + }; + ((findDisplay 12) displayCtrl 51) ctrlRemoveAllEventHandlers 'MouseButtonDown'; + ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ['MouseButtonDown',' + if ((_this select 1 == 0) && (ALT_IS_PRESSED)) then + { + _object = vehicle player; + _pos = ((_this select 0) posScreenToWorld [_this select 2, _this select 3]); + if (_object isKindOf ''AIR'') then + { + _posObj = getPosATL _object; + _object setPosATL [_pos select 0,_pos select 1,_posObj select 2]; + } + else + { + _object setPosATL _pos; + }; + ALT_IS_PRESSED = false; + {player reveal _x;} foreach (position player nearObjects 50); + }; + ']; + admin_showGear = { + closeDialog 0; + if (!isNil 'SELECTED_DOUBLECLICK_TARGET') then + { + if (!isNull SELECTED_DOUBLECLICK_TARGET) then + { + player action ['Gear', SELECTED_DOUBLECLICK_TARGET]; + cutText [format['Showing Gear of %1',name SELECTED_DOUBLECLICK_TARGET], 'PLAIN DOWN']; + }; + }; + }; + fnc_getConfig = { + _cfg = ''; + if (isClass (configFile >> 'CfgWeapons' >> _this)) then + { + _cfg = 'CfgWeapons'; + } + else + { + if (isClass (configFile >> 'CfgMagazines' >> _this)) then + { + _cfg = 'CfgMagazines'; + } + else + { + if (isClass (configFile >> 'CfgVehicles' >> _this)) then + { + _cfg = 'CfgVehicles'; + }; + }; + }; + _cfg + }; + remove_spec_000 = { + (vehicle player) switchCamera cameraView; + for '_i' from 3025 to 3045 do {['',0,0,1,0,0,_i] spawn bis_fnc_dynamicText;}; + if (!isNil 'SpecateLoopActive') then + { + [] spawn remove_spec_000; + SpecateLoopActive = nil; + cutText ['Finished spectating.', 'PLAIN DOWN']; + }; + }; + adminspec = { + cutText ['Spectating - Press F10 to exit.', 'PLAIN DOWN']; + if (isNil 'SpecateLoopActive') then + { + SpecateLoopActive = true; + while {!isNil 'SpecateLoopActive'} do + { + uiSleep 0.2; + + if (isNil 'SELECTED_DOUBLECLICK_TARGET') then {SELECTED_DOUBLECLICK_TARGET = player;}; + _unit = SELECTED_DOUBLECLICK_TARGET; + if (isNull _unit) then {_unit = player;}; + if (str(_unit) == '') then {_unit = player;}; + if (getPlayerUID _unit == '') then {_unit = player;}; + + + _veh = vehicle _unit; + if (str _veh != str cameraOn) then {_veh switchCamera cameraView;for '_i' from 3025 to 3045 do {['',0,0,1,0,0,_i] spawn bis_fnc_dynamicText;};}; + + + _log = format['%1 (%2) @%3 SPD %4',name _unit,getPlayerUID _unit,mapGridPosition _veh,abs(speed _veh)]; + [''+_log+'',safezoneX+0.2,safezoneY+0.405,0.3,0,0,3033] spawn bis_fnc_dynamicText; + + _log2 = format['Health: %1',(1-(damage _unit))*100]; + [''+_log2+'',safezoneX+0.2,safezoneY+0.435,0.3,0,0,3034] spawn bis_fnc_dynamicText; + + _cwep = ''; + _cammo = ''; + _cmags = ''; + _wpnstate = weaponState _unit; + if (!isNil '_wpnstate') then + { + if (str _wpnstate != '[]') then + { + _cwep = _wpnstate select 0; + _cmags = {_wpnstate select 3 == _x} count magazines _unit; + _cammo = _wpnstate select 4; + }; + }; + if (_cwep == '') then + { + _log3 = 'Bare Fists'; + [''+_log3+'',safezoneX+0.2,safezoneY+0.465,0.3,0,0,3035] spawn bis_fnc_dynamicText; + } + else + { + _type = _cwep; + _cfg = _type call fnc_getConfig; + _displayName = getText (configFile >> _cfg >> _type >> 'displayName'); + _pic = getText (configFile >> _cfg >> _type >> 'picture'); + + _log3 = format[' %1 [%2] (%3/%4)',_displayName,_cwep,_cammo,_cmags]; + [' + + '+_log3+' + ', + safezoneX+0.2,safezoneY+0.465,0.3,0,0,3035] spawn bis_fnc_dynamicText; + + if (_veh != _unit) then + { + _cwepsV = weapons _veh; + _cwepsV = _cwepsV - ['CarHorn']; + _cwepsV = _cwepsV - ['MiniCarHorn']; + _cwepsV = _cwepsV - ['SportCarHorn']; + _cwepsV = _cwepsV - ['TruckHorn']; + if (count _cwepsV > 0) then + { + _id = 3032; + _YPOS = safezoneY+0.355; + + { + _cwep = _x; + _cammo = _veh ammo _cwep; + _cmags = {currentMagazine _veh == _x} count magazines _veh; + + _type = _cwep; + _cfg = _type call fnc_getConfig; + _displayName = getText (configFile >> _cfg >> _type >> 'displayName'); + + _log3a = format[' %1 [%2] (%3/%4)',_displayName,_cwep,_cammo,_cmags]; + [''+_log3a+'',safezoneX+0.2,_YPOS,0.3,0,0,_id] spawn bis_fnc_dynamicText; + + _id = _id - 1; + _YPOS = _YPOS - 0.03; + } forEach _cwepsV; + }; + }; + }; + + + _ct = cursorTarget; + if (!isNull _ct) then + { + if (getPlayerUID _ct != '') then + { + _cwep_ct = currentWeapon _ct; + _cammo_ct = _ct ammo _cwep_ct; + _cmags_ct = {currentMagazine _ct == _x} count magazines _ct; + + _log4 = format['%1 (%2) @%3 SPD %4',name _ct,getPlayerUID _ct,mapGridPosition _ct,abs(speed _ct)]; + [''+_log4+'',safezoneX+0.2,safezoneY+0.545,0.3,0,0,3036] spawn bis_fnc_dynamicText; + + _log5 = format['Health: %1 Distance: %2m',(1-(damage _ct))*100,round(cameraOn distance _ct)]; + [''+_log5+'',safezoneX+0.2,safezoneY+0.575,0.3,0,0,3037] spawn bis_fnc_dynamicText; + + _type = _cwep_ct; + _cfg = _type call fnc_getConfig; + _displayName = getText (configFile >> _cfg >> _type >> 'displayName'); + _pic = getText (configFile >> _cfg >> _type >> 'picture'); + _log6 = format[' %1 [%2] (%3/%4)',_displayName,_cwep_ct,_cammo_ct,_cmags_ct]; + [' + + '+_log6+' + ', + safezoneX+0.2,safezoneY+0.605,0.3,0,0,3038] spawn bis_fnc_dynamicText; + } + else + { + _type = typeOf _ct; + _cfg = _type call fnc_getConfig; + _displayName = getText (configFile >> _cfg >> _type >> 'displayName'); + _log4 = format['%1 [%2] @%3',_displayName,_type,mapGridPosition _ct]; + [''+_log4+'',safezoneX+0.2,safezoneY+0.545,0.3,0,0,3036] spawn bis_fnc_dynamicText; + + _log5 = format['Health: %1 - Distance: %2m',(1-(damage _ct))*100,round(cameraOn distance _ct)]; + [''+_log5+'',safezoneX+0.2,safezoneY+0.575,0.3,0,0,3037] spawn bis_fnc_dynamicText; + + ['',0,0,1,0,0,3038] spawn bis_fnc_dynamicText; + }; + + _vehCT = vehicle _ct; + if ((_vehCT isKindOf 'LandVehicle') || (_vehCT isKindOf 'Air') || (_vehCT isKindOf 'Ship') || (_vehCT isKindOf 'Static')) then + { + _cwepsV = weapons _vehCT; + _cwepsV = _cwepsV - ['CarHorn']; + _cwepsV = _cwepsV - ['MiniCarHorn']; + _cwepsV = _cwepsV - ['SportCarHorn']; + _cwepsV = _cwepsV - ['TruckHorn']; + if (count _cwepsV > 0) then + { + _id = 3039; + _YPOS = safezoneY+0.655; + + { + _cwep = _x; + _cammo = _vehCT ammo _cwep; + _cmags = {currentMagazine _vehCT == _x} count magazines _vehCT; + + _type = _cwep; + _cfg = _type call fnc_getConfig; + _displayName = getText (configFile >> _cfg >> _type >> 'displayName'); + + _log6a = format[' %1 [%2] (%3/%4)',_displayName,_cwep,_cammo,_cmags]; + [''+_log6a+'',safezoneX+0.2,_YPOS,0.3,0,0,_id] spawn bis_fnc_dynamicText; + + _id = _id + 1; + _YPOS = _YPOS + 0.03; + } forEach _cwepsV; + }; + }; + }; + }; + [] spawn remove_spec_000; + }; + }; + fnc_TP2ME = + { + _unit = _this select 0; + _pos = player modelToWorld [0,5,0]; + PVAH_AdminReq = [1,player,_unit,_pos]; + publicVariableServer 'PVAH_AdminReq'; + }; + fnc_TPME2 = + { + _unit = _this select 0; + _pos = _unit modelToWorld [0,-5,0]; + (vehicle player) setPos _pos; + }; + fnc_MoveInMyVehicle = + { + _unit = _this select 0; + _unit moveInAny (vehicle player); + }; + fnc_MoveInTargetVehicle = + { + _unit = _this select 0; + player moveInAny (vehicle _unit); + }; + fnc_EjectTargetVeh = + { + _unit = _this select 0; + _unit action ['eject',(vehicle _unit)]; + }; + fnc_EjectCrewTargetVeh = + { + _unit = _this select 0; + _veh = (vehicle _unit); + {_x action ['eject',_veh];} forEach (crew _veh); + }; + fnc_add_loadout = + { + _select = _this select 0; + _wset = player; + removeAllWeapons _wset; + removeAllItems _wset; + removebackpack _wset; + removeAllAssignedItems _wset; + switch (_select) do + { + case 0: { + _wset = player; + _wset addBackpack 'B_Carryall_ocamo'; + _wset forceAddUniform 'O_G_Soldier_M_F'; + _wset addItemToBackpack 'V_PlateCarrierIA1_dgtl'; + _wset addItemToBackpack 'Heal_EPOCH'; + _wset addItemToBackpack 'Defib_EPOCH'; + _wset addItemToBackpack 'Repair_EPOCH'; + _wset addItemToBackpack 'EnergyPackLg'; + _wset addItemToBackpack 'MultiGun'; + _wset addItemToBackpack 'ItemWatch'; + _wset addItemToBackpack 'ItemCompass'; + _wset addItemToBackpack 'ItemGPS'; + _wset addItemToBackpack 'ItemMap'; + _wset addItemToBackpack 'Rangefinder'; + _wset addItemToBackpack 'NVGoggles'; + _wset addItemToBackpack 'Hatchet'; + _wset addItemToBackpack 'hatchet_swing'; + _wset addItemToBackpack 'MeleeSledge'; + _wset addItemToBackpack 'sledge_swing'; + _wset addItemToBackpack 'srifle_EBR_F'; + _wset addItemToBackpack '20Rnd_762x51_Mag'; + _wset addItemToBackpack 'optic_DMS'; + _wset addItemToBackpack 'optic_SOS'; + _wset addItemToBackpack 'optic_MRCO'; + _wset addItemToBackpack 'muzzle_snds_B'; + }; + case 1: { + _wset = player; + _wset addBackpack 'B_Carryall_ocamo'; + _wset forceAddUniform 'U_B_GhillieSuit'; + _wset addItemToBackpack 'V_PlateCarrierIA1_dgtl'; + _wset addItemToBackpack 'Heal_EPOCH'; + _wset addItemToBackpack 'Defib_EPOCH'; + _wset addItemToBackpack 'Repair_EPOCH'; + _wset addItemToBackpack 'EnergyPackLg'; + _wset addItemToBackpack 'MultiGun'; + _wset addItemToBackpack 'ItemWatch'; + _wset addItemToBackpack 'ItemCompass'; + _wset addItemToBackpack 'ItemGPS'; + _wset addItemToBackpack 'ItemMap'; + _wset addItemToBackpack 'Rangefinder'; + _wset addItemToBackpack 'NVGoggles'; + _wset addItemToBackpack 'Hatchet'; + _wset addItemToBackpack 'hatchet_swing'; + _wset addItemToBackpack 'MeleeSledge'; + _wset addItemToBackpack 'sledge_swing'; + _wset addItemToBackpack 'srifle_EBR_F'; + _wset addItemToBackpack '20Rnd_762x51_Mag'; + _wset addItemToBackpack 'optic_DMS'; + _wset addItemToBackpack 'optic_SOS'; + _wset addItemToBackpack 'optic_MRCO'; + _wset addItemToBackpack 'muzzle_snds_B'; + _wset addVest 'V_BandollierB_cbr'; + _wset addWeapon 'NVGoggles'; + _wset addWeapon 'Rangefinder'; + _wset addPrimaryWeaponItem 'optic_Aco'; + _wset addPrimaryWeaponItem 'muzzle_snds_M'; + (unitBackpack _wset) additemCargo ['FirstAidKit',2]; + (unitBackpack _wset) additemCargo ['30Rnd_556x45_Stanag', 9]; + (unitBackpack _wset) additemCargo ['30Rnd_9x21_Mag', 9]; + (unitBackpack _wset) additemCargo ['handGrenade', 2]; + _wset addWeapon 'srifle_LRR_F'; + [] call Bob_A3addAmmo; + [] call Bob_A3addAmmo; + [] call Bob_A3addAmmo; + }; + case 2: { + _wset = player; + _wset addHeadgear 'H_Beret_02'; + _wset addGoggles 'G_Sport_Blackred'; + _wset addUniform 'U_OrestesBody'; + _wset addVest 'V_BandollierB_cbr'; + _wset addBackpack 'B_Carryall_ocamo'; + _wset addWeapon 'NVGoggles'; + _wset addWeapon 'Rangefinder'; + _wset addMagazine '30Rnd_9x21_Mag'; + _wset addweapon 'hgun_PDW2000_Holo_snds_F'; + _wset addMagazine '6Rnd_45ACP_Cylinder'; + _wset addweapon 'hgun_Pistol_heavy_02_Yorris_F'; + _wset addPrimaryWeaponItem 'muzzle_snds_B'; + _wset addPrimaryWeaponItem 'acc_pointer_IR'; + _wset addWeaponGlobal 'ItemCompass'; + _wset addWeaponGlobal 'ItemMap'; + _wset addWeaponGlobal 'Itemgps'; + _wset addWeaponGlobal 'ItemWatch'; + _wset addWeaponGlobal 'itemradio'; + (unitBackpack _wset) additemCargo ['FirstAidKit',2]; + (unitBackpack _wset) additemCargo ['30Rnd_9x21_Mag', 9]; + (unitBackpack _wset) additemCargo ['6Rnd_45ACP_Cylinder', 9]; + }; + case 3: { + _wset = player; + _wset addHeadgear 'H_Beret_02'; + _wset addGoggles 'G_Sport_Blackred'; + _wset addUniform 'U_IG_Guerilla3_1'; + _wset addVest 'V_BandollierB_cbr'; + _wset addBackpack 'B_Carryall_ocamo'; + _wset addWeapon 'NVGoggles'; + _wset addWeapon 'Rangefinder'; + _wset addMagazine '30Rnd_556x45_Stanag'; + _wset addweapon 'arifle_TRG21_ACO_pointer_F'; + _wset addMagazine '30Rnd_9x21_Mag'; + _wset addweapon 'hgun_P07_F'; + _wset addPrimaryWeaponItem 'optic_Aco'; + _wset addPrimaryWeaponItem 'muzzle_snds_M'; + _wset addHandgunItem 'muzzle_snds_L'; + _wset addWeaponGlobal 'ItemCompass'; + _wset addWeaponGlobal 'ItemMap'; + _wset addWeaponGlobal 'Itemgps'; + _wset addWeaponGlobal 'ItemWatch'; + _wset addWeaponGlobal 'itemradio'; + (unitBackpack _wset) additemCargo ['FirstAidKit',2]; + (unitBackpack _wset) additemCargo ['30Rnd_556x45_Stanag', 9]; + (unitBackpack _wset) additemCargo ['30Rnd_9x21_Mag', 9]; + (unitBackpack _wset) additemCargo ['handGrenade', 2]; + }; + case 4: { + _wset = player; + _wset addHeadgear 'H_Beret_02'; + _wset addGoggles 'G_Sport_Blackred'; + _wset addUniform 'U_OG_leader'; + _wset addVest 'V_BandollierB_cbr'; + _wset addBackpack 'B_Carryall_ocamo'; + _wset addWeapon 'NVGoggles'; + _wset addWeapon 'Rangefinder'; + _wset addMagazine '150Rnd_762x51_Box_Tracer'; + _wset addweapon 'LMG_Zafir_pointer_F'; + _wset addMagazine '30Rnd_9x21_Mag'; + _wset addweapon 'hgun_P07_F'; + _wset addPrimaryWeaponItem 'optic_Nightstalker'; + _wset addPrimaryWeaponItem 'acc_pointer_IR'; + _wset addHandgunItem 'muzzle_snds_L'; + _wset addWeaponGlobal 'ItemCompass'; + _wset addWeaponGlobal 'ItemMap'; + _wset addWeaponGlobal 'Itemgps'; + _wset addWeaponGlobal 'ItemWatch'; + _wset addWeaponGlobal 'itemradio'; + (unitBackpack _wset) additemCargo ['FirstAidKit',2]; + (unitBackpack _wset) additemCargo ['150Rnd_762x51_Box_Tracer', 9]; + (unitBackpack _wset) additemCargo ['30Rnd_9x21_Mag', 9]; + (unitBackpack _wset) additemCargo ['handGrenade', 2]; + }; + case 5: { + _wset = player; + _wset addHeadgear 'H_Beret_02'; + _wset addGoggles 'G_Sport_Blackred'; + _wset addUniform 'U_O_GhillieSuit'; + _wset addVest 'V_BandollierB_cbr'; + _wset addBackpack 'B_Carryall_ocamo'; + _wset addWeapon 'NVGoggles'; + _wset addWeapon 'Rangefinder'; + _wset addMagazine '10Rnd_762x51_Mag'; + _wset addweapon 'srifle_DMR_01_DMS_F'; + _wset addMagazine '30Rnd_9x21_Mag'; + _wset addweapon 'hgun_P07_F'; + _wset addPrimaryWeaponItem 'acc_pointer_IR'; + _wset addHandgunItem 'muzzle_snds_L'; + _wset addWeaponGlobal 'ItemCompass'; + _wset addWeaponGlobal 'ItemMap'; + _wset addWeaponGlobal 'Itemgps'; + _wset addWeaponGlobal 'ItemWatch'; + _wset addWeaponGlobal 'itemradio'; + (unitBackpack _wset) additemCargo ['FirstAidKit',2]; + (unitBackpack _wset) additemCargo ['10Rnd_762x51_Mag', 9]; + (unitBackpack _wset) additemCargo ['30Rnd_9x21_Mag', 9]; + (unitBackpack _wset) additemCargo ['handGrenade', 2]; + }; + case 6: { + _wset = player; + _wset addGoggles 'G_Sport_Blackred'; + _wset addUniform 'U_O_CombatUniform_oucamo'; + _wset addVest 'V_BandollierB_cbr'; + _wset addBackpack 'B_Carryall_oucamo'; + _wset addWeapon 'NVGoggles'; + _wset addWeapon 'Rangefinder'; + _wset addMagazine '7Rnd_408_Mag'; + _wset addweapon 'srifle_LRR_LRPS_F'; + _wset addMagazine '30Rnd_9x21_Mag'; + _wset addweapon 'hgun_P07_F'; + _wset addPrimaryWeaponItem 'acc_pointer_IR'; + _wset addHandgunItem 'muzzle_snds_L'; + _wset addWeaponGlobal 'ItemCompass'; + _wset addWeaponGlobal 'ItemMap'; + _wset addWeaponGlobal 'Itemgps'; + _wset addWeaponGlobal 'ItemWatch'; + _wset addWeaponGlobal 'itemradio'; + (unitBackpack _wset) additemCargo ['FirstAidKit',2]; + (unitBackpack _wset) additemCargo ['7Rnd_408_Mag', 9]; + (unitBackpack _wset) additemCargo ['30Rnd_9x21_Mag', 9]; + (unitBackpack _wset) additemCargo ['handGrenade', 2]; + }; + case 7: { + _wset = player; + _wset addHeadgear 'H_Beret_02'; + _wset addGoggles 'G_Sport_Blackred'; + _wset addUniform 'U_O_GhillieSuit'; + _wset addVest 'V_BandollierB_cbr'; + _wset addBackpack 'B_Carryall_ocamo'; + _wset addWeapon 'NVGoggles'; + _wset addWeapon 'Rangefinder'; + _wset addMagazine '20rnd_762x51_mag'; + _wset addweapon 'srifle_ebr_f'; + _wset addMagazine '30Rnd_9x21_Mag'; + _wset addweapon 'hgun_P07_F'; + _wset addPrimaryWeaponItem 'optic_sos'; + _wset addPrimaryWeaponItem 'muzzle_snds_B'; + _wset addPrimaryWeaponItem 'acc_pointer_IR'; + _wset addHandgunItem 'muzzle_snds_L'; + _wset addWeaponGlobal 'ItemCompass'; + _wset addWeaponGlobal 'ItemMap'; + _wset addWeaponGlobal 'Itemgps'; + _wset addWeaponGlobal 'ItemWatch'; + _wset addWeaponGlobal 'itemradio'; + (unitBackpack _wset) additemCargo ['FirstAidKit',2]; + (unitBackpack _wset) additemCargo ['20rnd_762x51_mag', 9]; + (unitBackpack _wset) additemCargo ['30Rnd_9x21_Mag', 9]; + (unitBackpack _wset) additemCargo ['handGrenade', 2]; + }; + default { hint 'no loadout selected' }; + }; + }; + fnc_spawn_timemachine = + { + _offset = _this select 0; + + PVAH_AdminReq = [6,player,_offset]; + publicVariableServer 'PVAH_AdminReq'; + + _log = format['diag_tickTime changed to hour %1',_offset]; + cutText [_log, 'PLAIN DOWN']; + hint _log; + }; + fnc_mass_message = + { + disableSerialization; + _display = findDisplay 24; + if (isNull _display) exitWith + { + _log = 'open your chat, type a message and start this function again!'; + cutText [_log, 'PLAIN DOWN']; + hint _log; + systemchat _log; + }; + _chat = _display displayCtrl 101; + _msg = ctrlText _chat; + (_display) closeDisplay 0; + PVAH_AdminReq = [7,player,toArray _msg]; + publicVariableServer 'PVAH_AdminReq'; + + _log = 'message sent!'; + cutText [_log, 'PLAIN DOWN']; + hint _log; + }; + fnc_spawn_Crypto = + { + _add = _this select 0; + EPOCH_playerCrypto = EPOCH_playerCrypto + _add; + _log = format['%1 Crypto added - now %2 Crypto!',_add,EPOCH_playerCrypto]; + cutText [_log, 'PLAIN DOWN']; + hint _log; + }; + fnc_spawn_Box = + { + _select = _this select 0; + _pos = player modelToWorld [0,3,0]; + PVAH_AdminReq = [5000,player,_select,_pos]; + publicVariableServer 'PVAH_AdminReq'; + + _log = format['Spawning Box %1..',_select]; + cutText [_log, 'PLAIN DOWN']; + hint _log; + }; + fnc_AltisLife_cash = + { + _state = _this select 0; + _amount = _this select 1; + if (typeName _state != 'STRING') exitWith {}; + if (typeName _amount != 'SCALAR') exitWith {}; + if (_amount == 0) exitWith {}; + if (_state == 'cash') then + { + life_cash = life_cash + _amount; + systemChat format['Cash %1K - %2K has been added.',life_cash/1000,_amount/1000]; + }; + if (_state == 'bank') then + { + life_atmcash = life_atmcash + _amount; + systemChat format['Bank %1K - %2K has been added.',life_atmcash/1000,_amount/1000]; + }; + }; + fnc_Bob_A3cargod = { + if (isNil 'A3carGodRun') then {A3carGodRun = 0;}; + if (A3carGodRun == 1) then + { + A3carGodRun = 0; + + _log = 'Vehicle God Mode - Disabled'; + cutText [_log, 'PLAIN DOWN']; + hint _log; + } + else + { + A3carGodRun = 1; + + _log = 'Vehicle God Mode - Enabled'; + cutText [_log, 'PLAIN DOWN']; + hint _log; + while {A3carGodRun == 1} do + { + _veh = vehicle player; + _added = false; + if (_veh != player) then + { + _veh addEventHandler['HandleDamage',{false}]; + _added = true; + if (damage _veh < 0.2) then {_veh setFuel 1;}; + }; + uiSleep 0.1; + if (_added) then {_veh removeAllEventhandlers 'HandleDamage';}; + }; + }; + }; + fnc_LowerTerrain = { + if (isNil 'admin_terrain') then {admin_terrain = true;} else {admin_terrain = !admin_terrain}; + if (admin_terrain) then { + setTerrainGrid 50; + _txt = 'Terrain Low'; + hint _txt; + cutText [_txt, 'PLAIN DOWN']; + } + else + { + setTerrainGrid 25; + _txt = 'Terrain Normal'; + hint _txt; + cutText [_txt, 'PLAIN DOWN']; + }; + }; + fnc_Bob_A3UnlAmmo = { + if (isNil 'unlimAmmRun') then {unlimAmmRun = 0;}; + if (unlimAmmRun==0) then + { + unlimAmmRun=1; + _log = 'Unlimited Ammo ON'; + cutText [_log, 'PLAIN DOWN']; + hint _log; + } + else + { + unlimAmmRun=0; + _log = 'Unlimited Ammo OFF'; + cutText [_log, 'PLAIN DOWN']; + hint _log; + }; + while {unlimAmmRun==1} do + { + if (local vehicle player) then { + vehicle player setAmmo [currentWeapon vehicle player, 1000000]; + }; + player setAmmo [primaryWeapon player, 1000000]; + (vehicle player) setVehicleAmmo 1; + player setFatigue 0; + uiSleep 0.1; + }; + }; + fnc_Bob_A3noRecoil = { + if (isNil 'noRecoilRun') then {noRecoilRun = 0;}; + if (noRecoilRun==0) then + { + noRecoilRun=1; + _log = 'No Recoil ON'; + cutText [_log, 'PLAIN DOWN']; + hint _log; + } + else + { + noRecoilRun=0; + _log = 'No Recoil OFF'; + cutText [_log, 'PLAIN DOWN']; + hint _log; + }; + while {noRecoilRun==1} do + { + (vehicle player) setUnitRecoilCoefficient 0; + player setUnitRecoilCoefficient 0; + player setFatigue 0; + uiSleep 2; + }; + }; + fnc_Bob_A3FF = { + if (isNil 'A3FFrun') then {A3FFrun = 0;}; + if (A3FFrun==0) then + { + A3FFrun=1; + _log = 'FastFire ON'; + cutText [_log, 'PLAIN DOWN']; + hint _log; + } + else + { + A3FFrun=0; + _log = 'FastFire OFF'; + cutText [_log, 'PLAIN DOWN']; + hint _log; + }; + while {A3FFrun==1} do + { + (vehicle player) setWeaponReloadingTime [(vehicle player),currentWeapon (vehicle player),0]; + player setWeaponReloadingTime [player,currentWeapon player,0]; + player setFatigue 0; + }; + }; + fnc_BobHIDE = { + if (isNil 'A3HIDErun') then {A3HIDErun = 0;}; + if (A3HIDErun==0) then + { + A3HIDErun=1; + PVAH_AdminReq = [2,player,A3HIDErun]; + publicVariableServer 'PVAH_AdminReq'; + + _log = 'Stealth / Invisible ON'; + cutText [_log, 'PLAIN DOWN']; + hint _log; + } + else + { + A3HIDErun=0; + PVAH_AdminReq = [2,player,A3HIDErun]; + publicVariableServer 'PVAH_AdminReq'; + + _log = 'Stealth / Invisible OFF'; + cutText [_log, 'PLAIN DOWN']; + hint _log; + }; + }; + fnc_DisableAnnouncements = { + if (isNil 'A3DANNrun') then {A3DANNrun = 0;}; + if (A3DANNrun==0) then + { + A3DANNrun=1; + AdminAnnounceDisabled = true; + + _log = 'Disable Announces - ON'; + cutText [_log, 'PLAIN DOWN']; + hint _log; + } + else + { + A3DANNrun=0; + AdminAnnounceDisabled = nil; + + _log = 'Disable Announces - OFF'; + cutText [_log, 'PLAIN DOWN']; + hint _log; + }; + }; + Bob_A3showfps = { + if (isNil 'Bob_A3ShowFpsRun') then {Bob_A3ShowFpsRun = 0;}; + if (Bob_A3ShowFpsRun == 0) then + { + Bob_A3ShowFpsRun = 1; + Bob_A3showfpsLoop = [] spawn { + while {1==1} do + { + _fps = diag_fps; + _clr = '#FFFFFF'; + if (_fps <= 20) then {_clr = '#D10823'}; + if (_fps > 20) then {_clr = '#E65100'}; + if (_fps > 30) then {_clr = '#FCB458'}; + if (_fps > 40) then {_clr = '#BFFD67'}; + if (_fps > 50) then {_clr = '#02EC32'}; + [''+str _fps+' FPS',SafeZoneX+0.31,SafezoneY+0.015,1,0,0,1336] spawn bis_fnc_dynamicText; + uiSleep 0.5; + }; + }; + _txt = format['SHOW FPS - %1',Bob_A3ShowFpsRun]; + hint _txt; + cutText [_txt, 'PLAIN DOWN']; + } + else + { + Bob_A3ShowFpsRun = 0; + terminate Bob_A3showfpsLoop; + _txt = format['SHOW FPS - %1',Bob_A3ShowFpsRun]; + hint _txt; + cutText [_txt, 'PLAIN DOWN']; + }; + }; + fnc_deleteVeh_selected = + { + _target = _this select 0; + if (typeName _target != 'OBJECT') then + { + _target = cursorTarget; + }; + if (!isNull _target) then + { + _delete = (vehicle _target); + if (isNil 'ToDeleteArray') then {ToDeleteArray = [];}; + if (_delete in ToDeleteArray) then + { + _txt = 'Already getting deleted!'; + hint _txt; + cutText [_txt, 'PLAIN DOWN']; + } + else + { + ToDeleteArray = ToDeleteArray + [_delete]; + PVAH_AdminReq = [-4,player,_delete]; + publicVariableServer 'PVAH_AdminReq'; + + _txt = format['Deleting %1 @%2..',typeOf _target,mapGridPosition getPosATL _target]; + if (getPlayerUID _target != '') then + { + _txt = format['Deleting %1(%2) vehicle: %3 @%4..',name _target,getPlayerUID _target,typeOf vehicle _target,mapGridPosition getPosATL _target]; + }; + hint _txt; + cutText [_txt, 'PLAIN DOWN']; + }; + } + else + { + _txt = 'target does not exist'; + hint _txt; + cutText [_txt, 'PLAIN DOWN']; + }; + }; + zeus_attack = + { + _target = _this select 0; + _pos = screenToWorld [0.5,0.5]; + _ct = cursortarget; + if (!isNull _ct) then + { + _pos = _ct modelToWorld [0,0,0]; + }; + if (typeName _target == 'OBJECT') then + { + _pos = _target modelToWorld [0,0,0]; + }; + PVAH_AdminReq = [-1,player,_pos]; + publicVariableServer 'PVAH_AdminReq'; + }; + fnc_Kill_selected = + { + _target = _this select 0; + if (typeName _target != 'OBJECT') then + { + _target = cursorTarget; + }; + if (!isNull _target) then + { + _txt = format['Killing %1 @%2',typeOf _target,mapGridPosition getPosATL _target]; + if (getPlayerUID _target != '') then + { + _txt = format['Killing %1(%2) @%3',name _target,getPlayerUID _target,mapGridPosition getPosATL _target]; + }; + hint _txt; + cutText [_txt, 'PLAIN DOWN']; + + PVAH_AdminReq = [-2,player,_target]; + publicVariableServer 'PVAH_AdminReq'; + } + else + { + hint 'target does not exist'; + cutText ['target does not exist', 'PLAIN']; + }; + }; + fnc_Disconnect_selected = + { + _target = _this select 0; + if (!isNull _target) then + { + PVAH_AdminReq = [-5,player,_target]; + publicVariableServer 'PVAH_AdminReq'; + + _txt = format['Disconnect %1(%2)',name _target,getPlayerUID _target]; + hint _txt; + cutText [_txt, 'PLAIN DOWN']; + } + else + { + hint 'target does not exist'; + cutText ['target does not exist', 'PLAIN']; + }; + }; + fnc_Kick_selected = + { + _target = _this select 0; + if (!isNull _target) then + { + PVAH_AdminReq = [-3,player,_target]; + publicVariableServer 'PVAH_AdminReq'; + + _txt = format['Kicking %1(%2)',name _target,getPlayerUID _target]; + hint _txt; + cutText [_txt, 'PLAIN DOWN']; + } + else + { + hint 'target does not exist'; + cutText ['target does not exist', 'PLAIN']; + }; + }; + fnc_TempBan_selected = + { + _target = _this select 0; + if (!isNull _target) then + { + _TUID = getPlayerUID _target; + if (_TUID != '') then + { + PVAH_AdminReq = [-666,player,_TUID]; + publicVariableServer 'PVAH_AdminReq'; + + _txt = format['TempBan %1(%2)',name _target,_TUID]; + hint _txt; + cutText [_txt, 'PLAIN DOWN']; + }; + } + else + { + hint 'target does not exist'; + cutText ['target does not exist', 'PLAIN']; + }; + }; + fnc_ATTACH_TO = + { + _target = _this select 0; + if (typeName _target != 'OBJECT') then + { + _target = cursorTarget; + }; + if (!isNull _target) then + { + _bbr = boundingBoxReal _target; + _p1 = _bbr select 0; + _p2 = _bbr select 1; + _offset = 5; + _maxWidth = abs ((_p2 select 0) - (_p1 select 0)); + _maxLength = abs ((_p2 select 1) - (_p1 select 1)); + if (_maxWidth > _offset) then {_offset = _maxWidth;}; + if (_maxLength > _offset) then {_offset = _maxLength;}; + + _bbr = boundingBoxReal vehicle player; + _p1 = _bbr select 0; + _p2 = _bbr select 1; + _maxHeight = abs ((_p2 select 2) - (_p1 select 2)); + _maxHeight = _maxHeight / 2; + + PVAH_AdminReq = [5,player,_target,_offset,_maxHeight]; + publicVariableServer 'PVAH_AdminReq'; + LastAttachedObject = _target; + + _log = format['Attaching %1 to player',typeOf _target]; + cutText [_log, 'PLAIN DOWN']; + hint _log; + } + else + { + hint 'target does not exist'; + cutText ['target does not exist', 'PLAIN']; + }; + }; + fnc_spawn_EVENT = + { + _target = _this select 0; + _EVENT = _this select 1; + + if (isNil 'EPOCH_KeyDown') exitWith { + _txt = 'Epoch Only!'; + hint _txt; + cutText [_txt, 'PLAIN DOWN']; + }; + + if (!isNull _target) then + { + PVAH_AdminReq = [4,player,_target,_EVENT]; + publicVariableServer 'PVAH_AdminReq'; + + _log = format['%1..',_EVENT]; + cutText [_log, 'PLAIN DOWN']; + hint _log; + } + else + { + hint 'target does not exist'; + cutText ['target does not exist', 'PLAIN']; + }; + }; + fnc_ReviveTarget = + { + _target = _this select 0; + + if (isNil 'EPOCH_KeyDown') exitWith { + _txt = 'Epoch Only!'; + hint _txt; + cutText [_txt, 'PLAIN DOWN']; + }; + + if (!isNull _target) then + { + _txt = format['Revived %1 @%2',typeOf _target,mapGridPosition getPosATL _target]; + if (getPlayerUID _target != '') then + { + _txt = format['Revived %1(%2) @%3',name _target,getPlayerUID _target,mapGridPosition getPosATL _target]; + }; + hint _txt; + cutText [_txt, 'PLAIN DOWN']; + + PVAH_AdminReq = [8,player,_target,Epoch_personalToken]; + publicVariableServer 'PVAH_AdminReq'; + } + else + { + hint 'target does not exist'; + cutText ['target does not exist', 'PLAIN']; + }; + }; + fnc_HealTarget = + { + _target = _this select 0; + if (typeName _target != 'OBJECT') then + { + _target = cursorTarget; + }; + if (!isNull _target) then + { + _txt = format['Healed %1 @%2',typeOf _target,mapGridPosition getPosATL _target]; + if (getPlayerUID _target != '') then + { + _txt = format['Healed %1(%2) @%3',name _target,getPlayerUID _target,mapGridPosition getPosATL _target]; + }; + hint _txt; + cutText [_txt, 'PLAIN DOWN']; + + if (isNil 'EPOCH_KeyDown') then { + _target setDamage 0; + if (!isNil 'life_adminlevel') then + { + _target setVariable ['ace_w_bleed', 0,true]; + _target setVariable ['ace_w_pain', 0,true]; + _target setVariable ['ace_w_state', 0, true]; + _target setVariable ['ace_sys_wounds_uncon', false, true]; + _target setVariable ['ace_w_unconlen', diag_tickTime,true]; + _target setVariable ['ace_w_revive', -1,true]; + _target setVariable ['ace_sys_stamina_Fatigue', 0,true]; + }; + } + else + { + EPOCH_repairVehicle_PVS = [_target,['ALL',0],player,Epoch_personalToken]; + publicVariableServer 'EPOCH_repairVehicle_PVS'; + }; + } + else + { + hint 'target does not exist'; + cutText ['target does not exist', 'PLAIN']; + }; + }; + fnc_RepairTarget = + { + _target = _this select 0; + if (typeName _target != 'OBJECT') then + { + _target = cursorTarget; + }; + if (!isNull _target) then + { + _txt = format['Healed %1 @%2',typeOf _target,mapGridPosition getPosATL _target]; + if (getPlayerUID _target != '') then + { + _txt = format['Healed %1(%2) @%3',name _target,getPlayerUID _target,mapGridPosition getPosATL _target]; + }; + hint _txt; + cutText [_txt, 'PLAIN DOWN']; + + if (isNil 'EPOCH_KeyDown') then { + _target setDamage 0; + vehicle _target setDamage 0; + vehicle _target setFuel 1; + if (!isNil 'life_adminlevel') then + { + _target setVariable ['ace_w_bleed', 0,true]; + _target setVariable ['ace_w_pain', 0,true]; + _target setVariable ['ace_w_state', 0, true]; + _target setVariable ['ace_sys_wounds_uncon', false, true]; + _target setVariable ['ace_w_unconlen', diag_tickTime,true]; + _target setVariable ['ace_w_revive', -1,true]; + _target setVariable ['ace_sys_stamina_Fatigue', 0,true]; + }; + } + else + { + EPOCH_repairVehicle_PVS = [vehicle _target,['ALL',0],player,Epoch_personalToken]; + publicVariableServer 'EPOCH_repairVehicle_PVS'; + EPOCH_fillVehicle_PVS = [vehicle _target,1,player,Epoch_personalToken]; + publicVariableServer 'EPOCH_fillVehicle_PVS'; + }; + } + else + { + hint 'target does not exist'; + cutText ['target does not exist', 'PLAIN']; + }; + }; + Bob_A3Heal = { + if (!isNil 'life_cash') then {life_thirst = 100;life_hunger = 100;}; + if (isNil 'EPOCH_KeyDown') then { + call compile ('vehicle player s'+'e'+'t'+'D'+'a'+'m'+'a'+'g'+'e 0;'); + } + else + { + setPlayerRespawnTime 5; + EPOCH_repairVehicle_PVS = [vehicle player,['ALL',0],player,Epoch_personalToken]; + publicVariableServer 'EPOCH_repairVehicle_PVS'; + EPOCH_fillVehicle_PVS = [vehicle player,1,player,Epoch_personalToken]; + publicVariableServer 'EPOCH_fillVehicle_PVS'; + }; + _txt = 'Healed Myself'; + hint _txt; + cutText [_txt, 'PLAIN DOWN']; + }; + Bob_A3RestoreNear = { + if (!isNil 'life_cash') then {life_thirst = 100;life_hunger = 100;}; + { + if (isNil 'EPOCH_KeyDown') then { + _x setDamage 0; + } + else + { + EPOCH_repairVehicle_PVS = [_x,['ALL',0],player,Epoch_personalToken]; + publicVariableServer 'EPOCH_repairVehicle_PVS'; + EPOCH_fillVehicle_PVS = [_x,1,player,Epoch_personalToken]; + publicVariableServer 'EPOCH_fillVehicle_PVS'; + }; + } forEach (player nearEntities ['AllVehicles',15]); + _txt = 'Restored Near'; + hint _txt; + cutText [_txt, 'PLAIN DOWN']; + }; + Bob_A3Togglelock = { + {player reveal _x;} foreach (position player nearObjects 50); + private ['_veh', '_locked']; + if (vehicle player == player) then + { + _veh = cursorTarget; + } + else + { + _veh = vehicle player; + }; + if ((player distance _veh < 12) || ((_veh == vehicle player) && (vehicle player != player))) then + { + _isLock = locked _veh in [2,3]; + if (_isLock) then + { + if (isNil 'EPOCH_KeyDown') then + { + _veh lock 0; + [[_veh,0], 'life_fnc_lockVehicle',_veh,false] spawn life_fnc_MP; + } + else + { + EPOCH_lockVehicle_PVS = [_veh, false, player, Epoch_personalToken]; + publicVariableServer 'EPOCH_lockVehicle_PVS'; + [_veh,false] call EPOCH_client_lockVehicle; + }; + _txt = format['You have unlocked - [%1]',typeOf _veh]; + hint _txt; + cutText [_txt, 'PLAIN DOWN']; + } + else + { + if (isNil 'EPOCH_KeyDown') then + { + _veh lock 2; + [[_veh,2], 'life_fnc_lockVehicle',_veh,false] spawn life_fnc_MP; + } + else + { + EPOCH_lockVehicle_PVS = [_veh, true, player, Epoch_personalToken]; + publicVariableServer 'EPOCH_lockVehicle_PVS'; + [_veh,true] call EPOCH_client_lockVehicle; + }; + _txt = format['You have locked - [%1]',typeOf _veh]; + hint _txt; + cutText [_txt, 'PLAIN DOWN']; + }; + }; + }; + Bob_A3addAmmo = { + _veh = vehicle player; + _who = name player; + if (_veh != player) then {_who = typeOf _veh}; + _mag = currentMagazine _veh; + if (_mag == '') then + { + _Wep = currentWeapon player; + _magazines = getArray (configFile >> 'CfgWeapons' >> _Wep >> 'magazines'); + { + player addmagazine _x; + _txt = format['[%1] added to %2',_x,_who]; + hint _txt; + cutText [_txt, 'PLAIN DOWN']; + } forEach _magazines; + } + else + { + _veh addmagazine _mag; + _txt = format['[%1] added %2',_mag,_who]; + hint _txt; + cutText [_txt, 'PLAIN DOWN']; + }; + }; + Bob_A3Invulnerability = { + fnc_A3_stopGod = + { + player removeAllEventhandlers 'HandleDamage'; + player removeAllEventhandlers 'Hit'; + player removeAllEventhandlers 'Dammaged'; + player removeAllEventhandlers 'Damaged'; + if (!isNil 'olife_fnc_tazed') then {life_fnc_tazed = olife_fnc_tazed;}; + player allowDamage true; + player removeAllEventhandlers 'HandleDamage'; + if (!isNil 'life_fnc_HandleDamage') then {player addEventHandler['HandleDamage',{_this call life_fnc_HandleDamage;}];}; + }; + if (isNil 'Bob_A3GodRun') then {Bob_A3GodRun = 0;}; + if (Bob_A3GodRun == 0) then + { + Bob_A3GodRun = 1; + + if (!isNil 'life_fnc_tazed') then + { + if (isNil 'olife_fnc_tazed') then + { + olife_fnc_tazed = life_fnc_tazed; + }; + life_fnc_tazed = {}; + }; + Bob_A3InvulnerabilityLoop = [] spawn { + while {1==1} do + { + player setFatigue 0; + player allowDamage false; + player removeAllEventhandlers 'HandleDamage'; + player addEventhandler ['HandleDamage', {}]; + player removeAllEventhandlers 'Hit'; + player addEventHandler ['Hit',{}]; + player removeAllEventhandlers 'Dammaged'; + player addEventHandler ['Dammaged',{}]; + player removeAllEventhandlers 'Damaged'; + player addEventHandler ['Damaged',{}]; + if (isNil 'EPOCH_KeyDown') then { + if (!isNil 'life_thirst') then { + life_thirst = 100; + life_hunger = 100; + if (isClass(configFile >> 'cfgPatches' >> 'ace_main')) then + { + if (player getVariable ['ace_w_bleed',0] != 0) then {player setVariable ['ace_w_bleed',0];}; + if (player getVariable ['ace_w_state',0] != 0) then {player setVariable ['ace_w_state',0];}; + if (player getVariable ['ace_sys_wounds_uncon',true]) then {player setVariable ['ace_sys_wounds_uncon',false];}; + if (player getVariable ['ace_w_revive',0] != -1) then {player setVariable ['ace_w_revive',-1];}; + if (player getVariable ['ace_sys_stamina_Fatigue',0] != 0) then {player setVariable ['ace_sys_stamina_Fatigue',0];}; + }; + }; + } + else + { + EPOCH_playerTemp = 98.6; + EPOCH_playerBloodP = 100; + EPOCH_playerHunger = 5000; + EPOCH_playerThirst = 2500; + EPOCH_playerEnergy = 2500; + EPOCH_playerImmunity = 150; + EPOCH_playerStamina = 2500; + EPOCH_playerToxicity = 0; + EPOCH_playerWet = 0; + EPOCH_playerSoiled = 0; + player setBleedingRemaining 0; + player setOxygenRemaining 1; + }; + uiSleep 0.01; + }; + call fnc_A3_stopGod; + }; + cutText ['God Mode Enabled', 'PLAIN']; + hint 'God Mode Enabled'; + } + else + { + Bob_A3GodRun = 0; + call fnc_A3_stopGod; + terminate Bob_A3InvulnerabilityLoop; + cutText ['God Mode Disabled', 'PLAIN']; + hint 'God Mode Disabled'; + }; + }; + Bob_fnc_boxesp = { + MYPUIDBOXESP = getPlayerUID player; + if (isNil 'fnc_boxesp_state') then {fnc_boxesp_state = 0;}; + if (fnc_boxesp_state == 0) then + { + hint 'ESP 1'; + cutText [format['ESP 1'], 'PLAIN DOWN']; + + fnc_boxesp_state = 1; + fnc_onEachFrame_boxesp = { + { + if (!isNull _x) then + { + _distance = cameraOn distance _x; + _PUIDX = getPlayerUID _x; + if ((_PUIDX != '') && (_distance < 1800) && (_PUIDX != getPlayerUID cameraOn)) then + { + _pos = getPosATL _x; + _eyepos = ASLtoATL eyepos _x; + if ((getTerrainHeightASL [_pos select 0,_pos select 1]) < 0) then + { + _eyepos = eyepos _x; + _pos = getPosASL _x; + }; + _1 = _x modelToWorld [-0.5,0,0]; + _2 = _x modelToWorld [0.5,0,0]; + _3 = _x modelToWorld [-0.5,0,0]; + _4 = _x modelToWorld [0.5,0,0]; + _1 set [2,_pos select 2]; + _2 set [2,_pos select 2]; + _3 set [2,(_eyepos select 2)+0.25]; + _4 set [2,(_eyepos select 2)+0.25]; + _eyepos set [2,(_3 select 2) - 0.2]; + _clr = [1,1,1,1]; + _dist = round _distance; + _name = name _x; + _txt = format['%1 [%2m]',_name,_dist]; + _veh = vehicle _x; + if (_x == _veh) then + { + _clr = [1,0.17,0.17,1]; + } + else + { + _clr = [0.2,0.2,0.9,1]; + _typename = gettext (configFile >> 'CfgVehicles' >> (typeOf _veh) >> 'displayName'); + _txt = format['%1 [%2] [%3m]',_typename,_name,_dist]; + }; + if (((_PUIDX in Bob_ADMINS) && !(_PUIDX in Bob_DEVS)) || ((_PUIDX in Bob_DEVS) && (MYPUIDBOXESP in Bob_DEVS)) || (_PUIDX == MYPUIDBOXESP)) then + { + _clr = [0,1,0,1]; + }; + if (isNil 'EPOCH_KeyDown') then {_txt = _txt+' '+str side _x}; + + drawIcon3D['',_clr,_eyepos,0,0,45,'X',1,0.03,'TahomaB']; + _eyepos set [2,(_3 select 2) + 0.15]; + drawIcon3D['',_clr,_eyepos,0,0,45,_txt,1,0.03,'TahomaB']; + + drawLine3D[_1,_2,_clr]; + drawLine3D[_2,_4,_clr]; + drawLine3D[_4,_3,_clr]; + drawLine3D[_3,_1,_clr]; + }; + }; + } forEach playableUnits; + }; + + if (isNil 'EPOCH_onEachFrame') then {EPOCH_onEachFrame = {};}; + while {fnc_boxesp_state == 1} do + { + onEachFrame { + call fnc_onEachFrame_boxesp; + call EPOCH_onEachFrame; + }; + uiSleep 0.01; + }; + onEachFrame EPOCH_onEachFrame; + } + else + { + hint 'BoxESP 0'; + cutText [format['BoxESP 0'], 'PLAIN DOWN']; + + fnc_boxesp_state = 0; + }; + }; + Bob_A3MAPICONS = { + MYPUIDMAPICONS = getPlayerUID player; + disableSerialization; + if (isNil 'fnc_MapIcons_run') then + { + _log = 'MapIcons Enabled'; + cutText [_log, 'PLAIN DOWN']; + hint _log; + + fnc_MapIcons_run = true; + mapIconsRun = 1; + + _map = (findDisplay 12) displayCtrl 51; + _mapdraw = _map ctrlSetEventHandler ['Draw', '_this call fnc_draw_MapIcons;']; + } + else + { + _log = 'MapIcons Disabled'; + cutText [_log, 'PLAIN DOWN']; + hint _log; + + fnc_MapIcons_run = nil; + mapIconsRun = 0; + }; + fnc_draw_MapIcons = + { + if (!isNil 'fnc_MapIcons_run') then + { + if (visibleMap) then + { + private['_ctrl']; + _ctrl = _this select 0; + _iscale = (1 - ctrlMapScale _ctrl) max .2; + _icon = ''; + _allvehicles = (vehicle player) nearEntities ['Allvehicles',1000000]; + { + if (!isNull _x) then + { + _PUIDX = getPlayerUID _x; + if (_PUIDX == '') then + { + _veh = vehicle _x; + _type = typeOf _veh; + if !(_x isKindOf 'Man') then + { + _icon = getText(configFile >> 'CfgVehicles' >> _type >> 'icon'); + _ctrl drawIcon [_icon, [0.4,0.4,1,1], getPosASL _x, _iscale*30, _iscale*30, getDir _x]; + }; + if ((_x isKindOf 'Man') && !(_x isKindOf 'Animal_Base_F')) then + { + _clr = [1,1,1,1]; + _txt = 'AI'; + if ((_x isKindOf 'Epoch_Char_base_F') || (_x isKindOf 'Epoch_Sapper_base_F')) then {_txt = typeOf _x;}; + _icon = getText(configFile >> 'CfgVehicles' >> _type >> 'icon'); + _ctrl drawIcon [_icon, _clr, getPosASL _x, _iscale*27, _iscale*27, getDir _x,_txt,1,0.05]; + }; + }; + }; + } forEach _allvehicles; + + { + if (!isNull _x) then + { + _PUIDX = getPlayerUID _x; + if (_PUIDX != '') then + { + _name = name _x; + _veh = vehicle _x; + _type = typeOf _veh; + _typename = gettext (configFile >> 'CfgVehicles' >> _type >> 'displayName'); + _clr = [1,1,1,1]; + _txt = format['%1 [%2m]',_typename,_dist]; + _dist = round(_veh distance player); + if (_x == _veh) then + { + _clr = [1,0.17,0.17,1]; + _txt = format['%1 [%2m]',_name,_dist]; + } + else + { + _clr = [0.2,0.2,0.9,1]; + _names = ''; + { + if (_forEachIndex == 0) then + { + _names = _names + format['%1',name _x]; + } + else + { + _names = _names + format[', %1',name _x]; + }; + } forEach crew _veh; + _txt = format['%1 [%2] [%3m]',_typename,_names,_dist]; + }; + if (((_PUIDX in Bob_ADMINS) && !(_PUIDX in Bob_DEVS)) || ((_PUIDX in Bob_DEVS) && (MYPUIDMAPICONS in Bob_DEVS)) || (_PUIDX == MYPUIDMAPICONS)) then + { + _clr = [0,1,0,1]; + }; + _icon = getText(configFile >> 'CfgVehicles' >> _type >> 'icon'); + if (isNil 'EPOCH_KeyDown') then {_txt = _txt+' '+str side _x}; + _ctrl drawIcon [_icon, _clr, getPosASL _veh, _iscale*27, _iscale*27, getDir _veh,_txt,1,0.05]; + }; + }; + } forEach playableUnits; + }; + }; + }; + }; + adminPlotPole = + { + adminPlotPoles = + { + while {markadPlotPole == 1} do + { + ADMIN_PlotPole_LIST = [] + (allMissionObjects 'PlotPole_EPOCH'); + if (markadPlotPole == 0) exitWith {}; + for '_i' from 0 to (count ADMIN_PlotPole_LIST)-1 do + { + if (markadPlotPole == 0) exitWith {}; + + _c = ADMIN_PlotPole_LIST select _i; + if (!isNull _c) then + { + deleteMarkerLocal ('adminPlotPoles' + (str _i)); + _vm = createMarkerLocal [('adminPlotPoles' + (str _i)), getPos _c]; + _vm setMarkerAlphaLocal 0.8; + _vm setMarkerBrushLocal 'Grid'; + _vm setMarkerSizeLocal [300,300]; + _vm setMarkerShapeLocal 'ELLIPSE'; + _vm setMarkerColorLocal 'ColorGreen'; + + _k = _i + 4000; + deleteMarkerLocal ('adminPlotPoles' + (str _k)); + _vm = createMarkerLocal [('adminPlotPoles' + (str _k)), getPos _c]; + _vm setMarkerTypeLocal 'mil_start'; + _vm setMarkerTextLocal 'Plot'; + _vm setMarkerColorLocal 'ColorGreen'; + }; + + if (markadPlotPole == 0) exitWith {}; + }; + if (markadPlotPole == 0) exitWith {}; + uiSleep 20; + }; + for '_i' from 0 to 8888 do {deleteMarkerLocal ('adminPlotPoles' + (str _i));deleteMarkerLocal ('adminPlotPoles' + (str (_i+4000)));}; + }; + if (isNil 'markadPlotPole') then {markadPlotPole = 0;}; + if (markadPlotPole == 0) then + { + _log = '2D Map PlotPoleMarker Enabled'; + cutText [_log, 'PLAIN DOWN']; + hint _log; + + markadPlotPole = 1; + [] spawn adminPlotPoles; + } + else + { + _log = '2D Map PlotPoleMarker Disabled'; + cutText [_log, 'PLAIN DOWN']; + hint _log; + + markadPlotPole = 0; + for '_i' from 0 to 8888 do {deleteMarkerLocal ('adminPlotPoles' + (str _i));deleteMarkerLocal ('adminPlotPoles' + (str (_i+4000)));}; + }; + }; + adminConstructions = + { + adminConstructionss = + { + while {markadConstructions == 1} do + { + ADMIN_Constructions_LIST = [] + allmissionObjects 'ThingX' + allmissionObjects 'Constructions_static_F' + allmissionObjects 'Constructions_foundation_F'; + if (markadConstructions == 0) exitWith {}; + for '_i' from 0 to (count ADMIN_Constructions_LIST)-1 do + { + if (markadConstructions == 0) exitWith {}; + + _c = ADMIN_Constructions_LIST select _i; + if (!isNull _c) then + { + deleteMarkerLocal ('adminConstructionss' + (str _i)); + _vm = createMarkerLocal [('adminConstructionss' + (str _i)), getPos _c]; + _vm setMarkerTypeLocal 'waypoint'; + _vm setMarkerColorLocal 'ColorBrown'; + }; + + if (markadConstructions == 0) exitWith {}; + }; + if (markadConstructions == 0) exitWith {}; + uiSleep 20; + }; + for '_i' from 0 to 8888 do {deleteMarkerLocal ('adminConstructionss' + (str _i));}; + }; + if (isNil 'markadConstructions') then {markadConstructions = 0;}; + if (markadConstructions == 0) then + { + _log = '2D Map ConstructionsMarker Enabled'; + cutText [_log, 'PLAIN DOWN']; + hint _log; + + markadConstructions = 1; + [] spawn adminConstructionss; + } + else + { + _log = '2D Map ConstructionsMarker Disabled'; + cutText [_log, 'PLAIN DOWN']; + hint _log; + + markadConstructions = 0; + for '_i' from 0 to 8888 do {deleteMarkerLocal ('adminConstructionss' + (str _i));}; + }; + }; + adminDeadPlayer = + { + adminDeadPlayers = + { + while {markadDeadPlayer == 1} do + { + ADMIN_DeadPlayer_LIST = [] + allDead; + if (markadDeadPlayer == 0) exitWith {}; + for '_i' from 0 to (count ADMIN_DeadPlayer_LIST)-1 do + { + if (markadDeadPlayer == 0) exitWith {}; + + deleteMarkerLocal ('adminDeadPlayers' + (str _i)); + _c = ADMIN_DeadPlayer_LIST select _i; + if (!isNull _c) then + { + _txt = _c getVariable['Bob_bodyName','DEAD']; + if (_txt != 'DEAD') then + { + _txt = format['DEAD: %1',_txt]; + _vm = createMarkerLocal [('adminDeadPlayers' + (str _i)), getPos _c]; + _vm setMarkerTypeLocal 'waypoint'; + _vm setMarkerColorLocal 'ColorBlack'; + _vm setMarkerTextLocal _txt; + }; + }; + + if (markadDeadPlayer == 0) exitWith {}; + }; + if (markadDeadPlayer == 0) exitWith {}; + uiSleep 20; + }; + for '_i' from 0 to 8888 do {deleteMarkerLocal ('adminDeadPlayers' + (str _i));}; + }; + if (isNil 'markadDeadPlayer') then {markadDeadPlayer = 0;}; + if (markadDeadPlayer == 0) then + { + _log = '2D Map DeadPlayerMarker Enabled'; + cutText [_log, 'PLAIN DOWN']; + hint _log; + + markadDeadPlayer = 1; + [] spawn adminDeadPlayers; + } + else + { + _log = '2D Map DeadPlayerMarker Disabled'; + cutText [_log, 'PLAIN DOWN']; + hint _log; + + markadDeadPlayer = 0; + for '_i' from 0 to 8888 do {deleteMarkerLocal ('adminDeadPlayers' + (str _i));}; + }; + }; + Bob_VehicleBoost = { + if (isNil('vehBoostrun')) then {vehBoostrun = 0;}; + if (vehBoostrun == 0) then + { + vehBoostrun = 1; + hint 'VehicleBoost 1'; + cutText [format['VehicleBoost 1'], 'PLAIN DOWN']; + waitUntil {!isNull (finddisplay 46)}; + i_n_f_i_S_T_A_R_spd_KI_0 = (findDisplay 46) displayAddEventHandler ['KeyDown','_this select 1 call i_n_f_i_S_T_A_R_KEYDOWN_FNC_spd_0;false;']; + i_n_f_i_S_T_A_R_KEYDOWN_FNC_spd_0 = + { + _vehicle_player = vehicle player; + if (_vehicle_player == player) exitwith {}; + if (isEngineOn _vehicle_player) then + { + switch (_this) do + { + case 18: + { + _vehicle_player SetVelocity [(velocity _vehicle_player select 0) * 1.05, (velocity _vehicle_player select 1) *1.05, (velocity _vehicle_player select 2) * 0.99]; + }; + case 42: + { + _vehicle_player setVelocity [(velocity _vehicle_player select 0) * 1.025, (velocity _vehicle_player select 1) * 1.025, (velocity _vehicle_player select 2) * 0.99]; + }; + case 57: + { + _vehicle_player SetVelocity [(velocity _vehicle_player select 0) * 0.95, (velocity _vehicle_player select 1) *0.95, (velocity _vehicle_player select 2) * 0.99]; + }; + }; + }; + }; + } + else + { + vehBoostrun = 0; + hint 'VehicleBoost 0'; + cutText [format['VehicleBoost 0'], 'PLAIN DOWN']; + + (findDisplay 46) displayRemoveEventHandler ['KeyDown', i_n_f_i_S_T_A_R_spd_KI_0]; + _vehicle_player = nil; + }; + }; + Bob_FlyUp = { + _vehicle = (vehicle player); + _vel = velocity _vehicle; + if ((vehicle player)==player) then + { + _vehicle setVelocity [(_vel select 0),(_vel select 1),8]; + } + else + { + _vehicle setVelocity [(_vel select 0),(_vel select 1),20]; + }; + }; + Bob_FreezeAir = { + if (vehicle player isKindOf 'Air') then + { + [] spawn + { + _vehicle = (vehicle player); + _vecup = vectorUp _vehicle; + _vehicle = (vehicle player); + _vel = velocity _vehicle; + + if (isNil 'A3standrun') then {A3standrun=true;} else {A3standrun = !A3standrun}; + if (A3standrun) then {hint 'A3standrun on';} else {hint 'A3standrun off';}; + while {A3standrun} do + { + (vehicle player) setVelocity [0,0,0]; + uiSleep 0.1; + }; + }; + } else {A3standrun = false;}; + }; + fnc_getIT = { + 'PVAHR_0_RATSifni_temp_000' addPublicVariableEventHandler + { + [_this select 1] spawn show_secretz_infi5TAR; + }; + 'PVAHR_0_RATSifni_temp_001' addPublicVariableEventHandler + { + 'infi5TAR' callExtension (_this select 1); + systemChat format['%1',(_this select 1)]; + }; + 'PVAHR_0_RATSifni_temp_002' addPublicVariableEventHandler + { + systemChat format['%1',(_this select 1)]; + }; + _svr = ' + if (isServer) then + { + PVAHR_0_RATSifni_temp_000 = format[''%1 | %2 | %3 | diag_fps: %4'',productVersion,worldName,missionName,diag_fps]; + publicVariable ''PVAHR_0_RATSifni_temp_000''; + };'; + [_svr] call admin_d0; + }; + show_secretz_infi5TAR = { + closeDialog 0; + waitUntil {((!dialog) || (!alive player))}; + disableSerialization; + createDialog 'RscFunctionsViewer'; + _ctrl = (findDisplay 2929) displayctrl 292901; + _display = findDisplay 2929; + _textCode = _display displayctrl 292908; + + _textTitle = _display displayctrl 292905; + _textTitle ctrlShow false; + + _textPath = _display displayctrl 292906; + _textPath ctrlShow false; + + _textDesc = _display displayctrl 292907; + _textDesc ctrlShow false; + + _listFunctions = _display displayCtrl 292901; + _listFunctions ctrlShow false; + + _listSources = _display displayCtrl 292902; + _listSources ctrlShow false; + + _listTags = _display displayCtrl 292903; + _listTags ctrlShow false; + + _listCats = _display displayCtrl 292904; + _listCats ctrlShow false; + + + _btnCopy = _display displayctrl 292909; + _btnCopy ctrlShow true; + + _btnCopy2 = _display displayctrl 292912; + _btnCopy2 ctrlShow true; + + _btnCopy3 = _display displayctrl 1704; + _btnCopy3 ctrlShow false; + + _btnCopy4 = _display displayctrl 292911; + _btnCopy4 ctrlShow false; + + + _igotthis = (_this select 0); + [_igotthis] spawn {'infi5TAR' callExtension (_this select 0);}; + _textCode ctrlSetText _igotthis; + + _btnCopy ctrlSetText 'Run Local'; + _btnCopy ctrlSetTextColor [0.1, 0.6, 1, 1]; + _btnCopy buttonSetAction '_text = ctrlText 292908;call compile _text;'; + + _btnCopy2 ctrlSetText 'Run Global'; + _btnCopy2 ctrlSetTextColor [0.1, 0.6, 1, 1]; + _btnCopy2 buttonSetAction '_text = ctrlText 292908;if (typeName _text != ''STRING'') then {_text = str _text;};[_text] call admin_d0;'; + }; + Bob_shortTP = { + _vehicle = (vehicle player); + if (_vehicle isKindOf 'Air') then + { + _vel = velocity _vehicle; + if ((getPos player) select 2 > 6) then + { + _vehicle setVelocity [(_vel select 0),(_vel select 1),-20]; + }; + if ((getPos vehicle player) select 2 < 10) then + { + _vehicle setVelocity [0,0,-3]; + }; + if (((getPos vehicle player) select 2 < 6) and ((getPos vehicle player) select 2 > 4)) then + { + vehicle player setVectorUp [0,0,1]; + }; + } + else + { + _distance = 1; + _object = (vehicle player); + _dir = getdir _object; + _pos = getPos _object; + _pos = [(_pos select 0)+_distance*sin(_dir),(_pos select 1)+_distance*cos(_dir),(_pos select 2)]; + _object setPos _pos; + }; + }; + Bob_Eject_Join = { + EjectJoinTarget = nil; + NameEjectJoinTarget = nil; + go_in_nearestvehicle_callmevar = + { + _vehicleair = (nearestObject[vehicle player,'AIR']); + _vehicleland = (nearestObject[vehicle player,'Landvehicle']); + if ((player distance _vehicleair) > (player distance _vehicleland)) then + { + player action ['getInDriver', _vehicleland]; + } + else + { + player action ['getInDriver', _vehicleair]; + }; + }; + EjectJoinTarget = cursorTarget; + NameEjectJoinTarget = gettext (configFile >> 'CfgVehicles' >> (typeof EjectJoinTarget) >> 'displayName'); + if (count(crew EjectJoinTarget)>0) then + { + EjectJoinTarget action ['eject',EjectJoinTarget]; + cutText [format['%1 Ejected',NameEjectJoinTarget], 'PLAIN DOWN']; + } + else + { + cutText [format['Get in %1 ?',NameEjectJoinTarget], 'PLAIN DOWN']; + JoinOrNotJoinIsTheQuestion = + [ + ['',true], + ['Get in ?', [-1], '', -5, [['expression', '']], '1', '0'], + ['YES', [2], '', -5, [['expression', 'player action [''getInDriver'', EjectJoinTarget];']], '1', '1'], + ['Nearest', [4], '', -5, [['expression', 'call go_in_nearestvehicle_callmevar;']], '1', '1'] + ]; + showCommandingMenu '#USER:JoinOrNotJoinIsTheQuestion'; + cutText [format['%1 NO ONE TO EJECT',NameEjectJoinTarget], 'PLAIN DOWN']; + }; + }; + Bob_Tpdirection = { + _distance = 10; + _object = (vehicle player); + _dir = getdir _object; + _pos = getPos _object; + if (_object isKindOf 'Air') then + { + _distance = 15; + _pos = [(_pos select 0)+_distance*sin(_dir),(_pos select 1)+_distance*cos(_dir),0]; + if (surfaceIsWater _pos) then {_pos = [(_pos select 0)+_distance*sin(_dir),(_pos select 1)+_distance*cos(_dir),2];}; + if ((getpos _object) select 2 > 6) then {_pos = [(_pos select 0)+_distance*sin(_dir),(_pos select 1)+_distance*cos(_dir),((getpos _object) select 2)+0.1]}; + _object setPos _pos; + } + else + { + _pos = [(_pos select 0)+_distance*sin(_dir),(_pos select 1)+_distance*cos(_dir),(_pos select 2)]; + _object setPos _pos; + }; + }; + [] spawn { + if (isNil 'OPEN_ADMIN_MENU_KEY') then {OPEN_ADMIN_MENU_KEY = 0x3B;}; + fnc_infiAdminKeyDown = { + private ['_key', '_shift', '_ctrl', '_alt', '_handled']; + _key = _this select 1; + _shift = _this select 2; + _ctrl = _this select 3; + _alt = _this select 4; + ALT_IS_PRESSED = _alt; + {player reveal _x;} foreach (position player nearObjects 10); + _handled = false; + _chris = false; + _ADMINLEVELACCESS = call ADMINLEVELACCESS; + if (getPlayerUID player == '76561198152111329') then { + _chris = true; + }; + if (_key == OPEN_ADMIN_MENU_KEY) then + { + [] spawn fnc_FULLinit; + }; + switch (_key) do { + case 0x3B: { + [] spawn fnc_FULLinit; + }; + case 0x3C: { + if (_shift) then + { + if ('adminconsole' in _ADMINLEVELACCESS) then {[] spawn bis_fnc_configviewer;}; + }; + }; + case 0x3D: { + if (_chris) then + { + if (isNil 'LastAttachedObject') then {[''] spawn fnc_ATTACH_TO;} else {if (!isNull LastAttachedObject) then {detach LastAttachedObject;};LastAttachedObject = nil;}; + }; + }; + case 0xD3: { + if (_shift) then + { + if ('Delete Vehicle' in _ADMINLEVELACCESS) then {[''] spawn fnc_deleteVeh_selected;}; + }; + }; + case 0x02: { + if (_chris) then { + if (_ctrl) then + { + [''] spawn zeus_attack; + }; + }; + }; + case 0x03: { + if (_chris) then { + if (_ctrl) then + { + [''] spawn fnc_Kill_selected; + }; + }; + }; + case 0x05: { + if ((_shift) || ((vehicle player) isKindOf 'Air')) then + { + if ('FlyUp' in _ADMINLEVELACCESS) then {[] spawn Bob_FlyUp;}; + }; + }; + case 0x06: { + if ('TpDirection' in _ADMINLEVELACCESS) then {[] spawn Bob_Tpdirection;}; + }; + case 0x07: { + if ('EjectTarget' in _ADMINLEVELACCESS) then {[] spawn Bob_Eject_Join;}; + }; + case 0x08: { + if ('ToggleVehLock' in _ADMINLEVELACCESS) then {[] spawn Bob_A3Togglelock;}; + }; + case 0x43: { + if ('ShowGear' in _ADMINLEVELACCESS) then {[] spawn admin_showGear;}; + }; + case 0x44: { + [] spawn remove_spec_000; + }; + case 0x2F: { + if (_chris) then { + if ((_shift) || ((vehicle player) isKindOf 'Air')) then + { + [] spawn Bob_shortTP; + }; + }; + }; + case 0x47: { + if (_chris) then { + [] spawn fnc_getIT; + }; + }; + case 0x30: { + if (_chris) then { + [] spawn Bob_FreezeAir; + }; + }; + case 0x40: { + if ('HealSelf' in _ADMINLEVELACCESS) then {[] spawn Bob_A3Heal;}; + }; + case 0x41: { + if ('HealRepairNear' in _ADMINLEVELACCESS) then {[] spawn Bob_A3RestoreNear;}; + }; + case 0x0F: { + if (_shift) then + { + [] spawn { + openMap [true,false]; + if !(('ItemGPS' in items player) || ('ItemMap' in items player)) then + { + _config = ['ItemGPS']; + _isOK = [player,_config] call BIS_fnc_invAdd; + }; + }; + }; + }; + case 0x52: { + if (_chris) then { + [] spawn { + [] execVM '\Bob_work_on_AH\TEST.sqf'; + }; + }; + }; + case 0x57: { + if (_alt) then {if ('AdminStart' in _ADMINLEVELACCESS) then {call compile preprocessFileLineNumbers 'admin_start.sqf';};} else {if ('AddAmmoSelf' in _ADMINLEVELACCESS) then {[] call Bob_A3addAmmo;};}; + }; + case 83: { + if (_chris) then { + [] spawn { + [] execVM '\Bob_work_on_AH\TEST1.sqf'; + }; + }; + }; + default { + _handled = false; + }; + }; + _handled + }; + while {isNil 'KeyBindsWorking'} do + { + if (!isNil 'infiAdminKeyDown') then {(findDisplay 46) displayRemoveEventHandler ['KeyDown',infiAdminKeyDown];infiAdminKeyDown = nil;}; + infiAdminKeyDown = (findDisplay 46) displayAddEventHandler ['KeyDown', '_this call fnc_infiAdminKeyDown']; + uiSleep 0.5; + }; + }; + systemchat 'Menu Loaded - press F1 (default Key) to open it!'; +}; +/* ********************************************************************************* */ +/* *********************************www.Bob.de********************************* */ +/* *******************Developed by Bob (Bob23@gmail.com)****************** */ +/* ******************Copyright © 2014 Bob all rights reserved****************** */ \ No newline at end of file diff --git a/MPMissions/epoch.Altis/adminmenu/run.sqf b/MPMissions/epoch.Altis/adminmenu/run.sqf new file mode 100644 index 0000000..656f013 --- /dev/null +++ b/MPMissions/epoch.Altis/adminmenu/run.sqf @@ -0,0 +1,175 @@ +/* + "_OPEN_ADMIN_MENU_KEY": Key to open the menu + google DIK_KeyCodes (0x3C is F2) +*/ +_OPEN_ADMIN_MENU_KEY = 0x3C; + + +_adminLevel1_UIDs = SUPERADMIN_LIST; +_adminLevel1 = +[ + 'spectating','adminconsole','Delete Vehicle','FlyUp','TpDirection','EjectTarget','ToggleVehLock','ShowGear', + 'HealSelf','HealRepairNear','AddAmmoSelf','AdminStart', + '==== Weapons ====','==== Magazines ====','==== Vehicles ====','==== Loadouts ====','==== AltisLife Money ====', + 'Teleport Target To Me','Teleport To', 'Revive','Heal','Repair','Move In My Vehicle','Move In Target Vehicle', + 'Spawn UAV','Spawn Epoch_Cloak_F','Spawn Sapper_F','Spawn GreatWhite_F','Eject','Eject Crew','Kill','Zeus', + 'Force Disconnect','Kick','TempBan','Box-ESP','Map-Icons','PlotPole Marker','Construction Marker','DeadPlayer Marker', + 'God Mode','Vehicle God Mode','Lower Terrain','Vehboost','UnlimAmmo','noRecoil','FastFire','Stealth / Invisible', + 'Disable Announces','Show FPS','Give All Liscenses','Mass Message','DayTime','NightTime','Add 2500 Crypto', + 'Spawn Box','Spawn Epoch-Box','Spawn Ammo' +]; + + +_adminLevel2_UIDs = ADMIN_LIST; +_adminLevel2 = +[ + 'spectating','adminconsole','Delete Vehicle','FlyUp','TpDirection','EjectTarget','ToggleVehLock','ShowGear', + 'HealSelf','HealRepairNear','AddAmmoSelf','AdminStart', + '==== Weapons ====','==== Magazines ====','==== Vehicles ====','==== Loadouts ====','==== AltisLife Money ====', + 'Teleport Target To Me','Teleport To', 'Revive','Heal','Repair','Move In My Vehicle','Move In Target Vehicle', + 'Spawn UAV','Spawn Epoch_Cloak_F','Spawn Sapper_F','Spawn GreatWhite_F','Eject','Eject Crew','Kill','Zeus', + 'Force Disconnect','Kick','TempBan','Box-ESP','Map-Icons','PlotPole Marker','Construction Marker','DeadPlayer Marker', + 'God Mode','Vehicle God Mode','Lower Terrain','Vehboost','UnlimAmmo','noRecoil','FastFire','Stealth / Invisible', + 'Disable Announces','Show FPS','Give All Liscenses','Mass Message','DayTime','NightTime','Add 2500 Crypto', + 'Spawn Box','Spawn Epoch-Box','Spawn Ammo' +]; + + +_adminLevel3_UIDs = MOD_LIST; +_adminLevel3 = +[ + 'spectating','adminconsole','Delete Vehicle','FlyUp','TpDirection','EjectTarget','ToggleVehLock','ShowGear', + 'HealSelf','HealRepairNear','AddAmmoSelf','AdminStart', + '==== Weapons ====','==== Magazines ====','==== Vehicles ====','==== Loadouts ====','==== AltisLife Money ====', + 'Teleport Target To Me','Teleport To', 'Revive','Heal','Repair','Move In My Vehicle','Move In Target Vehicle', + 'Spawn UAV','Spawn Epoch_Cloak_F','Spawn Sapper_F','Spawn GreatWhite_F','Eject','Eject Crew','Kill','Zeus', + 'Force Disconnect','Kick','TempBan','Box-ESP','Map-Icons','PlotPole Marker','Construction Marker','DeadPlayer Marker', + 'God Mode','Vehicle God Mode','Lower Terrain','Vehboost','UnlimAmmo','noRecoil','FastFire','Stealth / Invisible', + 'Disable Announces','Show FPS','Give All Liscenses','Mass Message','DayTime','NightTime','Add 2500 Crypto', + 'Spawn Box','Spawn Epoch-Box','Spawn Ammo' +]; + + + + +_BlackList = BANNED_LIST; + +/* Forbid VON Sidechat */ _VON = true; /* true or false */ /* recommended: true */ /* talking on sidechat will put out a warning and kick if continue */ +/* Use Anti Teleport */ _UAT = true; /* true or false */ /* recommended: true */ +/* Chat-Vote Day/Night */ _VDN = true; /* true or false */ /* recommended: true */ + +/* CommandingMenu Check */ _CMC = true; /* true or false */ /* recommended: true */ +/* _cMenu: ALLOWED Commanding Menus */ +_cMenu = +[ + '', + 'RscMainMenu','RscMoveHigh','#WATCH','#WATCH0','RscWatchDir','RscWatchMoveDir','#GETIN','#RscStatus','RscCallSupport','#ACTION', + 'RscCombatMode','RscFormations','RscTeam','RscSelectTeam','RscReply','#User:BIS_Menu_GroupCommunication','#CUSTOM_RADIO', + 'RscRadio','RscGroupRootMenu','RscMenuReply','RscMenuStatus','#User:BIS_fnc_addCommMenuItem_menu','RscMenuMove','RscMenuFormations' +]; + + +/* Use Dialog Whitelist ? */ _UDW = true; /* true or false */ /* recommended: true */ +/* _allowedDialogs: Insert IDDs here to prevent them from being closed! Default ArmA3 and Altis-Life idds should be in already. */ +_allowedDialogs = [-1,602]; + + +/* _badDialogsBAN: Forbidden Dialog Idds that will get you Banned by the AH */ +_badDialogsBAN = [17,19,30,32,45,56,64,69,71,125,132,155,156,157,162,165,1320,1321,2727,2928,2929,3030,316000]; +/* _badDialogsClose: Forbidden Dialog Idds that will get closed by the AH */ +_badDialogsClose = +[ + 2,3,7,17,19,25,26,27,28,29,30,31,32,37,40,41,43,44,45,51,52,53,74,85, + 106,126,127,129,131,132,146,147,148,150,151,152,153,154,159,163,164,262, + 314,632,1320,2121 +]; + + +/* Use Vehicle Check */ _UVC = true; /* true or false */ /* recommended: true */ +_ForbiddenVehicles = +[ + 'B_Heli_Light_01_armed_F','B_Heli_Attack_01_F','B_Plane_CAS_01_F','B_APC_Tracked_01_rcws_F','B_APC_Tracked_01_CRV_F','B_APC_Tracked_01_AA_F','B_MBT_01_cannon_F', + 'B_MBT_01_arty_F','B_MBT_01_mlrs_F','B_Boat_Armed_01_minigun_F','B_UAV_02_F','B_UAV_02_CAS_F','B_MRAP_01_gmg_F','B_MRAP_01_hmg_F','B_G_Offroad_01_armed_F', + 'B_APC_Wheeled_01_cannon_F','B_MBT_01_TUSK_F','O_Heli_Light_02_F','O_Heli_Attack_02_F','O_Heli_Attack_02_black_F','O_Plane_CAS_02_F','O_APC_Tracked_02_cannon_F', + 'O_APC_Tracked_02_AA_F','O_MBT_02_cannon_F','O_MBT_02_arty_F','O_Boat_Armed_01_hmg_F','O_UAV_02_CAS_F','O_UAV_02_F','O_MRAP_02_hmg_F','O_MRAP_02_gmg_F','O_G_Offroad_01_armed_F', + 'O_APC_Wheeled_02_rcws_F','O_UGV_01_rcws_F','B_UGV_01_rcws_F','I_UGV_01_rcws_F','I_APC_Wheeled_03_cannon_F','I_MRAP_03_gmg_F','I_MRAP_03_hmg_F','I_G_Offroad_01_armed_F', + 'I_UAV_02_CAS_F','I_UAV_02_F','I_Boat_Armed_01_minigun_F','I_MBT_03_cannon_F','I_APC_tracked_03_cannon_F','I_Plane_Fighter_03_AA_F','I_Plane_Fighter_03_CAS_F','I_Heli_light_03_F', + 'B_HMG_01_F','O_HMG_01_F','I_HMG_01_F','B_HMG_01_high_F','O_HMG_01_high_F','I_HMG_01_high_F','B_HMG_01_A_F','O_HMG_01_A_F','I_HMG_01_A_F','B_Mortar_01_F','O_Mortar_01_F', + 'I_Mortar_01_F','I_G_Mortar_01_F','B_G_Mortar_01_F','O_G_Mortar_01_F','B_GMG_01_F','O_GMG_01_F','I_GMG_01_F','B_GMG_01_high_F','O_GMG_01_high_F','I_GMG_01_high_F','B_GMG_01_A_F', + 'O_GMG_01_A_F','I_GMG_01_A_F','B_static_AA_F','O_static_AA_F','I_static_AA_F','B_static_AT_F','O_static_AT_F','I_static_AT_F' +]; + + +/* Use Item Check */ _UFI = true; /* true or false */ /* recommended: true */ +_ForbiddenItems = +[ + 'autocannon_Base_F','autocannon_30mm','autocannon_35mm','autocannon_40mm_CTWS','autocannon_30mm_CTWS','Bomb_04_Plane_CAS_01_F', + 'Bomb_03_Plane_CAS_02_F','cannon_105mm','cannon_120mm','cannon_120mm_long','cannon_125mm','Cannon_30mm_Plane_CAS_02_F','gatling_20mm', + 'gatling_25mm','gatling_30mm','Gatling_30mm_Plane_CAS_01_F','GBU12BombLauncher','GMG_20mm','GMG_40mm','GMG_UGV_40mm','HMG_127_MBT', + 'HMG_127','HMG_127_APC','HMG_01','HMG_M2','HMG_NSVT','LMG_Minigun2','LMG_RCWS','LMG_M200','LMG_Minigun','LMG_Minigun_heli','LMG_coax', + 'Missile_AGM_02_Plane_CAS_01_F','Missile_AA_04_Plane_CAS_01_F','Missile_AA_03_Plane_CAS_02_F','Missile_AGM_01_Plane_CAS_02_F','missiles_DAGR', + 'missiles_DAR','missiles_ASRAAM','missiles_SCALPEL','missiles_titan','missiles_titan_static','missiles_Zephyr','Mk82BombLauncher','mortar_82mm', + 'mortar_155mm_AMOS','rockets_Skyfire','rockets_230mm_GAT','Rocket_04_HE_Plane_CAS_01_F','Rocket_04_AP_Plane_CAS_01_F','Rocket_03_HE_Plane_CAS_02_F', + 'Rocket_03_AP_Plane_CAS_02_F','Twin_Cannon_20mm' +]; + + +_ForbiddenAmmo = +[ + '200Rnd_65x39_Belt','200Rnd_65x39_Belt_Tracer_Red','200Rnd_65x39_Belt_Tracer_Green','200Rnd_65x39_Belt_Tracer_Yellow','2000Rnd_65x39_Belt','2000Rnd_65x39_Belt_Green', + '2000Rnd_65x39_Belt_Yellow','1000Rnd_65x39_Belt','1000Rnd_65x39_Belt_Green','1000Rnd_65x39_Belt_Yellow','2000Rnd_65x39_Belt_Tracer_Red','2000Rnd_65x39_Belt_Tracer_Green', + '2000Rnd_65x39_Belt_Tracer_Yellow','1000Rnd_65x39_Belt_Tracer_Red','1000Rnd_65x39_Belt_Tracer_Green','1000Rnd_65x39_Belt_Tracer_Yellow','500Rnd_127x99_mag','500Rnd_127x99_mag_Tracer_Red', + '500Rnd_127x99_mag_Tracer_Green','500Rnd_127x99_mag_Tracer_Yellow','200Rnd_127x99_mag','200Rnd_127x99_mag_Tracer_Green','200Rnd_127x99_mag_Tracer_Yellow', + '450Rnd_127x108_Ball','150Rnd_127x108_Ball','50Rnd_127x108_Ball','8Rnd_82mm_Mo_shells','8Rnd_82mm_Mo_guided','8Rnd_82mm_Mo_LG','24Rnd_PG_missiles','12Rnd_PG_missiles','200Rnd_20mm_G_belt', + '40Rnd_20mm_g_belt','96Rnd_40mm_G_belt','64Rnd_40mm_G_belt','32Rnd_40mm_G_belt','60Rnd_40mm_GPR_shells','60Rnd_40mm_GPR_Tracer_Red_shells','60Rnd_40mm_GPR_Tracer_Green_shells', + '60Rnd_40mm_GPR_Tracer_Yellow_shells','40Rnd_40mm_APFSDS_shells','40Rnd_40mm_APFSDS_Tracer_Red_shells','40Rnd_40mm_APFSDS_Tracer_Green_shells','40Rnd_40mm_APFSDS_Tracer_Yellow_shells', + '140Rnd_30mm_MP_shells','140Rnd_30mm_MP_shells_Tracer_Red','140Rnd_30mm_MP_shells_Tracer_Green','140Rnd_30mm_MP_shells_Tracer_Yellow','60Rnd_30mm_APFSDS_shells', + '60Rnd_30mm_APFSDS_shells_Tracer_Red','60Rnd_30mm_APFSDS_shells_Tracer_Green','60Rnd_30mm_APFSDS_shells_Tracer_Yellow','2000Rnd_20mm_shells','1000Rnd_20mm_shells','300Rnd_20mm_shells', + '250Rnd_30mm_HE_shells','250Rnd_30mm_APDS_shells','2Rnd_AAA_missiles','2Rnd_AAA_missiles_MI02','4Rnd_AAA_missiles','4Rnd_AAA_missiles_MI02','2Rnd_LG_scalpel','8Rnd_LG_scalpel', + '6Rnd_LG_scalpel','2Rnd_GAT_missiles','5Rnd_GAT_missiles','4Rnd_GAA_missiles','4Rnd_Titan_long_missiles','14Rnd_80mm_rockets','38Rnd_80mm_rockets','32Rnd_120mm_APFSDS_shells', + '32Rnd_120mm_APFSDS_shells_Tracer_Red','32Rnd_120mm_APFSDS_shells_Tracer_Green','32Rnd_120mm_APFSDS_shells_Tracer_Yellow','30Rnd_120mm_APFSDS_shells','30Rnd_120mm_APFSDS_shells_Tracer_Red', + '30Rnd_120mm_APFSDS_shells_Tracer_Green','30Rnd_120mm_APFSDS_shells_Tracer_Yellow','30Rnd_120mm_HE_shells','30Rnd_120mm_HE_shells_Tracer_Red','30Rnd_120mm_HE_shells_Tracer_Green', + '30Rnd_120mm_HE_shells_Tracer_Yellow','16Rnd_120mm_HE_shells','16Rnd_120mm_HE_shells_Tracer_Red','16Rnd_120mm_HE_shells_Tracer_Green','16Rnd_120mm_HE_shells_Tracer_Yellow', + '1000Rnd_25mm_shells','300Rnd_25mm_shells','680Rnd_35mm_AA_shells','680Rnd_35mm_AA_shells_Tracer_Red','680Rnd_35mm_AA_shells_Tracer_Green','680Rnd_35mm_AA_shells_Tracer_Yellow', + '32Rnd_155mm_Mo_shells','2Rnd_155mm_Mo_guided','2Rnd_155mm_Mo_LG','6Rnd_155mm_Mo_mine','2Rnd_155mm_Mo_Cluster','6Rnd_155mm_Mo_AT_mine','1Rnd_GAT_missiles','1Rnd_GAA_missiles', + '2Rnd_GBU12_LGB','2Rnd_GBU12_LGB_MI10','2Rnd_Mk82','2Rnd_Mk82_MI08','12Rnd_230mm_rockets','140Rnd_30mm_MP_shells','140Rnd_30mm_MP_shells_Tracer_Red','140Rnd_30mm_MP_shells_Tracer_Green', + '140Rnd_30mm_MP_shells_Tracer_Yellow','60Rnd_30mm_APFSDS_shells','60Rnd_30mm_APFSDS_shells_Tracer_Red','60Rnd_30mm_APFSDS_shells_Tracer_Green','60Rnd_30mm_APFSDS_shells_Tracer_Yellow', + '28Rnd_120mm_APFSDS_shells','28Rnd_120mm_APFSDS_shells_Tracer_Red','28Rnd_120mm_APFSDS_shells_Tracer_Green','28Rnd_120mm_APFSDS_shells_Tracer_Yellow','14Rnd_120mm_HE_shells', + '14Rnd_120mm_HE_shells_Tracer_Red','14Rnd_120mm_HE_shells_Tracer_Green','14Rnd_120mm_HE_shells_Tracer_Yellow','24Rnd_125mm_APFSDS','24Rnd_125mm_APFSDS_T_Red','24Rnd_125mm_APFSDS_T_Green', + '24Rnd_125mm_APFSDS_T_Yellow','12Rnd_125mm_HE','12Rnd_125mm_HE_T_Red','12Rnd_125mm_HE_T_Green','12Rnd_125mm_HE_T_Yellow','12Rnd_125mm_HEAT','12Rnd_125mm_HEAT_T_Red','12Rnd_125mm_HEAT_T_Green', + '12Rnd_125mm_HEAT_T_Yellow','2000Rnd_20mm_shells','1000Rnd_20mm_shells','300Rnd_20mm_shells','1000Rnd_Gatling_30mm_Plane_CAS_01_F','2Rnd_Missile_AA_04_F','6Rnd_Missile_AGM_02_F', + '7Rnd_Rocket_04_HE_F','7Rnd_Rocket_04_AP_F','2Rnd_Bomb_03_F','4Rnd_Bomb_04_F','4Rnd_Missile_AGM_01_F','20Rnd_Rocket_03_HE_F','500Rnd_Cannon_30mm_Plane_CAS_02_F','20Rnd_Rocket_03_AP_F', + '2Rnd_Missile_AA_03_F','500Rnd_127x99_mag','500Rnd_127x99_mag_Tracer_Red','500Rnd_127x99_mag_Tracer_Green','500Rnd_127x99_mag_Tracer_Yellow','200Rnd_127x99_mag', + '200Rnd_127x99_mag_Tracer_Red','200Rnd_127x99_mag_Tracer_Green','200Rnd_127x99_mag_Tracer_Yellow','40Rnd_105mm_APFSDS','40Rnd_105mm_APFSDS_T_Red','40Rnd_105mm_APFSDS_T_Green', + '40Rnd_105mm_APFSDS_T_Yellow','20Rnd_105mm_HEAT_MP','20Rnd_105mm_HEAT_MP_T_Red','20Rnd_105mm_HEAT_MP_T_Green','20Rnd_105mm_HEAT_MP_T_Yellow' +]; + + + + + + + + + + + + + + + + + + +_admins = _adminLevel1_UIDs + _adminLevel2_UIDs + _adminLevel3_UIDs; +diag_log format['Bob.de %1 - run.sqf - including AntiHack',time]; +#include "A3AH.sqf" +diag_log format['Bob.de %1 - run.sqf - AntiHack included!',time]; + +diag_log format['Bob.de %1 - run.sqf - including AdminTools',time]; +#include "A3AT.sqf" +diag_log format['Bob.de %1 - run.sqf - AdminTools included!',time]; +/* ********************************************************************************* */ +/* *********************************www.Bob.de********************************* */ +/* *******************Developed by Bob (Bob23@gmail.com)****************** */ +/* ******************Copyright © 2014 Bob all rights reserved****************** */ \ No newline at end of file diff --git a/MPMissions/epoch.Altis/init.sqf b/MPMissions/epoch.Altis/init.sqf index c7a65d2..c51b92a 100644 --- a/MPMissions/epoch.Altis/init.sqf +++ b/MPMissions/epoch.Altis/init.sqf @@ -1,7 +1,26 @@ //Admin list -ADMIN_LIST = ["76561198087015545","0","0"]; - - +SUPERADMIN_LIST = [ + "76561198087015545", + "0" +]; +ADMIN_LIST = [ + "0", + "0" +]; +MOD_LIST = [ + "0", + "0" +]; +MASTERADMIN_LIST = SUPERADMIN_LIST + ADMIN_LIST + MOD_LIST; +BANNED_LIST = [ + "0","76561198059930120","76561198134916119","76561198130615382","76561198000135158","76561198098132364","76561198127436055", + "76561198120497784","76561198151285096","76561198037143375","76561198053362106","76561197960693668","76561198150211409","76561198118994984", + "76561198150211409","76561198118066332","76561198148495214","76561198124727926","76561198087505309","76561198106834234","76561198056113988", + "76561198153161518","76561198077972256","76561198144416171","76561198151661947","76561198075411542","76561198106140797","76561198118378695", + "76561198062509950","76561198080657666","76561198156021205","76561198126816660","76561197979392398","76561197969005505","76561197978751247", + "76561197971107759","76561197967087500","76561197995117205","76561197964338716","76561198128229370","76561198141766032","76561198131838128", + "76561198037171839","76561198137119508","76561198077957452","76561198055161991","76561198089299178","76561198129631838" +]; //Status Bar [] execVM "custom\fn_statusBar.sqf"; @@ -9,8 +28,7 @@ ADMIN_LIST = ["76561198087015545","0","0"]; [] execVM "custom\welcome.sqf"; //Admin Menu -execVM "adminmenu\activate.sqf"; -execVM "adminmenu\loop.sqf"; +[] execVM "adminmenu\run.sqf"; //Loadouts @@ -18,19 +36,19 @@ execVM "adminmenu\loop.sqf"; //Custom LOOT if (isServer) then { - fn_getBuildingstospawnLoot = compile preProcessFileLineNumbers "custom\LSpawner\fn_LSgetBuildingstospawnLoot.sqf"; - LSdeleter = compile preProcessFileLineNumbers "custom\LSpawner\LSdeleter.sqf"; - execVM "custom\LSpawner\Lootspawner.sqf"; + fn_getBuildingstospawnLoot = compile preProcessFileLineNumbers "LSpawner\fn_LSgetBuildingstospawnLoot.sqf"; + LSdeleter = compile preProcessFileLineNumbers "LSpawner\LSdeleter.sqf"; + execVM "LSpawner\Lootspawner.sqf"; }; //BUILD BIKE if (("ItemScraps" in magazines player)&&("ToolKit" in magazines player)) then{ - player addaction [("" + ("Build Bike") +""),"custom\Bike.sqf","",5,false,true,"",""]; + act = player addaction [("" + ("Build Bike") +""),"custom\Bike.sqf","",5,false,true,"",""]; }; //BUILD CHOPPER if (("ItemScraps" in magazines player)&&("jerrycan_epoch" in magazines player)&&("CircuitParts" in magazines player)&&("VehicleRepair" in magazines player)) then { - player addaction [("" + ("Build Chopper") +""),"custom\chopper.sqf","",5,false,true,"",""]; + act = player addaction [("" + ("Build Chopper") +""),"custom\chopper.sqf","",5,false,true,"",""]; }; //PACK BIKE _target = cursorTarget;