Witam. Problem zapewne wielu wam znany. Mam kilka klas, które mają 1/1 i 1/x z kosy ppm. Problem polega na tym, że wszystkie te klasy mają też możliwość 1/1 i 1/x z kosy lpm czego nie chcę. Jakby ktoś był tak mily to proszę poprawić żeby każda kla klasa miała 1/1 z kosy na ppm
Spoiler
#include <amxmodx> #include <amxmisc> #include <codmod> #include <engine> #include <hamsandwich> #include <cstrike> #include <colorchat> #include <fun> #include <fakemeta> new const nazwa[] = "Wallcroft"; new const opis[] = "Jest bardzo szybki i ma 1/1 z kosy (PPM), posiada ubranie wroga"; new const bronie = 1<<CSW_DEAGLE | 1<<CSW_M3; new const zdrowie = 60; new const kondycja = 90; new const inteligencja = 0; new const wytrzymalosc = 10; new bool:ma_klase[33]; #define DMG_BULLET (1<<1) public plugin_init() { register_plugin(nazwa, "1.0", "Enson"); cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc); RegisterHam(Ham_TakeDamage, "player", "TakeDamage"); } public cod_class_enabled(id) { ColorChat(id, GREY, "[COD:MW3] Klasa %s stworzona przez L0w1cz.", nazwa); cs_set_user_defuse(id, 1); ma_klase[id] = true; ZmienUbranie(id, 0) // w-¦cza przebranie return COD_CONTINUE; } public cod_class_disabled(id) { ZmienUbranie(id, 1) // wy-¦cza przebranie 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 && random_num(1, x) == 1) cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits); return HAM_IGNORED; } public ZmienUbranie(id,reset) { if (id<1 || id>32 || !is_user_connected(id)) return PLUGIN_CONTINUE; if (reset) cs_reset_user_model(id); else { new Ubrania_CT[4][] = {"sas","gsg9","urban","gign"}, Ubrania_Terro[4][] = {"arctic","leet","guerilla","terror"}; new num = random_num(0,3); switch(get_user_team(id)) { case 1: cs_set_user_model(id, Ubrania_CT[num]); case 2:cs_set_user_model(id, Ubrania_Terro[num]); } } return PLUGIN_CONTINUE; } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par } */
Tu jakby ktoś był tak miły proszę o wywalenie też 1/1 z awp i pozostawienie 120dmg +int
Spoiler
#include <amxmodx> #include <codmod> #include <hamsandwich> #include <engine> #include <colorchat> #define DMG_BULLET (1<<1) new bool:ma_klase[33]; new const nazwa[] = "MacMilan"; new const opis[] = "Ma 1/1 z AWP(+inteligencja), 1/2 szansy na natychmiastowe zabicie z noza(PPM)"; new const bronie = 1<<CSW_DEAGLE | 1<<CSW_AWP; new const zdrowie = 30; new const kondycja = 25; new const inteligencja = 0; new const wytrzymalosc = 20; public plugin_init() { register_plugin(nazwa, "1.0", "L0w1cz"); cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc); RegisterHam(Ham_TakeDamage, "player", "TakeDamage"); } public cod_class_enabled(id){ ma_klase[id] = true; ColorChat(id, GREY, "[COD:MW3] Klasa %s stworzona przez L0w1cz.", nazwa); } 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(damagebits & DMG_BULLET) { new weapon = get_user_weapon(idattacker); if(weapon == CSW_AWP && damage > 20.0) cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits); if(weapon == CSW_KNIFE && damage > 20.0 && !(get_user_button(idattacker) & IN_ATTACK) && random_num(1,2) == 1) cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits); } return HAM_IGNORED; } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par } */
Spoiler
#include <amxmodx> #include <engine> #include <fakemeta> #include <hamsandwich> #include <codmod> #include <hamsandwich> new bool:ma_klase[33]; new bool:moze_skoczyc[33]; new const nazwa[] = "Lt. Vasquez"; new const opis[] = "Odporny na head shoty, posiada 1/1 z kosy, podwojny skok i mniejsza grafitacje"; new const bronie = (1<<CSW_KNIFE)|(1<<CSW_M4A1)|(1<<CSW_USP); new const zdrowie = 15; new const kondycja = 25; new const inteligencja = 10; new const wytrzymalosc = 25; public plugin_init() { register_plugin(nazwa, "1.0", "L0w1cz."); cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc); RegisterHam(Ham_TakeDamage, "player", "TakeDamage"); register_forward(FM_TraceLine, "TraceLine"); register_forward(FM_CmdStart, "CmdStart"); RegisterHam(Ham_Spawn, "player", "fwSpawn_Grawitacja", 1); } public cod_class_enabled(id) { entity_set_float(id, EV_FL_gravity, 600.0/800.0); ma_klase[id] = true; } public cod_class_disabled(id) { entity_set_float(id, EV_FL_gravity, 1.0); ma_klase[id] = false; } public TraceLine(Float:start[3], Float:end[3], conditions, id, trace) { if(get_tr2(trace, TR_iHitgroup) != HIT_HEAD) return FMRES_IGNORED; new iHit = get_tr2(trace, TR_pHit); if(!is_user_connected(iHit)) return FMRES_IGNORED; if(!ma_klase[iHit]) return FMRES_IGNORED; set_tr2(trace, TR_iHitgroup, 8); return FMRES_IGNORED; } 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 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 fwSpawn_Grawitacja(id) { if(ma_klase[id]) entity_set_float(id, EV_FL_gravity, 600.0/800.0); } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par } */
Użytkownik Kokoszko edytował ten post 24.09.2014 10:32