#include <amxmodx>
#include <codmod>
#include <hamsandwich>
#include <fakemeta>
 
#define DMG_BULLET (1<<1)



new const nazwa[] = "Grzmot";
new const opis[] = "Ma Deagla i +30dmg do tego 200hp na start";
new const bronie = 1<<CSW_DEAGLE;
new const zdrowie = 0;
new const kondycja = 100;
new const inteligencja = 0;
new const wytrzymalosc = 0;

new bool: ma_klase[33];

public plugin_init() {
	
	register_plugin(nazwa, "1.0", "Play");
	
	cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
	RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
}
public cod_class_enabled(id)
	ma_klase[id] = true;
	
public cod_class_disabled(id)
	ma_klase[id] = false;
	
public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
	if(!is_user_connected(idattacker))
		return HAM_IGNORED;
	
	if(!ma_klase[idattacker])
		return HAM_IGNORED;
	
	if(damagebits & DMG_BULLET)
	{
		new weapon = get_user_weapon(idattacker);
			
		if(weapon == CSW_DEAGLE)
			cod_inflict_damage(idattacker, this, 30.0, 0.0, idinflictor, damagebits);
	}
	
	return HAM_IGNORED;
}