2 Klasy Szybcioch i Wojskowy
Kolorowy96 12.01.2014
Witam. prosił bym o 2 klasy
1 klasa
Nazwa Szybcioch (Premium)
staty HP 5 inta 0 wytrz 5 kondycja 15
Opis: Widzi niewidzialnych + 10 dmq z xm1014 oraz posiada 1 min
Bronie xm1014 + elitki
Klasa ma byc na flage S (NIE NA admin_level_s tylko na FLAGE)
2 Klasa
Nazwa Wojskowy (Mega Premium)
staty 10hp inta 5 wyrz 6 kondycja 12
Opis: Posiada caly czas 49 kamuflarzu,dostaje spadochron oraz zestaw granatow
Bronie: AK-47 + P228
Klasa ma byc na flage T (nie na admin_level_t tylko na FLAGE)
Dziobak?
14.01.2014
Proszę, bym ci podesłał sma i amxx ale jaki bląd podczas wysyłania mam ;/
#include <amxmodx> #include <codmod> #include <engine> #include <hamsandwich> #include <fun> new const nazwa[] = "Wojskowy (Mega Premium)"; new const opis[] = "Posiada caly czas 49 kamuflarzu,dostaje spadochron oraz zestaw granatow"; new const bronie = 1<<CSW_P228 | 1<<CSW_AK47 | 1<<CSW_HEGRENADE | 1<<CSW_FLASHBANG | 1<<CSW_SMOKEGRENADE; new const zdrowie = 10; new const kondycja = 12; new const inteligencja = 5; new const wytrzymalosc = 6; new bool:ma_klase[33]; new bool:uzywa[33]; new para_ent[33]; public plugin_init() { register_plugin(nazwa, "1.0", "Play"); cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc); register_event("HLTV", "NowaRunda", "a", "1=0", "2=0"); } public cod_class_enabled(id) { if(!(get_user_flags(id) & ADMIN_IMMUNITY)) { client_print(id, print_chat, "(Premium)[Wojskowy] Nie masz uprawnien, aby uzywac tej klasy.") return COD_STOP; } set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 49); ma_klase[id] = true; return COD_CONTINUE; } public plugin_precache() { precache_model("models/parachute.mdl"); } public cod_class_disabled(id) { set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255); ma_klase[id] = false; } public client_PreThink(id) { //parachute.mdl animation information //0 - deploy - 84 frames //1 - idle - 39 frames //2 - detach - 29 frames if (!is_user_alive(id) || !ma_klase[id]) return new Float:fallspeed = -100.0 new Float:frame new flags = get_entity_flags(id) if (para_ent[id] > 0 && (flags & FL_ONGROUND)) { uzywa[id] = false; if (get_user_gravity(id) == 0.1) set_user_gravity(id, 1.0) if (entity_get_int(para_ent[id],EV_INT_sequence) != 2) { entity_set_int(para_ent[id], EV_INT_sequence, 2) entity_set_int(para_ent[id], EV_INT_gaitsequence, 1) entity_set_float(para_ent[id], EV_FL_frame, 0.0) entity_set_float(para_ent[id], EV_FL_fuser1, 0.0) entity_set_float(para_ent[id], EV_FL_animtime, 0.0) entity_set_float(para_ent[id], EV_FL_framerate, 0.0) return } frame = entity_get_float(para_ent[id],EV_FL_fuser1) + 2.0 entity_set_float(para_ent[id],EV_FL_fuser1,frame) entity_set_float(para_ent[id],EV_FL_frame,frame) if (frame > 254.0) { remove_entity(para_ent[id]) para_ent[id] = 0 } } if (uzywa[id]) { new Float:velocity[3] entity_get_vector(id, EV_VEC_velocity, velocity) if (velocity[2] < 0.0) { if(para_ent[id] <= 0) { para_ent[id] = create_entity("info_target") if(para_ent[id] > 0) { entity_set_string(para_ent[id],EV_SZ_classname,"parachute") entity_set_edict(para_ent[id], EV_ENT_aiment, id) entity_set_edict(para_ent[id], EV_ENT_owner, id) entity_set_int(para_ent[id], EV_INT_movetype, MOVETYPE_FOLLOW) entity_set_model(para_ent[id], "models/parachute.mdl") entity_set_int(para_ent[id], EV_INT_sequence, 0) entity_set_int(para_ent[id], EV_INT_gaitsequence, 1) entity_set_float(para_ent[id], EV_FL_frame, 0.0) entity_set_float(para_ent[id], EV_FL_fuser1, 0.0) } } if (para_ent[id] > 0) { entity_set_int(id, EV_INT_sequence, 3) entity_set_int(id, EV_INT_gaitsequence, 1) entity_set_float(id, EV_FL_frame, 1.0) entity_set_float(id, EV_FL_framerate, 1.0) set_user_gravity(id, 0.1) velocity[2] = (velocity[2] + 40.0 < fallspeed) ? velocity[2] + 40.0 : fallspeed entity_set_vector(id, EV_VEC_velocity, velocity) if (entity_get_int(para_ent[id],EV_INT_sequence) == 0) { frame = entity_get_float(para_ent[id],EV_FL_fuser1) + 1.0 entity_set_float(para_ent[id],EV_FL_fuser1,frame) entity_set_float(para_ent[id],EV_FL_frame,frame) if (frame > 100.0) { entity_set_float(para_ent[id], EV_FL_animtime, 0.0) entity_set_float(para_ent[id], EV_FL_framerate, 0.4) entity_set_int(para_ent[id], EV_INT_sequence, 1) entity_set_int(para_ent[id], EV_INT_gaitsequence, 1) entity_set_float(para_ent[id], EV_FL_frame, 0.0) entity_set_float(para_ent[id], EV_FL_fuser1, 0.0) } } } } else if (para_ent[id] > 0) { remove_entity(para_ent[id]) set_user_gravity(id, 1.0) para_ent[id] = 0 } } else if (para_ent[id] > 0 ) { remove_entity(para_ent[id]) set_user_gravity(id, 1.0) para_ent[id] = 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 } */
Szybcioch:
#include <amxmodx> #include <amxmisc> #include <codmod> #include <fakemeta> #include <engine> #include <hamsandwich> #define DMG_BULLET (1<<1) new bool:ma_klase[33]; new const model[] = "models/QTM_CodMod/mine.mdl" new ilosc_min_gracza[33]; new sprite_blast; new const nazwa[] = "Szybcioch (Premium)"; new const opis[] = "Widzi niewidzialnych + 10 dmq z xm1014 oraz posiada 1 min"; new const bronie = 1<<CSW_XM1014 | 1<<CSW_ELITE; new const zdrowie = 5; new const kondycja = 15; new const inteligencja = 0; new const wytrzymalosc = 5; public plugin_init() { register_plugin(nazwa, "1.0", "Play"); register_forward(FM_AddToFullPack, "FwdAddToFullPack", 1) cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc); RegisterHam(Ham_TakeDamage, "player", "TakeDamage"); } public plugin_precache() { precache_model(model); sprite_blast = precache_model("sprites/dexplo.spr"); } public cod_class_enabled(id) { if(!(get_user_flags(id) & ADMIN_LEVEL_G)) { client_print(id, print_chat, "[Szybcioch(Premium)] Nie masz uprawnien, aby uzywac tej klasy.") return COD_STOP; } ma_klase[id] = true; ilosc_min_gracza[id] = 3; return COD_CONTINUE; } public cod_class_disabled(id) ma_klase[id] = false; public FwdAddToFullPack(es_handle, e, ent, host, hostflags, player, pSet) { if(!is_user_connected(host) || !is_user_connected(ent)) return; if(!ma_klase[host]) return; set_es(es_handle, ES_RenderAmt, 255.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_team(this) != get_user_team(idattacker) && get_user_weapon(idattacker) == CSW_XM1014 && damagebits & DMG_BULLET) cod_inflict_damage(idattacker, this, 10.0, 0.1, idinflictor, damagebits); return HAM_IGNORED; } public cod_class_skill_used(id) { if (!ilosc_min_gracza[id]) { client_print(id, print_center, "Wykorzystales juz wszystkie miny!"); return PLUGIN_CONTINUE; } ilosc_min_gracza[id]--; new Float:origin[3]; entity_get_vector(id, EV_VEC_origin, origin); new ent = create_entity("info_target"); entity_set_string(ent ,EV_SZ_classname, "mine"); entity_set_edict(ent ,EV_ENT_owner, id); entity_set_int(ent, EV_INT_movetype, MOVETYPE_TOSS); entity_set_origin(ent, origin); entity_set_int(ent, EV_INT_solid, SOLID_BBOX); entity_set_model(ent, model); entity_set_size(ent,Float:{-16.0,-16.0,0.0},Float:{16.0,16.0,2.0}); drop_to_floor(ent); set_rendering(ent,kRenderFxNone, 0,0,0, kRenderTransTexture,50); return PLUGIN_CONTINUE; } public DotykMiny(ent, id) { if(!is_valid_ent(ent)) return; new attacker = entity_get_edict(ent, EV_ENT_owner); if (get_user_team(attacker) != get_user_team(id)) { new Float:fOrigin[3]; entity_get_vector( ent, EV_VEC_origin, fOrigin); new iOrigin[3]; for(new i=0;i<3;i++) iOrigin[i] = floatround(fOrigin[i]); message_begin(MSG_BROADCAST,SVC_TEMPENTITY, iOrigin); write_byte(TE_EXPLOSION); write_coord(iOrigin[0]); write_coord(iOrigin[1]); write_coord(iOrigin[2]); write_short(sprite_blast); write_byte(32); write_byte(20); write_byte(0); message_end(); new entlist[33]; new numfound = find_sphere_class(ent,"player", 90.0 ,entlist, 32); for (new i=0; i < numfound; i++) { new pid = entlist[i]; if (!is_user_alive(pid) || get_user_team(attacker) == get_user_team(pid)) continue; cod_inflict_damage(attacker, pid, 70.0, 0.8, ent, (1<<24)); } remove_entity(ent); } } public ResetHUD(id) ilosc_min_gracza[id] = 1; public NowaRunda() { new ent = find_ent_by_class(-1, "mine"); while(ent > 0) { remove_entity(ent); ent = find_ent_by_class(ent, "mine"); } } public client_disconnect(id) { new ent = find_ent_by_class(0, "mine"); while(ent > 0) { if(entity_get_edict(id, EV_ENT_owner) == id) remove_entity(ent); ent = find_ent_by_class(ent, "mine"); } }
Użytkownik Dziobak? edytował ten post 14.01.2014 20:25