Toggle Debug Monitor

predator1981

New Member
Please help, I cant get my Debug monitor to toggle on/off.

Anyone have any ideas?

Code:
waitUntil {sleep 1;(!isNil "PVDZ_plr_LoginRecord")};
waitUntil {sleep 1;(!isNil 'dayz_Totalzedscheck') || (!isNil 'dayz_locationCheck') || (!isNil 'dayzplayerlogin') || (!isNil 'dayz_animalcheck')};
showChat = true;
if (isNil "custom_monitor") then {custom_monitor = true;} else {custom_monitor = !custom_monitor;};
fnc_debug = {
    custom_monitor = true;
    while {custom_monitor} do
    {
        _logo = "images\SOSlogo.paa";       
        _nearestCity = nearestLocations [getPos player, ["NameCityCapital","NameCity","NameVillage","NameLocal"],650];
        _textCity = "Wilderness";
        if (count _nearestCity > 0) then {_textCity = text (_nearestCity select 0)};           
        _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];
        hintSilent parseText format
            ["
                <img size='6' image='%9'/><br/>
                <t size='1.5'font='Bitstream'align='center'color='#DDDDDD'>----------------------</t><br/>
                <t size='1'font='Bitstream'align='left'>Location:</t><t size='1' font='Bitstream'align='right'color='#FF0000'>%10</t><br/>
                <t size='1'font='Bitstream'align='left'>Blood:</t><t size='1' font='Bitstream'align='right'color='#FF0000'>%1</t><br/>
                <t size='1'font='Bitstream'align='left'>Humanity:</t><t size='1'font='Bitstream'align='right'color='#FF0000'>%2</t><br/>
                <t size='1'font='Bitstream'align='left'>Murders:</t><t size='1'font='Bitstream'align='right'color='#FF0000'>%3</t><br/>
                <t size='1'font='Bitstream'align='left'>Bandits Killed:</t><t size='1'font='Bitstream'align='right'color='#FF0000'>%4</t><br/>
                <t size='1'font='Bitstream'align='left'>Zombies Killed:</t><t size='1'font='Bitstream'align='right'color='#FF0000'>%5</t><br/>
                <t size='1'font='Bitstream'align='left'>Headshots:</t><t size='1'font='Bitstream'align='right'color='#FF0000'>%6</t><br/>
                <t size='1'font='Bitstream'align='left'>Survived:</t><t size='1'font='Bitstream'align='right'color='#FF0000'>%7 Dayz</t>
                <t size='1.5'font='Bitstream'align='center'color='#DDDDDD'>----------------------</t><br/>
                <t size='1'font='Bitstream'align='center'color='#FF0000'>Restart in %8 minutes!</t>
                <t size='1.5'font='Bitstream'align='center'color='#DDDDDD'>----------------------</t><br/>
                <t size='0.85' font='Bitstream' align='center'>Use F5 to Toggle</t><br/>
                ",r_player_blood,round _humanity,_killsH,_killsB,_kills,_headShots,(dayz_Survived),(239-(round(serverTime/60))),_logo,_textCity
            ];
            sleep 5;
    };
};
[] spawn fnc_debug;
 
Code:
dayz_spaceInterrupt = {
    private ["_dikCode", "_handled"];
    _dikCode = _this select 1;
    _handled = false;

    if (_dikCode == 0x44) then {
        if (custom_monitor) then {
           custom_monitor= false;
            hintSilent "";
        } else {[] spawn fnc_debug;};
    };
    _handled
};
 
Thanks for the quick reply :)
Not sure if that is what I was supposed to do but it didn't work.
All it seemed to do was bring up 2 scroll options on the left of the screen.

Should it look like this?

Code:
dayz_spaceInterrupt = {
    private ["_dikCode", "_handled"];
    _dikCode = _this select 1;
    _handled = false;

    if (_dikCode == 0x44) then {
        if (custom_monitor) then {
           custom_monitor= false;
            hintSilent "";
        } else {[] spawn fnc_debug;};
    };
    _handled
};

