Oto codclass_Alcatraz.sma
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <codmod>
#include <engine>
#include <hamsandwich>
#include <fakemeta>
#define DMG_BULLET (1<<1)
#define DMG_HE (1<<24)
new bool:ma_klase[33];
new const nazwa[] = "Alcatraz . ;*";
new const opis[] = "Natychmiastowe zabicie z noza,SCOUT 1/1 , HE (zwykly)";
new const bronie = 1<<CSW_SCOUT | 1<<CSW_M4A1 | 1<<CSW_MP5NAVY | 1<<CSW_DEAGLE | 5<<CSW_HEGRENADE | 1<<CSW_FLASHBANG | 1<<CSW_SMOKEGRENADE;
new const zdrowie = 150;
new const kondycja = 100;
new const inteligencja = 100;
new const wytrzymalosc = 200;
public plugin_init()
{
register_plugin(nazwa, "1.0", "QTM_Peyote");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
}
public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_G))
{
client_print(id, print_chat, "niee ma bocie zapomnij Lukasz jest boski i moze.")
return COD_STOP;
}
ma_klase[id] = true;
return COD_CONTINUE;
}
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_SCOUT)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
}
if(damagebits & DMG_HE && !random(1))
if(get_user_weapon(idattacker) == CSW_KNIFE && damagebits & DMG_BULLET && damage > 20.0)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
if(get_user_weapon(idattacker) == CSW_M4A1 | CSW_MP5NAVY && damagebits & DMG_BULLET)
cod_inflict_damage(idattacker, this, 30.0, 0.2, idinflictor, damagebits);
return HAM_IGNORED;
}
Klasa stworzona dla zabawy dlatego taka dobra