Jak dodac do klasy HP i szybkosc poruszania sie nie dodajac niczego do punktow statystyk?
Jezeli komus pomoze to tutaj jest kod lecz nie dzialajacy:
Spoiler
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <codmod> #include <hamsandwich> #include <fun> #include <fakemeta> const m_pPlayer = 41 const m_iId = 43 #define DMG_BULLET (1<<1) new bool:ma_klase[33]; new const nazwa[] = "Komandos"; new const opis[] = "Natychmiastowe zabicie z noza(PPM)"; new const bronie = (1<<CSW_SMOKEGRENADE)|(1<<CSW_USP)|(1<<CSW_DEAGLE); new const zdrowie = 0; new const kondycja = 0; new const inteligencja = 0; new const wytrzymalosc = 0; 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"); RegisterHam(Ham_Spawn, "player", "respawn", 1); new classname[32] for(new i=1;i<31;++i) if(i!=2) { get_weaponname(i,classname,31); RegisterHam( Ham_CS_Item_GetMaxSpeed, classname, "GetItemMaxSpeed"); } } public cod_class_enabled(id) { ma_klase[id] = true; set_user_health(id, 130); } 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_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); return HAM_IGNORED; } public respawn(id) { if(!is_user_alive(id)) return; if(!ma_klase[id]) return; set_user_health(id, 130); } public GetItemMaxSpeed(wid) { new weapon,id,Float:Speed id = get_pdata_cbase(wid,m_pPlayer,4) if(is_user_alive(id) && ma_klase[id]) { weapon = get_pdata_int(wid,m_iId,4) if(weapon) Speed = 1000.0 SetHamReturnFloat(Speed) } return HAM_OVERRIDE }