#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <fakemeta>
#include <hamsandwich>
 
#define DMG_BULLET (1<<1)
        
new const nazwa[]   = "Hardcor";
new const opis[]    = "10% dodatkowych obrazen z AK47";
new const bronie    = 1<<CSW_AK47 | 1<<CSW_GLOCK18;
new const zdrowie   = 15;
new const kondycja  = 0;
new const inteligencja = 5;
new const wytrzymalosc = 5;
    
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_AK47)
			cod_inflict_damage(idattacker, this, 10.0, 0.0, idinflictor, damagebits);
	}
	return HAM_IGNORED;
}