Witam mógłby ktoś dodać do tej klasy jedną rakietkę ?
#include <amxmodx> #include <amxmisc> #include <codmod> #include <fakemeta> #include <fun> new const nazwa[] = "Szeryf (Super Premium)"; new const opis[] = "Dostajesz XM 1014, Deagle, wszystkie granaty, jest szybki za zabicie dostaje pelen magazynek oraz posiada dodatkowy jeden skok w powietrzu "; new const bronie = (1<<CSW_HEGRENADE)|(1<<CSW_XM1014)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_FLASHBANG)|(1<<CSW_DEAGLE); new const zdrowie = 5; new const kondycja = 100; new const inteligencja = 0; new const wytrzymalosc = 0; new const max_clip[31] = { -1, 13, -1, 10, 1, 7, 1, 30, 30, 1, 30, 20, 25, 30, 35, 25, 12, 20, 10, 30, 100, 8, 30, 30, 20, 2, 7, 30, 30, -1, 50 }; new skoki[33]; 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_forward(FM_CmdStart, "fwCmdStart_MultiJump"); register_event("DeathMsg", "Death", "a"); } public cod_class_enabled(id) { if(!(get_user_flags(id) & ADMIN_LEVEL_D)) { client_print(id, print_chat, "[Szeryf (Super Premium)] Nie masz uprawnien, aby uzywac tej klasy.") return COD_STOP; } give_item(id, "weapon_hegrenade"); give_item(id, "weapon_flashbang"); give_item(id, "weapon_flashbang"); give_item(id, "weapon_smokegrenade"); ma_klase[id] = true; return COD_CONTINUE; } public cod_class_disabled(id) { ma_klase[id] = false; } public fwCmdStart_MultiJump(id, uc_handle) { if(!is_user_alive(id) || !ma_klase[id]) return FMRES_IGNORED; new flags = pev(id, pev_flags); if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && skoki[id]) { skoki[id]--; 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) skoki[id] = 1; return FMRES_IGNORED; } public Death() { new attacker = read_data(1); if(!is_user_connected(attacker)) return PLUGIN_CONTINUE; if(ma_klase[attacker]) { new weapon = get_user_weapon(attacker); if(max_clip[weapon] > 0) set_user_clip(attacker, max_clip[weapon]); } return PLUGIN_CONTINUE; } stock set_user_clip(id, ammo) { new weaponname[32], weaponid = -1, weapon = get_user_weapon(id, _, _); get_weaponname(weapon, weaponname, 31); while ((weaponid = engfunc(EngFunc_FindEntityByString, weaponid, "classname", weaponname)) != 0) if (pev(weaponid, pev_owner) == id) { set_pdata_int(weaponid, 51, ammo, 4); return weaponid; } return 0; }
Dziękuję ;]
Użytkownik HanRayS edytował ten post 24.10.2013 19:05