waitUntil {sleep 1;(!isNil "PVDZ_plr_LoginRecord")};
waitUntil {sleep 1;(!isNil 'dayz_Totalzedscheck') || (!isNil 'dayz_locationCheck') || (!isNil 'dayzplayerlogin') || (!isNil 'dayz_animalcheck')};
showChat = true;
if (isNil "custom_monitor") then {custom_monitor = true;} else {custom_monitor = !custom_monitor;};
fnc_debug = {
    custom_monitor = true;
    while {custom_monitor} do
    {
        _logo = "images\SOSlogo.paa";    
        _nearestCity = nearestLocations [getPos player, ["NameCityCapital","NameCity","NameVillage","NameLocal"],650];
        _textCity = "Wilderness";
        if (count _nearestCity > 0) then {_textCity = text (_nearestCity select 0)};        
        _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];
        hintSilent parseText format
            ["
                <img size='6' image='%9'/><br/>
                <t size='1.5'font='Bitstream'align='center'color='#DDDDDD'>----------------------</t><br/>
                <t size='1'font='Bitstream'align='left'>Location:</t><t size='1' font='Bitstream'align='right'color='#FF0000'>%10</t><br/>
                <t size='1'font='Bitstream'align='left'>Blood:</t><t size='1' font='Bitstream'align='right'color='#FF0000'>%1</t><br/>
                <t size='1'font='Bitstream'align='left'>Humanity:</t><t size='1'font='Bitstream'align='right'color='#FF0000'>%2</t><br/>
                <t size='1'font='Bitstream'align='left'>Murders:</t><t size='1'font='Bitstream'align='right'color='#FF0000'>%3</t><br/>
                <t size='1'font='Bitstream'align='left'>Bandits Killed:</t><t size='1'font='Bitstream'align='right'color='#FF0000'>%4</t><br/>
                <t size='1'font='Bitstream'align='left'>Zombies Killed:</t><t size='1'font='Bitstream'align='right'color='#FF0000'>%5</t><br/>
                <t size='1'font='Bitstream'align='left'>Headshots:</t><t size='1'font='Bitstream'align='right'color='#FF0000'>%6</t><br/>
                <t size='1'font='Bitstream'align='left'>Survived:</t><t size='1'font='Bitstream'align='right'color='#FF0000'>%7 Dayz</t>
                <t size='1.5'font='Bitstream'align='center'color='#DDDDDD'>----------------------</t><br/>
                <t size='1'font='Bitstream'align='center'color='#FF0000'>Restart in %8 minutes!</t>
                <t size='1.5'font='Bitstream'align='center'color='#DDDDDD'>----------------------</t><br/>
                <t size='0.85' font='Bitstream' align='center'>Use F5 to Toggle</t><br/>
                ",r_player_blood,round _humanity,_killsH,_killsB,_kills,_headShots,(dayz_Survived),(118-(round(serverTime/60))),_logo,_textCity
            ];
            sleep 5;
    };
};
[] spawn fnc_debug;
 
This is how mine looks,
just changed over the parts you need

Code:
/*

    /////Tweaked j0k3r5 / Original work done by Matt L / and to anyone else that is involved that Ive forgotten////
    ////www.j0k3r5.com////
    If modified and released give credits where due, thank you.
   
*/


dayz_spaceInterrupt = {
    private ["_dikCode", "_handled"];
    _dikCode = _this select 1;
    _handled = false;

    if (_dikCode == 0x44) then {
        if (j0k3r5_stats) then {
            j0k3r5_stats = false;
            hintSilent "";
        } else {[] spawn fnc_debug;};
    };
    _handled
};

fnc_debug = {
    j0k3r5_stats = true;
    while {j0k3r5_stats} do
    {
        _logo = "custom\Stats\stats_logo.paa";
        _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
       
        _nearestCity = nearestLocations [getPos player, ["NameCityCapital","NameCity","NameVillage","NameLocal"],750];
        _textCity = "Wilderness";
        if (count _nearestCity > 0) then {_textCity = text (_nearestCity select 0)};
           
        if (player == vehicle player) then
        {
            _pic = (gettext (configFile >> 'cfgWeapons' >> (currentWeapon player) >> 'picture'));   
        }
        else
        {
            _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));   
        };
       
        _timeleft=                     _combattimeout-time;
        _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";


       
        hintSilent parseText format 
            [
                "
                <img size='6' image='%10'/><br/>
                <t size='2.5'           font='Bitstream'align='center'color='#FFFF00'>%15</t><br/>               
                <br/>
                <t size='0.75'        font='Bitstream'align='left'>Location:</t><t size='0.75'                         font='Bitstream'align='right'color='#FF0000'>%11</t><br/>
                <t size='0.75'        font='Bitstream'align='left'>Blood:</t><t size='0.75'                             font='Bitstream'align='right'color='#FF0000'>%1</t><br/>
                <t size='0.75'        font='Bitstream'align='left'>Humanity:</t><t size='0.75'                        font='Bitstream'align='right'color='#FF0000'>%2</t><br/>
                <t size='0.75'        font='Bitstream'align='left'>Headshots:</t><t size='0.75'                        font='Bitstream'align='right'color='#FF0000'>%6</t><br/>
                <t size='0.75'         font='Bitstream'align='left'>Heroes Killed:</t><t size='0.75'                     font='Bitstream'align='right'color='#FF0000'>%3</t><br/>
                <t size='0.75'        font='Bitstream'align='left'>Bandits Killed:</t><t size='0.75'                    font='Bitstream'align='right'color='#FF0000'>%4</t><br/>
                <t size='0.75'        font='Bitstream'align='left'>Zombies Killed:</t><t size='0.75'                    font='Bitstream'align='right'color='#FF0000'>%5</t><br/>
                <t size='0.75'         font='Bitstream'align='left'>Zeds (alive/total): </t><t size='0.75'             font='Bitstream'align='right'color='#FF0000'>%13/%12</t><br/>
                <t size='0.75'         font='Bitstream'align='left'>FPS: </t><t size='0.75'                             font='Bitstream'align='right'color='#FF0000'>%14</t><br/>
                <t size='0.75'        font='Bitstream'align='left'>Survived:</t><t size='0.75'                        font='Bitstream'align='right'color='#FF0000'>%7 Dayz</t>
                <br/><br/>
                <t size='1'            font='Bitstream'align='center'color='#FFFF00'>Restart in %8 minutes!</t>
                <br/>
                <img size='6' image='%9'/>
                <br/>
                <t size='1'         font='Bitstream' align='center'>Use F10 to Toggle</t>
                <br/>
               
               
               
                ",
                r_player_blood,                                                //1
                round _humanity,                                            //2
                _killsH,                                                    //3
                _killsB,                                                    //4
                _kills,                                                        //5
                _headShots,                                                    //6
                (dayz_Survived),                                            //7
                (180-(round(serverTime/60))),                                //8 change the 180 to suit your server mins for restarts
                _pic,                                                        //9
                _logo,                                                        //10
                _textCity,                                                    //11
                count entities "zZombie_Base",                                //12
                {alive _x} count entities "zZombie_Base",                    //13
                diag_fps,                                                    //14
                dayz_playerName                                                //15


            ]; 
            sleep 5;
    };
};

