Oto moja klasa:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <engine> #include <cstrike> #include <codmod> #include <hamsandwich> #include <ColorChat> #include <fun> #define DMG_BULLET (1<<1) new bool:ma_klase[33]; new const nazwa[] = "Nozownik [PREMIUM]"; new const opis[] = "Natychmiastowe zabicie z noza(PPM)+niewidzialnosc"; new const bronie = 1<<CSW_KNIFE; new const zdrowie = 50; new const kondycja = 76; new const inteligencja = 10; new const wytrzymalosc = 3; 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"); register_event("CurWeapon","CurWeapon","be", "1=1"); } public cod_class_enabled(id) { if(!(get_user_flags(id) & ADMIN_LEVEL_H)) { ColorChat(id, RED, "[Nozownik] Nie masz uprawnien, aby korzystac z tej klasy. "); return COD_STOP; } ColorChat(id, RED, "[Nozownik] Klasa stworzona przez aXe") 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(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 CurWeapon(id) { if(!ma_klase[id]) return PLUGIN_CONTINUE; if(get_user_weapon(id) == CSW_KNIFE) set_rendering(id,kRenderFxGlowShell,0,0,0 ,kRenderTransAlpha, 5); else set_rendering(id,kRenderFxGlowShell,0,0,0 ,kRenderTransAlpha, 255); if(ma_klase[id] && read_data(2) != CSW_KNIFE) { set_task(0.1 ,"ma" ,id) } } public ma(id) { strip_user_weapons(id); give_item(id, "weapon_knife"); }
Czy da się coś z tym zrobić?