/* Plugin generated by AMXX-Studio */ #include #include #include #include #include #include new const nazwa[] = "Assasin"; new const opis[] = "Ma potrójny skok, 20 hp oraz pelen magazynak za kazde zabojstwo, 4 rakiety i 3 apteczki"; new const bronie = 1< 0) { if(entity_get_edict(entRakiety, EV_ENT_owner) == id) remove_entity(entRakiety); entRakiety = find_ent_by_class(entRakiety, "rocket"); } } public cod_class_enabled(id) { ilosc_apteczek_gracza[id] = 4; ilosc_rakiet_gracza[id] = 4; } public cod_class_skill_used(id) { if (!ilosc_apteczek_gracza[id]) { client_print(id, print_center, "Masz tylko 4 apteczki na runde!"); return PLUGIN_CONTINUE; } ilosc_apteczek_gracza[id]--; poprzednia_rakieta_gracza[id] = floatround(get_gametime()); ilosc_rakiet_gracza[id]--; new Float:origin[3]; entity_get_vector(id, EV_VEC_origin, origin); new Float: Origin[3], Float: vAngle[3], Float: Velocity[3]; new ent = create_entity("info_target"); entity_set_string(ent, EV_SZ_classname, "medkit"); entity_set_edict(ent, EV_ENT_owner, id); entity_set_int(ent, EV_INT_solid, SOLID_NOT); entity_set_vector(ent, EV_VEC_origin, origin); entity_set_float(ent, EV_FL_ltime, halflife_time() + 7 + 0.1); entity_get_vector(id, EV_VEC_v_angle, vAngle); entity_get_vector(id, EV_VEC_origin , Origin); new Ent = create_entity("info_target"); entity_set_model(ent, "models/w_medkit.mdl");entity_set_string(Ent, EV_SZ_classname, "rocket"); entity_set_model(Ent, "models/rpgrocket.mdl"); set_rendering ( ent, kRenderFxGlowShell, 255,0,0, kRenderFxNone, 255 ) ; drop_to_floor(ent); vAngle[0] *= -1.0; entity_set_origin(Ent, Origin); entity_set_vector(Ent, EV_VEC_angles, vAngle); entity_set_float(ent, EV_FL_nextthink, halflife_time() + 0.1); entity_set_int(Ent, EV_INT_effects, 2); entity_set_int(Ent, EV_INT_solid, SOLID_BBOX); entity_set_int(Ent, EV_INT_movetype, MOVETYPE_FLY); entity_set_edict(Ent, EV_ENT_owner, id); VelocityByAim(id, 1000 , Velocity); entity_set_vector(Ent, EV_VEC_velocity ,Velocity); return PLUGIN_CONTINUE; } public MedkitThink(ent) { new id = entity_get_edict(ent, EV_ENT_owner); new dist = 300; new heal = 5+floatround(cod_get_user_intelligence(id)*0.5); if (entity_get_edict(ent, EV_ENT_euser2) == 1) { new Float:forigin[3]; entity_get_vector(ent, EV_VEC_origin, forigin); new entlist[33]; new numfound = find_sphere_class(0,"player", float(dist),entlist, 32,forigin); for (new i=0; i < numfound; i++) { new pid = entlist[i]; if (get_user_team(pid) != get_user_team(id)) continue; new maksymalne_zdrowie = 100+cod_get_user_health(pid); new zdrowie = get_user_health(pid); new Float:nowe_zdrowie = (zdrowie+heal 0) { if(entity_get_edict(id, EV_ENT_owner) == id) remove_entity(ent); ent = find_ent_by_class(ent, "medkit"); } } register_forward(FM_CmdStart, "CmdStart"); register_event("DeathMsg", "DeathMsg", "ade"); } public cod_class_enabled(id) { if(!(get_user_flags(id) & ADMIN_LEVEL_H)) { client_print(id, print_chat, "[Admiral] Nie masz uprawnien, aby uzywac tej klasy.") return COD_STOP; } ma_klase[id] = true; return COD_CONTINUE; } public cod_class_disabled(id) 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 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