Jump to content

Custom Debug Monitor


DAKA

Recommended Posts

@DAKA

another similiar for 1.6:

https://postimg.org/image/tgok8tenn/

custom_monitor.sqf  (place into mpmissions\yourinstance\custom\

Spoiler

 if (isNil "debugMonitor") then { debugMonitor = false; };
        if (debugMonitor) then {
            debugMonitor = false;
            hintSilent "";
        } else {
    debugMonitor = true;
private["_time","_hours","_minutes","_restartTime"];

/************************* CONFIG *************************/
    _restartTime = 180; //total time before server restart (3hrs = 180 minutes)    
/************************* CONFIG *************************/

while {debugMonitor} do {

_time = (round(_restartTime-(serverTime)/60));     //Want it to count up instead of down? use _time = (round serverTime)/60;
    _hours = (floor(_time/60));
    _minutes = (_time - (_hours * 60));
    
    switch(_minutes) do
    {
        case 9: {_minutes = "09"};
        case 8: {_minutes = "08"};
        case 7: {_minutes = "07"};
        case 6: {_minutes = "06"};
        case 5: {_minutes = "05"};
        case 4: {_minutes = "04"};
        case 3: {_minutes = "03"};
        case 2: {_minutes = "02"};
        case 1: {_minutes = "01"};
        case 0: {_minutes = "00"};
    };
_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='left' color='#FFCC00'>SERVER NAME</t>
    <br/>
    <t size='1' font='Bitstream' align='left' color='#FFCC00'>TS:</t>
    <br/>
    <t size='1' font='Bitstream' align='center' color='#ff5200'>%1</t><br/>
    <t color='#009FCF' size='1' font='Bitstream' align='left'>Players Online: </t><t color='#ff5200' size='1' font='Bitstream' align='right'>%2</t><br/>
    <t color='#009FCF' size='1' font='Bitstream' align='left'>FPS: </t><t color='#ff5200' size='1' font='Bitstream' align='right'>%3</t><br/>
    <t color='#009FCF' size='1' font='Bitstream' align='left'>Blood: </t><t color='#ff5200' size='1' font='Bitstream' align='right'>%4</t><br/>
    <t color='#FFCC00' size='1' font='Bitstream' align='left'>BloodType:</t><t color='#FFCC00' size='1' font='Bitstream' align='right'>%12</t><br/>
    <t color='#009FCF' size='1' font='Bitstream' align='left'>Humanity: </t><t color='#ff5200' size='1' font='Bitstream' align='right'>%5</t><br/>
    
    <br/>
    
    <t color='#009FCF' size='1' font='Bitstream' align='left'>Murders: </t><t color='#ff5200' size='1' font='Bitstream' align='right'>%6</t><br/>
    <t color='#009FCF' size='1' font='Bitstream' align='left'>Bandit Kills:  </t><t color='#ff5200' size='1' font='Bitstream' align='right'>%7</t><br/>
    <t color='#009FCF' size='1' font='Bitstream' align='left'>Zombie Kills: </t><t color='#ff5200' size='1' font='Bitstream' align='right'>%8</t><br/>
    <t color='#FFCC00' size='1' font='Bitstream' align='left'>Restart In: </t><t color='#FFCC00' size='1' font='Bitstream' align='right'>%9Hr(s) %10Min(s)</t><br/>
    <img size='3' image='%11'/><br/>  
    <t color='#FFCC00' size='1' font='Bitstream' align='left'>Food:</t><t color='#FFCC00' size='1' font='Bitstream' align='right'>%13</t><br/>
    <t color='#FFCC00' size='1' font='Bitstream' align='left'>Drink:</t><t color='#FFCC00' size='1' font='Bitstream' align='right'>%14</t><br/>
    ",

(name player),//1
(count playableUnits),//2
(round diag_fps),//3
(player getVariable['USEC_BloodQty', r_player_blood]),//4
(player getVariable['humanity', 0]),//5
(player getVariable['humanKills', 0]),//6
(player getVariable['banditKills', 0]),//7
(player getVariable['zombieKills', 0]),//8
_hours, // Used on line 52 to display hours //9
_minutes, // Used on line 52 to display minutes //10
_pic,//11
(player getVariable['blood_type', 0]),//12

(round(dayz_hunger)),//13
(round(dayz_thirst))//14

];
sleep 2;
};
};

 

