#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <fun>
#include <hamsandwich>
#define DMG_BULLET (1<<1)
new const nazwa[] = "Oficer";
new const opis[] = "Dostaje TMP i UZI + 15 DMG do nich";
new const bronie = (1<<CSW_MAC10)|(1<<CSW_USP)|(1<<CSW_TMP)|(1<<CSW_FLASHBANG);
new const zdrowie = 10;
new const kondycja = 15;
new const inteligencja = -10;
new const wytrzymalosc = 5;
new bool:ma_klase[33];
public plugin_init()
{
register_plugin(nazwa, "1.0", "amxx.pl");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
}
public cod_class_enabled(id)
{
give_item(id, "weapon_flashbang");
give_item(id, "weapon_flashbang");
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_perk[idattacker])
return HAM_IGNORED;
if(get_user_team(this) != get_user_team(idattacker) && get_user_weapon(idattacker) == CSW_MAC10 && damagebits & DMG_BULLET)
cod_inflict_damage(idattacker, this, 15.0, 0.0, idinflictor, damagebits);
if(get_user_team(this) != get_user_team(idattacker) && get_user_weapon(idattacker) == CSW_TMP && damagebits & DMG_BULLET)
cod_inflict_damage(idattacker, this, 15.0, 0.0, idinflictor, damagebits);
return HAM_IGNORED;
}