Jump to content
  • 0

I need a custom debug monitor with toggle on/off function please


mgm

Question

Hey Guys,

 

I cannot fix with my custom debug monitor and seems like no help is coming to fix that one...

So can someone please post a tested & working custom debug monitor for Epoch 1.0.5.1?

 

Thanks

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

infiSTAR comes with a good one that is toggleable and different for players and admins....do you use infiSTAR?

Nope - just looking for a free code. I have some from this one and other forums but none.

 

I have managed to resolve the issue with mine. well.. actually my code was faulty, I learned how to do it properly. If anyone else comes across this via search, is the solution.

Link to comment
Share on other sites

  • 0

Put these two files in your mission root:

 

custom_monitor.sqf (code below)

if (isNil "debugMonitor") then { debugMonitor = false; };
        if (debugMonitor) then {
            debugMonitor = false;
            hintSilent "";
        } else {
    debugMonitor = true;
    while {debugMonitor} do
    {
	
	 hintSilent parseText format ["
	<t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Players: </t><t size='0.95' font='Bitstream' align='left'>%7</t>
	<t size='0.95' font='Bitstream' align='right' color='#FFBF00'>Restart: </t><t size='0.95' font='Bitstream' align='right'>%9 mins.</t><br/>
	
	<t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Zombie Kills: </t><t size='0.95' font='Bitstream' align='right'>%2</t><br/>
	<t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Survivor Kills: </t><t size='0.95' font='Bitstream' align='right'>%4</t><br/>
	<t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Bandit Kills: </t><t size='0.95' font='Bitstream' align='right'>%5</t><br/>
	<t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Headshots: </t><t size='0.95' font='Bitstream' align='right'>%3</t><br/>
	<t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Humanity: </t><t size='0.95' font='Bitstream' align='right'>%6</t><br/>
	<t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Blood: </t><t size='0.95' font='Bitstream' align='right'>%8</t><br/>
	<t size='0.95' font='Bitstream' align='center'>nomad.gamingdeluxe.net</t><br/>
	<t size='0.95' font='Bitstream' align='center'>dayzepoch.com/wiki</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['humanity', 0]), //6
	(playersNumber west), //(count playableUnits), //7
	r_player_blood, //8
	(360-(round(serverTime/60))) //9
	

];
sleep 2;
};
};

debug_init.sqf (code below)

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=""#08088A"">" + ("Debug Toggle") +"</t>"),"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;

Then in your init.sqf add these two lines:

 

[] execVM "debug_init.sqf";
[] execVM "custom_monitor.sqf";

 

inside any if(!isServer) block like this:

if(!isServer) then {
[] execVM "debug_init.sqf";
[] execVM "custom_monitor.sqf";
};

Change things around to suit your needs... This works on my server with no issues! 

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...