/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <hamsandwich>
#define PLUGIN "Rebeliant"
#define VERSION "1.0"
#define AUTHOR "Nick"
#define DMG_BULLET (1<<1)
new const nazwa[] = "Rebeliant";
new const opis[] = "Posiada XM1014 oraz usp/glock (1/12 z nich)";
new const bronie = (1<<CSW_XM1014)|(1<<CSW_USP)|(1<<CSW_GLOCK18);
new const zdrowie = 20;
new const kondycja = 15;
new const inteligencja = 0;
new const wytrzymalosc = 0;
new ma_klase[33];
public plugin_init()
{
register_plugin(nazwa, "1.0", "amxx.pl");
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
}
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(get_user_team(this) != get_user_team(idattacker) && get_user_weapon(idattacker) == CSW_USP && damagebits & DMG_BULLET && random_num(1, 12) == 1)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
if(get_user_team(this) != get_user_team(idattacker) && get_user_weapon(idattacker) == CSW_GLOCK18 && damagebits & DMG_BULLET && random_num(1, 12) == 1)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
return HAM_IGNORED;
}
Czy wszystko jest okej? Niby kompiluje się bez problemów, ale nie jestem pewien czy przy dodawaniu instakilla nie pomyliłem się gdzieś.
Z góry dziękuje za pomoc.


Dodatki SourceMod












