#include <amxmodx>
#include <amxmisc>
#include <cstrike>

public plugin_init()
{
	 register_plugin("Bullet Damage", "1.2", "f117bomb|Er0p4uk|STR@TEG")
	 register_event("Damage", "damage_msg", "b", "2!0", "3=0", "4!0")
	 register_cvar("bullet_damage", "2")
}

public damage_msg(vIndex)
{
	if (get_cvar_float("bullet_damage"))
	{
		new aIndex = get_user_attacker(vIndex)
		new damage = read_data(2)
		new r,g,b

		if (get_cvar_num("bullet_damage")==1)set_hudmessage(200, 200, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, 7)
		if (get_cvar_num("bullet_damage")>1)
		{
			if(cs_get_user_team(vIndex)==CS_TEAM_CT)b=255
			if(cs_get_user_team(vIndex)==CS_TEAM_T)r=255
			if(is_user_admin(vIndex))
			{
				r=0
				g=255
				b=0
			}
			set_hudmessage(r, g, b, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, 7)
			r=g=b=0
		}
		show_hudmessage(aIndex, "%i", damage)	
	}
	return PLUGIN_CONTINUE
}
