if ((isNull (findDisplay 106)) && (isNull (findDisplay 2001)) && (isNull (findDisplay -1)) && (isNull (findDisplay 41144))
&& (isNull (findDisplay 6902)) && (isNull (findDisplay 6903)) && (isNull (findDisplay 6904)) && (isNull (findDisplay 6905))
&& (isNull (findDisplay 65431)) && (isNull (findDisplay 65432)) && (isNull (findDisplay 65433)) && (isNull (findDisplay 65434))
&& (isNull (findDisplay 65440)) && (isNull (findDisplay 65441)) && (isNull (findDisplay 65442)) && !(ctrlEnabled 1900)) then
{closeDialog 0;}else{if (!isNull (findDisplay 106) and !(ctrlEnabled 6902) and (lbSize ((findDisplay 106) displayCtrl 105) < 1)) then {closeDialog 0;};};
_display = findDisplay 106;
if (!isNull _display) then
{
_chck = _display displayCtrl 101;
_txt = ctrlText _chck;
_txtA = toArray _txt;
_cntA = count _txtA;
if (_cntA < 3) then
{
closeDialog 0;
for '_close' from 0 to 25 do {sleep 0.1;closeDialog 0;};
_log = format['Gear Menu: %1',_txt];
"+_randvar10+" = [_name, _puid, _log,'',''];
publicVariableServer '"+_randvar10+"';
};
_foundDisplays = [];
for '_y' from -10 to 8888 do
{
if (!isNull (findDisplay _y)) then
{
if !(_y in _foundDisplays) then
{
_foundDisplays = _foundDisplays + [_y];
};
};
};
{
if !(_x in [0,8,12,18,46,70,106]) then
{
closeDialog 0;
for '_close' from 0 to 25 do {sleep 0.1;closeDialog 0;};
if (_x in [843]) then
{
[] spawn "+_randvar2+";
};
};
} forEach _foundDisplays;
};