Debug Monitor Question

Funyuns93

New Member
How would I go about adding how much time is left until the server restarts on the debug.
This is my debug for my server. If anyone could help that would be nice.
Code:
dayz_spaceInterrupt = {
        private ["_dikCode", "_handled","_displayg"];
        _dikCode = _this select 1;
        _handled = false;
        if (_dikCode in (actionKeys "GetOver")) then {
            if (!r_fracture_legs and (time - dayz_lastCheckBit > 4)) then {
                _inBuilding = [player] call fnc_isInsideBuilding;
                _nearbyObjects = nearestObjects[getPosATL player, ["TentStorage", "Hedgehog_DZ", "Sandbag1_DZ","TrapBear","Wire_cat1"], 8];
                if (!_inBuilding and (count _nearbyObjects == 0)) then {
                    dayz_lastCheckBit = time;
                    call player_CombatRoll;
                };
            };
        };
        //if (_dikCode == 57) then {_handled = true}; // space
        //if (_dikCode in actionKeys 'MoveForward' or _dikCode in actionKeys 'MoveBack') then {r_interrupt = true};
        /*
        if (_dikCode == 210) then //insert Key
        {
            _nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf";
        };
        */
        //Prevent exploit of drag body
        if ((_dikCode in actionKeys "Prone") and r_drag_sqf) then { force_dropBody = true; };
        if ((_dikCode in actionKeys "Crouch") and r_drag_sqf) then { force_dropBody = true; };
 
        if (_dikCode in actionKeys "MoveLeft") then {r_interrupt = true};
        if (_dikCode in actionKeys "MoveRight") then {r_interrupt = true};
        if (_dikCode in actionKeys "MoveForward") then {r_interrupt = true};
        if (_dikCode in actionKeys "MoveBack") then {r_interrupt = true};
        if (_dikCode in actionKeys "ForceCommandingMode") then {_handled = true};
        if (_dikCode in actionKeys "PushToTalk" and (time - dayz_lastCheckBit > 10)) then {
            dayz_lastCheckBit = time;
            [player,15,true,(getPosATL player)] spawn player_alertZombies;
        };
        if (_dikCode in actionKeys "VoiceOverNet" and (time - dayz_lastCheckBit > 10)) then {
            dayz_lastCheckBit = time;
            [player,15,true,(getPosATL player)] spawn player_alertZombies;
        };
        if (_dikCode in actionKeys "PushToTalkDirect" and (time - dayz_lastCheckBit > 10)) then {
            dayz_lastCheckBit = time;
            [player,5,false,(getPosATL player)] spawn player_alertZombies;
        };
        if (_dikCode in actionKeys "Chat" and (time - dayz_lastCheckBit > 10)) then {
            dayz_lastCheckBit = time;
            [player,15,false,(getPosATL player)] spawn player_alertZombies;
        };
        if (_dikCode in actionKeys "User20" and (time - dayz_lastCheckBit > 5)) then {
            dayz_lastCheckBit = time;
            _nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf";
        };
        if ((_dikCode == 0x3E or _dikCode == 0x0F or _dikCode == 0xD3) and (time - dayz_lastCheckBit > 10)) then {
            dayz_lastCheckBit = time;
            call dayz_forceSave;
        };
        if (_dikCode == 0xB8 or _dikCode == 0x38 or _dikCode == 0x3E or _dikCode == 0x2A or _dikCode == 0x36 or _dikCode == 0x01) then {
            _displayg = findDisplay 106;
            if (!isNull _displayg) then {
            call player_gearSync;
            call dayz_forceSave;
            } else {
                if (dialog) then {
                    call player_gearSync;
                    call dayz_forceSave;
                };
            };
        };
        /*
        if (_dikCode in actionKeys "IngamePause") then {
            waitUntil {
                _display = findDisplay 49;
                !isNull _display;
            };
            _btnRespawn = _display displayCtrl 1010;
            _btnAbort = _display displayCtrl 104;
            _btnRespawn ctrlEnable false;
            _btnAbort ctrlEnable false;
        };
        */
        if (_dikCode == 0x44) then {
        if (debugMonitor) then {
            debugMonitor = false;
            hintSilent "";
        } else {[] spawn fnc_debug;};
    };
    _handled
};
 
