Cvary:
diablo_arrow "50" diablo_arrow_multi "2.0" diablo_arrow_speed "1000"
if(player_class[id]==Lowca) { new clip,ammo new weapon = get_user_weapon(id,clip,ammo) if(bow[id] == 1) { if((bowdelay[id] + 5.0 - float(player_intelligence[id]/50))< get_gametime() && button2 & IN_ATTACK) { if(player_b_arrownum[id]<3) { bowdelay[id] = get_gametime() command_arrow(id) player_b_arrownum[id]+=1 } else client_print(id,print_center,"Wystrzeliles %s belty, musisz przeladowac",player_b_arrownum[id]) } entity_set_int(id, EV_INT_button, (button2 & ~IN_ATTACK) & ~IN_ATTACK2) } // nade if(g_GrenadeTrap[id] && button2 & IN_ATTACK2) { switch(weapon) { case CSW_HEGRENADE, CSW_FLASHBANG, CSW_SMOKEGRENADE: { if((g_PreThinkDelay[id] + 0.28) < get_gametime()) { switch(g_TrapMode[id]) { case 0: g_TrapMode[id] = 1 case 1: g_TrapMode[id] = 0 } client_print(id, print_center, "Grenade Trap %s", g_TrapMode[id] ? "[ON]" : "[OFF]") g_PreThinkDelay[id] = get_gametime() } } default: g_TrapMode[id] = 0 } } }
public command_arrow(id) { if(!is_user_alive(id)) return PLUGIN_HANDLED new Float: Origin[3], Float: Velocity[3], Float: vAngle[3], Ent entity_get_vector(id, EV_VEC_origin , Origin) entity_get_vector(id, EV_VEC_v_angle, vAngle) Ent = create_entity("info_target") if (!Ent) return PLUGIN_HANDLED entity_set_string(Ent, EV_SZ_classname, "xbow_arrow") entity_set_model(Ent, cbow_bolt) new Float:MinBox[3] = {-2.8, -2.8, -0.8} new Float:MaxBox[3] = {2.8, 2.8, 2.0} entity_set_vector(Ent, EV_VEC_mins, MinBox) entity_set_vector(Ent, EV_VEC_maxs, MaxBox) vAngle[0]*= -1 Origin[2]+=10 entity_set_origin(Ent, Origin) entity_set_vector(Ent, EV_VEC_angles, vAngle) entity_set_int(Ent, EV_INT_effects, 2) entity_set_int(Ent, EV_INT_solid, 1) entity_set_int(Ent, EV_INT_movetype, 5) entity_set_edict(Ent, EV_ENT_owner, id) new Float:dmg = get_cvar_float("diablo_arrow") + player_intelligence[id] * get_cvar_float("diablo_arrow_multi") entity_set_float(Ent, EV_FL_dmg,dmg) VelocityByAim(id, get_cvar_num("diablo_arrow_speed") , Velocity) set_rendering (Ent,kRenderFxGlowShell, 255,0,0, kRenderNormal,56) entity_set_vector(Ent, EV_VEC_velocity ,Velocity) return PLUGIN_HANDLED } public command_bow(id) { if(!is_user_alive(id)) return PLUGIN_HANDLED if(bow[id] == 1){ entity_set_string(id,EV_SZ_viewmodel,cbow_VIEW) entity_set_string(id,EV_SZ_weaponmodel,cvow_PLAYER) bowdelay[id] = get_gametime() }else if(player_sword[id] == 1) { entity_set_string(id, EV_SZ_viewmodel, SWORD_VIEW) entity_set_string(id, EV_SZ_weaponmodel, SWORD_PLAYER) bow[id]=0 } else { entity_set_string(id,EV_SZ_viewmodel,KNIFE_VIEW) entity_set_string(id,EV_SZ_weaponmodel,KNIFE_PLAYER) bow[id]=0 } return PLUGIN_CONTINUE } public toucharrow(arrow, id) { new kid = entity_get_edict(arrow, EV_ENT_owner) new lid = entity_get_edict(arrow, EV_ENT_enemy) if(is_user_alive(id)) { if(kid == id || lid == id) return entity_set_edict(arrow, EV_ENT_enemy,id) new Float:dmg = entity_get_float(arrow,EV_FL_dmg) entity_set_float(arrow,EV_FL_dmg,(dmg*3.0)/5.0) if(get_cvar_num("mp_friendlyfire") == 0 && get_user_team(id) == get_user_team(kid)) return Effect_Bleed(id,248) bowdelay[kid] -= 0.5 - floatround(player_intelligence[kid]/5.0) if(!player_b_antykusza[id]) change_health(id,floatround(-dmg),kid,"knife") message_begin(MSG_ONE,get_user_msgid("ScreenShake"),{0,0,0},id); write_short(7<<14); write_short(1<<13); write_short(1<<14); message_end(); if(get_user_team(id) == get_user_team(kid)) { new name[33] get_user_name(kid,name,32) client_print(0,print_chat,"%s attacked a teammate",name) } emit_sound(id, CHAN_ITEM, "weapons/knife_hit4.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) if(dmg<30) remove_entity(arrow) } } public touchWorld2(arrow, world) { remove_entity(arrow) }Co jest złe ?