A więc tak, przy debugu :
L 01/20/2014 - 21:04:51: [] Run time error 4: index out of bounds L 01/20/2014 - 21:04:51: [] [0] GWM.sma::client_PreThink (line 1217)
L 01/20/2014 - 21:10:32: [] Run time error 4: index out of bounds L 01/20/2014 - 21:10:32: [] [0] GWM.sma::CmdStart (line 1727)
public z linia 1727 :
public CmdStart(id, uc_handle) { if(!is_user_alive(id)) return FMRES_IGNORED; new button = get_uc(uc_handle, UC_Buttons); new oldbutton = get_user_oldbutton(id); new flags = get_entity_flags(id); if(informacje_przedmiotu_gracza[id][0] == 11) { if((button & IN_JUMP) && !(flags & FL_ONGROUND) && !(oldbutton & IN_JUMP) && ilosc_skokow_gracza[id] > 0) { ilosc_skokow_gracza[id]--; new Float:velocity[3]; entity_get_vector(id,EV_VEC_velocity,velocity); velocity[2] = random_float(265.0,285.0); entity_set_vector(id,EV_VEC_velocity,velocity); } else if(flags & FL_ONGROUND) { ilosc_skokow_gracza[id] = 1; } } if(button & IN_ATTACK) { new Float:fPunch[3] = {0.0,0.0,0.0}; if(informacje_przedmiotu_gracza[id][0] == 20) entity_set_vector(id, EV_VEC_punchangle,fPunch); if(informacje_przedmiotu_gracza[id][0] == 23) { entity_get_vector(id, EV_VEC_punchangle, fPunch); for(new i=0; i<3;i++) fPunch[i]*=0.9; entity_set_vector(id, EV_VEC_punchangle, fPunch); } } if(informacje_przedmiotu_gracza[id][0] == 28 && button & IN_DUCK && button & IN_JUMP && flags & FL_ONGROUND && get_gametime() > informacje_przedmiotu_gracza[id][1]+4.0){ informacje_przedmiotu_gracza[id][1] = floatround(get_gametime()); new Float:velocity[3]; VelocityByAim(id, 700, velocity); velocity[2] = random_float(265.0,285.0); entity_set_vector(id, EV_VEC_velocity, velocity); } static moze_skoczyc[MAX+1]; if(informacje_przedmiotu_gracza[id][0] == 52){ if((button & IN_JUMP) && !(flags & FL_ONGROUND) && !(oldbutton & IN_JUMP) && moze_skoczyc[id] > 0) { moze_skoczyc[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){ moze_skoczyc[id] = 4; } } if(informacje_przedmiotu_gracza[id][0] == 58 && !(oldbutton & IN_JUMP)){ if(button & IN_DUCK){ set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 76); } else { set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255); } } if(button & IN_USE && !(oldbutton & IN_USE) && informacje_przedmiotu_gracza[id][0] == 59 && godmode[id]){ godmode[id] = false; set_user_godmode(id,1); set_task(4.0,"godmode_off2",id+993213) set_bartime(id,4,0); } if(klasa_gracza[id] == screaming && pev(id,pev_button) & IN_USE && !(pev(id,pev_oldbuttons) & IN_USE)){ moc_talic(id); } if(klasa_gracza[id] == zmechanizowany && (get_speed(id) > 50|| gUserTempe[id] >= 255) && get_user_weapon(id) == CSW_M249){ setAttackAttack2(id) } if(get_pdata_cbase(id,OFFSET_ACTIVEITEM,OFFSET_LINUX_PLAYER) == gEntBaz[id]){ if(get_user_button(id) & IN_ATTACK && gNextShotTime[id] <= get_gametime() && ilosc_rakiet_gracza[id] > 0){ gNextShotTime[id] = get_gametime() + 3.0; StworzRakiete(id); set_animation(id,3) new wpn[32],clip,ammo,wpnid; wpnid = get_user_weapon(id, clip, ammo) get_weaponname(wpnid,wpn,31) cs_set_user_bpammo(id,wpnid,0) cs_set_weapon_ammo(find_ent_by_owner(1, wpn, id ), ilosc_rakiet_gracza[id]); FX_UpdateClip(id,get_user_weapon(id),ilosc_rakiet_gracza[id]); } setAttackAttack2(id) } if( get_user_button(id) & IN_ATTACK2 && !(get_user_oldbutton(id) & IN_ATTACK2) && klasa_gracza[id] == sas) { if (get_user_weapon(id) == CSW_KNIFE) { if (halflife_time()-player_b_blink[id] <= 3) return PLUGIN_HANDLED player_b_blink[id] = floatround(halflife_time()) UTIL_Teleport(id,180+12*inteligencja_gracza[id]) } } if (entity_get_int(id, EV_INT_button) & 2 && informacje_przedmiotu_gracza[id][0] == 44){ new flags = entity_get_int(id, EV_INT_flags) if (!(flags & FL_WATERJUMP) && entity_get_int(id, EV_INT_waterlevel) < 2 && flags & FL_ONGROUND){ new Float:velocity[3] entity_get_vector(id, EV_VEC_velocity, velocity) velocity[2] += 250.0 entity_set_vector(id, EV_VEC_velocity, velocity) entity_set_int(id, EV_INT_gaitsequence, 6) } } if( (button & IN_JUMP) && !(oldbutton & IN_JUMP) && (flags & FL_ONGROUND) && !(flags & FL_INWATER) && klasa_gracza[id] == rangers) { static Float:vecforce[3] pev(id,pev_velocity,vecforce) vecforce[2] += 400.0; set_pev(id,pev_velocity,vecforce) } if(iNiewi[id] == 1 && informacje_przedmiotu_gracza[id][0] == 66 && is_user_alive(id) && button & IN_USE && !(oldbutton & IN_USE)){ set_bartime(id,5,0); iNiewi[id] = 0; set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 10); remove_task(id+46466) set_task(5.0,"offNiewi",id+46466) } if (has_parachute[id]){ new Float:fallspeed = get_pcvar_float(pFallSpeed) * -1.0 new Float:frame new button = get_user_button(id) new oldbutton = get_user_oldbutton(id) new flags = get_entity_flags(id) if (para_ent[id] > 0 && (flags & FL_ONGROUND)) { if (get_pcvar_num(pDetach)) { if (fm_get_user_gravity(id) == 0.1) fm_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 FMRES_IGNORED; } 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 } } else { remove_entity(para_ent[id]) fm_set_user_gravity(id, 1.0) para_ent[id] = 0 } } else if (button & IN_USE) { 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/gwm_mod/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) fm_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]) fm_set_user_gravity(id, 1.0) para_ent[id] = 0 } } else if ((oldbutton & IN_USE) && para_ent[id] > 0 ) { remove_entity(para_ent[id]) fm_set_user_gravity(id, 1.0) para_ent[id] = 0 } } return FMRES_IGNORED; }
public z linia 1217 :
public client_PreThink(id){ if(!is_user_alive(id)) return PLUGIN_CONTINUE; if(klasa_gracza[id] == zmechanizowany && (get_speed(id) > 50|| gUserTempe[id] >= 255) && get_user_weapon(id) == CSW_M249){ setAttackAttack2(id) } if(get_pdata_cbase(id,OFFSET_ACTIVEITEM,OFFSET_LINUX_PLAYER) == gEntBaz[id]){ setAttackAttack2(id) } if(get_pdata_cbase(id,OFFSET_ACTIVEITEM,OFFSET_LINUX_PLAYER) == gEntExplode[id]){ setAttackAttack2(id) } #if defined CSS_ZOOM if(g_doFov[id]) { if(g_MinMaxFov[id][1] > g_MinMaxFov[id][0]) { --g_MinMaxFov[id][1] message_begin(MSG_ONE, gmsgSetFOV, {0,0,0}, id) write_byte(--g_MinMaxFov[id][1]) message_end() } else { message_begin(MSG_ONE, gmsgSetFOV, {0,0,0}, id) write_byte(g_MinMaxFov[id][0]) message_end() g_doFov[id] = 0 } } #endif return PLUGIN_CONTINUE; }
Użytkownik revoolution edytował ten post 20.01.2014 21:07