Wiec proszę Was
Kto mi powie jak zrobić w Klasie ,np. Ninja zeby miala Only Knife?
Wzorujmy sie na tym jak by to wygladalo:
#include <amxmodx>
#include <engine>
#include <hamsandwich>
#include <codmod>
#include <fun>
#define DMG_BULLET (1<<1)
new bool:ma_klase[33];
new const nazwa[] = "Mroczny Ninja";
new const opis[] = "Zmniejszona grawitacja i widoczność, 1/2 zabicie z noza";
new const bronie = 0;
new const zdrowie = -5;
new const kondycja = 30;
new const inteligencja = 0;
new const wytrzymalosc = 50;
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)
{
set_rendering(id,kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 30);
entity_set_float(id, EV_FL_gravity, 400.0/800.0);
ma_klase[id] = true;
}
public cod_class_disabled(id)
{
ma_klase[id] = false;
set_rendering(id,kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255);
entity_set_float(id, EV_FL_gravity, 800.0/800.0);
}
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_KNIFE && damage > 20.0 && random_num(1,2) == 1)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
}
return HAM_IGNORED;
}Dam +


Dodatki SourceMod



Temat jest zamknięty



nindża.amxx






