View Single Post
Backstabnoob
Veteran Member
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-11-2014 , 11:56   Re: Bomb Status
Reply With Quote #24

I tested 1.1, in fact I'm using it right now on my test server and it works without any issues. Like I said, dhud doesn't remove the message if you reshow it, because it doesn't use channels. The messages will be stuck one on another. This doesn't cause issues if the text doesn't change, but if it does it looks stupid, try it out. If 1.1 has issues, you can try 1.2, etc. 3.1 is still too high for no reason.

PHP Code:
switch ( get_pcvar_num g_iTeam ) ) { 
get_players has support for getting the list of players based on a team. You should check the value of the cvar before the for( ) loop and based on it call get_players with different arguments. You can simply use something like this:

PHP Code:
switch( get_pcvar_numg_iTeam )
{
   case 
1get_playersiPlayersiPlayersNum"ce""TERRORIST" )
   case 
2get_playersiPlayersiPlayersNum"ce""CT" )
   default: 
get_playersiPlayersiPlayersNum"c" )

Also cache this value before the loop:
PHP Code:
get_pcvar_num g_iHud_type 
Other than that your code seems fine now, moving back to New Plugin Submissions.
__________________
Currently busy working on a very large scale anime database project.
Backstabnoob is offline