Jump to content
  • 0

Custom Debug building bug


Lukedbx

Question

So I was having problems with my server when I added a custom debug the can be toggled.

 

 

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='#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' >Players Killed:</t><t size='1'font='Bitstream'align='right' color='#EEC900' >%4</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EEC900' >Bandits Killed:</t><t size='1'font='Bitstream'align='right' color='#EEC900' >%5</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EEC900' >Zombies Killed:</t><t size='1'font='Bitstream'align='right' color='#EEC900' >%6</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EEC900' >Headshots:</t><t size='1'font='Bitstream'align='right' color='#EEC900' >%7</t><br/>
        <t size='1' font='Bitstream' align='left' color='#EEC900' >Zombies (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 Bandit Count:</t><t size='1'font='Bitstream'align='right' color='#104E8B' >%11</t><br/>
        <t size='1'font='Bitstream'align='left' color='#104E8B' >Current Hero 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' > End Days Epoch </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;

 

 

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

 

When I had this on, it made people unable to use hotkeys when placing things like walls,safes etc , so they couldn't build anything. Dunno if anyone else has had this problem, but I thought I would share.
 
 
 
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

I have same problem but i tried what torndeco tell and not work,

torndeco, please could you post the. sqf already edited?

 

quick post as ingame atm - got same problem here regarding the space key and unable to build

 

Comment out this whole section in your debug monitor sqf...

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

Your sqf should now start with...

fnc_debug = {
    debugMonitor = true;
    while {debugMonitor} do
    {

Like Tornedeco is saying, that piece of code that I told you to comment out is overriding epoch hotkeys. There is lots of epoch stuff you wont be able to do if that code is in there. Cant cancel trades, cant even build a fire.

 

If you remove the code you won't be able to toggle the debug on/off, but you will still see the debug.

Link to comment
Share on other sites

  • 0

Comment out this whole section in your debug monitor sqf...

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

Your sqf should now start with...

fnc_debug = {
    debugMonitor = true;
    while {debugMonitor} do
    {

Like Tornedeco is saying, that piece of code that I told you to comment out is overriding epoch hotkeys. There is lots of epoch stuff you wont be able to do if that code is in there. Cant cancel trades, cant even build a fire.

 

If you remove the code you won't be able to toggle the debug on/off, but you will still see the debug.

Do this above then add a self action to make it toggle able agian

Link to comment
Share on other sites

  • 0

Do this above then add a self action to make it toggle able agian

 

Im not really familiar with codes and scripting could you possibly write the self action script to make it toggleable?

 

This is the monitor im using if you could just insert it in there for me:)

 

/*
 
/////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.
 
*/
 
 
fnc_debug = {
    j0k3r5_stats = true;
    while {j0k3r5_stats} do
{
_logo = "custom\Stats\stats_logo.paa";
_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'));
};
 
_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='1.5'     font='Bitstream'align='center'color='#FFFF00'>%15</t><br/>
<t size='1.25' font='Bitstream'align='center'>Turtle's on Turtle's</t><br/> 
<br/>
<t size='1' font='Bitstream'align='center'>Stay Alive Little One.. Frankie's Comming</t><br/>
<br/>
<t size='0.95' font='Bitstream'align='left'>Blood:</t><t size='0.95' font='Bitstream'align='right'color='#FF0000'>%1</t><br/>
<t size='0.95' font='Bitstream'align='left'>Humanity:</t><t size='0.95' font='Bitstream'align='right'color='#FF0000'>%2</t><br/>
<t size='0.95' font='Bitstream'align='left'>Headshots:</t><t size='0.95' font='Bitstream'align='right'color='#FF0000'>%6</t><br/>
<t size='0.95' font='Bitstream'align='left'>Heroes Killed:</t><t size='0.95' font='Bitstream'align='right'color='#FF0000'>%3</t><br/>
<t size='0.95' font='Bitstream'align='left'>Bandits Killed:</t><t size='0.95' font='Bitstream'align='right'color='#FF0000'>%4</t><br/>
<t size='0.95' font='Bitstream'align='left'>Zombies Killed:</t><t size='0.95' font='Bitstream'align='right'color='#FF0000'>%5</t><br/>
<t size='0.95' font='Bitstream'align='left'>Zeds (alive/total): </t><t size='0.95' font='Bitstream'align='right'color='#FF0000'>%13/%12</t><br/>
<t size='0.95' font='Bitstream'align='left'>FPS: </t><t size='0.95' font='Bitstream'align='right'color='#FF0000'>%14</t><br/>
<t size='0.95' font='Bitstream'align='left'>Survived:</t><t size='0.95' 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/>
<t size='1' font='Bitstream' align='center'>F10 to Toggle</t>
<br/>
 
 
 
",
r_player_blood, //1
round _humanity, //2
_killsH, //3
_killsB, //4
_kills, //5
_headShots, //6
(dayz_Survived), //7
(300-(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;
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...