Debug Monitor Hiding But Not Calling Back

Triage

New Member
Here is my Debug Monitor that I'm making.

Code:
if (isNil "custom_monitor") then {custom_monitor = true;} else {custom_monitor = !custom_monitor;};

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 custom_monitor;};
    };
    _handled
};

while {custom_monitor} 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;
    hintSilent parseText format ["
    <t size='1.2'font='Bitstream'align='center' color='#FF9900' >Mohawk Interactive </t><br/>
    <t size='1'font='Bitstream'align='center' color='#FFD700' >%1</t><br/>
    <t size='1'font='Bitstream'align='left' color='#D00000' >Blood Remaning:</t><t size='1' font='Bitstream'align='right' color='#D00000' >%2</t><br/>
    <t size='1'font='Bitstream'align='left' color='#D00000' >Humanity:</t><t size='1'font='Bitstream'align='right' color='#D00000' >%3</t><br/>
    <t size='1'font='Bitstream'align='left' color='#FFFFCC' >Survivors Killed:</t><t size='1'font='Bitstream'align='right' color='#FFFFCC' >%4</t><br/>
    <t size='1'font='Bitstream'align='left' color='#FFFFCC' >Bandits Killed:</t><t size='1'font='Bitstream'align='right' color='#FFFFCC' >%5</t><br/>
    <t size='1'font='Bitstream'align='left' color='#FFFFCC' >Zombies Killed:</t><t size='1'font='Bitstream'align='right' color='#FFFFCC' >%6</t><br/>
    <t size='1'font='Bitstream'align='left' color='#FFFFCC' >Headshots:</t><t size='1'font='Bitstream'align='right' color='#FFFFCC' >%7</t><br/>
    <t size='1'font='Bitstream'align='left' color='#FFFF00' >Current Bandit Count:</t><t size='1'font='Bitstream'align='right' color='#FFFF00' >%11</t><br/>
    <t size='1'font='Bitstream'align='left' color='#FFFF00' >Current Hero Count:</t><t size='1'font='Bitstream'align='right' color='#FFFF00' >%12</t><br/>
    <t size='1'font='Bitstream'align='left' color='#FFFF00' >Dayz Survived:</t><t size='1'font='Bitstream'align='right' color='#FFFF00' >%14</t><br/>
    <t size='1' font='Bitstream' align='left' color='#D00000' >FPS: </t><t size='1' font='Bitstream' align='right' color='#D00000' >%10</t><br/>
    <t size='1' font='Bitstream' align='left' color='#D00000' >Server Restart In: </t><t size='1' font='Bitstream' align='right' color='#D00000' >%13</t><br/>
    <t size='1'font='Bitstream'align='center' color='#FF9900' >F10 To Toggle </t><br/>
    <t size='1'font='Bitstream'align='center' color='#FF9900' >mohawkinteractive.net </t><br/>
    <t size='0.9'font='Bitstream'align='center' color='#FF9900' >ts3.mohawkinteractive.net:10013 </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,(120-(round(serverTime/60))),(dayz_Survived)];
sleep 1;
};

When you first spawn in it's on the screen which I want. When I hit F10 it disappears which I want., but when I hit F10 again it doesn't pop back up.

Does anyone know why it wouldn't. For the life of me I can understand why.
 
You dont set custom monitor to true anywhere.
Your f10 key spawns custom monitor function but your script has in line code istead.
Put all your monitor code into
fnc_monitor = {

Code

};
 
Back
Top