Czy ktoś by przerobił klase Danny bo nie działa 1/1 z noza ,magazynek za zabicie i nieskonczonosc skokow
SMA
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <codmod> #include <fakemeta> #include <hamsandwich> #include <engine> #define DMG_BULLET (1<<1) new const nazwa[] = "[GoldPremium]Danny"; new const opis[] = "Magazynek za zabicie,hp 30 za zabicie ,nieskonczonosc skokow ,ma 1/1 z kosy i eliminator rorzutu i jest niewidzialny 20/250 poziom niewidzialnosci,40% wiecej obrazen"; new const bronie = (1<<CSW_FAMAS); new const zdrowie = 150; new const kondycja = 200; new const inteligencja = 40; new const wytrzymalosc = 50; new bool:ma_klase[33]; new skoki[33]; new const maxClip[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 }; public plugin_init() { register_plugin(nazwa, "1.0", "RasiaQ"); cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc); register_event("DeathMsg", "DeathMsg", "ade"); register_forward(FM_CmdStart, "fwCmdStart_MultiJump"); register_forward(FM_PlayerPreThink, "PreThink"); register_forward(FM_UpdateClientData, "UpdateClientData", 1); RegisterHam(Ham_TakeDamage, "player", "TakeDamage"); } public cod_class_enabled(id) { if(!(get_user_flags(id) & ADMIN_LEVEL_D)) { client_print(id, print_chat, "[Danny] Nie masz uprawnien, aby uzywac tej klasy.") return COD_STOP; } skoki[id] = -1; set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 20); ma_klase[id] = false; return COD_CONTINUE; } public cod_class_disabled(id) { skoki[id] = 0; set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255); ma_klase[id] = false; } public DeathMsg() { new killer = read_data(1); new victim = read_data(2); if(!is_user_connected(killer)) return PLUGIN_CONTINUE; if(ma_klase[victim] && !ma_klase[killer]) cod_set_user_xp(killer, cod_get_user_xp(killer)+10); if(ma_klase[killer]) { new cur_health = pev(killer, pev_health); new Float:max_health = 100.0+cod_get_user_health(killer); new Float:new_health = cur_health+20.0<max_health? cur_health+30.0: max_health; set_pev(killer, pev_health, new_health); new weapon = get_user_weapon(killer); if(maxClip[weapon] != -1) set_user_clip(killer, maxClip[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; } 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 PreThink(id) { if(ma_klase[id]) set_pev(id, pev_punchangle, {0.0,0.0,0.0}) } public UpdateClientData(id, sw, cd_handle) { if(ma_klase[id]) set_cd(cd_handle, CD_PunchAngle, {0.0,0.0,0.0}) } 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; } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par } */