przerabiam dziś klasy i tykam się z problemem przerobienia klasy na 1/1 z AWP i 1/2 z noża, jak już znalazłem 1/1 z awp i 1/2 z noża to COD Stary. Prosiłbym o przerobienie klasy na 1/1 z AWP i 1/2 z noża.
Kod kapitan.sma
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <codmod> #include <cstrike> #include <fakemeta> #include <colorchat> #define DMG_BULLET (1<<1) new bool:ma_klase[33]; new bool:moze_skoczyc[33]; new CT_Skins[4][] = {"sas","gsg9","urban","gign"}; new Terro_Skins[4][] = {"arctic","leet","guerilla","terror"}; new const nazwa[] = "Kapitan Premium"; new const opis[] = "Posiada ubranie wroga, AWP, m4a1 deagle i HE. "; new const bronie = 1<<CSW_HEGRENADE | 1<<CSW_DEAGLE | 1<<CSW_M4A1 | 1<<CSW_AWP new const zdrowie = 30; new const kondycja = 90; new const inteligencja = 20; new const wytrzymalosc = 40; public plugin_init() { register_plugin(nazwa, "1.0", "QTM_Peyote"); cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc); register_forward(FM_CmdStart, "CmdStart"); register_forward(FM_Spawn, "Spawn", 1); } public cod_class_enabled(id) { ColorChat(id, RED, "^x04Klasa^x03 %s^x04 By^x01 uKFC.pl", nazwa); //Gdy gracz nie ma flagi wyświetli mu komunikat if(!(get_user_flags(id) & ADMIN_LEVEL_H)) //FLAGA { ColorChat(id, RED, "^x03[%s]^x04 Jest^x03 klasa premium", nazwa) //Znowu info ze przykładowa klasa jest PREMIUM return COD_STOP; } ma_klase[id] = true; return COD_CONTINUE; //To nie pozwala PLUGINOWI pokazywać w kółko to samo że klasa jest Premium } { ColorChat(id, GREEN, "Klasa %s zostala stworzona przez uKFC.pl", nazwa); set_pev(id, pev_gravity, 0.8); ZmienUbranie(id, 0); ma_klase[id] = true; } public cod_class_disabled(id) { set_pev(id, pev_gravity, 1.0); ZmienUbranie(id, 1); ma_klase[id] = false; } public CmdStart(id, uc_handle) { if(!ma_klase[id]) return FMRES_IGNORED; new button = get_uc(uc_handle, UC_Buttons); new oldbutton = pev(id, pev_oldbuttons); new flags = pev(id, pev_flags); if((button & IN_JUMP) && !(flags & FL_ONGROUND) && !(oldbutton & IN_JUMP) && moze_skoczyc[id]) { moze_skoczyc[id] = false; new Float:velocity[3]; pev(id, pev_velocity, velocity); velocity[2] = random_float(265.0,285.0); set_pev(id, pev_velocity, velocity); } else if(flags & FL_ONGROUND) moze_skoczyc[id] = true; return FMRES_IGNORED; } public ZmienUbranie(id,reset) { if (!is_user_connected(id)) return PLUGIN_CONTINUE; if (reset) cs_reset_user_model(id); else { new num = random_num(0,3); cs_set_user_model(id, (get_user_team(id) == 1)? CT_Skins[num]: Terro_Skins[num]); } return PLUGIN_CONTINUE; } public Spawn(id) { if(!is_user_connected(id)) return; if(ma_klase[id]) ZmienUbranie(id, 0); }
Reputacja dla każdego kto przerobi !