[] spawn fnc_debug;
 
I put in a new toggle debug montior. It works like a champ, however when the custom_monitor.sqf runs I can no longer access my Gear inside the drivers seat of a vehicle!? Weird, I move to the back seat and I can access it, but from the drivers seat you can't. Here is my debug monitor code.
Code:
dayz_spaceInterrupt = {
    private ["_dikCode", "_handled"];
    _dikCode = _this select 1;
    _handled = false;
    if (_dikCode == 0xC7) 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='#D60000' size='1.15' font='Bitstream' align='left'>AINT NOBODY...</t><br/>
        <t color='#5882FA' size='1' font='Bitstream' align='left'>%1</t><br/>
        <t color='#5882FA' size='1' font='Bitstream' align='left'>Survived %13 Days</t><br/>
        <t color='#00ff00' size='0.95' font='Bitstream' align='left'>%14 Players Online</t><br/>
        <t color='#FFBF00' size='0.95' font='Bitstream' align='left'>Murders: </t><t color='#FFBF00' size='0.95' font='Bitstream' align='right'>%4</t><br/>
        <t color='#FFBF00' size='0.95' font='Bitstream' align='left'>Bandits Killed: </t><t color='#FFBF00' size='0.95' font='Bitstream' align='right'>%5</t><br/>
        <t color='#FFBF00' size='0.95' font='Bitstream' align='left'>Zombies Killed: </t><t color='#FFBF00' size='0.95' font='Bitstream' align='right'>%2</t><br/>
        <t color='#FFBF00' size='0.95' font='Bitstream' align='left'>Zombies (alive/total): </t><t color='#FFBF00' size='0.95' font='Bitstream' align='right'>%11/%10</t><br/>
        <t color='#FFBF00' size='0.95' font='Bitstream' align='left'>Humanity: </t><t color='#FFBF00' size='0.95' font='Bitstream' align='right'>%7</t><br/>
        <t color='#FFBF00' size='0.95' font='Bitstream' align='left'>Blood: </t><t color='#FFBF00' size='0.95' font='Bitstream' align='right'>%6</t><br/>
        <t color='#FFBF00' size='0.95' font='Bitstream' align='left'>FPS: </t><t color='#FFBF00' size='0.95' font='Bitstream' align='right'>%8</t><br/>
        <t color='#FFBF00' size='0.95' font='Bitstream' align='left'>GPS: </t><t color='#FFBF00' size='0.95' font='Bitstream' align='right'>[%15]</t><br/>
        <t color='#5882FA' size='1' font='Bitstream' align='left'>Server restart in </t><t color='#5882FA' size='1' font='Bitstream' align='left'>%12 minutes</t><br/>
        <t color='#F4FA58' size='0.95' font='Bitstream' align='center'>Press HOME to toggle</t><br/>
        <t color='#FFBF00' size='0.85' font='Bitstream' align='center'>%16</t>",
        (name player),                                                                                                //1
        (player getVariable['zombieKills', 0]),                                                                        //2
        (player getVariable['headShots', 0]),                                                                        //3
        (player getVariable['humanKills', 0]),                                                                        //4
        (player getVariable['banditKills', 0]),                                                                        //5
        (player getVariable['USEC_BloodQty', r_player_blood]),                                                        //6
        (player getVariable['humanity', 0]),                                                                        //7
        (round diag_fps),                                                                                            //8
        _pic,                                                                                                        //9
        (count entities "zZombie_Base"),                                                                            //10
        ({alive _x} count entities "zZombie_Base"),                                                                    //11
        (240-(round(serverTime/60))),                                                                                //12
        (dayz_Survived),                                                                                            //13
        (count playableUnits),                                                                                        //14
        (mapGridPosition getPos player),                                                                            //15
        (getPosASL player)];                                                                                        //16
        sleep 1;
    };
};
[] spawn fnc_debug;
 
Back
Top