debug_init.sqf (place into mpmissions\yourinstance\custom\

Spoiler


if (isnil "debuginit") then {debuginit = true;};

    if (debuginit) then
    {
        []spawn
        {
            private["_veh", "_idb", "_idb2"];
            _idb = -1;
            while {alive player} do
            {
                if (_idb == -1) then
                {
                    _idb = (vehicle player) addaction [("<t color=""#ff0000"">" + ("Toggle debug") +"</t>"),"custom\custom_monitor.sqf","",0,false,true,"",""];
                    _veh = vehicle player;
                };
                if (_veh != vehicle player) then
                {
                    _veh removeAction _idb;
                    _idb = -1;      
                };
                Sleep 2;
            };
        };
        debuginit = false;
    };
    waituntil {!alive player ; sleep 2;};
    debuginit = true;

 

init.sqf

Spoiler

find:

execFSM "\z\addons\dayz_code\system\player_monitor.fsm";

below paste:

    // Debug Monitor
[] execVM "custom\debug_init.sqf";
[] execVM "custom\custom_monitor.sqf";

 

 

Link to comment
Share on other sites

  • 2 months later...
On 12/16/2016 at 6:59 AM, juandayz said:

@DAKA

another similiar for 1.6:

https://postimg.org/image/tgok8tenn/

custom_monitor.sqf  (place into mpmissions\yourinstance\custom\

  Hide contents

 if (isNil "debugMonitor") then { debugMonitor = false; };
        if (debugMonitor) then {
            debugMonitor = false;
            hintSilent "";
        } else {
    debugMonitor = true;
private["_time","_hours","_minutes","_restartTime"];

/************************* CONFIG *************************/
    _restartTime = 180; //total time before server restart (3hrs = 180 minutes)    
/************************* CONFIG *************************/

while {debugMonitor} do {

_time = (round(_restartTime-(serverTime)/60));     //Want it to count up instead of down? use _time = (round serverTime)/60;
    _hours = (floor(_time/60));
    _minutes = (_time - (_hours * 60));
    
    switch(_minutes) do
    {
        case 9: {_minutes = "09"};
        case 8: {_minutes = "08"};
        case 7: {_minutes = "07"};
        case 6: {_minutes = "06"};
        case 5: {_minutes = "05"};
        case 4: {_minutes = "04"};
        case 3: {_minutes = "03"};
        case 2: {_minutes = "02"};
        case 1: {_minutes = "01"};
        case 0: {_minutes = "00"};
    };
_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='left' color='#FFCC00'>SERVER NAME</t>
    <br/>
    <t size='1' font='Bitstream' align='left' color='#FFCC00'>TS:</t>
    <br/>
    <t size='1' font='Bitstream' align='center' color='#ff5200'>%1</t><br/>
    <t color='#009FCF' size='1' font='Bitstream' align='left'>Players Online: </t><t color='#ff5200' size='1' font='Bitstream' align='right'>%2</t><br/>
    <t color='#009FCF' size='1' font='Bitstream' align='left'>FPS: </t><t color='#ff5200' size='1' font='Bitstream' align='right'>%3</t><br/>
    <t color='#009FCF' size='1' font='Bitstream' align='left'>Blood: </t><t color='#ff5200' size='1' font='Bitstream' align='right'>%4</t><br/>
    <t color='#FFCC00' size='1' font='Bitstream' align='left'>BloodType:</t><t color='#FFCC00' size='1' font='Bitstream' align='right'>%12</t><br/>
    <t color='#009FCF' size='1' font='Bitstream' align='left'>Humanity: </t><t color='#ff5200' size='1' font='Bitstream' align='right'>%5</t><br/>
    
    <br/>
    
    <t color='#009FCF' size='1' font='Bitstream' align='left'>Murders: </t><t color='#ff5200' size='1' font='Bitstream' align='right'>%6</t><br/>
    <t color='#009FCF' size='1' font='Bitstream' align='left'>Bandit Kills:  </t><t color='#ff5200' size='1' font='Bitstream' align='right'>%7</t><br/>
    <t color='#009FCF' size='1' font='Bitstream' align='left'>Zombie Kills: </t><t color='#ff5200' size='1' font='Bitstream' align='right'>%8</t><br/>
    <t color='#FFCC00' size='1' font='Bitstream' align='left'>Restart In: </t><t color='#FFCC00' size='1' font='Bitstream' align='right'>%9Hr(s) %10Min(s)</t><br/>
    <img size='3' image='%11'/><br/>  
    <t color='#FFCC00' size='1' font='Bitstream' align='left'>Food:</t><t color='#FFCC00' size='1' font='Bitstream' align='right'>%13</t><br/>
    <t color='#FFCC00' size='1' font='Bitstream' align='left'>Drink:</t><t color='#FFCC00' size='1' font='Bitstream' align='right'>%14</t><br/>
    ",

(name player),//1
(count playableUnits),//2
(round diag_fps),//3
(player getVariable['USEC_BloodQty', r_player_blood]),//4
(player getVariable['humanity', 0]),//5
(player getVariable['humanKills', 0]),//6
(player getVariable['banditKills', 0]),//7
(player getVariable['zombieKills', 0]),//8
_hours, // Used on line 52 to display hours //9
_minutes, // Used on line 52 to display minutes //10
_pic,//11
(player getVariable['blood_type', 0]),//12

(round(dayz_hunger)),//13
(round(dayz_thirst))//14

];
sleep 2;
};
};

 

debug_init.sqf (place into mpmissions\yourinstance\custom\

  Hide contents


if (isnil "debuginit") then {debuginit = true;};

    if (debuginit) then
    {
        []spawn
        {
            private["_veh", "_idb", "_idb2"];
            _idb = -1;
            while {alive player} do
            {
                if (_idb == -1) then
                {
                    _idb = (vehicle player) addaction [("<t color=""#ff0000"">" + ("Toggle debug") +"</t>"),"custom\debug\custom_monitor.sqf","",0,false,true,"",""];
                    _veh = vehicle player;
                };
                if (_veh != vehicle player) then
                {
                    _veh removeAction _idb;
                    _idb = -1;      
                };
                Sleep 2;
            };
        };
        debuginit = false;
    };
    waituntil {!alive player ; sleep 2;};
    debuginit = true;

 

init.sqf

  Hide contents

find:

execFSM "\z\addons\dayz_code\system\player_monitor.fsm";

below paste:

    // Debug Monitor
[] execVM "custom\style\debug\debug_init.sqf";
[] execVM "custom\style\debug\custom_monitor.sqf";

 

 

It doesn't seem like your execVM commands are pointing to the right place if i place the other two files where you say to. Am i crazy?

 

Link to comment
Share on other sites

@Birgitte yup sory my bad

in init.sqf

Spoiler

find:

execFSM "\z\addons\dayz_code\system\player_monitor.fsm";

below paste:

    // Debug Monitor
[] execVM "custom\debug_init.sqf";
[] execVM "custom\custom_monitor.sqf";

debug_init.sqf (mpmissions\your instance\custom\ )

Spoiler

if (isnil "debuginit") then {debuginit = true;};

    if (debuginit) then
    {
        []spawn
        {
            private["_veh", "_idb", "_idb2"];
            _idb = -1;
            while {alive player} do
            {
                if (_idb == -1) then
                {
                    _idb = (vehicle player) addaction [("<t color=""#ff0000"">" + ("Toggle debug") +"</t>"),"custom\custom_monitor.sqf","",0,false,true,"",""];
                    _veh = vehicle player;
                };
                if (_veh != vehicle player) then
                {
                    _veh removeAction _idb;
                    _idb = -1;      
                };
                Sleep 2;
            };
        };
        debuginit = false;
    };
    waituntil {!alive player ; sleep 2;};
    debuginit = true;

custom_monitor.sqf (mpmissions\your instance\custom\ )

Spoiler

 if (isNil "debugMonitor") then { debugMonitor = false; };
        if (debugMonitor) then {
            debugMonitor = false;
            hintSilent "";
        } else {
    debugMonitor = true;
private["_time","_hours","_minutes","_restartTime"];

/************************* CONFIG *************************/
    _restartTime = 180; //total time before server restart (3hrs = 180 minutes)    
/************************* CONFIG *************************/

while {debugMonitor} do {

_time = (round(_restartTime-(serverTime)/60));     //Want it to count up instead of down? use _time = (round serverTime)/60;
    _hours = (floor(_time/60));
    _minutes = (_time - (_hours * 60));
    
    switch(_minutes) do
    {
        case 9: {_minutes = "09"};
        case 8: {_minutes = "08"};
        case 7: {_minutes = "07"};
        case 6: {_minutes = "06"};
        case 5: {_minutes = "05"};
        case 4: {_minutes = "04"};
        case 3: {_minutes = "03"};
        case 2: {_minutes = "02"};
        case 1: {_minutes = "01"};
        case 0: {_minutes = "00"};
    };
_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='left' color='#FFCC00'>SERVER NAME</t>
    <br/>
    <t size='1' font='Bitstream' align='left' color='#FFCC00'>TS:</t>
    <br/>
    <t size='1' font='Bitstream' align='center' color='#ff5200'>%1</t><br/>
    <t color='#009FCF' size='1' font='Bitstream' align='left'>Players Online: </t><t color='#ff5200' size='1' font='Bitstream' align='right'>%2</t><br/>
    <t color='#009FCF' size='1' font='Bitstream' align='left'>FPS: </t><t color='#ff5200' size='1' font='Bitstream' align='right'>%3</t><br/>
    <t color='#009FCF' size='1' font='Bitstream' align='left'>Blood: </t><t color='#ff5200' size='1' font='Bitstream' align='right'>%4</t><br/>
    <t color='#FFCC00' size='1' font='Bitstream' align='left'>BloodType:</t><t color='#FFCC00' size='1' font='Bitstream' align='right'>%12</t><br/>
    <t color='#009FCF' size='1' font='Bitstream' align='left'>Humanity: </t><t color='#ff5200' size='1' font='Bitstream' align='right'>%5</t><br/>
    
    <br/>
    
    <t color='#009FCF' size='1' font='Bitstream' align='left'>Murders: </t><t color='#ff5200' size='1' font='Bitstream' align='right'>%6</t><br/>
    <t color='#009FCF' size='1' font='Bitstream' align='left'>Bandit Kills:  </t><t color='#ff5200' size='1' font='Bitstream' align='right'>%7</t><br/>
    <t color='#009FCF' size='1' font='Bitstream' align='left'>Zombie Kills: </t><t color='#ff5200' size='1' font='Bitstream' align='right'>%8</t><br/>
    <t color='#FFCC00' size='1' font='Bitstream' align='left'>Restart In: </t><t color='#FFCC00' size='1' font='Bitstream' align='right'>%9Hr(s) %10Min(s)</t><br/>
    <img size='3' image='%11'/><br/>  
    <t color='#FFCC00' size='1' font='Bitstream' align='left'>Food:</t><t color='#FFCC00' size='1' font='Bitstream' align='right'>%13</t><br/>
    <t color='#FFCC00' size='1' font='Bitstream' align='left'>Drink:</t><t color='#FFCC00' size='1' font='Bitstream' align='right'>%14</t><br/>
    ",

(name player),//1
(count playableUnits),//2
(round diag_fps),//3
(player getVariable['USEC_BloodQty', r_player_blood]),//4
(player getVariable['humanity', 0]),//5
(player getVariable['humanKills', 0]),//6
(player getVariable['banditKills', 0]),//7
(player getVariable['zombieKills', 0]),//8
_hours, // Used on line 52 to display hours //9
_minutes, // Used on line 52 to display minutes //10
_pic,//11
(player getVariable['blood_type', 0]),//12

(round(dayz_hunger)),//13
(round(dayz_thirst))//14

];
sleep 2;
};
};

 

Link to comment
Share on other sites

  • 5 years later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...