fnc_debug = {
    debugMonitor = true;
    while {debugMonitor} do
    {
        _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
        if (player == vehicle player) then
        {
            _pic = (gettext (configFile >> 'cfgWeapons' >> (currentWeapon player) >> 'picture'));
        }
            else
        {
            _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
        };
        hintSilent parseText format ["
        <t color='#4682b4' size='1.15' font='Bitstream' align='center'>[MOOSE]Overwatch</t><br/>
        <t color='#ffffff' size='1' font='Bitstream' align='center'>%1</t><br/><br/>
        <t size='1' font='Bitstream' align='left'>Zombies Killed: </t><t color='#4682b4' size='1' font='Bitstream' align='right'>%2</t><br/>
        <t color='#ffffff' size='1' font='Bitstream' align='left'>Survivors Killed: </t><t color='#4682b4' size='1' font='Bitstream' align='right'>%4</t><br/>
        <t color='#ffffff' size='1' font='Bitstream' align='left'>Bandits Killed: </t><t color='#4682b4' size='1' font='Bitstream' align='right'>%5</t><br/>
        <t color='#ffffff' size='1' font='Bitstream' align='left'>Blood: </t><t color='#4682b4' size='1' font='Bitstream' align='right'>%6</t><br/>
        <t color='#ffffff' size='1' font='Bitstream' align='left'>Humanity: </t><t color='#4682b4' size='1' font='Bitstream' align='right'>%7</t><br/><br/>
        <t color='#ffffff' size='1' font='Bitstream' align='left'>FPS: </t><t color='#4682b4' size='1' font='Bitstream' align='right'>%8</t><br/>
        <img size='4' image='%9'/><br/>
        <t color='#4682b4' size='1' font='Bitstream' align='center'>Press F10 to toggle</t><br/>
        <t size='0.7' font='Bitstream' align='center'>Site Coming Soon!</t>",
        (name player),
        (player getVariable['zombieKills', 0]),
        (player getVariable['headShots', 0]),
        (player getVariable['humanKills', 0]),
        (player getVariable['banditKills', 0]),
        (player getVariable['USEC_BloodQty', r_player_blood]),
        (player getVariable['humanity', 0]),
        (round diag_fps),
        _pic];
        sleep 1;
    };
 
180 is the length of time between restarts, in minutes so change this to your restart interval.
Code:
<t color='#4682b4' size='1.15' font='Bitstream' align='center'>[MOOSE]Overwatch</t><br/>
        <t color='#ffffff' size='1' font='Bitstream' align='center'>%1</t><br/><br/>
        <t size='1' font='Bitstream' align='left'>Zombies Killed: </t><t color='#4682b4' size='1' font='Bitstream' align='right'>%2</t><br/>
        <t color='#ffffff' size='1' font='Bitstream' align='left'>Survivors Killed: </t><t color='#4682b4' size='1' font='Bitstream' align='right'>%4</t><br/>
        <t color='#ffffff' size='1' font='Bitstream' align='left'>Bandits Killed: </t><t color='#4682b4' size='1' font='Bitstream' align='right'>%5</t><br/>
        <t color='#ffffff' size='1' font='Bitstream' align='left'>Blood: </t><t color='#4682b4' size='1' font='Bitstream' align='right'>%6</t><br/>
        <t color='#ffffff' size='1' font='Bitstream' align='left'>Humanity: </t><t color='#4682b4' size='1' font='Bitstream' align='right'>%7</t><br/><br/>
        <t color='#ffffff' size='1' font='Bitstream' align='left'>FPS: </t><t color='#4682b4' size='1' font='Bitstream' align='right'>%8</t><br/>
    <t color='#ffffff' size='1' font='Bitstream' align='left'>Next Restart: </t><t color='#4682b4' size='1' font='Bitstream' align='right'>%9 min</t><br/>
        <img size='4' image='%10'/><br/>
        <t color='#4682b4' size='1' font='Bitstream' align='center'>Press F10 to toggle</t><br/>
        <t size='0.7' font='Bitstream' align='center'>Site Coming Soon!</t>",
        (name player),
        (player getVariable['zombieKills', 0]),
        (player getVariable['headShots', 0]),
        (player getVariable['humanKills', 0]),
        (player getVariable['banditKills', 0]),
        (player getVariable['USEC_BloodQty', r_player_blood]),
        (player getVariable['humanity', 0]),
        (round diag_fps),
        (180-(round(serverTime/60))),
        _pic];
        sleep 1;
    };
 
