Wiem, zdałem sobie z tego sprawe po 5 min od wysłania posta:
Ogarnij to:
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <fun>
#include <hamsandwich>
#include <cstrike>
new bool:ma_klase[33];
new const nazwa[] = "Jakas tam klasa";
new const opis[] = "1/8 na unikniecie obrazen z M3";
new const bronie = (1<<CSW_FIVESEVEN)|(1<<CSW_MP5NAVY)|(1<<CSW_FLASHBANG);
new const zdrowie = 0;
new const kondycja = 0;
new const inteligencja = 0;
new const wytrzymalosc = 0;
public plugin_init()
{
register_plugin(nazwa, "1.0", "Sqwareck");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
RegisterHam(Ham_TakeDamage, "player", "Fw_HamPlayerTakeDamage", 0)
}
public cod_class_enabled(id)
{
give_item(id, "weapon_flashbang");
ma_klase[id] = true;
}
public cod_class_disabled(id)
{
ma_klase[id] = false
}
public Fw_HamPlayerTakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(is_user_alive(this))
return;
if(ma_klase[this])
return;
if(random_num(1,8) == 1)
return;
if(get_user_weapon(idattacker) == CSW_M3)
{
SetHamParamFloat(4, 0.0)
}
}
Użytkownik Sqwareck edytował ten post 15.12.2013 20:41