oto Kod:
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <hamsandwich>
#define DMG_BULLET (1<<1)
new const nazwa[] = "Kapitan [Premium]";
new const opis[] = "Odbija 2 pociski w rundzie";
new const bronie = (1<<CSW_AWP)|(1<<CSW_M4A1);
new const zdrowie = 30;
new const kondycja = 20;
new const inteligencja = 10;
new const wytrzymalosc = 10;
new bool:ma_klase[33];
new pozostale_strzaly[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");
RegisterHam(Ham_Spawn, "player", "Spawn", 1);
}
public cod_class_enabled(id)
{
ma_klase[id] = true;
if(!(get_user_flags(id) & (~0x0)))
{
client_print(id, print_chat, "[Kapitan [Premium]] Nie masz uprawnien, aby uzywac tej klasy.")
return COD_STOP;
}
pozostale_strzaly[id] = 2;
return COD_CONTINUE;
}
public cod_class_disabled(id)
ma_klase[id] = false;
public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(!ma_klase[this])
return HAM_IGNORED;
if(pozostale_strzaly[this] > 0 && damagebits & DMG_BULLET)
{
pozostale_strzaly[this]--;
return HAM_SUPERCEDE;
}
return HAM_IGNORED;
}
public Spawn(id)
pozostale_strzaly[id] = 2;


Dodatki SourceMod



Temat jest zamknięty


raportuj ten post, a moderator lub administrator rozpatrzy go ponownie.