How would you add it to this one
Code:
//Credit to nullpo for his original debug and Superlube for the picture
//Modified by Matt L
dayz_spaceInterrupt = {
    private ["_dikCode", "_handled"];
    _dikCode = _this select 1;
    _handled = false;
 
    if (_dikCode == 0x44) then {
        if (debugMonitor) then {
            debugMonitor = false;
            hintSilent "";
        } else {[] spawn fnc_debug;};
    };
    _handled
};
 
fnc_debug = {
    debugMonitor = true;
    while {debugMonitor} do
    {
        _kills =        player getVariable["zombieKills",0];
        _killsH =        player getVariable["humanKills",0];
        _killsB =        player getVariable["banditKills",0];
        _humanity =        player getVariable["humanity",0];
        _headShots =    player getVariable["headShots",0];
        _zombies =              count entities "zZombie_Base";
        _zombiesA =    {alive _x} count entities "zZombie_Base";
        _banditCount = {(isPlayer _x) && ((_x getVariable ["humanity",0]) < 0)} count playableUnits;
        _heroCount  = {(isPlayer _x) && ((_x getVariable ["humanity",0]) >= 5000)} count playableUnits;
        _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
            if (player == vehicle player) then
            {
                _pic = (gettext (configFile >> 'cfgWeapons' >> (currentWeapon player) >> 'picture'));
            }
                else
            {
                _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
            };
        hintSilent parseText format ["
        <t size='1'font='Bitstream'align='center' color='#00FF00' >%1</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EE0000' >Blood Left:</t><t size='1' font='Bitstream'align='right' color='#EE0000' >%2</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EEC900' >Humanity:</t><t size='1'font='Bitstream'align='right' color='#EEC900' >%3</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EEC900' >Noobs Killed:</t><t size='1'font='Bitstream'align='right' color='#EEC900' >%4</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EEC900' >Assholes Killed:</t><t size='1'font='Bitstream'align='right' color='#EEC900' >%5</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EEC900' >Zombitches Killed:</t><t size='1'font='Bitstream'align='right' color='#EEC900' >%6</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EEC900' >Dome Shots:</t><t size='1'font='Bitstream'align='right' color='#EEC900' >%7</t><br/>
        <t size='1' font='Bitstream' align='left' color='#EEC900' >Zombitches (alive/total): </t><t size='1' font='Bitstream' align='right' color='#EEC900' >%9/%8</t><br/>
        <t size='1'font='Bitstream'align='left' color='#104E8B' >Current Asshole Count:</t><t size='1'font='Bitstream'align='right' color='#FF0000' >%11</t><br/>
        <t size='1'font='Bitstream'align='left' color='#104E8B' >Current NiceGuy Count:</t><t size='1'font='Bitstream'align='right' color='#00FF00' >%12</t><br/>
        <t size='1' font='Bitstream' align='left' color='#104E8B' >FPS: </t><t size='1' font='Bitstream' align='right' color='#104E8B' >%10</t><br/>
        <img size='3' image='%13'/><br/>
        <t size='1'font='Bitstream'align='left' color='#FF00FF' >Press F10 to toggle! </t><br/>
        <t size='1'font='Bitstream'align='left' color='#00FFFF' >DayzFallenDead.com</t><br/>
        <t size='1'font='Bitstream'align='left' color='#00FF00' >206.222.11.218:2372</t><br/>
 
        ",dayz_playerName,r_player_blood,round _humanity,_killsH,_killsB,_kills,_headShots,count entities "zZombie_Base",{alive _x} count entities "zZombie_Base",diag_fps,_banditCount,_heroCount,_pic];
    sleep 1;
    };
};
 
[] spawn fnc_debug;
 
How would you add it to this one
Code:
-snip- YOUR OLD CODE HERE -snip


like before 180 is time between restarts (%14)

Code:
//Credit to nullpo for his original debug and Superlube for the picture
//Modified by Matt L
dayz_spaceInterrupt = {
    private ["_dikCode", "_handled"];
    _dikCode = _this select 1;
    _handled = false;
 
    if (_dikCode == 0x44) then {
        if (debugMonitor) then {
            debugMonitor = false;
            hintSilent "";
        } else {[] spawn fnc_debug;};
    };
    _handled
};
 
fnc_debug = {
    debugMonitor = true;
    while {debugMonitor} do
    {
        _kills =        player getVariable["zombieKills",0];
        _killsH =        player getVariable["humanKills",0];
        _killsB =        player getVariable["banditKills",0];
        _humanity =        player getVariable["humanity",0];
        _headShots =    player getVariable["headShots",0];
        _zombies =              count entities "zZombie_Base";
        _zombiesA =    {alive _x} count entities "zZombie_Base";
        _banditCount = {(isPlayer _x) && ((_x getVariable ["humanity",0]) < 0)} count playableUnits;
        _heroCount  = {(isPlayer _x) && ((_x getVariable ["humanity",0]) >= 5000)} count playableUnits;
        _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
            if (player == vehicle player) then
            {
                _pic = (gettext (configFile >> 'cfgWeapons' >> (currentWeapon player) >> 'picture'));
            }
                else
            {
                _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
            };
        hintSilent parseText format ["
        <t size='1'font='Bitstream'align='center' color='#00FF00' >%1</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EE0000' >Blood Left:</t><t size='1' font='Bitstream'align='right' color='#EE0000' >%2</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EEC900' >Humanity:</t><t size='1'font='Bitstream'align='right' color='#EEC900' >%3</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EEC900' >Noobs Killed:</t><t size='1'font='Bitstream'align='right' color='#EEC900' >%4</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EEC900' >Assholes Killed:</t><t size='1'font='Bitstream'align='right' color='#EEC900' >%5</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EEC900' >Zombitches Killed:</t><t size='1'font='Bitstream'align='right' color='#EEC900' >%6</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EEC900' >Dome Shots:</t><t size='1'font='Bitstream'align='right' color='#EEC900' >%7</t><br/>
        <t size='1' font='Bitstream' align='left' color='#EEC900' >Zombitches (alive/total): </t><t size='1' font='Bitstream' align='right' color='#EEC900' >%9/%8</t><br/>
        <t size='1'font='Bitstream'align='left' color='#104E8B' >Current Asshole Count:</t><t size='1'font='Bitstream'align='right' color='#FF0000' >%11</t><br/>
        <t size='1'font='Bitstream'align='left' color='#104E8B' >Current NiceGuy Count:</t><t size='1'font='Bitstream'align='right' color='#00FF00' >%12</t><br/>
        <t size='1' font='Bitstream' align='left' color='#104E8B' >FPS: </t><t size='1' font='Bitstream' align='right' color='#104E8B' >%10</t><br/>
        <t color='#104E8B' size='1' font='Bitstream' align='left'>Next Restart: </t><t color='#4682b4' size='1' font='Bitstream' align='right'>%14 min</t><br/>
        <img size='3' image='%13'/><br/>
        <t size='1'font='Bitstream'align='left' color='#FF00FF' >Press F10 to toggle! </t><br/>
        <t size='1'font='Bitstream'align='left' color='#00FFFF' >DayzFallenDead.com</t><br/>
        <t size='1'font='Bitstream'align='left' color='#00FF00' >206.222.11.218:2372</t><br/>
 
        ",
        dayz_playerName, // %1
        r_player_blood, // %2
        round _humanity, // %3
        _killsH, // %4
        _killsB, // %5
        _kills, // %6
        _headShots, // %7
        count entities "zZombie_Base", // %8
        {alive _x} count entities "zZombie_Base", // %9
        diag_fps, // %10
        _banditCount, // %11
        _heroCount, // %12
        _pic, // %13
        (180-(round(serverTime/60))) // %14
        ];
    sleep 1;
    };
};
 
[] spawn fnc_debug;
 
Sorry, have no idea.. its possible that it has to many lines, try deleting ones you dont need that bad and check again.
 
Back
Top