Simple(ish) Debug Monitor w/ toggling function and animation

Matt L

OpenDayZ Rockstar!
Someone suggested this earlier today and then I instantly got to work on it. Credits must be given to three people who provided their knowledge to help me get this to work. First to Krixes, he helped me finalize it and this whole thing is based on some of his code. Second, to AVendettaForYou for helping me work through some early issues. Third to nullpo who wrote the original code for the debug monitor.

First: create a custom_monitor.sqf with this code in it:

Updated w/ zombies alive/total, fps, and a live bandit/hero count(Thanks to ButtFace for providing a proper variable!):
Has animation and all variables: OR for a version WITHOUT the animation and some variables..
Second: You will need an overwritten fn_selfActions.sqf (if you are using Krixes self blood bag script, you already have it) it can be found in the dayz_code.pbo. Place that in a folder (in your mission.pbo) called Fixes. Open it up and find
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
and place
if((speed player <= 1) && _canDo) then {
        if (s_player_toggle < 0) then {
              s_player_toggle = player addaction[("<t color=""#c70000"">" + ("Toggle Debug") +"</t>"),"custom_monitor.sqf","",5,false,true,"",""];
} else {
                player removeAction s_player_toggle;
                s_player_toggle = -1;
right after it.

NOTE: if you have Krixes self blood bagging it will look like this :

Third: You must create a compiles.sqf inside the Fixes folder. It should have ONLY this line of code in it :
fnc_usec_selfActions = compile preprocessFileLineNumbers "Fixes\fn_selfActions.sqf"; // fnc_usec_selfActions - adds custom actions to dayz code

Fourth: Now to visit your init.sqf. Find thecall compile preprocess line that says something with a compile.sqf. Underneath that (but above the progressloadingscreen line) paste this code
call compile preprocessFileLineNumbers "Fixes\compiles.sqf"; //Compile custom compiles

Fifth: Repack your .pbo and upload! Oh and one more thing, if you have an antihack (such as Hangenders or Blur Gaming's) You will need to whitelist s_player_toggle in the dayz actions section and find a section of the code labeled _retArr and delete 'entities' and 'playableUnits' otherwise the debug will not function.

You should now recieve a red scroll option that says Toggle Debug, after performing a short animation your debug monitor will dissapear. If you click Toggle Debug again, it will reappear

Edit: Forgot to include that the scroll option takes a few seconds to appear at first. You have to run around a bit.

Matt L

OpenDayZ Rockstar!
New Version (does not require fn_selfActions):
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;};
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'));
                _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
        hintSilent parseText format ["
        <t size='1'font='Bitstream'align='center' color='#EE0000' >%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='#104E8B' >Humanity:</t><t size='1'font='Bitstream'align='right' color='#104E8B' >%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='#104E8B' >%11</t><br/>
        <t size='1'font='Bitstream'align='left' color='#104E8B' >Current NiceGuy Count:</t><t size='1'font='Bitstream'align='right' color='#104E8B' >%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='center' color='#104E8B' >Press F10 to toggle! </t><br/>
        <t size='1'font='Bitstream'align='center' color='#104E8B' >Welcome to Pax Extreme DayZ </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;

To use this version make a new .sqf named custom_monitor paste this code into it and execute it from the init.sqf ( inside the if (!isDedicated) then { )
[] ExecVM "custom_monitor.sqf";