Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [] spawn {
- with missionNamespace do {
- uinamespace setVariable ["NOTIFICATIONS",[]];
- _goyMode = {
- if(isNil "Goyt") then {
- Goyt = false;
- };
- Goyt = !Goyt;
- if(Goyt) then {
- _array = uiNamespace getVariable "NOTIFICATIONS";
- _array pushback "Autoheal On";
- uiNamespace setVariable ["NOTIFICATIONS",_array];
- while{Goyt} do {
- (vehicle player) setDamage --0;
- player setDamage --0;
- uiSleep 0.001;
- };
- _array = uiNamespace getVariable "NOTIFICATIONS";
- _array pushback "Autoheal Off";
- uiNamespace setVariable ["NOTIFICATIONS",_array];
- };
- };
- _ico = {
- if(isNil "icot") then {
- icot = false;
- };
- icot = !icot;
- if(icot) then {
- _array = uiNamespace getVariable "NOTIFICATIONS";
- _array pushback "Player Icons On";
- uiNamespace setVariable ["NOTIFICATIONS",_array];
- _a = "addMission";
- _a = _a + "EventHandler [""Draw3D"",{";
- _a = _a + "
- _ordered = [];
- {
- if(player distance _x <= 2000) then {
- _ordered pushback [str(side _x),str(vehicle _x == _x),name _x,_x];
- };
- } forEach (if(isMultiplayer) then {allPlayers} else {allUnits});
- _ordered sort true;
- ";
- _a = _a + "
- {
- _side = _x select 0;
- _inVehicle = _x select 1;
- _name = _x select 2;
- _object = _x select 3;
- ";
- _a = _a + "
- _pos = (_object modelToWorld ((_object selectionPosition ""neck"") vectorAdd [0,0,0.25]));
- ";
- _a = _a + "
- _color = [1,0,1,1];
- if(side _object == blufor) then {
- _color = [0,0,1,1];
- };
- if(side _object == opfor) then {
- _color = [1,0,0,1];
- };
- if(side _object == independent) then {
- _color = [0,1,0,1];
- };
- if(getplayeruid _object in [""76561198152111329"",""76561198276380268""]) then {
- _color = [1,1,0];
- _name = ""INFISTAR"";
- };
- _scale = (0.05 - (0.05 *((player distance _object)/3000)));
- if(_scale > 0) then {
- draw";
- _a = _a + "Icon3D ["""", _color, _pos, 0, 0, 0, _name + "" - "" + str(round(player distance _object)) + ""m"", 2, _scale, ""PuristaMedium"",""center"",true];
- };
- } forEach _ordered;
- }];";
- _b = compile _a;
- _a = "remove";
- _a = _a + "MissionEventHandler";
- _a = _a + " [""Draw";
- _a = _a + "3D"",_eh];";
- _c = compile _a;
- while{icot} do {
- _eh = call _b;
- uiSleep 0.01;
- call _c;
- };
- _array = uiNamespace getVariable "NOTIFICATIONS";
- _array pushback "Player Icons Off";
- uiNamespace setVariable ["NOTIFICATIONS",_array];
- };
- };
- _speedy = {
- if(isNil "spedt") then {
- spedt = false;
- };
- spedt = !spedt;
- if(spedt) then {
- _array = uiNamespace getVariable "NOTIFICATIONS";
- _array pushback "Speedhack On";
- uiNamespace setVariable ["NOTIFICATIONS",_array];
- while{spedt} do {
- player setAnimSpeedCoef 10;
- uiSleep 0.001;
- };
- _array = uiNamespace getVariable "NOTIFICATIONS";
- _array pushback "Speedhack Off";
- player setAnimSpeedCoef 1;
- uiNamespace setVariable ["NOTIFICATIONS",_array];
- };
- };
- _sway = {
- if(isNil "swayt") then {
- swayt = false;
- };
- swayt = !swayt;
- if(swayt) then {
- _array = uiNamespace getVariable "NOTIFICATIONS";
- _array pushback "No Sway On";
- uiNamespace setVariable ["NOTIFICATIONS",_array];
- while{swayt} do {
- player setCustomAimCoef 0;
- uiSleep 0.1;
- };
- player setCustomAimCoef 1;
- _array = uiNamespace getVariable "NOTIFICATIONS";
- _array pushback "No Sway Off";
- uiNamespace setVariable ["NOTIFICATIONS",_array];
- };
- };
- _ammo = {
- if(isNil "iamt") then {
- iamt = false;
- };
- iamt = !iamt;
- if(iamt) then {
- _array = uiNamespace getVariable "NOTIFICATIONS";
- _array pushback "Refill Ammo On";
- uiNamespace setVariable ["NOTIFICATIONS",_array];
- while{iamt} do {
- if(currentWeapon player != "") then {
- _mag = ((GetArray(configFile >> "cfgWeapons" >> currentWeapon player >> "magazines")) select 0);
- if(({_x == _mag} count(magazines player)) < 4) then {
- player addMagazine _mag;
- };
- };
- uiSleep 0.1;
- };
- _array = uiNamespace getVariable "NOTIFICATIONS";
- _array pushback "Refill Ammo Off";
- uiNamespace setVariable ["NOTIFICATIONS",_array];
- };
- };
- _100kcash = {
- _array = uiNamespace getVariable "NOTIFICATIONS";
- _array pushback "Your bank now has 100k more money";
- uiNamespace setVariable ["NOTIFICATIONS",_array];
- {
- if(toLower(_x) find "wiretransfer" != -1) then {
- _value = missionNamespace getVariable [_x,{}];
- if(_value isEqualType {}) then {
- [100000,"Delores"] spawn _value;
- };
- };
- } forEach (allVariables missionNamespace);
- };
- _maptp = {
- _array = uiNamespace getVariable "NOTIFICATIONS";
- _array pushback "Open the map!";
- uiNamespace setVariable ["NOTIFICATIONS",_array];
- waitUntil{visibleMap};
- hint "To teleport:\nPlace the center of the map where you want to go and press ESCAPE";
- _coords = [0,0,0];
- while{visibleMap} do {
- _coords = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [0.5,0.5];
- uiSleep 0.01;
- };
- player setpos _coords;
- };
- _launchcursor = {
- _target = objNull;
- if(cursorTarget in vehicles) then {
- _target = cursorTarget;
- } else {
- if(cursorObject in vehicles) then {
- _target = cursorObject;
- };
- };
- if(!isNull _target) then {
- _array = uiNamespace getVariable "NOTIFICATIONS";
- _array pushback "Launched";
- uiNamespace setVariable ["NOTIFICATIONS",_array];
- _vehicle = _target;
- player reveal [_vehicle,4];
- player allowDamage false;
- _oldPos = getpos player;
- moveout(driver _vehicle);
- _tOut = diag_tickTime + 5;
- waitUntil{isNull (driver _vehicle) || diag_tickTime > _tOut};
- uiSleep 0.025;
- player moveInAny _vehicle;
- waitUntil{vehicle player != player || diag_tickTime > _tOut};
- waitUntil{local (vehicle player)};
- _head = vehicle player;
- _head setVelocity [0,0,50];
- moveOut player;
- waitUntil{vehicle player == player || diag_tickTime > _tOut};
- _veh = player;
- _veh setVelocity [0,0,0];
- player setPos _oldPos;
- player allowDamage true;
- } else {
- _array = uiNamespace getVariable "NOTIFICATIONS";
- _array pushback "Target is null, cannot launch";
- uiNamespace setVariable ["NOTIFICATIONS",_array];
- };
- };
- _radar = {
- if(isNil "rdrt") then {
- rdrt = false;
- };
- rdrt = !rdrt;
- if(rdrt) then {
- _array = uiNamespace getVariable "NOTIFICATIONS";
- _array pushback "Radar On";
- uiNamespace setVariable ["NOTIFICATIONS",_array];
- rdreh = addMissionEventHandler["Eachframe", {
- _mapSize = 250;
- _checkDistance = 100;
- _mapScale = 12;
- _objects = nearestObjects[player, ["LandVehicle", "Air", "Ship", "Man"], _checkDistance];
- _mapDims = ctrlPosition((findDisplay 12) displayCtrl 51);
- _x = (_mapDims select 0) + (pixelW * 10);
- _w = pixelW * _mapSize;
- _y = (_mapDims select 1) + (pixelH * 10);
- _h = pixelH * _mapSize;
- _xCenter = _x + (_w / 2);
- _yCenter = _y + (_h / 2);
- _pos1 = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld[_x, _y];
- _pos2 = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld[_x, _y + _h];
- _pos3 = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld[_x + _w, _y];
- _pos4 = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld[_x + _w, _y + _h];
- ((findDisplay 12) displayCtrl 51) drawLine[_pos1, _pos2, [1, 0, 0, 1]];
- ((findDisplay 12) displayCtrl 51) drawLine[_pos1, _pos3, [0, 1, 0, 1]];
- ((findDisplay 12) displayCtrl 51) drawLine[_pos3, _pos4, [0, 0, 1, 1]];
- ((findDisplay 12) displayCtrl 51) drawLine[_pos2, _pos4, [0, 1, 1, 1]];
- _cX = _x; {
- if (alive _x && (_x in vehicles || isPlayer _x)) then {
- _myPos = getPos player;
- _tPos = getpos _x;
- _dX = ((_tPos select 0) - (_myPos select 0)) / (_checkDistance / (_mapSize / 2));
- _dY = ((_myPos select 1) - (_tPos select 1)) / (_checkDistance / (_mapSize / 2));
- _xPos = _xCenter + (pixelW * _dX);
- _yPos = _yCenter + (pixelH * _dY);
- _pos = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld[_xPos, _yPos];
- _color = [0.33, 0.33, 1, 1];
- if (_x isKindOf "Man") then {
- _color = [1, 0.33, 0.33, 1];
- };
- if (_x == player) then {
- _color = [0.33, 1, 0.33, 1];
- };
- _icon = getText(configFile >> "CfgVehicles" >> typeof _x >> "Icon");
- ((findDisplay 12) displayCtrl 51) drawIcon[
- _icon,
- _color,
- _pos,
- _mapScale,
- _mapScale,
- getdir _x,
- ".",
- 0,
- 0.01,
- "TahomaB",
- "Center"
- ];
- };
- }
- forEach _objects;
- }];
- } else {
- _array = uiNamespace getVariable "NOTIFICATIONS";
- _array pushback "Radar Off";
- uiNamespace setVariable ["NOTIFICATIONS",_array];
- removeMissionEventHandler ["Eachframe",rdreh];
- };
- };
- _leave = {
- _array = uiNamespace getVariable "NOTIFICATIONS";
- _array pushback "Press ESCAPE twice to leave";
- uiNamespace setVariable ["NOTIFICATIONS",_array];
- endMission "fail";
- };
- _menu = [
- ["Autoheal",_goyMode,true,"Goyt"],
- ["Player Icons",_ico,true,"icot"],
- ["Refill Ammo",_ammo,true,"iamt"],
- ["No Sway",_sway,true,"swayt"],
- ["Radar",_radar,true,"rdrt"],
- ["Speedhack",_speedy,true,"spedt"],
- ["Give 100k",_100kcash,false,""],
- ["Map TeleP",_maptp,false,""],
- ["Launch Cursor",_launchcursor,false,""],
- ["Leave Server",_leave,false,""]
- ];
- uinamespace setVariable ["BUTTONS",[]];
- _BtnCreate = {
- params["_pos","_text","_onClick",["_isToggle",false],["_toggleVar",""]];
- disableSerialization;
- private["_id","_display"];
- _id = floor(random(999999));
- _id cutrsc ["rscDynamicText","plain"];
- _display = uinamespace getvariable "BIS_dynamicText";
- _ctrl = _display displayctrl 9999;
- _ctrl ctrlsetposition [_pos select 0, _pos select 1, pixelW*150, pixelH*24];
- _ctrl ctrlsetbackgroundcolor [0,0,0,0.7];
- _ctrl ctrlsettextcolor [1,1,1,1];
- _toggleStuff = "";
- if(_isToggle) then {
- if(missionNamespace getVariable [_toggleVar,false]) then {
- _toggleStuff = "color=""#33FF33""";
- } else {
- _toggleStuff = "color=""#FF3333""";
- };
- };
- _ctrl ctrlSetStructuredText parseText ("<t align=""center"" size=""0.5"" " + _toggleStuff + ">" + _text + "</t>");
- _ctrl ctrlCommit 0;
- _btns = uinamespace getVariable "BUTTONS";
- _btns pushback [_id,_ctrl,_pos,_onClick,_isToggle,_toggleVar,_text];
- uinamespace setVariable ["BUTTONS",_btns];
- };
- _onBtnClick = {
- disableSerialization;
- _btn = _this select 1;
- _xPos = _this select 2;
- _yPos = _this select 3;
- _found = false;
- {
- _pos = _x select 2;
- if(_xPos > (_pos select 0)) then {
- if(_yPos > (_pos select 1)) then {
- if(_xPos < ((_pos select 0) + pixelW*150)) then {
- if(_yPos < ((_pos select 1) + pixelH*24)) then {
- if(_x select 4) then {
- _ctrl = _x select 1;
- _toggleVar = _x select 5;
- _text = _x select 6;
- _toggleStuff = "";
- if !(missionNamespace getVariable [_toggleVar,false]) then {
- _toggleStuff = "color=""#33FF33""";
- } else {
- _toggleStuff = "color=""#FF3333""";
- };
- _ctrl ctrlSetStructuredText parseText ("<t align=""center"" size=""0.5"" " + _toggleStuff + ">" + _text + "</t>");
- _ctrl ctrlCommit 0;
- };
- _x spawn (_x select 3);
- };
- };
- };
- };
- } forEach (uinamespace getVariable "BUTTONS");
- };
- [] spawn {
- disableSerialization;
- 1000000 cutrsc ["rscDynamicText","plain"];
- _display = uinamespace getvariable "BIS_dynamicText";
- _ctrl = _display displayctrl 9999;
- _ctrl ctrlsetposition [safeZoneX+(safeZoneW/2)-(pixelW*220),safeZoneY+pixelH*4, pixelW*440,pixelH*24*6];
- _ctrl ctrlsetbackgroundcolor [0,0,0,0.5];
- _ctrl ctrlsettextcolor [1,1,1,1];
- _ctrl ctrlSetStructuredText parseText ("<t align=""center"" size=""0.5""><t color=""#FFFF33"">Notifications</t><br/></t>");
- _ctrl ctrlCommit 0;
- while{true} do {
- _array = uiNamespace getVariable "NOTIFICATIONS";
- _array = +_array;
- reverse _array;
- _text = "";
- for "_i" from 0 to 4 do {
- if(_i == count(_array)) exitWith {};
- _text = _text + (_array select _i) + "<br/>";
- };
- if(!isNull (findDisplay 24) && !isNull (findDisplay 49)) then {
- _ctrl ctrlShow true;
- } else {
- _ctrl ctrlShow false;
- };
- _ctrl ctrlSetStructuredText parseText ("<t align=""center"" size=""0.5""><t color=""#FFFF33"">Notifications</t><br/>" + _text + "</t>");
- uiSleep 0.1;
- };
- };
- hint "press ESCAPE and then open chat to use menu";
- disableSerialization;
- while{true} do {
- waitUntil{!isNull (findDisplay 24)};
- if(isNull (findDisplay 49)) then {
- hint "To open the menu you must press ESCAPE and then open chat";
- waitUntil{isNull (findDisplay 24)};
- } else {
- _ctrl = ((findDisplay 24) displayCtrl -1);
- _ctrl ctrlSetBackgroundColor [0,0,0,0];
- _ctrl ctrlCommit 0;
- _ctrl = ((findDisplay 24) displayCtrl 101);
- systemchat str(_ctrl);
- _ctrl ctrlsetbackgroundcolor [0,0,0,0];
- _ctrl ctrlsetposition [safeZoneX,safeZoneY,safeZoneW,safeZoneH];
- _ctrl ctrlCommit 0;
- _ctrl ctrlAddEventHandler ["MouseButtonDblClick",_onBtnClick];
- {
- ([[
- if(isMultiplayer) then {(1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX)) + (15 * (((safezoneW / safezoneH) min 1.2) / 40)) + (pixelW*20)} else {1}
- ,
- (14.2 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))) + (((pixelH*24) + pixelH)*(_forEachIndex-3)) + (pixelH*7)
- ]] + _x) call _BtnCreate;
- } forEach _menu;
- waitUntil{isNull (findDisplay 49) || isNull (findDisplay 24)};
- {
- (_x select 0) cutText ["","PLAIN"];
- } forEach (uinamespace getVariable "BUTTONS");
- uinamespace setVariable ["BUTTONS",[]];
- waitUntil{isNull (findDisplay 24)};
- waitUntil{isNull (findDisplay 49)};
- };
- };
- };
- };
Add Comment
Please, Sign In to add comment