#include <amxmodx>
#include <zombieplaguenew1.3>

new iconstatus

public plugin_init()
{
	register_plugin( "[ZP] Biohazard Icon for New Modes", "1.0" , "Zombie Lurker + @bdul! + fiendshard" )
	register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
	
	iconstatus = get_user_msgid("StatusIcon")
}

public event_round_start()
{
	static id
	for (id = 1; id <= get_maxplayers(); id++)
	{
		set_task(0.1, "display_the_icon", id, _, _, "b")
	}
}
public display_the_icon(id)
{
	if (is_user_connected(id))
	{
		if (zp_is_nemesis_round())
			set_user_icon(id , 1 , 255 , 0 , 0)
		else if (zp_is_survivor_round())
			set_user_icon(id , 1 , 0 , 0 , 255)
		else if (zp_is_swarm_round())
			set_user_icon(id , 1 , 255 , 255 , 0)
		else if (zp_is_plague_round()) 
			set_user_icon(id , 1 , 255 , 0 , 0)
		else if (zp_is_assassin_round()) 
			set_user_icon(id , 1 , 225 , 5 , 225)
		else if (zp_is_sniper_round()) 
			set_user_icon(id , 1 , 255 , 127 , 0)
		else if (zp_is_lnj_round()) 
			set_user_icon(id , 1 , 30 , 230 , 230)
		else if (zp_has_round_started()) 
			set_user_icon(id , 1 , 0 , 255 , 0)
		
	}
}
stock set_user_icon(id , mode , red , green , blue)
{
	message_begin(MSG_ONE,iconstatus,{0,0,0},id);
	write_byte(mode);
	write_string("dmg_bio");
	write_byte(red);
	write_byte(green);
	write_byte(blue);
	message_end();
}