Jump to content
  • 0

[SOLVED] Debug Monitor: How to add 'Online Players' ?


KrisiS

Question

Hi guys,

 

Can someone help me to add online players to the following debug monitor ?

 

Online Players:                   */*

 

 

Thank you in advance,

 

 

 

 

 

 

Debug Monitor:

/*

	/////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 = "";
		_pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
		
		_nearestCity = nearestLocations [getPos player, ["NameCityCapital","NameCity","NameVillage","NameLocal"],750];
		_textCity = "Wilderness";
		if (count _nearestCity > 0) then {_textCity = text (_nearestCity select 0)};
			
		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 
			[
				"
				<t size='0.90'		font='Bitstream'align='left'color='#f0f068'>Headshots:</t><t size='0.90'				font='Bitstream'align='right'color='#FFFFFF'>%6</t><br/>
				<t size='0.90' 		font='Bitstream'align='left'color='#f0f068'>Survivors Killed:</t><t size='0.90' 		        font='Bitstream'align='right'color='#FFFFFF'>%3</t><br/>
				<t size='0.90'		font='Bitstream'align='left'color='#f0f068'>Assholes Killed:</t><t size='0.90'			        font='Bitstream'align='right'color='#FFFFFF'>%4</t><br/>
				<t size='0.90'		font='Bitstream'align='left'color='#f0f068'>Zombies Killed:</t><t size='0.90'			        font='Bitstream'align='right'color='#FFFFFF'>%5</t><br/>
				<t size='0.90' 		font='Bitstream'align='left'color='#f0f068'>Zeds (alive/total): </t><t size='0.90' 		        font='Bitstream'align='right'color='#FFFFFF'>%13/%12</t><br/>
				<t size='0.90'		font='Bitstream'align='left'color='#f0f068'>Survived:</t><t size='0.90'					font='Bitstream'align='right'color='#FFFFFF'>%7 Dayz</t><br/>
				<t size='0.90'		font='Bitstream'align='left'color='#f0f068'>Humanity:</t><t size='0.90'					font='Bitstream'align='right'color='#FFFFFF'>%2</t><br/>
				<br/>
				<t size='0.90' 		font='Bitstream'align='left'color='#1ade00'>FPS: </t><t size='0.90' 					font='Bitstream'align='right'color='#1ade00'>%14</t><br/>
				<t size='0.90'		font='Bitstream'align='left'color='#ff3d3d'>BLOOD:</t><t size='0.90' 					font='Bitstream'align='right'color='#ff3d3d'>%1</t><br/>
				<br/>
				<t size='0.90'	        font='Bitstream'align='left' color='#FFFF00'>Server Restart:</t><t size='0.90'                          font='Bitstream'align='right'color='#FFFF00'>%8 minutes!</t>
				
				
				
				
				",
				r_player_blood,												//1
				round _humanity,											//2
				_killsH,													//3
				_killsB,													//4
				_kills,														//5
				_headShots,													//6
				(dayz_Survived),											//7
				(240-(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

			]; 
			sleep 5;
	};
};

[] spawn fnc_debug;
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

I believe the variable is (count playableUnits) so should look like this

fnc_debug = {
j0k3r5_stats = true;
while {j0k3r5_stats} do
    {
        _logo = "";
        _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
        
        _nearestCity = nearestLocations [getPos player, ["NameCityCapital","NameCity","NameVillage","NameLocal"],750];
        _textCity = "Wilderness";
        if (count _nearestCity > 0) then {_textCity = text (_nearestCity select 0)};
            
        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
            [
                "
                <t size='0.90'        font='Bitstream'align='left'color='#f0f068'>Headshots:</t><t size='0.90'                font='Bitstream'align='right'color='#FFFFFF'>%6</t><br/>
                <t size='0.90'         font='Bitstream'align='left'color='#f0f068'>Survivors Killed:</t><t size='0.90'          font='Bitstream'align='right'color='#FFFFFF'>%3</t><br/>
                <t size='0.90'        font='Bitstream'align='left'color='#f0f068'>Assholes Killed:</t><t size='0.90'             font='Bitstream'align='right'color='#FFFFFF'>%4</t><br/>
                <t size='0.90'        font='Bitstream'align='left'color='#f0f068'>Zombies Killed:</t><t size='0.90'             font='Bitstream'align='right'color='#FFFFFF'>%5</t><br/>
                <t size='0.90'         font='Bitstream'align='left'color='#f0f068'>Zeds (alive/total): </t><t size='0.90'          font='Bitstream'align='right'color='#FFFFFF'>%13/%12</t><br/>
                <t size='0.90'        font='Bitstream'align='left'color='#f0f068'>Survived:</t><t size='0.90'                    font='Bitstream'align='right'color='#FFFFFF'>%7 Dayz</t><br/>
                <t size='0.90'        font='Bitstream'align='left'color='#f0f068'>Humanity:</t><t size='0.90'                    font='Bitstream'align='right'color='#FFFFFF'>%2</t><br/>
                <br/>
                <t size='0.90'         font='Bitstream'align='left'color='#1ade00'>FPS: </t><t size='0.90'                     font='Bitstream'align='right'color='#1ade00'>%14</t><br/>
                <t size='0.90'        font='Bitstream'align='left'color='#ff3d3d'>BLOOD:</t><t size='0.90'                     font='Bitstream'align='right'color='#ff3d3d'>%1</t><br/>
                <br/>
                <t size='0.90'     font='Bitstream'align='left' color='#FFFF00'>Server Restart:</t><t size='0.90' font='Bitstream'align='right'color='#FFFF00'>%8 minutes!</t>
                <t size='0.90'     font='Bitstream'align='left' color='#FFFF00'>Players Online:</t><t size='0.90' font='Bitstream'align='right'color='#FFFF00'>%15</t>              
                
                ",
                r_player_blood,                                                //1
                round _humanity,                                            //2
                _killsH,                                                    //3
                _killsB,                                                    //4
                _kills,                                                        //5
                _headShots,                                                    //6
                (dayz_Survived),                                            //7
                (240-(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
                (count playableUnits)                                        //15
            ];
            sleep 5;
    };
};
[] spawn fnc_debug;
Link to comment
Share on other sites

  • 0

Thanks for the reply mate, it didn't work though.

However, I got it to work with the following edits:

/*

	/////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 = "";
		_pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
		
		_nearestCity = nearestLocations [getPos player, ["NameCityCapital","NameCity","NameVillage","NameLocal"],750];
		_textCity = "Wilderness";
		if (count _nearestCity > 0) then {_textCity = text (_nearestCity select 0)};
			
		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";
		_onlinePlayer = 	playersNumber west;

		
		hintSilent parseText format 
			[
				"
				<t size='0.90'		font='Bitstream'align='left'color='#f0f068'>Headshots:</t><t size='0.90'			font='Bitstream'align='right'color='#FFFFFF'>%6</t><br/>
				<t size='0.90' 		font='Bitstream'align='left'color='#f0f068'>Survivors Killed:</t><t size='0.90' 		font='Bitstream'align='right'color='#FFFFFF'>%3</t><br/>
				<t size='0.90'		font='Bitstream'align='left'color='#f0f068'>Assholes Killed:</t><t size='0.90'			font='Bitstream'align='right'color='#FFFFFF'>%4</t><br/>
				<t size='0.90'		font='Bitstream'align='left'color='#f0f068'>Zombies Killed:</t><t size='0.90'			font='Bitstream'align='right'color='#FFFFFF'>%5</t><br/>
				<t size='0.90' 		font='Bitstream'align='left'color='#f0f068'>Zeds (alive/total): </t><t size='0.90' 		font='Bitstream'align='right'color='#FFFFFF'>%13/%12</t><br/>
				<t size='0.90'		font='Bitstream'align='left'color='#f0f068'>Survived:</t><t size='0.90'				font='Bitstream'align='right'color='#FFFFFF'>%7 DayZ</t><br/>
				<t size='0.90'		font='Bitstream'align='left'color='#f0f068'>Humanity:</t><t size='0.90'				font='Bitstream'align='right'color='#FFFFFF'>%2</t><br/>
				<t size='0.90'     	font='Bitstream'align='left'color='#f0f068'>Players Online:</t><t size='0.90' 			font='Bitstream'align='right'color='#FFFFFF'>%15/20</t>
				<br/><br/>
				<t size='0.90' 		font='Bitstream'align='left'color='#1ade00'>FPS: </t><t size='0.90' 				font='Bitstream'align='right'color='#1ade00'>%14</t><br/>
				<t size='0.90'		font='Bitstream'align='left'color='#ff3d3d'>BLOOD:</t><t size='0.90' 				font='Bitstream'align='right'color='#ff3d3d'>%1</t><br/>
				<br/>
				<t size='0.90'	   	font='Bitstream'align='left' color='#FFFF00'>Server Restart:</t><t size='0.90'  		font='Bitstream'align='right'color='#FFFF00'>%8 Minutes</t>
				 
				
				
				
				",
				r_player_blood,													//1
				round _humanity,												//2
				_killsH,													//3
				_killsB,													//4
				_kills,														//5
				_headShots,													//6
				(dayz_Survived),												//7
				(240-(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
				_onlinePlayer													//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
  • Advertisement
  • Discord

×
×
  • Create New...