Witam, mam problem z 1/1 z he oraz z 1/1 z awp. Przeczytałem mnóstwo poradników ale żaden mi nie pomógł ;/
Nie potrafię zrobić Do klas żeby miały : 1/1 z he oraz 1/1 z awp.
Oto .sma z jednej klasy:
#include <amxmodx> #include <hamsandwich> #include <amxmisc> #include <codmod> #include <engine> #include <fun> #define DMG_BULLET (1<<1) #define DMG_HEGRENADE (1<<24) new const nazwa[] = "Piękoś[Prywatna]"; new const opis[] = "Niewidoczny na nożu,awp1/1,galil +[3int],he1/2"; new const bronie = (1<<CSW_HEGRENADE)|(1<<CSW_GALIL)|(1<<CSW_AWP)|(1<<CSW_DEAGLE); new const zdrowie = 0; new const kondycja = 10; new const inteligencja = 0; new const wytrzymalosc = 0; new ma_klase[33]; public plugin_init() { register_plugin(nazwa, "1.0", "amxx.pl"); cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc); register_event("CurWeapon", "eventKnife_Niewidzialnosc", "be", "1=1"); } public cod_class_enabled(id) { if(!(get_user_flags(id) & ADMIN_LEVEL_H)) { client_print(id, print_chat, "[Piękoś[Prywatna]] Nie masz uprawnien, aby uzywac tej klasy.") return COD_STOP; } give_item(id, "weapon_hegrenade"); ma_klase[id] = true; return COD_CONTINUE; } public cod_class_disabled(id) { set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255); ma_klase[id] = false; } public eventKnife_Niewidzialnosc(id) { if(!ma_klase[id]) return; if( read_data(2) == CSW_KNIFE ) { set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 35); } else { set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255); } } 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_AWP && damagebits & DMG_BULLET) cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits); if(get_user_weapon(idattacker) == CSW_M4A1&& damagebits & DMG_BULLET) cod_inflict_damage(idattacker, this, 20.0, 0.0, idinflictor, damagebits); return HAM_IGNORED; }
W tym trzeba tylko dodać 1/1 z he. Jak możecie to sprawdzcie czy jest dobrze 1/1 z awp :_)
Wynagrodze plusikami +++