Advertisement
Guest User

Untitled

a guest
Nov 4th, 2016
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 296.08 KB | None | 0 0
  1. /*
  2.     stats by kzuq^BorJomi
  3.     version 2.42
  4.    
  5.     Big thanks developers of kz_ljs_xm and Exolent
  6.    
  7.     Visit  http://unique-kz.com/
  8.    
  9.         2011 year
  10. */
  11.  
  12. #include <amxmodx>
  13. #include <amxmisc>
  14. #include <colorchat>
  15. #include <fakemeta>
  16. #include <engine>
  17. #include <cstrike>
  18. #include <hamsandwich>
  19. #include <uq_jumpstats_const.inc>
  20. #include <uq_jumpstats_stocks.inc>
  21. #include <celltrie>
  22. #include <dhudmessage>
  23.  
  24. #define VERSION "2.42"
  25. #pragma semicolon 1
  26.  
  27. ////////////////////////////////////Some shit varibeles////////////////////////////////////
  28. new dd_sync[33],angles_arry[33],Float:old_angles[33][3],lost_frame_count[33][NSTRAFES],line_lost[33][NSTRAFES][NVAR],FullJumpFrames[33],heystats,max_players,bool:duckbhop_bug_pre[33],bool:dropupcj[33],Float:first_duck_z[33],screenshoot,Float:checkladdertime[33],bool:ladderbug[33],bool:login[33];
  29. new uq_istrafe,kz_uq_istrafe,bug_check[33],bool:bug_true[33],bool:find_ladder[33],bool:Checkframes[33],type_button_what[33][100];
  30. new min_pre,beam_type[33],min_prestrafe[33],dropbhop[33],ddnum[33],bool:dropaem[33],bool:ddforcj[33];
  31. new kz_uq_min_other,bool:slide_protec[33],bool:UpcjFail[33],bool:upBhop[33],Float:upheight[33];
  32. new beam_entity[33][NVAR],ent_count[33],kz_uq_extras,sql_stats,kz_sql,g_sql_pid[33],kz_top_rank_by,kz_uq_block_top;
  33.  
  34. new bool:height_show[33],bool:firstfall_ground[33],framecount[33],bool:firstladder[33];
  35. new Float:FallTime[33],Float:FallTime1[33],multiscj[33],multidropcj[33],bool:enable_sound[33];
  36. new jumpblock[33],Float:edgedist[33];
  37. new bool:failed_jump[33],bool:started_multicj_pre[33],bool:sync_doubleduck[33],bhop_num[33],bool:Show_edge_Fail[33],bool:Show_edge[33],bool:fps_hight[33],bool:first_ground_bhopaem[33];
  38.  
  39. new line_erase[33][NSTRAFES],line_erase_strnum[33];
  40.  
  41. new max_edge,min_edge,NSTRAFES1,max_strafes,Float:nextbhoptime[33],Float:bhopaemtime[33],Float:ground_bhopaem_time[33],Float:SurfFrames[33],Float:oldSurfFrames[33],bool:first_air[33];
  42. new bool:preessbutton[33],button_what[33],bool:gBeam_button[33][100],gBeam_button_what[33][100];
  43. new bool:h_jumped[33],Float:heightoff_origin[33],web_stats,Float:x_heightland_origin[33],bool:x_jump[33],Float:laddertime[33],bool:edgedone[33];
  44. new schetchik[33],Float:changetime[33],bool:edgeshow[33],bool:slide[33],pre_type[33][33];
  45.  
  46. new bool:ingame_strafe[33],bool:ljpre[33],Float:distance[33],detecthj[33],bool:doubleduck[33];
  47. new Float:doubletime[33],bool:multibhoppre[33],kz_uq_fps,bool:duckbhop[33],MAX_DISTANCE,Float:upbhop_koeff[33];
  48. new Float:rDistance[3],Float:frame2time,bool:touch_ent[33],bool:ddbeforwj[33],bool:gHasColorChat[33],Float:old_angle1[33];
  49. new bool:g_lj_stats[33],strafe_num[33],bool:g_Jumped[33],bool:g_reset[33],ljsDir[64],ljsDir_weapon[8][64],ljsDir_block[64],Float:gBeam_points[33][100][3],gBeam_duck[33][100],gBeam_count[33];
  50.  
  51. new gBeam,waits[33],waits1[33],Float:slideland[33],bool:backwards[33],bool:hookcheck[33],Float:timeonground[33];
  52. new map_dist[NTOP+1],map_syncc[NTOP+1],map_maxsped[NTOP+1], map_prestr[NTOP+1],map_names[NTOP+1][33],map_ip[NTOP+1][33],map_streif[NTOP+1],map_type[NTOP+1][33];
  53. new kz_uq_lj,kz_uq_cj,kz_uq_dcj,kz_uq_mcj ,kz_uq_ladder,kz_uq_ldbj,kz_uq_bj,kz_uq_sbj,kz_uq_drbj,kz_uq_drsbj,kz_uq_drcj,kz_uq_wj;  
  54.  
  55. new oldpre[33],oldljpre[33],oldfail[33],Float:starthj[33][3],Float:stophj[33][3], Float:endhj[33][3];
  56. new bool:landslide[33],strafecounter_oldbuttons[33],Float:Fulltime,Float:needslide[33],Float:groundslide[33];
  57. new jj,sync_[33],goodSyncTemp,badSyncTemp,strafe_lost_frame[33][NSTRAFES],Float:time_,Float:strafe_stat_time[33][NSTRAFES],Float:strafe_stat_speed[33][NSTRAFES][2];
  58. new strafe_stat_sync[33][NSTRAFES][2],strLen,strMess[40*NSTRAFES],strMessBuf[40*NSTRAFES],team[33];
  59.  
  60. new bool:g_pBot[33],strL,strM[40*NSTRAFES],strMBuf[40*NSTRAFES],Float:firstvel[33],Float:secvel[33],Float:firstorig[33][3],Float:secorig[33][3];
  61. new Float:speed[33], Float:TempSpeed[33],Float:statsduckspeed[33][500];
  62. new bool:slidim[33],Float:slidedist[33],edgefriction,mp_footsteps,sv_cheats,sv_airaccelerate,sv_maxspeed,sv_stepsize,sv_maxvelocity,sv_gravity;
  63.  
  64. new kz_min_dcj,kz_stats_x,kz_stats_y,Float:stats_x,Float:stats_y,taskslide[33],taskslide1[33],bool:failslide[33];
  65. new Float:failslidez[33],kz_strafe_x,kz_strafe_y,Float:strafe_x,Float:strafe_y,Float:laddist[33],kz_duck_x;
  66. new kz_duck_y,Float:duck_x,Float:duck_y,bool:bhopaem[33],bool:nextbhop[33],kz_stats_red,kz_stats_green, kz_stats_blue, kz_failstats_red,kz_failstats_green;
  67. new kz_failstats_blue, kz_sounds, kz_airaccelerate,kz_uq_url,kz_prefix,kz_legal_settings;
  68.  
  69. new kz_good_lj,kz_pro_lj,kz_holy_lj,kz_leet_lj,kz_god_lj,kz_good_bj,kz_pro_bj,kz_holy_bj,kz_leet_bj,kz_god_bj;
  70. new kz_good_cj,kz_pro_cj,kz_holy_cj,kz_leet_cj,kz_god_cj,kz_good_wj,kz_pro_wj,kz_holy_wj,kz_leet_wj,kz_god_wj;
  71. new kz_good_dbj,kz_pro_dbj, kz_holy_dbj,kz_leet_dbj, kz_god_dbj,kz_good_scj,kz_pro_scj, kz_holy_scj,kz_leet_scj, kz_god_scj;
  72. new kz_good_ladder,kz_pro_ladder,kz_holy_ladder, kz_leet_ladder,kz_god_ladder,kz_good_dcj,kz_pro_dcj,kz_holy_dcj,kz_leet_dcj,kz_god_dcj;
  73.  
  74. new kz_god_duckbhop,kz_holy_duckbhop,kz_pro_duckbhop,kz_good_duckbhop,kz_good_dropscj,kz_pro_dropscj,kz_holy_dropscj,kz_leet_dropscj,kz_god_dropscj;
  75. new kz_good_real,kz_pro_real,kz_holy_real,kz_leet_real,kz_god_real,kz_good_bhopinduck,kz_pro_bhopinduck,kz_holy_bhopinduck,kz_leet_bhopinduck,kz_god_bhopinduck;
  76. new kz_god_upbj,kz_leet_upbj,kz_good_upbj, kz_pro_upbj,kz_holy_upbj,kz_god_upsbj,kz_leet_upsbj,kz_good_upsbj, kz_pro_upsbj,kz_holy_upsbj;
  77. new kz_uq_dscj,kz_uq_mscj,kz_leet_duckbhop,kz_uq_dropscj,kz_uq_dropdscj,kz_uq_dropmscj,kz_uq_duckbhop,kz_uq_bhopinduck,kz_uq_realldbhop,kz_uq_multibhop,kz_uq_upbj,kz_uq_upbhopinduck,kz_uq_upsbj,kz_uq_dropdcj,kz_uq_dropmcj;
  78.  
  79. new user_block[33][2],Float:slidez[33][4][3],prefix[64];
  80.  
  81. new CjafterJump[33],bool:ddafterJump[33],bool:cjjump[33],bool:serf_reset[33],entlist[256],ent,nLadder,Float:ladderxyz[256][3],Float:ladderminxyz[256][3], Float:laddersize[256][3], nashladder,bool:ladderjump[33];
  82. new bool:kz_stats_pre[33], bool:kz_beam[33],bool:showpre[33],bool:showjofon[33],bool:speedon[33],bool:jofon[33];
  83.  
  84. new Float:dropbjorigin[33][3], Float:falloriginz[33],Float:origin[3],ducks[33], movetype[33];
  85. static Float:maxspeed[33], Float:prestrafe[33],JumpType:jump_type[33],JumpType:old_type_dropbj[33], frames[33], frames_gained_speed[33], bool:turning_left[33];
  86. static bool:turning_right[33],bool:started_cj_pre[33],bool:in_duck[33], bool:in_bhop[33],bool:in_air[33],bool:in_ladder[33];
  87. new bool:player_admin[33],bool:failearly[33],bool:firstshow[33],bool:first_onground[33],bool:notjump[33],bool:OnGround[33],bool:donehook[33];
  88.  
  89. new bool:streifstat[33],Jtype[33][33],Jtype1[33][33],Jtype_old_dropbj[33][33],Jtype_old_dropbj1[33][33],Float:weapSpeed[33],Float:weapSpeedOld[33];
  90. new airacel[33][33],bool:firstfr[33],kz_speed_x,kz_speed_y,hud_stats,hud_streif,hud_pre,hud_duck,hud_speed;
  91. new kz_uq_connect,kz_uq_light,bool:duckstring[33],kz_uq_top,kz_uq_maptop,bool:showduck[33],Float:surf[33];
  92. new bool:first_surf[33],oldjump_type[33],oldjump_typ1[33],jump_typeOld[33],mapname[33],Float:duckstartz[33],direct_for_strafe[33];
  93. new Float:height_difference[33],kz_uq_team,bool:jumpoffirst[33],bool:posibleScj[33];
  94. new kz_uq_noslow,kz_prest_x,kz_prest_y,kz_speed_r,kz_speed_g,kz_speed_b,kz_prest_r,kz_prest_g,kz_prest_b;
  95.  
  96. new weapon_top,bool:touch_somthing[33],record_start[33],allow_info;
  97. new showtime_st_stats[33];
  98.  
  99. new Float:jof[33],weapon_block_top;
  100.  
  101. new g_playername[33][64], g_playersteam[33][35], g_playerip[33][16], rankby,plugin_ver[33];
  102.  
  103. new ljsDir_block_weapon[8][64],uq_host,uq_user,uq_pass,uq_db,Handle:DB_TUPLE,Handle:SqlConnection,g_error[512],sql_Cvars_num[SQLCVARSNUM];
  104. new sql_JumpType[33];
  105. new Trie:JData,Trie:JData_Block,Float:oldjump_height[33],Float:jheight[33],bool:jheight_show[33];
  106.  
  107. new uq_lj,uq_cj,uq_dcj,uq_mcj,uq_ladder,uq_ldbj,uq_bj,uq_sbj,uq_drbj,uq_drsbj,uq_drcj; 
  108. new uq_wj,uq_dscj,uq_mscj,uq_dropscj,uq_dropdscj,uq_dropmscj,uq_duckbhop,uq_bhopinduck;
  109. new uq_realldbhop,uq_upbj,uq_upbhopinduck,uq_upsbj,uq_multibhop,uq_dropdcj,uq_dropmcj;
  110. new dcj_god_dist,dcj_leet_dist,dcj_holy_dist,dcj_pro_dist,dcj_good_dist;
  111. new lj_god_dist,lj_leet_dist,lj_holy_dist,lj_pro_dist,lj_good_dist;
  112. new ladder_god_dist,ladder_leet_dist,ladder_holy_dist,ladder_pro_dist,ladder_good_dist;
  113. new wj_god_dist,wj_leet_dist,wj_holy_dist,wj_pro_dist,wj_good_dist;
  114. new bj_god_dist,bj_leet_dist,bj_holy_dist,bj_pro_dist,bj_good_dist;
  115. new cj_god_dist,cj_leet_dist,cj_holy_dist,cj_pro_dist,cj_good_dist;
  116. new dbj_god_dist,dbj_leet_dist,dbj_holy_dist,dbj_pro_dist,dbj_good_dist;
  117. new scj_god_dist,scj_leet_dist,scj_holy_dist,scj_pro_dist,scj_good_dist;
  118. new dropscj_god_dist,dropscj_leet_dist,dropscj_holy_dist,dropscj_pro_dist,dropscj_good_dist;
  119. new bhopinduck_god_dist,bhopinduck_leet_dist,bhopinduck_holy_dist,bhopinduck_pro_dist,bhopinduck_good_dist;
  120. new upbj_god_dist,upbj_leet_dist,upbj_holy_dist,upbj_pro_dist,upbj_good_dist;
  121. new upsbj_god_dist,upsbj_leet_dist,upsbj_holy_dist,upsbj_pro_dist,upsbj_good_dist;
  122. new real_god_dist,real_leet_dist,real_holy_dist,real_pro_dist,real_good_dist;
  123. new duckbhop_god_dist,duckbhop_leet_dist,duckbhop_holy_dist,duckbhop_pro_dist,duckbhop_good_dist;
  124. new web_sql,max_distance,min_distance_other,min_distance,uq_airaccel,leg_settings,uq_sounds;
  125. new uq_maxedge,uq_minedge,uq_min_pre,speed_r,speed_g,speed_b,Float:speed_x,Float:speed_y,h_speed,kz_top,kz_extras,kz_weapon,kz_block_top;
  126. new uq_team,prest_r,prest_g,prest_b,Float:prest_x,Float:prest_y,h_prest,h_stats,h_duck,h_streif;               
  127. new uq_noslow,uq_light,uq_screen,uq_info,uq_fps,kz_map_top,kz_wpn_block_top,stats_r,stats_b,stats_g,f_stats_r,f_stats_b,f_stats_g;
  128. //new uq_sv_maxvelocity,uq_sv_stepsize,uq_sv_maxspeed,uq_edgefriction,uq_mp_footsteps,uq_sv_cheats,uq_sv_gravity,uq_sv_airaccelerate;
  129. new kz_uq_script_work,uq_script_work,uq_ban_minutes,kz_uq_ban_minutes,uq_bug,kz_uq_bug,uq_script_notify,kz_uq_script_notify,uq_admins,kz_uq_admins,kz_uq_script_detection,uq_script_detection,kz_uq_update_auth,uq_update_auth;
  130. new doubleduck_stat_sync[33][2],logs_path[128],uq_script_punishment,kz_uq_script_punishment,uq_ban_authid,uq_ban_type,kz_uq_ban_authid,kz_uq_ban_type;
  131. new kz_uq_block_chat_show,kz_uq_block_chat_min,uq_block_chat_show,uq_block_chat_min;
  132.  
  133.  
  134. new bool:speedtype[33],ddforcjafterbhop[33],ddforcjafterladder[33],ddstandcj[33];
  135. new bool:trigger_protection[33],kz_uq_speed_allteam,uq_speed_allteam;
  136.  
  137. new sql_Cvars[SQLCVARSNUM][] = { //cvars for db
  138.     "kz_uq_save_extras_top",
  139.     "kz_uq_top_by",
  140.     "kz_uq_sql",
  141.     "kz_uq_block_top"
  142. };
  143.  
  144. new Trie:JumpPlayers;
  145.  
  146. new const KZ_CVARSDIR[] = "config.cfg";
  147.  
  148. public plugin_init()
  149. {
  150.     register_plugin( "JumpStats", VERSION, "BorJomi" );
  151.    
  152.     register_dictionary("uq_jumpstats.txt");
  153.    
  154.     kz_good_lj            = register_cvar("kz_uq_good_lj",            "240");   // lj hj
  155.     kz_pro_lj            = register_cvar("kz_uq_pro_lj",             "245");
  156.     kz_holy_lj            = register_cvar("kz_uq_holy_lj",            "250");
  157.     kz_leet_lj           = register_cvar("kz_uq_leet_lj",            "253");
  158.     kz_god_lj           = register_cvar("kz_uq_god_lj",            "255");
  159.    
  160.     kz_good_cj            = register_cvar("kz_uq_good_cj",            "250");   // cj
  161.     kz_pro_cj            = register_cvar("kz_uq_pro_cj",             "255");
  162.     kz_holy_cj            = register_cvar("kz_uq_holy_cj",            "260");
  163.     kz_leet_cj           = register_cvar("kz_uq_leet_cj",            "265");
  164.     kz_god_cj           = register_cvar("kz_uq_god_cj",            "267");
  165.    
  166.     kz_good_dcj            = register_cvar("kz_uq_good_dcj",            "250"); // dcj mcj
  167.     kz_pro_dcj            = register_cvar("kz_uq_pro_dcj",             "255");
  168.     kz_holy_dcj            = register_cvar("kz_uq_holy_dcj",            "260");
  169.     kz_leet_dcj           = register_cvar("kz_uq_leet_dcj",            "265");
  170.     kz_god_dcj           = register_cvar("kz_uq_god_dcj",            "270");
  171.    
  172.     kz_good_ladder           = register_cvar("kz_uq_good_ladder",            "150");    // ladder
  173.     kz_pro_ladder           = register_cvar("kz_uq_pro_ladder",             "160");
  174.     kz_holy_ladder           = register_cvar("kz_uq_holy_ladder",            "170");
  175.     kz_leet_ladder           = register_cvar("kz_uq_leet_ladder",            "180");
  176.     kz_god_ladder          = register_cvar("kz_uq_god_ladder",            "190");
  177.    
  178.     kz_good_bj           = register_cvar("kz_uq_good_bj",            "230");    // bj sbj
  179.     kz_pro_bj           = register_cvar("kz_uq_pro_bj",             "235");
  180.     kz_holy_bj           = register_cvar("kz_uq_holy_bj",            "240");
  181.     kz_leet_bj           = register_cvar("kz_uq_leet_bj",            "245");
  182.     kz_god_bj          = register_cvar("kz_uq_god_bj",            "247");
  183.    
  184.     kz_good_wj          = register_cvar("kz_uq_good_wj",            "255"); // wj dropcj ladderbhop
  185.     kz_pro_wj           = register_cvar("kz_uq_pro_wj",             "260");
  186.     kz_holy_wj           = register_cvar("kz_uq_holy_wj",            "265");
  187.     kz_leet_wj           = register_cvar("kz_uq_leet_wj",            "270");
  188.     kz_god_wj          = register_cvar("kz_uq_god_wj",            "272");
  189.    
  190.     kz_good_dbj          = register_cvar("kz_uq_good_dbj",            "240");   //
  191.     kz_pro_dbj          = register_cvar("kz_uq_pro_dbj",             "250");
  192.     kz_holy_dbj          = register_cvar("kz_uq_holy_dbj",            "265");
  193.     kz_leet_dbj           = register_cvar("kz_uq_leet_dbj",            "270");
  194.     kz_god_dbj          = register_cvar("kz_uq_god_dbj",            "272");
  195.    
  196.     kz_good_scj          = register_cvar("kz_uq_good_scj",            "245");   //
  197.     kz_pro_scj          = register_cvar("kz_uq_pro_scj",             "250");
  198.     kz_holy_scj          = register_cvar("kz_uq_holy_scj",            "255");
  199.     kz_leet_scj           = register_cvar("kz_uq_leet_scj",            "260");
  200.     kz_god_scj          = register_cvar("kz_uq_god_scj",            "262");
  201.    
  202.     kz_good_dropscj          = register_cvar("kz_uq_good_dropscj",            "255");   //
  203.     kz_pro_dropscj          = register_cvar("kz_uq_pro_dropscj",             "260");
  204.     kz_holy_dropscj          = register_cvar("kz_uq_holy_dropscj",            "265");
  205.     kz_leet_dropscj           = register_cvar("kz_uq_leet_dropscj",            "270");
  206.     kz_god_dropscj          = register_cvar("kz_uq_god_dropscj",            "272");
  207.    
  208.     kz_good_duckbhop          = register_cvar("kz_uq_good_duckbhop",            "120"); //
  209.     kz_pro_duckbhop          = register_cvar("kz_uq_pro_duckbhop",             "130");
  210.     kz_holy_duckbhop          = register_cvar("kz_uq_holy_duckbhop",            "140");
  211.     kz_leet_duckbhop         = register_cvar("kz_uq_leet_duckbhop",            "150");
  212.     kz_god_duckbhop         = register_cvar("kz_uq_god_duckbhop",            "160");
  213.    
  214.     kz_good_bhopinduck         = register_cvar("kz_uq_good_bhopinduck",            "205")//
  215.     kz_pro_bhopinduck          = register_cvar("kz_uq_pro_bhopinduck",             "210");
  216.     kz_holy_bhopinduck          = register_cvar("kz_uq_holy_bhopinduck",            "215");
  217.     kz_leet_bhopinduck          = register_cvar("kz_uq_leet_bhopinduck",            "218");
  218.     kz_god_bhopinduck         = register_cvar("kz_uq_god_bhopinduck",            "220");
  219.    
  220.     kz_good_real         = register_cvar("kz_uq_good_realldbhop",            "240");    //
  221.     kz_pro_real          = register_cvar("kz_uq_pro_realldbhop",             "250");
  222.     kz_holy_real         = register_cvar("kz_uq_holy_realldbhop",            "265");
  223.     kz_leet_real         = register_cvar("kz_uq_leet_realldbhop",            "270");
  224.     kz_god_real         = register_cvar("kz_uq_god_realldbhop",            "272");
  225.    
  226.     kz_good_upbj         = register_cvar("kz_uq_good_upbj",            "225")//
  227.     kz_pro_upbj          = register_cvar("kz_uq_pro_upbj",             "230");
  228.     kz_holy_upbj          = register_cvar("kz_uq_holy_upbj",            "235");
  229.     kz_leet_upbj          = register_cvar("kz_uq_leet_upbj",            "240");
  230.     kz_god_upbj         = register_cvar("kz_uq_god_upbj",            "245");
  231.    
  232.     kz_good_upsbj         = register_cvar("kz_uq_good_upbj",            "230"); //
  233.     kz_pro_upsbj          = register_cvar("kz_uq_pro_upbj",             "235");
  234.     kz_holy_upsbj          = register_cvar("kz_uq_holy_upbj",            "240");
  235.     kz_leet_upsbj          = register_cvar("kz_uq_leet_upbj",            "244");
  236.     kz_god_upsbj         = register_cvar("kz_uq_god_upbj",            "246");
  237.    
  238.     kz_min_dcj          = register_cvar("kz_uq_min_dist",            "215");
  239.     MAX_DISTANCE         = register_cvar("kz_uq_max_dist",            "290");
  240.    
  241.     kz_stats_red        = register_cvar("kz_uq_stats_red",        "0");    
  242.     kz_stats_green      = register_cvar("kz_uq_stats_green",      "255");
  243.     kz_stats_blue       = register_cvar("kz_uq_stats_blue",       "159");
  244.     kz_failstats_red        = register_cvar("kz_uq_failstats_red",        "255");      
  245.     kz_failstats_green      = register_cvar("kz_uq_failstats_green",      "0");
  246.     kz_failstats_blue       = register_cvar("kz_uq_failstats_blue",       "109");
  247.    
  248.     kz_sounds        = register_cvar("kz_uq_sounds",           "1");
  249.     kz_top_rank_by        = register_cvar("kz_uq_top_by",        "1");      // How ranking will work? 0=name, 1=ip 2=steam
  250.     kz_legal_settings     = register_cvar("kz_uq_legal_settings",     "1");
  251.     kz_prefix          = register_cvar("kz_uq_prefix",       "unique-kz");
  252.     kz_airaccelerate     = register_cvar("kz_uq_airaccelerate",     "10");
  253.    
  254.     kz_stats_x        = register_cvar("kz_uq_stats_x",        "-1.0");     
  255.     kz_stats_y      = register_cvar("kz_uq_stats_y",      "0.70");
  256.     kz_strafe_x        = register_cvar("kz_uq_strafe_x",        "0.70");       
  257.     kz_strafe_y      = register_cvar("kz_uq_strafe_y",      "0.35");
  258.     kz_duck_x        = register_cvar("kz_uq_duck_x",        "0.6");    
  259.     kz_duck_y      = register_cvar("kz_uq_duck_y",      "0.78");
  260.     kz_speed_x        = register_cvar("kz_uq_speed_x",        "-1.0");     
  261.     kz_speed_y      = register_cvar("kz_uq_speed_y",      "0.83");
  262.     kz_prest_x        = register_cvar("kz_uq_prestrafe_x",        "-1.0");     
  263.     kz_prest_y      = register_cvar("kz_uq_prestrafe_y",      "0.65");
  264.    
  265.     kz_speed_r        = register_cvar("kz_uq_speed_red",        "255");    
  266.     kz_speed_g        = register_cvar("kz_uq_speed_green",      "255");
  267.     kz_speed_b          = register_cvar("kz_uq_speed_blue",        "255");     
  268.     kz_prest_r        = register_cvar("kz_uq_prestrafe_red",        "255");    
  269.     kz_prest_g      = register_cvar("kz_uq_prestrafe_green",      "255");
  270.     kz_prest_b        = register_cvar("kz_uq_prestrafe_blue",        "255");
  271.    
  272.     hud_stats       = register_cvar("kz_uq_hud_stats",        "3");    
  273.     hud_streif    = register_cvar("kz_uq_hud_strafe",      "4");
  274.     hud_pre      = register_cvar("kz_uq_hud_pre",        "1");     
  275.     hud_duck     = register_cvar("kz_uq_hud_duck",      "1");
  276.     hud_speed     = register_cvar("kz_uq_hud_speed",      "2");
  277.    
  278.     kz_uq_lj       = register_cvar("kz_uq_lj",        "1");
  279.     kz_uq_cj       = register_cvar("kz_uq_cj",        "1");
  280.     kz_uq_dcj       = register_cvar("kz_uq_dcj",        "1");  
  281.     kz_uq_mcj       = register_cvar("kz_uq_mcj",        "1");  
  282.     kz_uq_ladder       = register_cvar("kz_uq_ladder",        "1");
  283.     kz_uq_ldbj       = register_cvar("kz_uq_ldbj",        "1");
  284.     kz_uq_bj       = register_cvar("kz_uq_bj",        "1");
  285.     kz_uq_sbj       = register_cvar("kz_uq_sbj",        "1");  
  286.     kz_uq_drbj       = register_cvar("kz_uq_drbj",        "1");
  287.     kz_uq_drsbj       = register_cvar("kz_uq_scj",        "1");
  288.     kz_uq_drcj       = register_cvar("kz_uq_drcj",        "1");
  289.     kz_uq_wj       = register_cvar("kz_uq_wj",        "1");
  290.    
  291.     kz_uq_dscj       = register_cvar("kz_uq_dscj",        "1");
  292.     kz_uq_mscj       = register_cvar("kz_uq_mscj",        "1");
  293.     kz_uq_dropscj       = register_cvar("kz_uq_dropscj",        "1");
  294.     kz_uq_dropdscj       = register_cvar("kz_uq_dropdscj",        "1");
  295.     kz_uq_dropmscj       = register_cvar("kz_uq_dropmscj",        "1");
  296.     kz_uq_duckbhop       = register_cvar("kz_uq_duckbhop",        "1");
  297.     kz_uq_bhopinduck      = register_cvar("kz_uq_bhopinduck",        "1");
  298.     kz_uq_realldbhop       = register_cvar("kz_uq_realldbhop",        "1");
  299.     kz_uq_upbj      = register_cvar("kz_uq_upbj",        "1");
  300.     kz_uq_upbhopinduck      = register_cvar("kz_uq_upbhopinduck",        "1");
  301.     kz_uq_upsbj       = register_cvar("kz_uq_upsbj",        "1");
  302.     kz_uq_multibhop      = register_cvar("kz_uq_multibhop",        "1");
  303.     kz_uq_dropdcj      = register_cvar("kz_uq_dropdcj",        "1");
  304.     kz_uq_dropmcj     = register_cvar("kz_uq_dropmcj",        "1");
  305.    
  306.     kz_uq_light    = register_cvar("kz_uq_light",      "0");
  307.     kz_uq_connect = register_cvar("kz_uq_connect", "abdehklmn");
  308.     kz_uq_fps = register_cvar("kz_uq_fps", "1");   
  309.     kz_uq_top = register_cvar("kz_uq_save_top", "1");
  310.     kz_uq_maptop = register_cvar("kz_uq_maptop", "1");
  311.     kz_uq_team = register_cvar("kz_uq_team", "0");
  312.     kz_uq_istrafe = register_cvar("kz_uq_istrafes", "0");
  313.    
  314.     max_edge = register_cvar("kz_uq_max_block", "290");
  315.     min_edge = register_cvar("kz_uq_min_block", "100");
  316.     min_pre = register_cvar("kz_uq_min_pre", "60");
  317.     kz_uq_min_other = register_cvar("kz_uq_min_dist_other",            "120");
  318.     kz_uq_extras = register_cvar("kz_uq_save_extras_top", "1");
  319.     max_strafes = register_cvar("kz_uq_max_strafes", "14");
  320.     screenshoot = register_cvar("kz_uq_screenshoot", "0");
  321.    
  322.     sql_stats = register_cvar("kz_uq_sql", "0");
  323.     web_stats = register_cvar("kz_uq_web", "0");
  324.    
  325.     uq_host = register_cvar("kz_uq_host", "127.0.0.1");
  326.     uq_user = register_cvar("kz_uq_user", "root");
  327.     uq_pass = register_cvar("kz_uq_pass", "");
  328.     uq_db = register_cvar("kz_uq_db", "uq_jumpstats");
  329.        
  330.     allow_info = register_cvar("kz_uq_demo_info", "1");
  331.     weapon_top = register_cvar("kz_uq_weapons_top", "1");
  332.     weapon_block_top = register_cvar("kz_uq_block_weapons", "1");
  333.     kz_uq_url = register_cvar("kz_uq_url","http://localhost/uq_jumpstats/index.php?type=lj&from_game=true");
  334.     kz_uq_block_top = register_cvar("kz_uq_block_top", "1");
  335.    
  336.     kz_uq_bug=register_cvar("kz_uq_bug_check", "1");
  337.     kz_uq_noslow=register_cvar("kz_uq_noslowdown", "0");
  338.    
  339.     kz_uq_admins = register_cvar("kz_uq_only_admins", "0");
  340.     kz_uq_script_detection = register_cvar("kz_uq_script_detection", "1");
  341.     kz_uq_update_auth = register_cvar("kz_uq_update_auth", "1");
  342.     kz_uq_script_notify = register_cvar("kz_uq_script_notify", "1");
  343.     kz_uq_script_punishment = register_cvar("kz_uq_script_punishment", "0");
  344.     kz_uq_script_work = register_cvar("kz_uq_script_work", "2");
  345.    
  346.     kz_uq_ban_type = register_cvar("kz_uq_ban_type", "0");
  347.     kz_uq_ban_authid = register_cvar("kz_uq_ban_authid", "0");
  348.     kz_uq_ban_minutes = register_cvar("kz_uq_ban_minutes", "45");
  349.    
  350.     kz_uq_block_chat_show = register_cvar("kz_uq_block_chat_show", "1");
  351.     kz_uq_block_chat_min = register_cvar("kz_uq_block_chat_min", "1");
  352.    
  353.     kz_uq_speed_allteam = register_cvar("kz_uq_speed_allteam", "1");
  354.    
  355.     register_cvar( "uq_jumpstats", VERSION, FCVAR_SERVER|FCVAR_SPONLY);
  356.    
  357.     register_concmd("amx_reset_uqtops","reset_tops",ADMIN_CVAR ,"reset all tops");
  358.    
  359.     register_clcmd( "say /strafe""streif_stats" ,         ADMIN_ALL, "- enabled/disables");
  360.     register_clcmd( "say /strafes", "streif_stats" ,         ADMIN_ALL, "- enabled/disables");
  361.     register_clcmd( "say /strafestat""streif_stats" ,         ADMIN_ALL, "- enabled/disables");
  362.     register_clcmd( "say /strafestats", "streif_stats" ,         ADMIN_ALL, "- enabled/disables");
  363.     register_clcmd( "say /showpre", "show_pre" ,         ADMIN_ALL, "- enabled/disables");
  364.     register_clcmd( "say /duck",    "pre_stats" ,         ADMIN_ALL, "- enabled/disables");
  365.     register_clcmd( "say /ducks",   "pre_stats" ,         ADMIN_ALL, "- enabled/disables");
  366.     register_clcmd( "say /uqstats",     "cmdljStats",         ADMIN_ALL, "- enabled/disables" );
  367.     register_clcmd( "say /ljstats",     "cmdljStats",         ADMIN_ALL, "- enabled/disables" );
  368.     register_clcmd( "say /stats",       "cmdljStats",         ADMIN_ALL, "- enabled/disables" );
  369.     register_clcmd( "say /heigh",       "heightshow",         ADMIN_ALL, "- enabled/disables" );
  370.     register_clcmd( "say /fall",        "heightshow",         ADMIN_ALL, "- enabled/disables" );
  371.    
  372.     register_clcmd( "say /uqversion",   "cmdVersion",         ADMIN_ALL);
  373.     register_clcmd( "say uqversion",    "cmdVersion",         ADMIN_ALL);
  374.     register_clcmd("say /uqbeam",     "cmdljbeam",         ADMIN_ALL);
  375.     register_clcmd("say /beam",     "cmdljbeam",         ADMIN_ALL);
  376.     register_clcmd("say /ljbeam",     "cmdljbeam",         ADMIN_ALL);
  377.     register_clcmd("say /speed",     "show_speed",         ADMIN_ALL);
  378.     register_clcmd("say speed",     "show_speed",         ADMIN_ALL);
  379.     register_clcmd("say /colorchat",     "cmdColorChat",         ADMIN_ALL);
  380.     register_clcmd("say colorchat",     "cmdColorChat",         ADMIN_ALL);
  381.     register_clcmd("say /bhopwarn",     "show_early",         ADMIN_ALL);
  382.     register_clcmd("say /multibhop",     "multi_bhop",         ADMIN_ALL);
  383.     register_clcmd("say /duckspre",     "duck_show",         ADMIN_ALL);
  384.     register_clcmd("say /duckpre",     "duck_show",         ADMIN_ALL);
  385.     register_clcmd("say /ljpre",     "lj_show",         ADMIN_ALL);
  386.     register_clcmd("say /prelj",     "lj_show",         ADMIN_ALL);
  387.     register_clcmd("say /uqsound",     "enable_sounds",         ADMIN_ALL);
  388.     register_clcmd("say /uqsounds",     "enable_sounds",         ADMIN_ALL);
  389.    
  390.     register_clcmd("say /failedge",     "ShowedgeFail",         ADMIN_ALL);
  391.     register_clcmd("say /failedg",     "ShowedgeFail",         ADMIN_ALL);
  392.     register_clcmd("say /edgefail",     "ShowedgeFail",         ADMIN_ALL);
  393.     register_clcmd("say /edgfail",     "ShowedgeFail",         ADMIN_ALL);
  394.     register_clcmd("say /edge",     "Showedge",         ADMIN_ALL);
  395.     register_clcmd("say /edg",     "Showedge",         ADMIN_ALL);
  396.    
  397.     register_clcmd("say /joftrainer",     "trainer_jof",         ADMIN_ALL);
  398.     register_clcmd("say joftrainer",     "trainer_jof",         ADMIN_ALL);
  399.     register_clcmd("say /joftr",     "trainer_jof",         ADMIN_ALL);
  400.     register_clcmd("say joftr",     "trainer_jof",         ADMIN_ALL);
  401.    
  402.     register_clcmd("say /speedt",     "speed_type",         ADMIN_ALL);
  403.     register_clcmd("say speedt",     "speed_type",         ADMIN_ALL);
  404.    
  405.     register_clcmd("say /jof",     "show_jof",         ADMIN_ALL);
  406.     register_clcmd("say jof",     "show_jof",         ADMIN_ALL);
  407.    
  408.     register_clcmd("say /jheigh",     "show_jheight",         ADMIN_ALL);
  409.     register_clcmd("say jheigh",     "show_jheight",         ADMIN_ALL);
  410.    
  411.     register_clcmd("say /istrafe",     "ingame_st_stats",         ADMIN_ALL);
  412.     register_clcmd("say istrafe",     "ingame_st_stats",         ADMIN_ALL);
  413.    
  414.     register_clcmd("say /options",     "Option",         ADMIN_ALL);
  415.     register_clcmd("say /ljsmenu",     "Option",         ADMIN_ALL);
  416.     register_clcmd("say /ljsmenu2",     "Option2",         ADMIN_ALL);
  417.     register_clcmd("say /uqmenu",     "Option",         ADMIN_ALL);
  418.     register_clcmd("say /option",     "Option",         ADMIN_ALL);
  419.  
  420.     register_menucmd(register_menuid("StatsOptionMenu1"),          1023, "OptionMenu1");
  421.     register_menucmd(register_menuid("StatsOptionMenu2"),          1023, "OptionMenu2");
  422.     register_menucmd(register_menuid("StatsOptionMenu3"),          1023, "OptionMenu3");
  423.    
  424.     edgefriction          = get_cvar_pointer("edgefriction");
  425.     mp_footsteps          = get_cvar_pointer("mp_footsteps");
  426.     sv_cheats             = get_cvar_pointer("sv_cheats");
  427.     sv_gravity            = get_cvar_pointer("sv_gravity");
  428.     sv_airaccelerate      = get_cvar_pointer("sv_airaccelerate");
  429.     sv_maxspeed           = get_cvar_pointer("sv_maxspeed");
  430.     sv_stepsize           = get_cvar_pointer("sv_stepsize");
  431.     sv_maxvelocity        = get_cvar_pointer("sv_maxvelocity");
  432.    
  433.    
  434.     register_forward(FM_Touch,           "fwdTouch",           1);
  435.     register_forward( FM_PlayerPreThink,    "fwdPreThink"0 );
  436.     register_forward( FM_PlayerPostThink,   "fwdPostThink", 0 );
  437.    
  438.     RegisterHam(Ham_Spawn, "player", "FwdPlayerSpawn", 1);
  439.     RegisterHam(Ham_Killed, "player", "FwdPlayerDeath", 1);
  440.     RegisterHam(Ham_Touch, "player",    "HamTouch");
  441.    
  442.     register_event("ResetHUD","ResetHUD","b");
  443.    
  444.    
  445.    
  446.     max_players=get_maxplayers()+1;
  447.    
  448.     ent=find_ent_by_class(-1,"func_ladder");
  449.     while( ent > 0 )
  450.     {
  451.         entity_get_vector ( ent, EV_VEC_maxs, ladderxyz[nLadder] );
  452.         entity_get_vector ( ent, EV_VEC_mins, ladderminxyz[nLadder] );
  453.         entity_get_vector ( ent, EV_VEC_size, laddersize[nLadder] );
  454.         entlist[nLadder]=ent;
  455.        
  456.         ent = find_ent_by_class(ent,"func_ladder");
  457.         nLadder++;
  458.     }
  459.    
  460.     get_mapname(mapname, 32);
  461.    
  462.     // Logs
  463.     new logs[64];
  464.     get_localinfo("amxx_logs", logs, 63);
  465.     formatex(logs_path, 127, "%s\uq_jumpstats.txt", logs);
  466.    
  467.    
  468. }
  469.  
  470. public plugin_natives()
  471. {
  472.     register_native("kz_get_configsdir", "native_kz_get_configsdir", 1);
  473.    
  474. }
  475. public plugin_cfg()
  476. {
  477.     new cvarfiles[100], uqpath[64];
  478.     kz_get_configsdir(uqpath, 63);
  479.     formatex(cvarfiles, 99, "%s/%s", uqpath, KZ_CVARSDIR);
  480.    
  481.     if( file_exists(cvarfiles) )
  482.     {
  483.         server_cmd("exec %s", cvarfiles);
  484.         server_exec();
  485.     }
  486.    
  487.     uq_min_pre=get_pcvar_num(min_pre);
  488.     uq_maxedge=get_pcvar_num(max_edge);
  489.     uq_minedge=get_pcvar_num(min_edge);
  490.     kz_sql=get_pcvar_num(sql_stats);
  491.     web_sql=get_pcvar_num(web_stats);
  492.     rankby = get_pcvar_num(kz_top_rank_by);
  493.     uq_team=get_pcvar_num(kz_uq_team);
  494.     uq_istrafe=get_pcvar_num(kz_uq_istrafe);
  495.     NSTRAFES1=get_pcvar_num(max_strafes);
  496.     stats_x=get_pcvar_float(kz_stats_x);
  497.     stats_y=get_pcvar_float(kz_stats_y);
  498.     strafe_x=get_pcvar_float(kz_strafe_x);
  499.     strafe_y=get_pcvar_float(kz_strafe_y);
  500.     duck_x=get_pcvar_float(kz_duck_x);
  501.     duck_y=get_pcvar_float(kz_duck_y);
  502.     prest_r=get_pcvar_num(kz_prest_r);
  503.     prest_g=get_pcvar_num(kz_prest_g);
  504.     prest_b=get_pcvar_num(kz_prest_b);
  505.     prest_x=get_pcvar_float(kz_prest_x);
  506.     prest_y=get_pcvar_float(kz_prest_y);
  507.     h_prest=get_pcvar_num(hud_pre);
  508.     h_stats=get_pcvar_num(hud_stats);
  509.     h_duck=get_pcvar_num(hud_duck);
  510.     h_streif=get_pcvar_num(hud_streif);
  511.     stats_r=get_pcvar_num(kz_stats_red);
  512.     stats_b=get_pcvar_num(kz_stats_blue);
  513.     stats_g=get_pcvar_num(kz_stats_green);
  514.     f_stats_r=get_pcvar_num(kz_failstats_red);
  515.     f_stats_b=get_pcvar_num(kz_failstats_blue);
  516.     f_stats_g=get_pcvar_num(kz_failstats_green);
  517.     uq_lj=get_pcvar_num(kz_uq_lj)
  518.     uq_cj=get_pcvar_num(kz_uq_cj)
  519.     uq_dcj=get_pcvar_num(kz_uq_dcj);   
  520.     uq_mcj=get_pcvar_num(kz_uq_mcj);   
  521.     uq_ladder=get_pcvar_num(kz_uq_ladder)
  522.     uq_ldbj=get_pcvar_num(kz_uq_ldbj)
  523.     uq_bj=get_pcvar_num(kz_uq_bj)
  524.     uq_sbj=get_pcvar_num(kz_uq_sbj);   
  525.     uq_drbj=get_pcvar_num(kz_uq_drbj)
  526.     uq_drsbj=get_pcvar_num(kz_uq_drsbj);   
  527.     uq_drcj=get_pcvar_num(kz_uq_drcj)
  528.     uq_wj=get_pcvar_num(kz_uq_wj);
  529.     uq_dscj=get_pcvar_num(kz_uq_dscj)
  530.     uq_mscj=get_pcvar_num(kz_uq_mscj);
  531.     uq_dropscj=get_pcvar_num(kz_uq_dropscj);
  532.     uq_dropdscj=get_pcvar_num(kz_uq_dropdscj);
  533.     uq_dropmscj=get_pcvar_num(kz_uq_dropmscj);
  534.     uq_duckbhop=get_pcvar_num(kz_uq_duckbhop);
  535.     uq_bhopinduck=get_pcvar_num(kz_uq_bhopinduck);
  536.     uq_realldbhop=get_pcvar_num(kz_uq_realldbhop);
  537.     uq_upbj=get_pcvar_num(kz_uq_upbj);
  538.     uq_upbhopinduck=get_pcvar_num(kz_uq_upbhopinduck);
  539.     uq_upsbj=get_pcvar_num(kz_uq_upsbj);
  540.     uq_multibhop=get_pcvar_num(kz_uq_multibhop);
  541.     uq_dropdcj=get_pcvar_num(kz_uq_dropdcj);
  542.     uq_dropmcj=get_pcvar_num(kz_uq_dropmcj);
  543.     dcj_god_dist=get_pcvar_num(kz_god_dcj);
  544.     dcj_leet_dist=get_pcvar_num(kz_leet_dcj);
  545.     dcj_holy_dist=get_pcvar_num(kz_holy_dcj);
  546.     dcj_pro_dist=get_pcvar_num(kz_pro_dcj);
  547.     dcj_good_dist=get_pcvar_num(kz_good_dcj);
  548.     lj_god_dist=get_pcvar_num(kz_god_lj);
  549.     lj_leet_dist=get_pcvar_num(kz_leet_lj);
  550.     lj_holy_dist=get_pcvar_num(kz_holy_lj);
  551.     lj_pro_dist=get_pcvar_num(kz_pro_lj);
  552.     lj_good_dist=get_pcvar_num(kz_good_lj);
  553.     ladder_god_dist=get_pcvar_num(kz_god_ladder);
  554.     ladder_leet_dist=get_pcvar_num(kz_leet_ladder);
  555.     ladder_holy_dist=get_pcvar_num(kz_holy_ladder);
  556.     ladder_pro_dist=get_pcvar_num(kz_pro_ladder);
  557.     ladder_good_dist=get_pcvar_num(kz_good_ladder);
  558.     wj_god_dist=get_pcvar_num(kz_god_wj);
  559.     wj_leet_dist=get_pcvar_num(kz_leet_wj);
  560.     wj_holy_dist=get_pcvar_num(kz_holy_wj);
  561.     wj_pro_dist=get_pcvar_num(kz_pro_wj);
  562.     wj_good_dist=get_pcvar_num(kz_good_wj);
  563.     bj_god_dist=get_pcvar_num(kz_god_bj);
  564.     bj_leet_dist=get_pcvar_num(kz_leet_bj);
  565.     bj_holy_dist=get_pcvar_num(kz_holy_bj);
  566.     bj_pro_dist=get_pcvar_num(kz_pro_bj);
  567.     bj_good_dist=get_pcvar_num(kz_good_bj);
  568.     cj_god_dist=get_pcvar_num(kz_god_cj);
  569.     cj_leet_dist=get_pcvar_num(kz_leet_cj);
  570.     cj_holy_dist=get_pcvar_num(kz_holy_cj);
  571.     cj_pro_dist=get_pcvar_num(kz_pro_cj);
  572.     cj_good_dist=get_pcvar_num(kz_good_cj);
  573.     dbj_god_dist=get_pcvar_num(kz_god_dbj);
  574.     dbj_leet_dist=get_pcvar_num(kz_leet_dbj);
  575.     dbj_holy_dist=get_pcvar_num(kz_holy_dbj);
  576.     dbj_pro_dist=get_pcvar_num(kz_pro_dbj);
  577.     dbj_good_dist=get_pcvar_num(kz_good_dbj);  
  578.     scj_god_dist=get_pcvar_num(kz_god_scj);
  579.     scj_leet_dist=get_pcvar_num(kz_leet_scj);
  580.     scj_holy_dist=get_pcvar_num(kz_holy_scj);
  581.     scj_pro_dist=get_pcvar_num(kz_pro_scj);
  582.     scj_good_dist=get_pcvar_num(kz_good_scj);      
  583.     dropscj_god_dist=get_pcvar_num(kz_god_dropscj);
  584.     dropscj_leet_dist=get_pcvar_num(kz_leet_dropscj);
  585.     dropscj_holy_dist=get_pcvar_num(kz_holy_dropscj);
  586.     dropscj_pro_dist=get_pcvar_num(kz_pro_dropscj);
  587.     dropscj_good_dist=get_pcvar_num(kz_good_dropscj);
  588.     bhopinduck_god_dist=get_pcvar_num(kz_god_bhopinduck);
  589.     bhopinduck_leet_dist=get_pcvar_num(kz_leet_bhopinduck);
  590.     bhopinduck_holy_dist=get_pcvar_num(kz_holy_bhopinduck);
  591.     bhopinduck_pro_dist=get_pcvar_num(kz_pro_bhopinduck);
  592.     bhopinduck_good_dist=get_pcvar_num(kz_good_bhopinduck);
  593.     upbj_god_dist=get_pcvar_num(kz_god_upbj);
  594.     upbj_leet_dist=get_pcvar_num(kz_leet_upbj);
  595.     upbj_holy_dist=get_pcvar_num(kz_holy_upbj);
  596.     upbj_pro_dist=get_pcvar_num(kz_pro_upbj);
  597.     upbj_good_dist=get_pcvar_num(kz_good_upbj);
  598.     upsbj_god_dist=get_pcvar_num(kz_god_upsbj);
  599.     upsbj_leet_dist=get_pcvar_num(kz_leet_upsbj);
  600.     upsbj_holy_dist=get_pcvar_num(kz_holy_upsbj);
  601.     upsbj_pro_dist=get_pcvar_num(kz_pro_upsbj);
  602.     upsbj_good_dist=get_pcvar_num(kz_good_upsbj);
  603.     real_god_dist=get_pcvar_num(kz_god_real);
  604.     real_leet_dist=get_pcvar_num(kz_leet_real);
  605.     real_holy_dist=get_pcvar_num(kz_holy_real);
  606.     real_pro_dist=get_pcvar_num(kz_pro_real);
  607.     real_good_dist=get_pcvar_num(kz_good_real);
  608.     duckbhop_god_dist=get_pcvar_num(kz_god_duckbhop);
  609.     duckbhop_leet_dist=get_pcvar_num(kz_leet_duckbhop);
  610.     duckbhop_holy_dist=get_pcvar_num(kz_holy_duckbhop);
  611.     duckbhop_pro_dist=get_pcvar_num(kz_pro_duckbhop);
  612.     duckbhop_good_dist=get_pcvar_num(kz_good_duckbhop);
  613.     leg_settings=get_pcvar_num(kz_legal_settings)
  614.     uq_airaccel=get_pcvar_num( kz_airaccelerate );
  615.     min_distance=get_pcvar_num(kz_min_dcj);
  616.     min_distance_other=get_pcvar_num(kz_uq_min_other);
  617.     max_distance=get_pcvar_num(MAX_DISTANCE);
  618.     uq_sounds=get_pcvar_num(kz_sounds);
  619.     uq_light=get_pcvar_num( kz_uq_light);
  620.     uq_screen=get_pcvar_num(screenshoot);
  621.     uq_info=get_pcvar_num(allow_info);
  622.     uq_fps=get_pcvar_num(kz_uq_fps);
  623.     speed_r=get_pcvar_num(kz_speed_r);
  624.     speed_g=get_pcvar_num(kz_speed_g);
  625.     speed_b=get_pcvar_num(kz_speed_b);
  626.     speed_x=get_pcvar_float(kz_speed_x);
  627.     speed_y=get_pcvar_float(kz_speed_y);
  628.     h_speed=get_pcvar_num(hud_speed);
  629.     kz_top=get_pcvar_num(kz_uq_top);
  630.     kz_extras=get_pcvar_num(kz_uq_extras);
  631.     kz_weapon=get_pcvar_num(weapon_top);
  632.     kz_block_top=get_pcvar_num(kz_uq_block_top);
  633.     kz_map_top=get_pcvar_num(kz_uq_maptop);
  634.     kz_wpn_block_top=get_pcvar_num(weapon_block_top);
  635.     get_pcvar_string(kz_prefix, prefix, 63);
  636.     uq_bug=get_pcvar_num(kz_uq_bug);
  637.     uq_noslow=get_pcvar_num(kz_uq_noslow);
  638.     uq_admins=get_pcvar_num(kz_uq_admins);
  639.     uq_script_detection=get_pcvar_num(kz_uq_script_detection);
  640.     uq_update_auth=get_pcvar_num(kz_uq_update_auth);
  641.     uq_script_notify=get_pcvar_num(kz_uq_script_notify);
  642.     uq_script_punishment=get_pcvar_num(kz_uq_script_punishment);
  643.     uq_script_work=get_pcvar_num(kz_uq_script_work);
  644.     uq_ban_authid=get_pcvar_num(kz_uq_ban_authid);
  645.     uq_ban_type=get_pcvar_num(kz_uq_ban_type);
  646.     uq_ban_minutes=get_pcvar_num(kz_uq_ban_minutes);
  647.     uq_block_chat_min=get_pcvar_num(kz_uq_block_chat_min);
  648.     uq_block_chat_show=get_pcvar_num(kz_uq_block_chat_show);
  649.     uq_speed_allteam=get_pcvar_num(kz_uq_speed_allteam);
  650.     //uq_edgefriction=get_pcvar_num(edgefriction);
  651.     //uq_mp_footsteps=get_pcvar_num(mp_footsteps);
  652.     //uq_sv_cheats=get_pcvar_num(sv_cheats);
  653.     //uq_sv_gravity=get_pcvar_num(sv_gravity);
  654.     //uq_sv_airaccelerate=get_pcvar_num(sv_airaccelerate);
  655.     //uq_sv_maxspeed=get_pcvar_num(sv_maxspeed);
  656.     //uq_sv_stepsize=get_pcvar_num(sv_stepsize);
  657.     //uq_sv_maxvelocity=get_pcvar_num(sv_maxvelocity);
  658.    
  659.     if(!file_exists(cvarfiles))
  660.     {
  661.         kz_make_cvarexec(cvarfiles);
  662.     }
  663.    
  664.     new plugin_id=find_plugin_byfile("uq_jumpstats_tops.amxx");
  665.     new filename[33],plugin_name[33],plugin_author[33],status[33];
  666.    
  667.     if(plugin_id==-1)
  668.     {
  669.         log_amx("Can't find uq_jumpstats_tops.amxx");
  670.         server_print("[uq_jumpstats] Can't find uq_jumpstats_tops.amxx");
  671.     }
  672.     else
  673.     {
  674.         get_plugin(plugin_id,filename,32,plugin_name,32,plugin_ver,32,plugin_author,32,status,32);
  675.        
  676.         if(!equali(plugin_ver,VERSION))
  677.         {
  678.             set_task(5.0,"Wrong_ver");
  679.         }
  680.     }
  681.  
  682.     if( leg_settings )
  683.     {
  684.         set_cvar_string("edgefriction", "2");
  685.         set_cvar_string("mp_footsteps", "1");
  686.         set_cvar_string("sv_cheats", "0");
  687.         set_cvar_string("sv_gravity", "800");
  688.        
  689.         if(uq_airaccel==0 || uq_airaccel==10)
  690.             set_cvar_string("sv_airaccelerate", "10");
  691.         else if(uq_airaccel==1 || uq_airaccel==100)
  692.             set_cvar_string("sv_airaccelerate", "100");
  693.         else
  694.         {
  695.             new str[10];
  696.             num_to_str(uq_airaccel,str,9);
  697.             set_cvar_string("sv_airaccelerate", str);
  698.         }
  699.        
  700.         set_cvar_string("sv_maxspeed", "320");
  701.         set_cvar_string("sv_stepsize", "18");
  702.         set_cvar_string("sv_maxvelocity", "2000");
  703.     }
  704.  
  705.     new dataDir[64];
  706.     get_datadir(dataDir, 63);
  707.     format(ljsDir, 63, "%s/Topljs", dataDir);
  708.        
  709.     if( !dir_exists(ljsDir) )
  710.         mkdir(ljsDir);
  711.            
  712.     if(kz_sql==1)
  713.     {
  714.         set_task(0.2, "stats_sql");
  715.         set_task(1.0, "save_info_sql");
  716.         JumpPlayers = TrieCreate();
  717.     }
  718.     else if(kz_sql==0)
  719.     {
  720.         JData = TrieCreate();
  721.         JData_Block = TrieCreate();
  722.        
  723.         format(ljsDir_block, 63, "%s/Topljs/block_tops", dataDir);
  724.            
  725.         if( !dir_exists(ljsDir_block) )
  726.             mkdir(ljsDir_block);
  727.            
  728.         for(new i=0;i<NTECHNUM;i++)
  729.         {
  730.             read_tops(Type_List[i],i);
  731.             read_tops_block(Type_List[i],i);
  732.         }
  733.            
  734.         for(new j=0;j<8;j++)
  735.         {
  736.             new mxspd[11];
  737.             num_to_str(weapon_maxspeed(j),mxspd,10);
  738.            
  739.             format(ljsDir_weapon[j], 63, "%s/Top_weapon_speed_%s", ljsDir,mxspd);
  740.             format(ljsDir_block_weapon[j], 63, "%s/Top_weapon_speed_%s", ljsDir_block,mxspd);
  741.            
  742.             if( !dir_exists(ljsDir_weapon[j]) )
  743.                 mkdir(ljsDir_weapon[j]);
  744.             if( !dir_exists(ljsDir_block_weapon[j]) )
  745.                 mkdir(ljsDir_block_weapon[j]);
  746.                
  747.             for(new i=0;i<NWPNTECHNUM;i++)
  748.             {
  749.                 read_tops_weapon(Type_List_weapon[i],i,j);
  750.                 read_tops_block_weapon(Type_List_weapon[i],i,j);
  751.             }
  752.             read_tops_block_weapon("hj",9,j);  
  753.         }
  754.     }  
  755. }
  756. public Wrong_ver()
  757. {
  758.     for(new i=1;i<get_maxplayers();i++)
  759.     {
  760.         if(is_user_alive(i) && is_user_connected(i))
  761.             ColorChat(i, BLUE, "^x04Version^x03 uq_jumpstats.amxx^x01(%s)^x04 different from^x03 uq_jumpstats_tops.amxx^x01(%s)",VERSION,plugin_ver);
  762.     }
  763.     set_task(5.0,"Wrong_ver");
  764. }
  765.  
  766. #include <uq_jumpstats_sql.inc>
  767.  
  768. public plugin_precache()
  769. {
  770.     gBeam = precache_model( "sprites/zbeam6.spr" );
  771.     precache_sound( "misc/impressive.wav" );
  772.     precache_sound( "misc/perfect.wav" );
  773.     precache_sound( "misc/mod_godlike.wav" );
  774.     precache_sound( "misc/holyshit.wav" );
  775.     precache_sound( "misc/mod_wickedsick.wav" );
  776.    
  777.    
  778.     precache_model( "models/hairt.mdl" );
  779.     heystats = precache_model( "sprites/zbeam6.spr" );
  780. }
  781.  
  782. stock kz_make_cvarexec(const config[])
  783. {
  784.     new f = fopen(config, "wt");
  785.     new stringscvars[256],s_host[101],s_pass[101],s_user[101],s_db[101];
  786.     new s_x[10],s_y[10];
  787.    
  788.     fprintf(f, "// Config of JumpStats For Global Knife Gaming^n");
  789.     fprintf(f, "// Version %s^n",VERSION);
  790.     fprintf(f, "^n");
  791.    
  792.     fprintf(f, "// Players commands^n");
  793.     fprintf(f, "^n");
  794.     fprintf(f, "// say /strafes - on/off statistics Strafes^n");
  795.     fprintf(f, "// say /showpre - on/off display prestrafe^n");
  796.     fprintf(f, "// say /ducks - on/off statistics ducks for multi cj^n");
  797.     fprintf(f, "// say /ljstats - on/off the main statistics^n");
  798.     fprintf(f, "// say /uqversion - show version^n");
  799.     fprintf(f, "// say /beam - on/off showing the trajectory of the jump^n");
  800.     fprintf(f, "// say /speed - on/off display of speed player^n");
  801.     fprintf(f, "// say /colorchat - on/off display of color in the chat messages from other players^n");
  802.     fprintf(f, "// say /ljsmenu - open the configuration menu^n");
  803.     fprintf(f, "// say /ljtop - open TOP10 menu^n");
  804.     fprintf(f, "// say /bhopwarn - on/off show message when you bhop prestrafe is fail^n");
  805.     fprintf(f, "// say /multibhop - on/off show multi bhop pre^n");
  806.     fprintf(f, "// say /duckspre - on/off display prestrafe after each duck^n");
  807.     fprintf(f, "// say /ljpre - on/off display prestrafe for LJ^n");
  808.     fprintf(f, "// say /failedge - on/off display jumpoff wehn failed without bolock^n");
  809.     fprintf(f, "// say /edge - on/off display jumpoff,block,landing^n");
  810.     fprintf(f, "// say /heigh - on/off display heigh^n");
  811.     fprintf(f, "// say /mylj - on/off myljtop menu^n");
  812.     fprintf(f, "// say /wpnlj - on/off weapon top menu^n");
  813.     fprintf(f, "// say /jof - on/off showing Jumpoff when press jump button^n");
  814.     fprintf(f, "// say /joftr - on/off Jumpoff trainer^n");
  815.     fprintf(f, "// say /blocktop - on/off block tops menu^n");
  816.     fprintf(f, "// say /jheigh - on/off showing jump heigh^n");
  817.     fprintf(f, "// say /istrafe - on/off InGame strafe stats^n");
  818.     fprintf(f, "// say /speedt - Big/Small Speed Type^n");
  819.     fprintf(f, "^n");
  820.    
  821.     fprintf(f, "// Admin command^n");
  822.     fprintf(f, "^n");
  823.     fprintf(f, "// amx_reset_uqtops – reset all tops^n");
  824.     fprintf(f, "^n");
  825.    
  826.     fprintf(f, "// Cvars^n");
  827.     fprintf(f, "^n");
  828.     fprintf(f, "// What should work when players connect to the server:^n");
  829.     fprintf(f, "//  0 = none^n");
  830.     fprintf(f, "//  a = colorchat^n");
  831.     fprintf(f, "//  b = stats^n");
  832.     fprintf(f, "//  c = speed^n");
  833.     fprintf(f, "//  d = showpre^n");
  834.     fprintf(f, "//  e = strafe stats^n");
  835.     fprintf(f, "//  f = beam^n");
  836.     fprintf(f, "//  g = duck stats for mcj^n");
  837.     fprintf(f, "//  h = shows message when your bhop prestrafe is failed^n");
  838.     fprintf(f, "//  i = show multibhop pre^n");
  839.     fprintf(f, "//  j = show prestrafe after duck^n");
  840.     fprintf(f, "//  k = show lj prestrafe^n");
  841.     fprintf(f, "//  l = show edge^n");
  842.     fprintf(f, "//  m = show edge when fail (without block)^n");
  843.     fprintf(f, "//  n = enable sounds^n");
  844.     fprintf(f, "//  o = enable InGame strafe stats^n");
  845.    
  846.     get_pcvar_string(kz_uq_connect, stringscvars, 255);
  847.    
  848.     fprintf(f, "kz_uq_connect ^"%s^"^n", stringscvars);
  849.     fprintf(f, "^n");
  850.    
  851.     fprintf(f, "// Min distance^n");
  852.     fprintf(f, "kz_uq_min_dist %i^n", min_distance);
  853.     fprintf(f, "^n");
  854.    
  855.     fprintf(f, "// Min distance (Ups bhop, MultiBhop, Real Ladder Bhop, Ducks Bhop, Ladder Jump)^n");
  856.     fprintf(f, "kz_uq_min_dist_other %i^n", min_distance_other);
  857.     fprintf(f, "^n");
  858.    
  859.     fprintf(f, "// Max distance^n");
  860.     fprintf(f, "kz_uq_max_dist %i^n", max_distance);
  861.     fprintf(f, "^n");
  862.    
  863.     fprintf(f, "// Showing info about block in ColorChat messages^n");
  864.     fprintf(f, "kz_uq_block_chat_show %i^n", uq_block_chat_show);
  865.     fprintf(f, "kz_uq_block_chat_min %i - minimum block to show (block more then 0=good,1=pro,2=holy,3=leet,4=god distance cvars)^n", uq_block_chat_min);
  866.     fprintf(f, "^n");
  867.    
  868.     fprintf(f, "// Enable stats for admins only^n");
  869.     fprintf(f, "kz_uq_only_admins %i^n", uq_admins);
  870.     fprintf(f, "^n");
  871.    
  872.     fprintf(f, "// Enable stats for team (0=all,1=T,2=CT)^n");
  873.     fprintf(f, "kz_uq_team %i^n", uq_team);
  874.     fprintf(f, "^n");
  875.    
  876.     fprintf(f, "// Enable cmd /speed for all team^n");
  877.     fprintf(f, "kz_uq_speed_allteam %i^n", uq_speed_allteam);
  878.     fprintf(f, "^n");
  879.    
  880.     fprintf(f, "// Allow highlighting after landing (1 = on, 0 = off; works for holy, leet and god distances)^n");
  881.     fprintf(f, "kz_uq_light %i^n", uq_light);
  882.     fprintf(f, "^n");
  883.    
  884.     fprintf(f, "// Allow sounds (1 = on, 0 = off)^n");
  885.     fprintf(f, "kz_uq_sounds %i^n",uq_sounds);
  886.     fprintf(f, "^n");
  887.    
  888.     fprintf(f, "// Allow doing ScreenShot if Player going in Top (not work with kz_uq_sql <1> and for map top)^n");
  889.     fprintf(f, "kz_uq_screenshoot %i^n",uq_screen);
  890.     fprintf(f, "^n");
  891.    
  892.     fprintf(f, "// Allow showing info about stats when you record demo^n");
  893.     fprintf(f, "kz_uq_demo_info %i^n",uq_info);
  894.     fprintf(f, "^n");
  895.  
  896.     fprintf(f, "// How work Sql Module (1=SQL module enable, 0=disable)^n");
  897.     fprintf(f, "kz_uq_sql %i^n",kz_sql);
  898.     fprintf(f, "^n");
  899.  
  900.     fprintf(f, "// Enable/Disable Web Top (1=Enable,0=Disable) - if you want standart tops with sql module, turn of web mod^n");
  901.     fprintf(f, "kz_uq_web %i^n",web_sql);
  902.     fprintf(f, "^n");
  903.    
  904.     get_pcvar_string(uq_host, s_host, 100);
  905.     get_pcvar_string(uq_user, s_user, 100);
  906.     get_pcvar_string(uq_pass, s_pass, 100);
  907.     get_pcvar_string(uq_db, s_db, 100);
  908.    
  909.     fprintf(f, "// Options for Sql Module^n");
  910.     fprintf(f, "kz_uq_host ^"%s^"^n",s_host);
  911.     fprintf(f, "kz_uq_user ^"%s^"^n",s_user);
  912.     fprintf(f, "kz_uq_pass ^"%s^"^n",s_pass);
  913.     fprintf(f, "kz_uq_db ^"%s^"^n",s_db);
  914.     fprintf(f, "// This Option used only in Showing Top(sql), change this if you use another url on you web server^n");
  915.     get_pcvar_string(kz_uq_url, stringscvars, 255);
  916.     fprintf(f, "kz_uq_url ^"%s^"^n",stringscvars);
  917.     fprintf(f, "kz_uq_update_auth %i - Update in DB Steam and Ip^n",uq_update_auth);
  918.     fprintf(f, "^n");
  919.        
  920.     fprintf(f, "// How to save Top10 (2 = steamid, 1 = Ip, 0 = name)^n");
  921.     fprintf(f, "kz_uq_top_by %i^n",rankby);
  922.     fprintf(f, "^n");
  923.    
  924.     fprintf(f, "kz_uq_save_top %i - On/Off TOP10 (1 = on, 0 = off)^n",kz_top);  
  925.     fprintf(f, "kz_uq_maptop %i  - On/Off MapTop (1 = on, 0 = off)^n",kz_map_top);
  926.     fprintf(f, "kz_uq_save_extras_top %i  - On/Off Extra Tops (1 = on, 0 = off)^n",kz_extras);
  927.     fprintf(f, "kz_uq_weapons_top %i  - On/Off Weapon Tops (1 = on, 0 = off)^n",kz_weapon);
  928.     fprintf(f, "kz_uq_block_top %i  - On/Off Block Tops (1 = on, 0 = off)^n",kz_block_top);
  929.     fprintf(f, "kz_uq_block_weapons %i  - On/Off Block Tops for other weapons (1 = on, 0 = off)^n",kz_wpn_block_top);  
  930.     fprintf(f, "^n");
  931.    
  932.     fprintf(f, "// Allow check to legal settings (1 = on, 0 = off)^n");
  933.     fprintf(f, "kz_uq_legal_settings %i^n",leg_settings);
  934.     fprintf(f, "kz_uq_fps %i - (1=more than 100 FPS jump does not count, 0=count)^n",uq_fps);
  935.     fprintf(f, "kz_uq_bug_check %i - Allow checking for bug distance^n",uq_bug);
  936.     fprintf(f, "^n");
  937.    
  938.     fprintf(f, "// Anti script(Beta)^n");
  939.     fprintf(f, "kz_uq_script_detection %i^n",uq_script_detection);
  940.     fprintf(f, "kz_uq_script_work %i - antiscript works if player distance more then (0=good,1=pro,2=holy,3=leet,4=god distance)^n",uq_script_work);
  941.     fprintf(f, "kz_uq_script_notify %i - print messages to all people on server with scripter name^n",uq_script_notify);
  942.     fprintf(f, "kz_uq_script_punishment %i - (0=nothing,1=kick,2=ban)^n",uq_script_punishment);
  943.     fprintf(f, "kz_uq_ban_type %i - (0=standart bans, 1=amxbans)^n",uq_ban_type);
  944.     fprintf(f, "kz_uq_ban_minutes %i - ban time in minutes^n",uq_ban_minutes);
  945.     fprintf(f, "kz_uq_ban_authid %i - (ban by 0=name,1=ip,2=steam)^n",uq_ban_authid);
  946.     fprintf(f, "^n");
  947.  
  948.     get_pcvar_string(kz_prefix, stringscvars, 255);
  949.    
  950.     fprintf(f, "// The prefix for all messages in chat^n");
  951.     fprintf(f, "kz_uq_prefix ^"%s^"^n", stringscvars);
  952.     fprintf(f, "^n");
  953.    
  954.     fprintf(f, "// How to set up a server by value sv_airaccelerate (Varible=xx, but var=0 reserved for 10aa, var=1 for 100aa)^n");
  955.     fprintf(f, "kz_uq_airaccelerate %i^n",uq_airaccel);
  956.     fprintf(f, "^n");
  957.    
  958.     fprintf(f, "// On/Off Showing stats with noslowdown^n");
  959.     fprintf(f, "kz_uq_noslowdown %i^n",uq_noslow);
  960.     fprintf(f, "^n");
  961.    
  962.     fprintf(f, "// Max strafes (if players strafes>Max, stats doesnt shows)^n");
  963.     fprintf(f, "kz_uq_max_strafes %i^n",NSTRAFES1);
  964.     fprintf(f, "^n");
  965.  
  966.     fprintf(f, "// Allow InGame Strafe Stats (laggy feature)^n");
  967.     fprintf(f, "kz_uq_istrafes %i^n",uq_istrafe);
  968.     fprintf(f, "^n");
  969.    
  970.     fprintf(f, "// Color Hud message statistics when you jump, in the RGB^n");
  971.     fprintf(f, "kz_uq_stats_red %i^n",stats_r);
  972.     fprintf(f, "kz_uq_stats_green %i^n",stats_g);
  973.     fprintf(f, "kz_uq_stats_blue %i^n",stats_b);
  974.     fprintf(f, "^n");
  975.    
  976.     fprintf(f, "// Color Hud messages Fail statistics when you jump, in the RGB^n");
  977.     fprintf(f, "kz_uq_failstats_red %i^n",f_stats_r);      
  978.     fprintf(f, "kz_uq_failstats_green %i^n",f_stats_g);
  979.     fprintf(f, "kz_uq_failstats_blue %i^n",f_stats_b);
  980.     fprintf(f, "^n");
  981.    
  982.     fprintf(f, "// Color Hud messages prestrafe, in the RGB^n");
  983.     fprintf(f, "kz_uq_prestrafe_red %i^n",prest_r);
  984.     fprintf(f, "kz_uq_prestrafe_green %i^n",prest_g);
  985.     fprintf(f, "kz_uq_prestrafe_blue %i^n",prest_b);
  986.     fprintf(f, "^n");
  987.    
  988.     fprintf(f, "// Color of speed, in the RGB^n");
  989.     fprintf(f, "kz_uq_speed_red %i^n",speed_r);    
  990.     fprintf(f, "kz_uq_speed_green %i^n",speed_g);
  991.     fprintf(f, "kz_uq_speed_blue %i^n",speed_b);
  992.     fprintf(f, "^n");
  993.    
  994.     fprintf(f, "//Coordinates Hud messages^n");
  995.     fprintf(f, "^n");
  996.     fprintf(f, "//General stats jump^n");
  997.    
  998.     get_pcvar_string(kz_stats_x, s_x, 9);
  999.     get_pcvar_string(kz_stats_y, s_y, 9);
  1000.    
  1001.     fprintf(f, "kz_uq_stats_x ^"%s^"^n", s_x);
  1002.     fprintf(f, "kz_uq_stats_y ^"%s^"^n", s_y);
  1003.     fprintf(f, "^n");
  1004.     fprintf(f, "//Strafes Stats^n");
  1005.    
  1006.     get_pcvar_string(kz_strafe_x, s_x, 9);
  1007.     get_pcvar_string(kz_strafe_y, s_y, 9);
  1008.    
  1009.     fprintf(f, "kz_uq_strafe_x ^"%s^"^n", s_x);
  1010.     fprintf(f, "kz_uq_strafe_y ^"%s^"^n", s_y);
  1011.     fprintf(f, "^n");
  1012.     fprintf(f, "//Ducks Stats for Multi dd^n");
  1013.    
  1014.     get_pcvar_string(kz_duck_x, s_x, 9);
  1015.     get_pcvar_string(kz_duck_y, s_y, 9);
  1016.    
  1017.     fprintf(f, "kz_uq_duck_x ^"%s^"^n", s_x);
  1018.     fprintf(f, "kz_uq_duck_y ^"%s^"^n", s_y);
  1019.     fprintf(f, "^n");
  1020.     fprintf(f, "//Speed^n");
  1021.    
  1022.     get_pcvar_string(kz_speed_x, s_x, 9);
  1023.     get_pcvar_string(kz_speed_y, s_y, 9);
  1024.    
  1025.     fprintf(f, "kz_uq_speed_x ^"%s^"^n", s_x);
  1026.     fprintf(f, "kz_uq_speed_y ^"%s^"^n", s_y);
  1027.     fprintf(f, "^n");
  1028.     fprintf(f, "//Prestrafe^n");
  1029.    
  1030.     get_pcvar_string(kz_prest_x, s_x, 9);
  1031.     get_pcvar_string(kz_prest_y, s_y, 9);
  1032.    
  1033.     fprintf(f, "kz_uq_prestrafe_x ^"%s^"^n", s_x);
  1034.     fprintf(f, "kz_uq_prestrafe_y ^"%s^"^n", s_y);
  1035.     fprintf(f, "^n");
  1036.    
  1037.     fprintf(f, "// Channel Hud messages of general stats jump^n");
  1038.     fprintf(f, "kz_uq_hud_stats %i^n",h_stats);
  1039.     fprintf(f, "^n");
  1040.     fprintf(f, "// Channel Hud messages of strafes Stats^n");
  1041.     fprintf(f, "kz_uq_hud_strafe %i^n",h_streif);
  1042.     fprintf(f, "^n");
  1043.     fprintf(f, "// Channel Hud messages of ducks Stats for Multi CountJump^n");
  1044.     fprintf(f, "kz_uq_hud_duck %i^n",h_duck);
  1045.     fprintf(f, "^n");
  1046.     fprintf(f, "// Channel Hud messages of speed^n");
  1047.     fprintf(f, "kz_uq_hud_speed %i^n",h_speed);
  1048.     fprintf(f, "^n");
  1049.     fprintf(f, "// Channel Hud messages of prestafe^n");
  1050.     fprintf(f, "kz_uq_hud_pre %i^n",h_prest);
  1051.     fprintf(f, "^n");
  1052.    
  1053.     fprintf(f, "// For what technique stats enable^n");
  1054.     fprintf(f, "kz_uq_lj %i^n",uq_lj)
  1055.     fprintf(f, "kz_uq_cj %i^n",uq_cj)
  1056.     fprintf(f, "kz_uq_bj %i^n",uq_bj)
  1057.     fprintf(f, "kz_uq_sbj %i^n",uq_sbj);   
  1058.     fprintf(f, "kz_uq_wj %i^n",uq_wj)
  1059.     fprintf(f, "kz_uq_dcj %i^n",uq_dcj);   
  1060.     fprintf(f, "kz_uq_mcj %i^n",uq_mcj);   
  1061.     fprintf(f, "kz_uq_drbj %i^n",uq_drbj);     
  1062.     fprintf(f, "kz_uq_drcj %i^n",uq_drcj)
  1063.     fprintf(f, "kz_uq_ladder %i^n",uq_ladder)
  1064.     fprintf(f, "kz_uq_ldbj %i^n",uq_ldbj)
  1065.     fprintf(f, "^n");
  1066.    
  1067.     fprintf(f, "// Max,Min block to show in edge^n");
  1068.     fprintf(f, "kz_uq_max_block %i^n",uq_maxedge)
  1069.     fprintf(f, "kz_uq_min_block %i^n",uq_minedge)
  1070.     fprintf(f, "^n");
  1071.    
  1072.     fprintf(f, "// Minimum Prestrafe to show^n");
  1073.     fprintf(f, "kz_uq_min_pre %i^n",uq_min_pre);       
  1074.     fprintf(f, "^n");
  1075.    
  1076.     fprintf(f, "// For what Extra technique stats enable^n");
  1077.     fprintf(f, "kz_uq_scj %i^n",uq_drsbj);
  1078.     fprintf(f, "kz_uq_dscj %i^n",uq_dscj)
  1079.     fprintf(f, "kz_uq_mscj %i^n",uq_mscj)
  1080.     fprintf(f, "kz_uq_dropscj %i^n",uq_dropscj);   
  1081.     fprintf(f, "kz_uq_dropdscj %i^n",uq_dropdscj)
  1082.     fprintf(f, "kz_uq_dropmscj %i^n",uq_dropmscj)
  1083.     fprintf(f, "kz_uq_duckbhop %i^n",uq_duckbhop)
  1084.     fprintf(f, "kz_uq_bhopinduck %i^n",uq_bhopinduck)
  1085.     fprintf(f, "kz_uq_realldbhop %i^n",uq_realldbhop)
  1086.     fprintf(f, "kz_uq_upbj %i^n",uq_upbj)
  1087.     fprintf(f, "kz_uq_upsbj %i^n",uq_upsbj);   
  1088.     fprintf(f, "kz_uq_upbhopinduck %i^n",uq_upbhopinduck)
  1089.     fprintf(f, "kz_uq_multibhop %i^n",uq_multibhop);
  1090.     fprintf(f, "kz_uq_dropdcj %i^n",uq_dropdcj);   
  1091.     fprintf(f, "kz_uq_dropmcj %i^n",uq_dropmcj);   
  1092.     fprintf(f, "^n");
  1093.    
  1094.     fprintf(f, "// Color for chat messages of jump distances (good = grey, pro = green, holy = blue, leet = red, god = red (with sound godlike for all players))^n");
  1095.     fprintf(f, "// LongJump/HighJump^n");
  1096.     fprintf(f, "kz_uq_good_lj %i^n",lj_good_dist)
  1097.     fprintf(f, "kz_uq_pro_lj %i^n",lj_pro_dist);
  1098.     fprintf(f, "kz_uq_holy_lj %i^n",lj_holy_dist);
  1099.     fprintf(f, "kz_uq_leet_lj %i^n",lj_leet_dist);
  1100.     fprintf(f, "kz_uq_god_lj %i^n",lj_god_dist);
  1101.     fprintf(f, "^n");
  1102.  
  1103.     fprintf(f, "// CountJump^n");
  1104.     fprintf(f, "kz_uq_good_cj %i^n",cj_good_dist)
  1105.     fprintf(f, "kz_uq_pro_cj %i^n",cj_pro_dist);
  1106.     fprintf(f, "kz_uq_holy_cj %i^n",cj_holy_dist);
  1107.     fprintf(f, "kz_uq_leet_cj %i^n",cj_leet_dist);
  1108.     fprintf(f, "kz_uq_god_cj %i^n",cj_god_dist);
  1109.     fprintf(f, "^n");
  1110.    
  1111.     fprintf(f, "// Double CountJump/Multi CountJump^n");
  1112.     fprintf(f, "kz_uq_good_dcj %i^n",dcj_good_dist);   
  1113.     fprintf(f, "kz_uq_pro_dcj %i^n",dcj_pro_dist);
  1114.     fprintf(f, "kz_uq_holy_dcj %i^n",dcj_holy_dist);
  1115.     fprintf(f, "kz_uq_leet_dcj %i^n",dcj_leet_dist);
  1116.     fprintf(f, "kz_uq_god_dcj %i^n",dcj_god_dist);
  1117.     fprintf(f, "^n");
  1118.    
  1119.     fprintf(f, "// LadderJump^n");
  1120.     fprintf(f, "kz_uq_good_ladder %i^n",ladder_good_dist)
  1121.     fprintf(f, "kz_uq_pro_ladder %i^n",ladder_pro_dist);
  1122.     fprintf(f, "kz_uq_holy_ladder %i^n",ladder_holy_dist);
  1123.     fprintf(f, "kz_uq_leet_ladder %i^n",ladder_leet_dist);
  1124.     fprintf(f, "kz_uq_god_ladder %i^n",ladder_god_dist);
  1125.     fprintf(f, "^n");
  1126.    
  1127.     fprintf(f, "// BhopJump/StandUp BhopJump^n");
  1128.     fprintf(f, "kz_uq_good_bj %i^n",bj_good_dist)
  1129.     fprintf(f, "kz_uq_pro_bj %i^n",bj_pro_dist);
  1130.     fprintf(f, "kz_uq_holy_bj %i^n",bj_holy_dist);
  1131.     fprintf(f, "kz_uq_leet_bj %i^n",bj_leet_dist);
  1132.     fprintf(f, "kz_uq_god_bj %i^n",bj_god_dist);
  1133.     fprintf(f, "^n");
  1134.    
  1135.     fprintf(f, "// WeirdJump/Drop CountJump(double,multi)/Ladder BhopJump^n");
  1136.     fprintf(f, "kz_uq_good_wj %i^n",wj_good_dist)
  1137.     fprintf(f, "kz_uq_pro_wj %i^n",wj_pro_dist);
  1138.     fprintf(f, "kz_uq_holy_wj %i^n",wj_holy_dist);
  1139.     fprintf(f, "kz_uq_leet_wj %i^n",wj_leet_dist);
  1140.     fprintf(f, "kz_uq_god_wj %i^n",wj_god_dist);
  1141.     fprintf(f, "^n");
  1142.    
  1143.     fprintf(f, "// Drop BhopJump^n");
  1144.     fprintf(f, "kz_uq_good_dbj %i^n",dbj_good_dist);   
  1145.     fprintf(f, "kz_uq_pro_dbj %i^n",dbj_pro_dist);
  1146.     fprintf(f, "kz_uq_holy_dbj %i^n",dbj_holy_dist);
  1147.     fprintf(f, "kz_uq_leet_dbj %i^n",dbj_leet_dist);
  1148.     fprintf(f, "kz_uq_god_dbj %i^n",dbj_god_dist);
  1149.     fprintf(f, "^n");
  1150.    
  1151.     fprintf(f, "// StandUp CountJump (Double or Multi StandUp CountJump=SCJ+10units)(if 100aa all cvar dist +10 units)^n");
  1152.     fprintf(f, "kz_uq_good_scj %i^n",scj_good_dist);   
  1153.     fprintf(f, "kz_uq_pro_scj %i^n",scj_pro_dist);
  1154.     fprintf(f, "kz_uq_holy_scj %i^n",scj_holy_dist);
  1155.     fprintf(f, "kz_uq_leet_scj %i^n",scj_leet_dist);
  1156.     fprintf(f, "kz_uq_god_scj %i^n",scj_god_dist);
  1157.     fprintf(f, "^n");
  1158.    
  1159.     fprintf(f, "// Drop StandUp CountJump(double,multi)^n");
  1160.     fprintf(f, "kz_uq_good_dropscj %i^n",dropscj_good_dist);   
  1161.     fprintf(f, "kz_uq_pro_dropscj %i^n",dropscj_pro_dist);
  1162.     fprintf(f, "kz_uq_holy_dropscj %i^n",dropscj_holy_dist);
  1163.     fprintf(f, "kz_uq_leet_dropscj %i^n",dropscj_leet_dist);
  1164.     fprintf(f, "kz_uq_god_dropscj %i^n",dropscj_god_dist);
  1165.     fprintf(f, "^n");
  1166.    
  1167.     fprintf(f, "// Up Bhop^n");
  1168.     fprintf(f, "kz_uq_good_upbj %i^n",upbj_good_dist)
  1169.     fprintf(f, "kz_uq_pro_upbj %i^n",upbj_pro_dist);
  1170.     fprintf(f, "kz_uq_holy_upbj %i^n",upbj_holy_dist);
  1171.     fprintf(f, "kz_uq_leet_upbj %i^n",upbj_leet_dist);
  1172.     fprintf(f, "kz_uq_god_upbj %i^n",upbj_god_dist);
  1173.     fprintf(f, "^n");
  1174.    
  1175.     fprintf(f, "// Up StandBhop^n");
  1176.     fprintf(f, "kz_uq_good_upsbj %i^n",upsbj_good_dist);   
  1177.     fprintf(f, "kz_uq_pro_upsbj %i^n",upsbj_pro_dist);
  1178.     fprintf(f, "kz_uq_holy_upsbj %i^n",upsbj_holy_dist);
  1179.     fprintf(f, "kz_uq_leet_upsbj %i^n",upsbj_leet_dist);
  1180.     fprintf(f, "kz_uq_god_upsbj %i^n",upsbj_god_dist);
  1181.     fprintf(f, "^n");
  1182.    
  1183.     fprintf(f, "// Bhop In Duck(Up Bhop In Duck)^n");
  1184.     fprintf(f, "kz_uq_good_bhopinduck %i^n",bhopinduck_good_dist)
  1185.     fprintf(f, "kz_uq_pro_bhopinduck %i^n",bhopinduck_pro_dist);
  1186.     fprintf(f, "kz_uq_holy_bhopinduck %i^n",bhopinduck_holy_dist);
  1187.     fprintf(f, "kz_uq_leet_bhopinduck %i^n",bhopinduck_leet_dist);
  1188.     fprintf(f, "kz_uq_god_bhopinduck %i^n",bhopinduck_god_dist);
  1189.     fprintf(f, "^n");
  1190.    
  1191.     fprintf(f, "// Duck Bhop^n");
  1192.     fprintf(f, "kz_uq_good_duckbhop %i^n",duckbhop_good_dist)
  1193.     fprintf(f, "kz_uq_pro_duckbhop %i^n",duckbhop_pro_dist);
  1194.     fprintf(f, "kz_uq_holy_duckbhop %i^n",duckbhop_holy_dist);
  1195.     fprintf(f, "kz_uq_leet_duckbhop %i^n",duckbhop_leet_dist);
  1196.     fprintf(f, "kz_uq_god_duckbhop %i^n",duckbhop_god_dist);
  1197.     fprintf(f, "^n");
  1198.    
  1199.     fprintf(f, "// Real Ladder Bhop^n");
  1200.     fprintf(f, "kz_uq_good_realldbhop %i^n",real_good_dist);   
  1201.     fprintf(f, "kz_uq_pro_realldbhop %i^n",real_pro_dist);
  1202.     fprintf(f, "kz_uq_holy_realldbhop %i^n",real_holy_dist);
  1203.     fprintf(f, "kz_uq_leet_realldbhop %i^n",real_leet_dist);
  1204.     fprintf(f, "kz_uq_god_realldbhop %i^n",real_god_dist);
  1205.     fprintf(f, "^n");
  1206.    
  1207.     fclose(f);
  1208.    
  1209.     server_cmd("exec %s", config);
  1210.     server_exec();
  1211. }
  1212. public Log_script(f_frames,cheated_frames,id,Float:log_dist,Float:log_max,Float:log_pre,log_str,log_sync,jump_type_str[],wpn_str[],punishments[],t_str[40*NSTRAFES])
  1213. {
  1214.     new Date[20];
  1215.     get_time("%m/%d/%y %H:%M:%S", Date, 19) ;
  1216.     new username[33];
  1217.     get_user_name(id, username, 32);
  1218.     new userip[16];
  1219.     get_user_ip(id, userip, 15, 1);
  1220.     new authid[35];
  1221.     get_user_authid(id, authid, 34);
  1222.     new main_text[512];
  1223.    
  1224.     write_file(logs_path, "---------------------------------------------------", -1);
  1225.     formatex(main_text, 511, "%s |%s |%s |%s |%s |%s ^n", Date,username, authid, userip, "Script",punishments);
  1226.     write_file(logs_path, main_text, -1);
  1227.     formatex(main_text, 511, "Type: %s ::: Weapon: %s^nDistance: %.03f Maxspeed: %.03f Prestrafe: %.03f Strafes: %d Sync: %d^n",jump_type_str,wpn_str,log_dist,log_max,log_pre,log_str,log_sync);
  1228.     write_file(logs_path, main_text, -1);
  1229.     formatex(main_text, 511, "Total Frames: %d^nCheated Frames: %d^n",f_frames,cheated_frames);
  1230.     write_file(logs_path, main_text, -1);
  1231.    
  1232.     new strf[40];
  1233.     for(new ll=INFO_ONE; (ll <= log_str) && (ll < NSTRAFES);ll++)
  1234.     {
  1235.         strtok(t_str,strf,40,t_str,40*NSTRAFES,'^n');
  1236.         replace(strf,40,"^n","");
  1237.         write_file(logs_path, strf, -1);
  1238.     }
  1239.     write_file(logs_path, "---------------------------------------------------", -1);
  1240.    
  1241.     if(uq_script_notify)
  1242.     {
  1243.         Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_SCRIPTNOTIFY",prefix,username,jump_type_str);
  1244.         Color_Chat_Lang(id,BLUE,"%L",LANG_SERVER,"UQSTATS_SCRIPTNOTIFY",prefix,username,jump_type_str);
  1245.         Color_Chat_Lang(id,GREY,"%L",LANG_SERVER,"UQSTATS_SCRIPTNOTIFY",prefix,username,jump_type_str);
  1246.     }
  1247. }
  1248. public krasnota(id)
  1249. {                
  1250.         message_begin(MSG_ONE, get_user_msgid("ScreenFade"), _, id);
  1251.         write_short(1<<10);
  1252.         write_short(1<<10);
  1253.         write_short(0x0000);
  1254.         write_byte(255);
  1255.         write_byte(0);
  1256.         write_byte(0);
  1257.         write_byte(110);
  1258.         message_end();
  1259. }
  1260.  
  1261. public sineva(id)
  1262. {                
  1263.         message_begin(MSG_ONE, get_user_msgid("ScreenFade"), _, id);
  1264.         write_short(1<<10);
  1265.         write_short(1<<10);
  1266.         write_short(0x0000);
  1267.         write_byte(0);
  1268.         write_byte(0);
  1269.         write_byte(255);
  1270.         write_byte(110);
  1271.         message_end();
  1272. }
  1273.  
  1274. public tskFps(id)
  1275. {
  1276.     if( leg_settings)
  1277.     {
  1278.         id-=434490;
  1279.         client_cmd(id, "developer 0;fps_max 101;cl_forwardspeed 400;cl_sidespeed 400;cl_backspeed 400");
  1280.     }
  1281. }
  1282. public server_frame()
  1283. {
  1284.     if( leg_settings )
  1285.     {
  1286.         if( get_pcvar_num(edgefriction) != 2 )
  1287.             set_pcvar_num(edgefriction, 2);
  1288.        
  1289.         if( get_pcvar_num(mp_footsteps) != 1 )
  1290.             set_pcvar_num(mp_footsteps, 1);
  1291.        
  1292.         if( get_pcvar_num(sv_cheats) != 0 )
  1293.             set_pcvar_num(sv_cheats, 0);
  1294.        
  1295.         if( get_pcvar_num(sv_gravity)!= 800 )
  1296.             set_pcvar_num(sv_gravity, 800);
  1297.        
  1298.         if((uq_airaccel==0 || uq_airaccel==10) && get_pcvar_num(sv_airaccelerate) != 10 )
  1299.             set_pcvar_num(sv_airaccelerate, 10);
  1300.         else if((uq_airaccel==1 || uq_airaccel==100) && get_pcvar_num(sv_airaccelerate) != 100 )
  1301.             set_pcvar_num(sv_airaccelerate, 100);
  1302.         else if(get_pcvar_num(sv_airaccelerate) != uq_airaccel && uq_airaccel!=0 && uq_airaccel!=1)
  1303.             set_pcvar_num(sv_airaccelerate, uq_airaccel);
  1304.        
  1305.         if( get_pcvar_num(sv_maxspeed) != 320 )
  1306.             set_pcvar_num(sv_maxspeed, 320);
  1307.        
  1308.         if( get_pcvar_num(sv_stepsize) != 18 )
  1309.             set_pcvar_num(sv_stepsize, 18);
  1310.        
  1311.         if( get_pcvar_num(sv_maxvelocity) != 2000 )
  1312.             set_pcvar_num(sv_maxvelocity, 2000);
  1313.     }
  1314. }
  1315. public client_putinserver(id)
  1316. {
  1317.     if(speedon[id] && !is_user_hltv(id) && !is_user_bot(id))// && is_user_alive(id) && is_user_bot(id) && is_user_hltv())
  1318.     {
  1319.         set_task(0.1, "DoSpeed", id+212299, "", 0, "b", 0);
  1320.     }
  1321.    
  1322.     get_user_name(id, g_playername[id], 63);
  1323.     get_user_ip(id, g_playerip[id], 15, 1);
  1324.     get_user_authid(id, g_playersteam[id], 35);
  1325.  
  1326.     if(kz_sql == 1)
  1327.     {
  1328.         player_load_info(id);
  1329.     }
  1330.    
  1331.     if(is_user_admin(id))
  1332.     {
  1333.         player_admin[id]=true;
  1334.     }
  1335. }
  1336. public Dojof(taskid)
  1337. {
  1338.     taskid-=212398;
  1339.    
  1340.     static alive, spectatedplayer;
  1341.     alive = g_alive[taskid];
  1342.     spectatedplayer = get_spectated_player(taskid);
  1343.    
  1344.     if( (alive || spectatedplayer > 0))
  1345.     {
  1346.         new show_id;
  1347.        
  1348.         if( alive )
  1349.         {
  1350.             show_id=taskid;
  1351.         }
  1352.         else
  1353.         {
  1354.             show_id=spectatedplayer;
  1355.         }
  1356.        
  1357.         if(jof[show_id]!=0.0)
  1358.         {  
  1359.             if(jof[show_id]>5.0)
  1360.             {
  1361.                 set_hudmessage(255, 255, 255, -1.0, 0.6, 0, 0.0, 0.7, 0.0, 0.0, h_speed);
  1362.             }
  1363.             else
  1364.             {
  1365.                 set_hudmessage(255, 0, 0, -1.0, 0.6, 0, 0.0, 0.7, 0.0, 0.0, h_speed);
  1366.             }
  1367.             show_hudmessage(taskid,"%L",LANG_SERVER,"UQSTATS_JOF", jof[show_id]);
  1368.         }
  1369.     }
  1370. }
  1371.  
  1372.  
  1373. public DoSpeed(taskid)
  1374. {
  1375.     taskid-=212299;
  1376.    
  1377.     static alive, spectatedplayer;
  1378.     alive = g_alive[taskid];
  1379.     spectatedplayer = get_spectated_player(taskid);
  1380.    
  1381.     if( (alive || spectatedplayer > 0))
  1382.     {
  1383.         new show_id;
  1384.        
  1385.         if( alive )
  1386.         {
  1387.             show_id=taskid;
  1388.         }
  1389.         else
  1390.         {
  1391.             show_id=spectatedplayer;
  1392.         }
  1393.        
  1394.         new Float:velocity[3];
  1395.         pev(show_id, pev_velocity, velocity);
  1396.            
  1397.         if( velocity[2] != 0 )
  1398.             velocity[2]-=velocity[2];
  1399.                    
  1400.         new Float:speedy = vector_length(velocity);
  1401.        
  1402.         if(speedtype[taskid])
  1403.         {
  1404.             set_dhudmessage(speed_r, speed_g, speed_b, speed_x, speed_y, 0, 0.0, 0.1, 0.0, 0.0);
  1405.             show_dhudmessage(taskid, "%L",LANG_SERVER,"UQSTATS_SPEEDSHOW", floatround(speedy, floatround_floor));
  1406.         }
  1407.         else
  1408.         {
  1409.             set_hudmessage(speed_r, speed_g, speed_b, speed_x, speed_y, 0, 0.0, 0.2, 0.0, 0.0, h_speed);
  1410.             show_hudmessage(taskid, "%L",LANG_SERVER,"UQSTATS_SPEEDSHOW", floatround(speedy, floatround_floor));       
  1411.         }
  1412.     }
  1413. }
  1414. public wait(id)
  1415. {
  1416.     id-=3313;
  1417.     waits[id]=1;
  1418.  
  1419. }
  1420.  
  1421. public wait1(id)
  1422. {
  1423.     id-=3214;
  1424.     waits1[id]=1;
  1425.  
  1426. }
  1427.  
  1428. public client_command(id)
  1429. {
  1430.     static command[32];
  1431.     read_argv( 0, command, 31 );
  1432.  
  1433.     static const forbidden[][] = {
  1434.         "tele", "tp", "gocheck", "gc", "stuck", "unstuck", "start", "reset", "restart",
  1435.         "spawn", "respawn"
  1436.     };
  1437.     if(uq_info)
  1438.     {
  1439.         if(record_start[id]==0 && equali( command, "fullupdate" ))
  1440.         {
  1441.             record_start[id]=1;
  1442.         }
  1443.         else if(record_start[id]==1 && equali( command, "specmode" ))
  1444.         {
  1445.             set_hudmessage(255, 255, 255, 0.72, 0.0, 0, 6.0, 1.0);
  1446.             show_hudmessage(id, "%L",LANG_SERVER,"UQSTATS_INFOSTS",VERSION);
  1447.            
  1448.             record_start[id]=0;
  1449.         }
  1450.     }
  1451.    
  1452.     if( equali( command, "say" ) )
  1453.     {
  1454.         read_args( command, 31 );
  1455.         remove_quotes( command );
  1456.     }
  1457.    
  1458.     if( equali( command, "+hook" ) )
  1459.     {
  1460.         JumpReset(id,0);
  1461.         donehook[id]=true;
  1462.         hookcheck[id]=false;
  1463.     }
  1464.     else if( command[0] == '/' || command[0] == '.' )
  1465.     {
  1466.         copy( command, 31, command[1] );
  1467.        
  1468.         for( new i ; i < sizeof( forbidden ) ; i++ )
  1469.         {
  1470.             if( equali( command, forbidden[i] ) )
  1471.             {
  1472.                 JumpReset(id,1);
  1473.                 break;
  1474.             }
  1475.         }
  1476.     }
  1477. }
  1478. public remove_beam_ent(id)
  1479. {
  1480.     for(new i=0;i<ent_count[id];i++)
  1481.     {
  1482.         message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
  1483.         write_byte(99);
  1484.         write_short(beam_entity[id][i]);
  1485.         message_end();
  1486.        
  1487.         remove_entity(beam_entity[id][i]);
  1488.     }
  1489.     ent_count[id]=0;
  1490. }
  1491. public epta(id,Float:or[3],direct_strafe,l_lost[NSTRAFES][NVAR],full,ducked,str_num,strafe_frame1[NSTRAFES],strafe_frame2[NSTRAFES],strafe_lost[NSTRAFES])
  1492. {  
  1493.     new Float:os_start,Float:temp_or[3],direct[2];
  1494.    
  1495.     switch(direct_strafe)
  1496.     {
  1497.         case 1:
  1498.         {
  1499.             temp_or[0]=or[0];
  1500.             temp_or[1]=or[1]+48.0;
  1501.            
  1502.             if(ducked)
  1503.             {
  1504.                 temp_or[2]=or[2]+16+18;
  1505.             }
  1506.             else temp_or[2]=or[2]+18;
  1507.         }
  1508.         case 2:
  1509.         {
  1510.             temp_or[0]=or[0];
  1511.             temp_or[1]=or[1]-48.0;
  1512.            
  1513.             if(ducked)
  1514.             {
  1515.                 temp_or[2]=or[2]+16+18;
  1516.             }
  1517.             else temp_or[2]=or[2]+18;
  1518.            
  1519.             direct[1]=1;
  1520.         }
  1521.         case 3:
  1522.         {
  1523.             temp_or[0]=or[1];
  1524.             temp_or[1]=or[0]+48.0;
  1525.            
  1526.             if(ducked)
  1527.             {
  1528.                 temp_or[2]=or[2]+16+18;
  1529.             }
  1530.             else temp_or[2]=or[2]+18;
  1531.            
  1532.             direct[0]=1;
  1533.             direct[1]=1;
  1534.         }
  1535.         case 4:
  1536.         {
  1537.             temp_or[0]=or[1];
  1538.             temp_or[1]=or[0]-48.0;
  1539.            
  1540.             if(ducked)
  1541.             {
  1542.                 temp_or[2]=or[2]+16+18;
  1543.             }
  1544.             else temp_or[2]=or[2]+18;
  1545.            
  1546.             direct[0]=1;
  1547.         }
  1548.     }
  1549.    
  1550.     os_start=temp_or[0]-(full/2);
  1551.  
  1552.     if(direct[1])
  1553.     {
  1554.         new Float:temp_start=os_start+full;
  1555.            
  1556.         beam_entity[id][ent_count[id]] = create_entity("info_target");
  1557.        
  1558.         //entity_set_int(beam_entity[id][ent_count[id]], EV_INT_solid, SOLID_NOT);
  1559.         entity_set_model(beam_entity[id][ent_count[id]], "models/hairt.mdl");
  1560.        
  1561.         new Float:ent_or[3];
  1562.         if(direct[0])
  1563.         {
  1564.             ent_or[0]=temp_or[1];
  1565.             ent_or[1]=temp_start;
  1566.         }
  1567.         else
  1568.         {
  1569.             ent_or[0]=temp_start;
  1570.             ent_or[1]=temp_or[1];
  1571.         }
  1572.         ent_or[2]=temp_or[2];
  1573.        
  1574.         entity_set_origin(beam_entity[id][ent_count[id]], ent_or);
  1575.        
  1576.         message_begin(MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, {0, 0, 0}, id);
  1577.        
  1578.         write_byte(TE_BEAMENTPOINT);
  1579.         write_short(beam_entity[id][ent_count[id]]);
  1580.    
  1581. ///////////////////////////////////////////
  1582.         if(direct[0])
  1583.         {
  1584.             write_coord(floatround(temp_or[1]));
  1585.             write_coord(floatround(temp_start-full));
  1586.         }
  1587.         else
  1588.         {
  1589.             write_coord(floatround(temp_start-full));
  1590.             write_coord(floatround(temp_or[1]));
  1591.         }
  1592.         write_coord(floatround(temp_or[2]));
  1593. ///////////////////////////////////////////
  1594.         write_short(heystats);
  1595.         write_byte(0);
  1596.         write_byte(5);
  1597.         write_byte(showtime_st_stats[id]);
  1598.         write_byte(1);
  1599.         write_byte(0);
  1600.            
  1601.        
  1602.         write_byte(0);
  1603.         write_byte(0);
  1604.         write_byte(255);
  1605.    
  1606.         write_byte(150);
  1607.         write_byte(1);
  1608.         message_end();
  1609.        
  1610.         ent_count[id]++;
  1611.        
  1612.         for(new i=0;i<2;i++)
  1613.         {
  1614.             beam_entity[id][ent_count[id]] = create_entity("info_target");
  1615.            
  1616.             //entity_set_int(beam_entity[id][ent_count[id]], EV_INT_solid, SOLID_NOT);
  1617.             entity_set_model(beam_entity[id][ent_count[id]], "models/hairt.mdl");
  1618.            
  1619.             new Float:ent_org[3];
  1620.             if(direct[0])
  1621.             {
  1622.                 ent_org[0]=temp_or[1];
  1623.                
  1624.                 if(i==1)
  1625.                     ent_org[1]=temp_start-full;
  1626.                 else
  1627.                     ent_org[1]=temp_start;
  1628.             }
  1629.             else
  1630.             {
  1631.                 if(i==1)
  1632.                     ent_org[0]=temp_start-full;
  1633.                 else
  1634.                     ent_org[0]=temp_start;
  1635.                    
  1636.                 ent_org[1]=temp_or[1];
  1637.             }
  1638.             ent_org[2]=temp_or[2]-10.0;
  1639.            
  1640.             entity_set_origin(beam_entity[id][ent_count[id]], ent_org);
  1641.            
  1642.             message_begin(MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, {0, 0, 0}, id);
  1643.            
  1644.             write_byte(TE_BEAMENTPOINT);
  1645.             write_short(beam_entity[id][ent_count[id]]);
  1646.            
  1647.     ///////////////////////////////////////////
  1648.             if(direct[0])
  1649.             {
  1650.                 write_coord(floatround(temp_or[1]));
  1651.                
  1652.                 if(i==1)
  1653.                     write_coord(floatround(temp_start-full));
  1654.                 else
  1655.                     write_coord(floatround(temp_start));
  1656.             }
  1657.             else
  1658.             {
  1659.                 if(i==1)
  1660.                     write_coord(floatround(temp_start-full));
  1661.                 else
  1662.                     write_coord(floatround(temp_start));
  1663.                    
  1664.                 write_coord(floatround(temp_or[1]));
  1665.             }
  1666.             write_coord(floatround(temp_or[2]+10.0));
  1667.     ///////////////////////////////////////////
  1668.             write_short(heystats);
  1669.             write_byte(0);
  1670.             write_byte(5);
  1671.             write_byte(showtime_st_stats[id]);
  1672.             write_byte(5);
  1673.             write_byte(0);
  1674.                
  1675.            
  1676.             write_byte(0);
  1677.             write_byte(0);
  1678.             write_byte(255);
  1679.        
  1680.             write_byte(150);
  1681.             write_byte(1);
  1682.             message_end();
  1683.            
  1684.             ent_count[id]++;
  1685.         }
  1686.        
  1687.         for(new i=1;i<=str_num;i++)
  1688.         {
  1689.             new Float:st_start,Float:st_finish;
  1690.            
  1691.             st_finish=temp_start-strafe_lost[i]-strafe_frame1[i]-strafe_frame2[i];
  1692.             st_start=temp_start-strafe_lost[i];
  1693.            
  1694.             for(new Float:j=st_start,count_l=0;j>st_finish;j=j-1.0)
  1695.             {
  1696.                 beam_entity[id][ent_count[id]] = create_entity("info_target");
  1697.        
  1698.                 //entity_set_int(beam_entity[id][ent_count[id]], EV_INT_solid, SOLID_NOT);
  1699.                 entity_set_model(beam_entity[id][ent_count[id]], "models/hairt.mdl");
  1700.                
  1701.                 new Float:ent_org[3];
  1702.                 if(direct[0])
  1703.                 {
  1704.                     ent_org[0]=temp_or[1];
  1705.                     ent_org[1]=j;
  1706.                 }
  1707.                 else
  1708.                 {
  1709.                     ent_org[0]=j;
  1710.                     ent_org[1]=temp_or[1];
  1711.                 }
  1712.                
  1713.                 if(i%2!=0)
  1714.                     ent_org[2]=temp_or[2];
  1715.                 else
  1716.                     ent_org[2]=temp_or[2]-4.0;
  1717.                
  1718.                 entity_set_origin(beam_entity[id][ent_count[id]], ent_org);
  1719.                
  1720.                 message_begin(MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, {0, 0, 0}, id);
  1721.                
  1722.                 write_byte(TE_BEAMENTPOINT);
  1723.                 write_short(beam_entity[id][ent_count[id]]);
  1724.                
  1725.         ///////////////////////////////////////////
  1726.                 if(direct[0])
  1727.                 {
  1728.                     write_coord(floatround(temp_or[1]));
  1729.                     write_coord(floatround(j));
  1730.                 }
  1731.                 else
  1732.                 {
  1733.                     write_coord(floatround(j));
  1734.                     write_coord(floatround(temp_or[1]));
  1735.                 }
  1736.                
  1737.                 if(i%2!=0)
  1738.                     write_coord(floatround(temp_or[2]+4.0));
  1739.                 else
  1740.                     write_coord(floatround(temp_or[2]));
  1741.         ///////////////////////////////////////////
  1742.                 write_short(heystats);
  1743.                 write_byte(0);
  1744.                 write_byte(5);
  1745.                 write_byte(showtime_st_stats[id]);
  1746.                 write_byte(5);
  1747.                 write_byte(0);
  1748.                    
  1749.                 if(l_lost[i][count_l])
  1750.                 {
  1751.                     write_byte(255);
  1752.                     write_byte(0);
  1753.                     write_byte(0);
  1754.                     line_lost[id][i][count_l]=0;
  1755.                 }
  1756.                 else
  1757.                 {
  1758.                     write_byte(0);
  1759.                     write_byte(255);
  1760.                     write_byte(0);
  1761.                 }
  1762.                
  1763.                 write_byte(200);
  1764.                 write_byte(1);
  1765.                 message_end();
  1766.                 count_l++;
  1767.                 ent_count[id]++;
  1768.             }
  1769.             temp_start=st_finish;
  1770.            
  1771.         }
  1772.     }
  1773.     else
  1774.     {
  1775.         new Float:temp_start=os_start;
  1776.        
  1777.         beam_entity[id][ent_count[id]] = create_entity("info_target");
  1778.        
  1779.     //  entity_set_int(beam_entity[id][ent_count[id]], EV_INT_solid, SOLID_NOT);
  1780.         entity_set_model(beam_entity[id][ent_count[id]], "models/hairt.mdl");
  1781.        
  1782.         new Float:ent_or[3];
  1783.         if(direct[0])
  1784.         {
  1785.             ent_or[0]=temp_or[1];
  1786.             ent_or[1]=temp_start;
  1787.         }
  1788.         else
  1789.         {
  1790.             ent_or[0]=temp_start;
  1791.             ent_or[1]=temp_or[1];
  1792.         }
  1793.         ent_or[2]=temp_or[2];
  1794.        
  1795.         entity_set_origin(beam_entity[id][ent_count[id]], ent_or);
  1796.        
  1797.         message_begin(MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, {0, 0, 0}, id);
  1798.        
  1799.         write_byte(TE_BEAMENTPOINT);
  1800.         write_short(beam_entity[id][ent_count[id]]);
  1801.        
  1802. ///////////////////////////////////////////
  1803.         if(direct[0])
  1804.         {
  1805.             write_coord(floatround(temp_or[1]));
  1806.             write_coord(floatround(temp_start+full));
  1807.         }
  1808.         else
  1809.         {
  1810.             write_coord(floatround(temp_start+full));
  1811.             write_coord(floatround(temp_or[1]));
  1812.         }
  1813.         write_coord(floatround(temp_or[2]));
  1814. ///////////////////////////////////////////
  1815.         write_short(heystats);
  1816.         write_byte(0);
  1817.         write_byte(5);
  1818.         write_byte(showtime_st_stats[id]);
  1819.         write_byte(1);
  1820.         write_byte(0);
  1821.            
  1822.        
  1823.         write_byte(0);
  1824.         write_byte(0);
  1825.         write_byte(255);
  1826.    
  1827.         write_byte(150);
  1828.         write_byte(1);
  1829.         message_end();
  1830.        
  1831.         ent_count[id]++;
  1832.        
  1833.         for(new i=0;i<2;i++)
  1834.         {
  1835.             beam_entity[id][ent_count[id]] = create_entity("info_target");
  1836.        
  1837.             //entity_set_int(beam_entity[id][ent_count[id]], EV_INT_solid, SOLID_NOT);
  1838.             entity_set_model(beam_entity[id][ent_count[id]], "models/hairt.mdl");
  1839.            
  1840.             new Float:ent_org[3];
  1841.             if(direct[0])
  1842.             {
  1843.                 ent_org[0]=temp_or[1];
  1844.                
  1845.                 if(i==1)
  1846.                     ent_org[1]=temp_start+full;
  1847.                 else
  1848.                     ent_org[1]=temp_start;
  1849.             }
  1850.             else
  1851.             {
  1852.                 if(i==1)
  1853.                     ent_org[0]=temp_start+full;
  1854.                 else
  1855.                     ent_org[0]=temp_start;
  1856.                    
  1857.                 ent_org[1]=temp_or[1];
  1858.             }
  1859.             ent_org[2]=temp_or[2]-10.0;
  1860.            
  1861.             entity_set_origin(beam_entity[id][ent_count[id]], ent_org);
  1862.            
  1863.             message_begin(MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, {0, 0, 0}, id);
  1864.            
  1865.             write_byte(TE_BEAMENTPOINT);
  1866.             write_short(beam_entity[id][ent_count[id]]);
  1867.     ///////////////////////////////////////////
  1868.             if(direct[0])
  1869.             {
  1870.                 write_coord(floatround(temp_or[1]));
  1871.                
  1872.                 if(i==1)
  1873.                     write_coord(floatround(temp_start+full));
  1874.                 else
  1875.                     write_coord(floatround(temp_start));
  1876.             }
  1877.             else
  1878.             {
  1879.                 if(i==1)
  1880.                     write_coord(floatround(temp_start+full));
  1881.                 else
  1882.                     write_coord(floatround(temp_start));
  1883.                    
  1884.                 write_coord(floatround(temp_or[1]));
  1885.             }
  1886.             write_coord(floatround(temp_or[2]+10.0));
  1887.     ///////////////////////////////////////////
  1888.             write_short(heystats);
  1889.             write_byte(0);
  1890.             write_byte(5);
  1891.             write_byte(showtime_st_stats[id]);
  1892.             write_byte(5);
  1893.             write_byte(0);
  1894.                
  1895.            
  1896.             write_byte(0);
  1897.             write_byte(0);
  1898.             write_byte(255);
  1899.        
  1900.             write_byte(150);
  1901.             write_byte(1);
  1902.             message_end();
  1903.            
  1904.             ent_count[id]++;
  1905.         }
  1906.        
  1907.         for(new i=1;i<=str_num;i++)
  1908.         {
  1909.             new Float:st_start,Float:st_finish;
  1910.            
  1911.             st_finish=temp_start+strafe_lost[i]+strafe_frame1[i]+strafe_frame2[i];
  1912.             st_start=temp_start+strafe_lost[i];
  1913.             //ColorChat(id,RED,"start=%f tempstart=%f st_start=%f st_finish=%f",os_start,temp_start, st_start,st_finish);
  1914.            
  1915.             for(new Float:j=st_start,count_l=0;j<st_finish;j++)
  1916.             {
  1917.                 beam_entity[id][ent_count[id]] = create_entity("info_target");
  1918.        
  1919.             //  entity_set_int(beam_entity[id][ent_count[id]], EV_INT_solid, SOLID_NOT);
  1920.                 entity_set_model(beam_entity[id][ent_count[id]], "models/hairt.mdl");
  1921.                
  1922.                 new Float:ent_org[3];
  1923.                 if(direct[0])
  1924.                 {
  1925.                     ent_org[0]=temp_or[1];
  1926.                     ent_org[1]=j;
  1927.                 }
  1928.                 else
  1929.                 {
  1930.                     ent_org[0]=j;
  1931.                     ent_org[1]=temp_or[1];
  1932.                 }
  1933.                
  1934.                 if(i%2!=0)
  1935.                     ent_org[2]=temp_or[2];
  1936.                 else
  1937.                     ent_org[2]=temp_or[2]-4.0;
  1938.                
  1939.                 entity_set_origin(beam_entity[id][ent_count[id]], ent_org);
  1940.                
  1941.                 message_begin(MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, {0, 0, 0}, id);
  1942.                
  1943.                 write_byte(TE_BEAMENTPOINT);
  1944.                 write_short(beam_entity[id][ent_count[id]]);
  1945.  
  1946.         ///////////////////////////////////////////
  1947.                 if(direct[0])
  1948.                 {
  1949.                     write_coord(floatround(temp_or[1]));
  1950.                     write_coord(floatround(j));
  1951.                 }
  1952.                 else
  1953.                 {
  1954.                     write_coord(floatround(j));
  1955.                     write_coord(floatround(temp_or[1]));
  1956.                 }
  1957.                
  1958.                 if(i%2!=0)
  1959.                     write_coord(floatround(temp_or[2]+4.0));
  1960.                 else
  1961.                     write_coord(floatround(temp_or[2]));
  1962.         ///////////////////////////////////////////
  1963.                 write_short(heystats);
  1964.                 write_byte(0);
  1965.                 write_byte(5);
  1966.                 write_byte(showtime_st_stats[id]);
  1967.                 write_byte(5);
  1968.                 write_byte(0);
  1969.                    
  1970.                 if(l_lost[i][count_l])
  1971.                 {
  1972.                     write_byte(255);
  1973.                     write_byte(0);
  1974.                     write_byte(0);
  1975.                     line_lost[id][i][count_l]=0;
  1976.                 }
  1977.                 else
  1978.                 {
  1979.                     write_byte(0);
  1980.                     write_byte(255);
  1981.                     write_byte(0);
  1982.                 }
  1983.                
  1984.                 write_byte(200);
  1985.                 write_byte(1);
  1986.                 message_end();
  1987.                 count_l++;
  1988.                 ent_count[id]++;
  1989.             }
  1990.             temp_start=st_finish;
  1991.         }
  1992.     }
  1993. }
  1994.  
  1995.  
  1996. public fwdPreThink( id )
  1997. {
  1998.     if(g_userConnected[id]==true && g_pBot[id]==false)
  1999.     {  
  2000.         if(uq_admins==1 && !player_admin[id])
  2001.         {
  2002.             return FMRES_IGNORED;
  2003.         }
  2004.         else
  2005.         {
  2006.             new tmpTeam[33],dead_flag; 
  2007.             get_user_team(id,tmpTeam,32);
  2008.             dead_flag=pev(id, pev_deadflag);
  2009.            
  2010.             if(equali(tmpTeam,"SPECTATOR") && g_alive[id])
  2011.             {
  2012.                 g_alive[id]=false;
  2013.                
  2014.                 if( task_exists(id, 0) )
  2015.                     remove_task(id, 0);
  2016.                    
  2017.                 if( task_exists(id+434490, 0) )
  2018.                     remove_task(id+434490, 0);
  2019.                    
  2020.                 if( task_exists(id, 0) )
  2021.                     remove_task(id, 0);
  2022.                
  2023.                 if( task_exists(id+89012, 0) )
  2024.                     remove_task(id+89012, 0);
  2025.                
  2026.                 if( task_exists(id+3313, 0) )
  2027.                     remove_task(id+3313, 0);
  2028.                
  2029.                 if( task_exists(id+3214, 0) )
  2030.                     remove_task(id+3214, 0);
  2031.                    
  2032.                 if( task_exists(id+15237, 0) )
  2033.                     remove_task(id+15237, 0);
  2034.                
  2035.                 if( task_exists(id+212398, 0) )
  2036.                     remove_task(id+212398, 0);
  2037.             }
  2038.             else if(equali(tmpTeam,"TERRORIST") || equali(tmpTeam,"CT"))
  2039.             {
  2040.                 if(dead_flag==2 && g_alive[id])
  2041.                 {
  2042.                     g_alive[id]=false;
  2043.                    
  2044.                     if( task_exists(id, 0) )
  2045.                         remove_task(id, 0);
  2046.                        
  2047.                     if( task_exists(id+434490, 0) )
  2048.                         remove_task(id+434490, 0);
  2049.                        
  2050.                     if( task_exists(id, 0) )
  2051.                         remove_task(id, 0);
  2052.                    
  2053.                     if( task_exists(id+89012, 0) )
  2054.                         remove_task(id+89012, 0);
  2055.                    
  2056.                     if( task_exists(id+3313, 0) )
  2057.                         remove_task(id+3313, 0);
  2058.                    
  2059.                     if( task_exists(id+3214, 0) )
  2060.                         remove_task(id+3214, 0);
  2061.                        
  2062.                     if( task_exists(id+15237, 0) )
  2063.                         remove_task(id+15237, 0);
  2064.                    
  2065.                     if( task_exists(id+212398, 0) )
  2066.                         remove_task(id+212398, 0);
  2067.                 }
  2068.                 else if(dead_flag==0 && g_alive[id]==false)
  2069.                 {
  2070.                     g_alive[id]=true;
  2071.                 }
  2072.             }
  2073.            
  2074.            
  2075.            
  2076.             if(uq_team==0)
  2077.             {
  2078.                 team[id]=0;
  2079.             }
  2080.             else if(equali(tmpTeam,"TERRORIST"))
  2081.             {
  2082.                 team[id]=1;
  2083.             }
  2084.             else if(equali(tmpTeam,"CT"))
  2085.             {
  2086.                 team[id]=2;
  2087.             }
  2088.             else
  2089.             {
  2090.                 team[id]=uq_team;
  2091.             }
  2092.            
  2093.             if( g_alive[id] && team[id]==uq_team)
  2094.             {
  2095.                 static bool:failed_ducking[33];
  2096.                 static bool:first_frame[33];
  2097.                 static Float:duckoff_time[33];
  2098.                 static Float:duckoff_origin[33][3], Float:pre_jumpoff_origin[33][3];
  2099.                 static Float:jumpoff_foot_height[33];  
  2100.                 static Float:prest[33],Float:prest1[33],Float:jumpoff_origin[33][3],Float:failed_velocity[33][3],Float:failed_origin[33][3];
  2101.                 static Float:frame_origin[33][2][3], Float:frame_velocity[33][2][3], Float:jumpoff_time[33], Float:last_land_time[33];
  2102.                
  2103.                 new entlist1[1];
  2104.                
  2105.                 weapSpeedOld[id] = weapSpeed[id];
  2106.                
  2107.                 if( g_reset[id] ==true)
  2108.                 {
  2109.                     angles_arry[id]=0;
  2110.                     dd_sync[id]=0;
  2111.                     g_reset[id] = false;
  2112.                     g_Jumped[id]    = false;
  2113.                     cjjump[id] =false;
  2114.                     in_air[id]  = false;
  2115.                     in_duck[id] = false;
  2116.                     in_bhop[id] = false;
  2117.                     ducks[id]=0;
  2118.                     first_duck_z[id]=0.0;
  2119.                     backwards[id]=false;
  2120.                     dropaem[id]=false;
  2121.                     failed_jump[id] = false;
  2122.                     prest[id]=0.0;
  2123.                     bug_true[id]=false;
  2124.                     detecthj[id]=0;
  2125.                     edgedone[id]=false;
  2126.                     jumpblock[id]=1000;
  2127.                     schetchik[id]=0;
  2128.                     CjafterJump[id]=0;
  2129.                     upBhop[id]=false;
  2130.                     old_type_dropbj[id]=Type_Null;
  2131.                     first_surf[id]=false;
  2132.                     surf[id]=0.0;
  2133.                     ddbeforwj[id]=false;
  2134.                     duckstring[id]=false;
  2135.                     notjump[id]=false;
  2136.                     frames_gained_speed[id] = 0;
  2137.                     frames[id]  = 0;
  2138.                     strafe_num[id] = 0;
  2139.                     ladderjump[id]=false;
  2140.                     started_multicj_pre[id] = false;
  2141.                     started_cj_pre[id]      = false;
  2142.                     jumpoffirst[id]=false;
  2143.                     jump_type[id]   = Type_None;
  2144.                     gBeam_count[id] = 0;
  2145.                     edgedist[id]=0.0;
  2146.                     oldjump_height[id]=0.0;
  2147.                     jheight[id]=0.0;
  2148.                     duckbhop_bug_pre[id]=false;
  2149.                     FullJumpFrames[id]=0;
  2150.                     direct_for_strafe[id]=0;
  2151.                     ddstandcj[id]=false;
  2152.                    
  2153.                     for( new i = 0; i < 100; i++ )
  2154.                     {
  2155.                         gBeam_points[id][i][0]  = 0.0;
  2156.                         gBeam_points[id][i][1]  = 0.0;
  2157.                         gBeam_points[id][i][2]  = 0.0;
  2158.                         gBeam_duck[id][i]   = false;
  2159.                         gBeam_button[id][i]=false;
  2160.                        
  2161.                     }
  2162.                     Checkframes[id]=false;
  2163.                     for(new i=0;i<NSTRAFES;i++)
  2164.                     {
  2165.                         type_button_what[id][i]=0;
  2166.                         if(uq_istrafe)
  2167.                             lost_frame_count[id][i]=0;                     
  2168.                     }
  2169.                    
  2170.                     if(uq_istrafe)
  2171.                     {
  2172.                         for(new i=0;i<=line_erase_strnum[id];i++)
  2173.                         {
  2174.                             for( new j = 0; j <= line_erase[id][i]; j++ )
  2175.                             {
  2176.                                 if(i<NSTRAFES && j<NVAR)
  2177.                                     line_lost[id][i][j]=0;
  2178.                             }
  2179.                         }
  2180.                     }
  2181.                 }
  2182.                
  2183.                 static button, oldbuttons, flags;
  2184.                 pev(id, pev_maxspeed, weapSpeed[id]);
  2185.                 pev(id, pev_origin, origin);
  2186.                 button = pev(id, pev_button );
  2187.                 flags = pev(id, pev_flags );
  2188.                 oldbuttons = pev( id, pev_oldbuttons );
  2189.                
  2190.                 static Float:fGravity,Pmaxspeed;
  2191.                 pev(id, pev_gravity, fGravity);
  2192.                 Pmaxspeed=pev( id, pev_maxspeed );
  2193.                 new Float:velocity[3];
  2194.                 pev(id, pev_velocity, velocity);
  2195.                 movetype[id] = pev(id, pev_movetype);
  2196.                
  2197.                 if( flags&FL_ONGROUND && flags&FL_INWATER )  
  2198.                         velocity[2] = 0.0;
  2199.                 if( velocity[2] != 0 )
  2200.                     velocity[2]-=velocity[2];
  2201.                    
  2202.                 speed[id] = vector_length(velocity);   
  2203.                
  2204.                 new is_spec_user[33];
  2205.                 for( new i = INFO_ONE; i < max_players; i++ )
  2206.                 {
  2207.                     is_spec_user[i]=is_user_spectating_player(i, id);
  2208.                 }
  2209.                 if(strafe_num[id]>NSTRAFES1)
  2210.                 {
  2211.                     g_reset[id]=true;
  2212.                     for( new i = INFO_ONE; i < max_players; i++ )
  2213.                     {
  2214.                         if( (i == id || is_spec_user[i]))
  2215.                         {
  2216.                             set_hudmessage( 255, 255, 255, stats_x, stats_y, 0, 6.0, 2.5, 0.1, 0.3, h_stats );
  2217.                             show_hudmessage(i,"%L",LANG_SERVER,"UQSTATS_STR1",NSTRAFES1,strafe_num[id]);   
  2218.                         }
  2219.                     }
  2220.                     return FMRES_IGNORED;
  2221.                 }
  2222.                
  2223.                
  2224.                 if((button&IN_RIGHT || button&IN_LEFT) && !(flags&FL_ONGROUND))
  2225.                 {
  2226.                     for(new i = INFO_ONE; i < max_players; i++ )
  2227.                     {
  2228.                         if( (i == id || is_spec_user[i]))
  2229.                         {
  2230.                             client_print(i,print_center,"%L",LANG_SERVER,"UQSTATS_STR2");
  2231.                             JumpReset(id,28);
  2232.                             return FMRES_IGNORED;
  2233.                         }
  2234.                     }
  2235.                 }
  2236.                 new airace,aircj;
  2237.                 if(uq_airaccel<=10 && uq_airaccel!=1)
  2238.                 {
  2239.                     if(uq_airaccel==0)
  2240.                         airace=10;
  2241.                     else
  2242.                         airace=uq_airaccel;
  2243.                        
  2244.                     aircj=0;
  2245.                     formatex(airacel[id],32,"");
  2246.                 }
  2247.                 else
  2248.                 {
  2249.                     if(uq_airaccel==1)
  2250.                     {
  2251.                         airace=100;
  2252.                         formatex(airacel[id],32,"(100aa)");
  2253.                     }
  2254.                     else
  2255.                     {
  2256.                         airace=uq_airaccel;
  2257.                         formatex(airacel[id],32,"(%daa)",uq_airaccel);
  2258.                     }
  2259.                     aircj=10;
  2260.                 }
  2261.                
  2262.                 new spd;
  2263.                 if(equali(mapname,"slide_gs_longjumps") || equali(mapname,"b2j_slide_longjumps"))
  2264.                 {
  2265.                     spd=1400;
  2266.                 }
  2267.                 else spd=450;
  2268.                
  2269.                 if(speed[id]> spd || weapSpeedOld[id] != weapSpeed[id])
  2270.                 {
  2271.                     if(weapSpeedOld[id] != weapSpeed[id])
  2272.                     {
  2273.                        
  2274.                         changetime[id]=get_gametime();
  2275.                     }
  2276.                     JumpReset(id,29);
  2277.                     return FMRES_IGNORED;
  2278.                 }
  2279.                
  2280.                 if(leg_settings==1 && (get_pcvar_num(edgefriction) != 2 || fGravity != 1.0 || get_pcvar_num(mp_footsteps) != 1
  2281.                     || get_pcvar_num(sv_cheats) != 0
  2282.                     || get_pcvar_num(sv_gravity) != 800
  2283.                     || get_pcvar_num(sv_airaccelerate) != airace
  2284.                     || get_pcvar_num(sv_maxspeed) != 320
  2285.                     || get_pcvar_num(sv_stepsize) != 18
  2286.                     || get_pcvar_num(sv_maxvelocity) != 2000
  2287.                     || pev(id, pev_waterlevel) >= 2 ))
  2288.                     {
  2289.                         JumpReset(id,99);
  2290.                         return FMRES_IGNORED;
  2291.                     }
  2292.            
  2293.                 if(!(button&IN_MOVELEFT)
  2294.                 && oldbuttons&IN_MOVELEFT)
  2295.                 {
  2296.                     preessbutton[id]=false;
  2297.                     button_what[id]=0;
  2298.                 }
  2299.                 else if(oldbuttons&IN_MOVERIGHT
  2300.                 && !(button&IN_MOVERIGHT))
  2301.                 {
  2302.                     button_what[id]=0;
  2303.                     preessbutton[id]=false;
  2304.                 }
  2305.                 else if(oldbuttons&IN_BACK
  2306.                 && !(button&IN_BACK))
  2307.                 {
  2308.                     preessbutton[id]=false;
  2309.                     button_what[id]=0;
  2310.                 }
  2311.                 else if(oldbuttons&IN_FORWARD
  2312.                 && !(button&IN_FORWARD))
  2313.                 {
  2314.                     preessbutton[id]=false;
  2315.                     button_what[id]=0;
  2316.                 }
  2317.                    
  2318.                 if( !(flags&FL_ONGROUND) )
  2319.                 {
  2320.                     last_land_time[id] = get_gametime();
  2321.                     jof[id]=0.0;
  2322.                 }
  2323.                    
  2324.                
  2325.                 if(bhopaem[id]==true && !(flags&FL_ONGROUND) && movetype[id] != MOVETYPE_FLY)
  2326.                 {
  2327.                     bhopaemtime[id]=get_gametime();
  2328.                 }
  2329.                 else if(bhopaem[id]==true && flags&FL_ONGROUND && get_gametime()-bhopaemtime[id]>0.1 && movetype[id] != MOVETYPE_FLY)
  2330.                 {
  2331.            
  2332.                     bhopaem[id]=false;
  2333.                 }
  2334.                
  2335.                 if(nextbhop[id]==true && flags&FL_ONGROUND && first_ground_bhopaem[id]==false)
  2336.                 {
  2337.                     first_ground_bhopaem[id]=true;
  2338.                     ground_bhopaem_time[id]=get_gametime();
  2339.                 }
  2340.                 else if(nextbhop[id]==true && !(flags&FL_ONGROUND) && first_ground_bhopaem[id]==true && movetype[id] != MOVETYPE_FLY)
  2341.                 {
  2342.                     first_ground_bhopaem[id]=false;
  2343.                 }
  2344.                
  2345.                 if(nextbhop[id]==true && flags&FL_ONGROUND && first_ground_bhopaem[id]==true && (get_gametime()-ground_bhopaem_time[id]>0.1) && movetype[id] != MOVETYPE_FLY)
  2346.                 {
  2347.                     first_ground_bhopaem[id]=false;
  2348.                     bhopaem[id]=false;
  2349.                     nextbhop[id]=false;
  2350.                 }
  2351.                
  2352.                 if(nextbhop[id]==true && !(flags&FL_ONGROUND) && movetype[id] != MOVETYPE_FLY)
  2353.                 {
  2354.                     nextbhoptime[id]=get_gametime();
  2355.                 }
  2356.                 if(nextbhop[id]==true && flags&FL_ONGROUND && get_gametime()-nextbhoptime[id]>0.1 && movetype[id] != MOVETYPE_FLY)
  2357.                 {
  2358.                     nextbhop[id]=false;
  2359.                 }
  2360.                 if(flags & FL_ONGROUND && h_jumped[id]==false && movetype[id] != MOVETYPE_FLY)
  2361.                 {
  2362.                     heightoff_origin[id]=0.0;
  2363.                 }
  2364.                
  2365.                 if(!g_Jumped[id] && flags & FL_ONGROUND && button&IN_BACK && backwards[id]==false)
  2366.                 {
  2367.                     backwards[id]=true;
  2368.                 }
  2369.                 else if(!g_Jumped[id] && flags & FL_ONGROUND && button&IN_FORWARD && backwards[id])
  2370.                 {
  2371.                     backwards[id]=false;
  2372.                 }
  2373.                
  2374.                 if(flags & FL_ONGROUND && button&IN_JUMP && !(oldbuttons&IN_JUMP) && movetype[id] != MOVETYPE_FLY)
  2375.                 {
  2376.                     if(is_user_ducking(id))
  2377.                     {
  2378.                         heightoff_origin[id]=origin[2]+18;
  2379.                     }
  2380.                     else heightoff_origin[id]=origin[2];
  2381.                    
  2382.                     h_jumped[id]=true;
  2383.                 }
  2384.                 else if(flags & FL_ONGROUND && h_jumped[id] && movetype[id] != MOVETYPE_FLY)
  2385.                 {
  2386.                     new Float:heightland_origin;
  2387.                     if(is_user_ducking(id))
  2388.                     {
  2389.                         heightland_origin=origin[2]+18;
  2390.                     }
  2391.                     else heightland_origin=origin[2];
  2392.                    
  2393.                    
  2394.                     for( new i = INFO_ONE; i < max_players; i++ )
  2395.                     {
  2396.                         if( (i == id || is_spec_user[i]))
  2397.                         {  
  2398.                             if(height_show[i]==true )
  2399.                             {
  2400.                                 if(heightland_origin-heightoff_origin[id]==0.0)
  2401.                                 {
  2402.                                     set_hudmessage(prest_r,prest_g, prest_b, stats_x, stats_y, 0, 0.0, 0.7, 0.1, 0.1, h_stats);
  2403.                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_FJHEIGH1");
  2404.                                 }
  2405.                                 else if(heightland_origin-heightoff_origin[id]>0.0)
  2406.                                 {
  2407.                                     set_hudmessage(prest_r,prest_g, prest_b, stats_x, stats_y, 0, 0.0, 0.7, 0.1, 0.1, h_stats);
  2408.                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_FJHEIGH2",heightland_origin-heightoff_origin[id]);
  2409.                                 }
  2410.                                 else if(heightland_origin-heightoff_origin[id]<0.0)
  2411.                                 {
  2412.                                     set_hudmessage(prest_r,prest_g, prest_b, stats_x, stats_y, 0, 0.0, 0.7, 0.1, 0.1, h_stats);
  2413.                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_FJHEIGH3",floatabs(heightland_origin-heightoff_origin[id]));
  2414.                                 }
  2415.                             }
  2416.                         }
  2417.                     }
  2418.                     for( new i = INFO_ONE; i < max_players; i++ )
  2419.                     {
  2420.                         if( (i == id || is_spec_user[i]))
  2421.                         {
  2422.                             if(height_show[i]==true )
  2423.                             {
  2424.                                 if(heightland_origin-heightoff_origin[id]==0.0)
  2425.                                 {
  2426.                                     client_print( i, print_console,"%L",LANG_SERVER,"UQSTATS_FJHEIGH1");
  2427.                                 }
  2428.                                 else if(heightland_origin-heightoff_origin[id]>0.0)
  2429.                                 {
  2430.                                     client_print( i, print_console,"%L",LANG_SERVER,"UQSTATS_FJHEIGH2",heightland_origin-heightoff_origin[id]);
  2431.                                 }
  2432.                                 else if(heightland_origin-heightoff_origin[id]<0.0)
  2433.                                 {
  2434.                                     client_print( i, print_console,"%L",LANG_SERVER,"UQSTATS_FJHEIGH3",floatabs(heightland_origin-heightoff_origin[id]));
  2435.                                 }
  2436.                             }
  2437.                         }
  2438.                     }
  2439.                     h_jumped[id]=false;
  2440.                 }
  2441.                
  2442.                 if((movetype[id] != MOVETYPE_FLY)) 
  2443.                 {
  2444.                     if(firstfr[id]==false)
  2445.                     {
  2446.                         firstfr[id]=true;
  2447.                         pev(id, pev_velocity, velocity);
  2448.                         pev(id, pev_origin, origin);
  2449.                         if((g_Jumped[id]==true || !(flags&FL_ONGROUND)))
  2450.                         {
  2451.                             firstvel[id]=velocity[2];
  2452.                         }
  2453.                         firstorig[id]=origin;
  2454.                     }
  2455.                     else if(firstfr[id]==true )
  2456.                     {
  2457.                         pev(id, pev_origin, origin);
  2458.                         pev(id, pev_velocity, velocity);
  2459.            
  2460.                         secorig[id]=origin;
  2461.                         if((g_Jumped[id]==true || !(flags&FL_ONGROUND)))
  2462.                         {
  2463.                             secvel[id]=velocity[2];
  2464.                         }
  2465.                         firstfr[id]=false
  2466.                     }
  2467.                     if(!(flags&FL_ONGROUND) && first_air[id]==false)
  2468.                     {
  2469.                         framecount[id]++;
  2470.                         if(framecount[id]==2)
  2471.                         {
  2472.                             first_air[id]=true;
  2473.                         }
  2474.                        
  2475.                         SurfFrames[id]=floatabs(firstvel[id]-secvel[id]);
  2476.                        
  2477.                         if(floatabs(firstvel[id]-secvel[id])>41)
  2478.                         {
  2479.                             SurfFrames[id]=oldSurfFrames[id];
  2480.                         }
  2481.                         oldSurfFrames[id]=SurfFrames[id];
  2482.                     }
  2483.                     if(flags&FL_ONGROUND && first_air[id]==true)
  2484.                     {
  2485.                         first_air[id]=false;
  2486.                         framecount[id]=0;
  2487.                     }
  2488.                     if(!(flags&FL_ONGROUND) && SurfFrames[id]<7.9 && uq_fps==1 && fps_hight[id]==false)
  2489.                     {
  2490.                         fps_hight[id]=true;
  2491.                     }
  2492.                     if((flags&FL_ONGROUND) && SurfFrames[id]>7.9 && fps_hight[id])
  2493.                     {
  2494.                         fps_hight[id]=false;
  2495.                     }
  2496.            
  2497.                     if(!(flags&FL_ONGROUND) && 1.7*floatabs(firstvel[id]-secvel[id])<SurfFrames[id] && floatabs(firstvel[id]-secvel[id])!=4.0)
  2498.                     {
  2499.                         if(equali(mapname,"slide_gs_longjumps") || equali(mapname,"b2j_slide_longjumps"))
  2500.                         {
  2501.                             slide[id]=true;
  2502.                         }
  2503.                         else if(!ladderjump[id] && movetype[id] != MOVETYPE_FLY)
  2504.                         {
  2505.                             find_sphere_class (id, "func_ladder",200.0, entlist1, 1);
  2506.                             if(!entlist1[0])
  2507.                             {
  2508.                                 JumpReset(id,30);
  2509.                                 slide_protec[id]=true;
  2510.                                 return FMRES_IGNORED;
  2511.                             }
  2512.                         }
  2513.                     }
  2514.                     else
  2515.                     {
  2516.                         if(slide[id]==true && ((oldbuttons&IN_MOVELEFT && button&IN_MOVERIGHT) || (oldbuttons&IN_MOVERIGHT && button&IN_MOVELEFT)))
  2517.                         {
  2518.                             if(touch_ent[id])
  2519.                             {
  2520.                                 JumpReset(id,102);
  2521.                             }
  2522.                            
  2523.                             if(task_exists(id)) remove_task(id);
  2524.                            
  2525.                             set_task(1.5,"JumpReset1", id);
  2526.                            
  2527.                             pev(id, pev_origin, origin);
  2528.                            
  2529.                             slidim[id]=true;
  2530.                             jump_type[id]=Type_Slide;
  2531.                            
  2532.                             g_Jumped[id]    = true;
  2533.                             prestrafe[id]   = speed[id];
  2534.            
  2535.                             if(showpre[id]==true)
  2536.                             {
  2537.                                 set_hudmessage(255,255, 255, -1.0, 0.85, 0, 0.0, 0.7, 0.1, 0.1, 2);
  2538.                                 show_hudmessage(id, "Slide pre: %.03f",speed);
  2539.                             }
  2540.                             slide[id]=false;
  2541.                         }
  2542.                     }
  2543.                    
  2544.                     firstorig[id][2]=0.0;
  2545.                     secorig[id][2]=0.0;
  2546.                    
  2547.                     if((slidim[id]==true || slide[id]==true) && get_distance_f(firstorig[id],secorig[id])>20.0)
  2548.                     {
  2549.                         groundslide[id]=0.0;
  2550.                         waits[id]=0;
  2551.                         slidim[id]=false;
  2552.                         taskslide[id]=0;
  2553.                         failslide[id]=false;
  2554.                         slide[id]=false;
  2555.                         g_Jumped[id]    = false;
  2556.                        
  2557.                         return FMRES_IGNORED;
  2558.                     }
  2559.                    
  2560.                     if((g_Jumped[id]==true || h_jumped[id]) && get_distance_f(firstorig[id],secorig[id])>6.0)
  2561.                     {
  2562.                         h_jumped[id]=false;
  2563.                         JumpReset(id,31);
  2564.                         return FMRES_IGNORED;
  2565.                     }
  2566.                 }
  2567.                 if(slidim[id]==true)
  2568.                 {
  2569.                    
  2570.                     //if(Pmaxspeed != 250.0)
  2571.                     //{
  2572.                     //  client_print(id,print_center,"Slide works only withs weapons 250.0 speed");
  2573.                     //  return FMRES_IGNORED;
  2574.                     //}
  2575.                    
  2576.                     pev(id, pev_origin, origin);
  2577.                     new Float:start[33][3],Float:end[33][3];
  2578.                    
  2579.                
  2580.                     start[id][0]=origin[0];
  2581.                     start[id][1]=origin[1]+16.0;
  2582.                     start[id][2]=origin[2];
  2583.                     end[id][0]=origin[0];
  2584.                     end[id][1]=origin[1]+16.0;
  2585.                     end[id][2]=origin[2]-500.0;
  2586.                    
  2587.                     engfunc(EngFunc_TraceLine, start[id], end[id], IGNORE_GLASS, id, 0);
  2588.                     get_tr2( 0, TR_vecEndPos, slidez[id][0]);
  2589.            
  2590.                     start[id][0]=origin[0];
  2591.                     start[id][1]=origin[1]-16.0;
  2592.                     start[id][2]=origin[2];
  2593.                     end[id][0]=origin[0];
  2594.                     end[id][1]=origin[1]-16.0;
  2595.                     end[id][2]=origin[2]-500.0;
  2596.                    
  2597.                     engfunc(EngFunc_TraceLine, start[id], end[id], IGNORE_GLASS, id, 0);
  2598.                     get_tr2( 0, TR_vecEndPos, slidez[id][1]);
  2599.                    
  2600.                     start[id][0]=origin[0]+16.0;
  2601.                     start[id][1]=origin[1];
  2602.                     start[id][2]=origin[2];
  2603.                     end[id][0]=origin[0]+16.0;
  2604.                     end[id][1]=origin[1];
  2605.                     end[id][2]=origin[2]-500.0;
  2606.                    
  2607.                     engfunc(EngFunc_TraceLine, start[id], end[id], IGNORE_GLASS, id, 0);
  2608.                     get_tr2( 0, TR_vecEndPos, slidez[id][2]);
  2609.                    
  2610.                     start[id][0]=origin[0]-16.0;
  2611.                     start[id][1]=origin[1];
  2612.                     start[id][2]=origin[2];
  2613.                     end[id][0]=origin[0]-16.0;
  2614.                     end[id][1]=origin[1];
  2615.                     end[id][2]=origin[2]-500.0;
  2616.                    
  2617.                     engfunc(EngFunc_TraceLine, start[id], end[id], IGNORE_GLASS, id, 0);
  2618.                     get_tr2( 0, TR_vecEndPos, slidez[id][3]);
  2619.                    
  2620.                     for(new i=0;i<4;i++)
  2621.                     {      
  2622.                         if(i!=3)
  2623.                         {
  2624.                             if(slidez[id][i][2]>slidez[id][i+1][2])
  2625.                             {
  2626.                                 needslide[id]=slidez[id][i][2];
  2627.                                 groundslide[id]=slidez[id][i+1][2];
  2628.                            
  2629.                                 if(needslide[id]-groundslide[id]>149.0 && landslide[id]==false)
  2630.                                 {
  2631.                                     landslide[id]=true;
  2632.                                     pev(id, pev_origin, origin);
  2633.                                     if( !(is_user_ducking(id)) )
  2634.                                     {
  2635.                                         origin[2]-=36.0;
  2636.                                     }
  2637.                                     else origin[2]-=18.0;
  2638.                                    
  2639.                                     slideland[id]=origin[2];
  2640.                                     slidedist[id]=slideland[id]-groundslide[id];
  2641.                                     maxspeed[id]=speed[id];
  2642.                                 }
  2643.                             }
  2644.                         }
  2645.                     }
  2646.                
  2647.                     if(taskslide[id]==0)
  2648.                     {
  2649.                         set_task(0.4,"wait", id+3313);
  2650.                         taskslide[id]=1;
  2651.                     }
  2652.                    
  2653.                     pev(id, pev_velocity, velocity);
  2654.                     if(velocity[1]==0.0 && failslide[id]==false && !(flags&FL_ONGROUND) && waits[id]==1 )
  2655.                     {
  2656.                         if( !(is_user_ducking(id)) )
  2657.                         {
  2658.                             origin[2]-=36.0;
  2659.                         }
  2660.                         else origin[2]-=18.0;
  2661.                         failslidez[id]=origin[2];
  2662.                         failslide[id]=true;        
  2663.                     }
  2664.                 }
  2665.                
  2666.                 if(flags&FL_ONGROUND && slidim[id]==true && Pmaxspeed == 250.0)
  2667.                 {
  2668.                     for( new i = INFO_ONE; i < max_players; i++ )
  2669.                     {
  2670.                         if( (i == id || is_spec_user[i]) && g_lj_stats[i]==true)
  2671.                         {
  2672.                             if(needslide[id]-groundslide[id]==slidedist[id])
  2673.                             {
  2674.                                 client_print(i, print_console, "Slide Distance: %d.xxx",floatround(slidedist[id], floatround_floor));
  2675.                                 set_hudmessage( stats_r, stats_g, stats_b, stats_x, stats_y, 0, 6.0, 2.5, 0.1, 0.3, h_stats )
  2676.                                 show_hudmessage( i, "Slide Distance: %d.xxx",floatround(slidedist[id], floatround_floor));
  2677.                             }
  2678.                             else
  2679.                             {
  2680.                                 client_print(i, print_console, "Slide Distance: %f",slidedist[id]);
  2681.                                 set_hudmessage(stats_r, stats_g, stats_b, stats_x, stats_y, 0, 6.0, 2.5, 0.1, 0.3, h_stats );  
  2682.                                 show_hudmessage( i, "Slide Distance: %f",slidedist[id]);
  2683.                            
  2684.                             }
  2685.                         }
  2686.                     }
  2687.                                    
  2688.                     new iPlayers[32],iNum;
  2689.                     get_players ( iPlayers, iNum,"ch") ;
  2690.                     for(new i=0;i<iNum;i++)
  2691.                     {
  2692.                         new ids=iPlayers[i];
  2693.                         if(gHasColorChat[ids] ==true || ids==id)
  2694.                         {
  2695.                             if(needslide[id]-groundslide[id]==slidedist[id])
  2696.                             {
  2697.                                 ColorChat(ids, GREY, "[%s] %s jumped %d.xxx units with Slide lj!^x01%s",prefix, g_playername[id], floatround(slidedist[id], floatround_floor),airacel[id]);
  2698.                             }
  2699.                             else
  2700.                             ColorChat(ids, GREY, "[%s] %s jumped %.3f units with Slide lj!^x01%s",prefix, g_playername[id], slidedist[id],airacel[id]);            
  2701.                         }
  2702.                     }
  2703.                                        
  2704.                     slidim[id]=false;
  2705.                     groundslide[id]=0.0;
  2706.                     waits[id]=0;
  2707.                     slidim[id]=false;
  2708.                     taskslide[id]=0;
  2709.                     taskslide1[id]=0;
  2710.                    
  2711.                     message_begin(MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, {0, 0, 0}, id);
  2712.                     write_byte ( TE_BEAMPOINTS );
  2713.                     write_coord(floatround(origin[0]));
  2714.                     write_coord(floatround(origin[1]));
  2715.                     write_coord(floatround(slideland[id]));
  2716.                     write_coord(floatround(origin[0]));
  2717.                     write_coord(floatround(origin[1]+52.0));
  2718.                     write_coord(floatround(slideland[id]));
  2719.                
  2720.                     write_short(gBeam);
  2721.                     write_byte(1);
  2722.                     write_byte(5);
  2723.                     write_byte(1130);
  2724.                     write_byte(20);
  2725.                     write_byte(0);
  2726.                     write_byte(255);
  2727.                     write_byte(0);
  2728.                     write_byte(0);
  2729.                    
  2730.                     write_byte(200);
  2731.                     write_byte(200);
  2732.                     message_end();
  2733.                     landslide[id]=false;
  2734.                 }
  2735.                 if((failslide[id]==true) && slidim[id]==true)
  2736.                 {
  2737.                     for( new i = INFO_ONE; i < max_players; i++ )
  2738.                     {
  2739.                         if( (i == id || is_spec_user[i]) && g_lj_stats[i]==true)
  2740.                         {
  2741.                             client_print(i, print_console, "Slide Distance: %f Prestrafe: %f",failslidez[id]-groundslide[id],prestrafe[id]);
  2742.                    
  2743.                             set_hudmessage( f_stats_r, f_stats_g, f_stats_b, stats_x, stats_y, 0, 6.0, 2.5, 0.1, 0.3, h_stats );
  2744.                             show_hudmessage( i, "Slide Distance: %f^nPrestrafe: %f",failslidez[id]-groundslide[id],prestrafe[id]);
  2745.                         }
  2746.                     }
  2747.                    
  2748.                     message_begin(MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, {0, 0, 0}, id);
  2749.                     write_byte ( TE_BEAMPOINTS );
  2750.                     write_coord(floatround(origin[0]));
  2751.                     write_coord(floatround(origin[1]));
  2752.                     write_coord(floatround(failslidez[id]));
  2753.                     write_coord(floatround(origin[0]));
  2754.                     write_coord(floatround(origin[1]+52.0));
  2755.                     write_coord(floatround(failslidez[id]));
  2756.                    
  2757.                     write_short(gBeam);
  2758.                     write_byte(1);
  2759.                     write_byte(5);
  2760.                     write_byte(1130);
  2761.                     write_byte(20);
  2762.                     write_byte(0);
  2763.                     write_byte(255);
  2764.                     write_byte(0);
  2765.                     write_byte(0);
  2766.                    
  2767.                     write_byte(200);
  2768.                     write_byte(200);
  2769.                     message_end();
  2770.            
  2771.                     failslide[id]=false;
  2772.                     slidim[id]=false;
  2773.                     groundslide[id]=0.0;
  2774.                     waits[id]=0;
  2775.                     taskslide[id]=0;
  2776.                     taskslide1[id]=0;
  2777.                 }
  2778.            
  2779.                 if( (in_air[id]==true || in_bhop[id] == true) && !(flags&FL_ONGROUND) )
  2780.                 {
  2781.                     static i;
  2782.                     for( i = INFO_ZERO; i < 2; i++ )
  2783.                     {
  2784.                         if( (i == 1)
  2785.                         || (frame_origin[id][i][0] == 0
  2786.                         && frame_origin[id][i][1] == 0
  2787.                         && frame_origin[id][i][2] == 0
  2788.                         && frame_velocity[id][i][0] == 0
  2789.                         && frame_velocity[id][i][1] == 0
  2790.                         && frame_velocity[id][i][2] == 0 ))
  2791.                         {
  2792.                             frame_origin[id][i][0] = origin[0];
  2793.                             frame_origin[id][i][1] = origin[1];
  2794.                             frame_origin[id][i][2] = origin[2];
  2795.                            
  2796.                             pev(id, pev_velocity, velocity);
  2797.                             frame_velocity[id][i][0] = velocity[0];
  2798.                             frame_velocity[id][i][1] = velocity[1];
  2799.                             frame_velocity[id][i][2] = velocity[2];
  2800.                             i=2;
  2801.                         }
  2802.                     }
  2803.                    
  2804.                 }
  2805.                
  2806.                 if( (in_air[id]) && !( flags & FL_ONGROUND ) && !failed_jump[id])
  2807.                 {  
  2808.                     if(uq_script_detection)
  2809.                     {
  2810.                         new Float:angles[3];
  2811.                         pev(id,pev_angles,angles);
  2812.                        
  2813.                         if(floatabs(angles[0]-old_angles[id][0])==0.0)
  2814.                         {
  2815.                             angles_arry[id]++;
  2816.                         }
  2817.                         //if()
  2818.                         //{
  2819.                         //  angles_arry1[id]++;
  2820.                         //}
  2821.                        
  2822.                         //client_print(id,print_chat,"%f",floatabs(vector_length(angles)-vector_length(old_angles[id])));  
  2823.                    
  2824.                         old_angles[id]=angles;
  2825.                     }
  2826.                    
  2827.                     new Float:jh_origin;
  2828.                    
  2829.                     jh_origin=origin[2];
  2830.                    
  2831.                     if(floatabs(jumpoff_origin[id][2]-jh_origin)<oldjump_height[id] && jheight[id]==0.0)
  2832.                     {
  2833.                        
  2834.                         if(is_user_ducking(id))
  2835.                         {
  2836.                             jheight[id]=oldjump_height[id]+18.0;
  2837.                         }
  2838.                         else jheight[id]=oldjump_height[id];
  2839.                        
  2840.                         for( new i = INFO_ONE; i < max_players; i++ )
  2841.                         {
  2842.                             if( (i == id || is_spec_user[i]))
  2843.                             {  
  2844.                                 if(jheight_show[i]==true )
  2845.                                 {
  2846.                                     set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  2847.                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE39",jheight[id]);
  2848.                                    
  2849.                                     client_print( i, print_console,"%L",LANG_SERVER,"UQSTATS_PRE39",jheight[id]);
  2850.                                 }
  2851.                             }
  2852.                         }
  2853.                        
  2854.                         if(!direct_for_strafe[id])
  2855.                         {
  2856.                             if(velocity[1]>0 && floatabs(velocity[1])>floatabs(velocity[0]))
  2857.                             {
  2858.                                 direct_for_strafe[id]=1;
  2859.                             }
  2860.                             else if(velocity[1]<0 && floatabs(velocity[1])>floatabs(velocity[0]))
  2861.                             {
  2862.                                 direct_for_strafe[id]=2;
  2863.                             }
  2864.                             else if(velocity[0]>0 && floatabs(velocity[0])>floatabs(velocity[1]))
  2865.                             {
  2866.                                 direct_for_strafe[id]=3;
  2867.                             }
  2868.                             else if(velocity[0]<0 && floatabs(velocity[0])>floatabs(velocity[1]))
  2869.                             {
  2870.                                 direct_for_strafe[id]=4;
  2871.                             }
  2872.                         }
  2873.                     }
  2874.                    
  2875.                    
  2876.                    
  2877.                     oldjump_height[id]=floatabs(jumpoff_origin[id][2]-origin[2]);
  2878.                    
  2879.                     if(bug_check[id]==0 && floatfract(velocity[2])==0)
  2880.                     {
  2881.                         bug_check[id]=1;
  2882.                     }
  2883.                     else if(bug_check[id]==1 && floatfract(velocity[2])==0)
  2884.                     {
  2885.                         bug_true[id]=true;
  2886.                         bug_check[id]=0;
  2887.                     }
  2888.                     if( !in_bhop[id] )
  2889.                     {
  2890.                         fnSaveBeamPos( id );
  2891.                     }
  2892.                     static Float:old_speed[33];
  2893.                     if( speed[id] > old_speed[id] )
  2894.                     {
  2895.                         frames_gained_speed[id]++;
  2896.                     }
  2897.                     frames[id]++;
  2898.                    
  2899.                     old_speed[id] = speed[id];
  2900.            
  2901.                     if( speed[id] > maxspeed[id] )
  2902.                     {
  2903.                         if (strafe_num[id] < NSTRAFES)
  2904.                         {
  2905.                             strafe_stat_speed[id][strafe_num[id]][0] += speed[id] - maxspeed[id];
  2906.                         }
  2907.                         maxspeed[id] = speed[id];
  2908.                     }
  2909.                     if ((speed[id] < TempSpeed[id]) && (strafe_num[id] < NSTRAFES))
  2910.                     {
  2911.                         strafe_stat_speed[id][strafe_num[id]][1] += TempSpeed[id] - speed[id];
  2912.                         if(strafe_stat_speed[id][strafe_num[id]][1]>5)
  2913.                         {
  2914.                             if(floatabs(firstvel[id]-secvel[id])<SurfFrames[id]-0.1)
  2915.                             {
  2916.                                 Checkframes[id]=true;
  2917.                             }
  2918.                             else if(floatabs(firstvel[id]-secvel[id])>SurfFrames[id])
  2919.                             {
  2920.                                 Checkframes[id]=true;
  2921.                             }
  2922.                         }
  2923.                        
  2924.                        
  2925.                     }
  2926.                     TempSpeed[id] = speed[id];
  2927.                    
  2928.                     if((origin[2] + 18.0 - jumpoff_origin[id][2] < 0))
  2929.                     {
  2930.                         failed_jump[id] = true;
  2931.                     }
  2932.                     else if( (is_user_ducking(id) ? (origin[2]+18) : origin[2]) >= jumpoff_origin[id][2] )
  2933.                     {
  2934.                         failed_origin[id] = origin;
  2935.                         failed_ducking[id] = is_user_ducking( id );
  2936.                         failed_velocity[id] = velocity;
  2937.                        
  2938.                         origin[2] = pre_jumpoff_origin[id][2]
  2939.                     }
  2940.                     if( first_frame[id] )
  2941.                     {
  2942.                         first_frame[id] = false;
  2943.                         frame_velocity[id][0] = velocity;
  2944.                        
  2945.                         gBeam_count[id] = 0;
  2946.                         for( new i = 0; i < 100; i++ )
  2947.                         {
  2948.                             gBeam_points[id][i][0]  = 0.0;
  2949.                             gBeam_points[id][i][1]  = 0.0;
  2950.                             gBeam_points[id][i][2]  = 0.0;
  2951.                             gBeam_duck[id][i]   = false;
  2952.                             gBeam_button[id][i]=false;
  2953.                         }
  2954.                        
  2955.                         if(in_bhop[id] && jump_type[id]!=Type_DuckBhop)
  2956.                         {
  2957.                             if(upBhop[id])
  2958.                             {
  2959.                                 if(jump_type[id]==Type_Up_Bhop_In_Duck)
  2960.                                 {
  2961.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_UBID");
  2962.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_UBID");
  2963.                                 }
  2964.                                 else if(velocity[2] < upbhop_koeff[id])
  2965.                                 {
  2966.                                     jump_type[id]=Type_Up_Bhop;
  2967.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_UBJ");
  2968.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_UBJ");
  2969.                                 }
  2970.                                 else
  2971.                                 {
  2972.                                     jump_type[id]=Type_Up_Stand_Bhop;
  2973.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_USBJ");
  2974.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_USBJ");
  2975.                                 }
  2976.                                 upBhop[id]=false;
  2977.                             }
  2978.                             else if(jump_type[id]==Type_Bhop_In_Duck)
  2979.                             {
  2980.                                 formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_BID");
  2981.                                 formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_BID");
  2982.                             }
  2983.                             else if( velocity[2] < 229.0)
  2984.                             {
  2985.                                 jump_type[id] = Type_BhopLongJump;
  2986.                                 formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_BJ");
  2987.                                 formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_BJ");
  2988.                             }
  2989.                             else
  2990.                             {
  2991.                            
  2992.                                 jump_type[id] = Type_StandupBhopLongJump;
  2993.                                 formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_SBJ");
  2994.                                 formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_SBJ");
  2995.                                 jumpoff_origin[id][2] = pre_jumpoff_origin[id][2];
  2996.                             }
  2997.                            
  2998.                             for( new i = INFO_ONE; i < max_players; i++ )
  2999.                             {
  3000.                                 if( (i == id || is_spec_user[i]))
  3001.                                 {  
  3002.                                     if(showpre[i]==true && prestrafe[id]>min_prestrafe[id])
  3003.                                     {
  3004.                                         if((Pmaxspeed * 1.2)>prestrafe[id] )
  3005.                                         {
  3006.                                             if(jump_type[id]==Type_Up_Bhop_In_Duck && (uq_upbhopinduck==1 ))
  3007.                                             {
  3008.                                                 set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3009.                                                 show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE33",prestrafe[id]);
  3010.                                             }
  3011.                                             else if(jump_type[id]==Type_Up_Bhop && (uq_upbj==1 ))
  3012.                                             {
  3013.                                                 set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3014.                                                 show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE34",prestrafe[id]);
  3015.                                             }
  3016.                                             else if(jump_type[id]==Type_Up_Stand_Bhop && (uq_upsbj==1 ))
  3017.                                             {
  3018.                                                 set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3019.                                                 show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE35",prestrafe[id]);
  3020.                                             }
  3021.                                             else if(jump_type[id]==Type_Bhop_In_Duck   &&  uq_bhopinduck==1)
  3022.                                             {
  3023.                                                 set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3024.                                                 show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE36",prestrafe[id]);
  3025.                                             }
  3026.                                             else if(jump_type[id]==Type_BhopLongJump   &&  uq_bj==1)
  3027.                                             {
  3028.                                                 set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3029.                                                 show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE37",prestrafe[id]);
  3030.                                             }
  3031.                                             else if(jump_type[id]==Type_StandupBhopLongJump  && uq_sbj==1)
  3032.                                             {
  3033.                                                 set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3034.                                                 show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE38",prestrafe[id]);
  3035.                                             }
  3036.                                         }
  3037.                                         else
  3038.                                         {  
  3039.                                             set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 1.5, 0.1, 0.1, h_prest);
  3040.                                             show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PREHIGH",prestrafe[id],Pmaxspeed * 1.2);
  3041.                                         }
  3042.                                     }
  3043.                                 }
  3044.                             }
  3045.                         }
  3046.                         else if(jump_type[id]==Type_DuckBhop)
  3047.                         {
  3048.                             for( new i = INFO_ONE; i < max_players; i++ )
  3049.                             {
  3050.                                 if( (i == id || is_spec_user[i]))
  3051.                                 {  
  3052.                                     if(showpre[i]==true && speed[id]>50.0)
  3053.                                     {
  3054.                                         if((Pmaxspeed * 1.2)>speed[id] )
  3055.                                         {
  3056.                                             if(prestrafe[id]<200)
  3057.                                             {
  3058.                                                 if(jump_type[id]==Type_DuckBhop && (uq_duckbhop==1))
  3059.                                                 {
  3060.                                                     set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3061.                                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE32",prestrafe[id]);
  3062.                                                 }
  3063.                                             }
  3064.                                         }
  3065.                                     }
  3066.                                 }
  3067.                             }
  3068.                         }
  3069.                     }
  3070.                     else
  3071.                     {  
  3072.                         frame_velocity[id][1] = velocity;
  3073.                     }
  3074.                    
  3075.                     if( in_bhop[id] )
  3076.                         fnSaveBeamPos( id );
  3077.            
  3078.                     if(detecthj[id]!=1)
  3079.                     {  
  3080.                         starthj[id][0] = origin[0];
  3081.                         starthj[id][1] = origin[1];
  3082.                         starthj[id][2] = jumpoff_origin[id][2]+28.0;
  3083.                         stophj[id][0] = origin[0];
  3084.                         stophj[id][1] = origin[1];
  3085.                         stophj[id][2] = starthj[id][2] - 133.0;
  3086.                            
  3087.                         engfunc( EngFunc_TraceLine, starthj[id], stophj[id], IGNORE_MONSTERS, id, 0 );
  3088.                         get_tr2( 0, TR_vecEndPos, endhj[id]);
  3089.                        
  3090.                         if(starthj[id][2]-endhj[id][2]<133.0 && (starthj[id][2]-endhj[id][2]-64)!=0 && (starthj[id][2]-endhj[id][2]-64)>0 && detecthj[id]!=1)
  3091.                         {
  3092.                             detecthj[id]=2;
  3093.                         }
  3094.                        
  3095.                         if(starthj[id][2]-endhj[id][2]>=133.0 && detecthj[id]!=2)
  3096.                         {
  3097.                             detecthj[id]=1;
  3098.                         }
  3099.                     }
  3100.                    
  3101.                     if(ddafterJump[id])
  3102.                         ddafterJump[id]=false
  3103.                 }
  3104.                
  3105.                 if(notjump[id] && bhopaem[id])
  3106.                 {
  3107.                     notjump[id]=false;
  3108.                 }
  3109.                
  3110.                 if( flags&FL_ONGROUND )
  3111.                 {
  3112.                     surf[id]=0.0;
  3113.                     if (!pev( id, pev_solid ))
  3114.                     {
  3115.                         static ClassName[32];
  3116.                         pev(pev(id, pev_groundentity), pev_classname, ClassName, 32);
  3117.            
  3118.                         if( equali(ClassName, "func_train")
  3119.                             || equali(ClassName, "func_conveyor")
  3120.                             || equali(ClassName, "trigger_push") || equali(ClassName, "trigger_gravity"))
  3121.                         {
  3122.                             JumpReset(id,32);
  3123.                             set_task(0.4,"JumpReset1", id);
  3124.                         }
  3125.                         else if(equali(ClassName, "func_door") || equali(ClassName, "func_door_rotating") )
  3126.                         {
  3127.                             JumpReset(id,33);
  3128.                             set_task(0.4,"JumpReset1", id);
  3129.                         }
  3130.                     }
  3131.                    
  3132.                     pev(id, pev_origin, origin);
  3133.                     notjump[id]=true;
  3134.                     if(is_user_ducking(id))
  3135.                     {
  3136.                         falloriginz[id]=origin[2]+18;
  3137.                     }
  3138.                     else falloriginz[id]=origin[2];
  3139.                    
  3140.                     if( OnGround[id] == false)
  3141.                     {  
  3142.                         if (dropbhop[id] || in_ladder[id] || jump_type[id] == Type_WeirdLongJump || jump_type[id]==Type_ladderBhop || jump_type[id]==Type_Drop_BhopLongJump)
  3143.                         {
  3144.                             FallTime[id]=get_gametime();
  3145.                            
  3146.                         }
  3147.                         OnGround[id] = true;
  3148.                     }
  3149.                 }
  3150.                
  3151.                 if( !(flags&FL_ONGROUND) && notjump[id]==true && (movetype[id] != MOVETYPE_FLY) && jump_type[id]!=Type_ladderBhop )//&& jump_type[id] != Type_Drop_CountJump)
  3152.                 {  
  3153.                     pev(id, pev_origin, origin);
  3154.            
  3155.                     OnGround[id] = false;
  3156.                    
  3157.                     pev(id, pev_velocity, velocity);
  3158.                    
  3159.                     new Float:tempfall;
  3160.                    
  3161.                     if(is_user_ducking(id))
  3162.                     {
  3163.                         tempfall=origin[2]+18;
  3164.                     }
  3165.                     else tempfall=origin[2];
  3166.                    
  3167.                     if( falloriginz[id]-tempfall>1.0 && !cjjump[id] && (ddforcj[id] || jump_type[id] == Type_Drop_CountJump || jump_type[id] == Type_StandUp_CountJump || jump_type[id] == Type_None || jump_type[id] == Type_CountJump || jump_type[id] == Type_Multi_CountJump || jump_type[id] == Type_Double_CountJump))
  3168.                     {
  3169.                         oldjump_type[id]=0;
  3170.            
  3171.                         formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_WJ");
  3172.                         formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_WJ");
  3173.                        
  3174.                         if(ddforcj[id])
  3175.                         ddforcj[id]=false;
  3176.                        
  3177.                         jump_type[id] = Type_WeirdLongJump;
  3178.                        
  3179.                     }
  3180.                    
  3181.                     if (velocity[2] == -240.0)
  3182.                     {
  3183.                         oldjump_type[id]=0;
  3184.                         ddbeforwj[id]=true;
  3185.                         jump_type[id] = Type_WeirdLongJump;
  3186.                        
  3187.                        
  3188.                         formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_DDWJ");
  3189.                         formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_DDWJ");
  3190.                     }
  3191.                 }
  3192.                 else if(!(flags&FL_ONGROUND) && notjump[id]==false && (movetype[id] != MOVETYPE_FLY) && in_ladder[id]==false && jump_type[id] != Type_Slide)
  3193.                 {
  3194.                     oldjump_type[id]=0;
  3195.                     OnGround[id] = false;
  3196.            
  3197.                     pev(id, pev_velocity, velocity);
  3198.                     pev(id, pev_origin, origin);
  3199.                    
  3200.                     new Float:drbh;
  3201.                     if(is_user_ducking(id))
  3202.                     {
  3203.                         drbh=origin[2]+18;
  3204.                     }
  3205.                     else drbh=origin[2];
  3206.            
  3207.                     if(dropbjorigin[id][2]-drbh>2.0)
  3208.                     {
  3209.                         if(dropbjorigin[id][2]-drbh<30 && jump_type[id] != Type_Drop_BhopLongJump && jump_type[id] != Type_None)
  3210.                         {
  3211.                             old_type_dropbj[id]=jump_type[id];
  3212.                             formatex(Jtype_old_dropbj[id],32,Jtype[id]);
  3213.                             formatex(Jtype_old_dropbj1[id],32,Jtype1[id]);
  3214.                         }
  3215.                        
  3216.                         jump_type[id] = Type_Drop_BhopLongJump;
  3217.                         formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_DRBJ");
  3218.                         formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_DRBJ");
  3219.                         nextbhop[id]=false;
  3220.                         bhopaem[id]=false;
  3221.                         dropbhop[id]=true;
  3222.                     }
  3223.                 }
  3224.                
  3225.                 if( movetype[id] == MOVETYPE_FLY)
  3226.                 {
  3227.                     OnGround[id] = false;
  3228.                     firstvel[id]=8.0;
  3229.                     secvel[id]=0.0;
  3230.                     checkladdertime[id]=get_gametime();
  3231.                 }
  3232.                 if( movetype[id] == MOVETYPE_FLY && firstladder[id]==false)
  3233.                 {
  3234.                     firstladder[id]=true;
  3235.                     nextbhop[id]=false;
  3236.                     bhopaem[id]=false;
  3237.                     h_jumped[id]=false;
  3238.                     JumpReset(id,34);
  3239.                     return FMRES_IGNORED;
  3240.                 }
  3241.                 if( movetype[id] != MOVETYPE_FLY && firstladder[id]==true && flags&FL_ONGROUND)
  3242.                 {
  3243.                     firstladder[id]=false;
  3244.                 }
  3245.                 if( (movetype[id] == MOVETYPE_FLY) &&  (button&IN_FORWARD || button&IN_BACK || button&IN_LEFT || button&IN_RIGHT ) )
  3246.                 {
  3247.                     ladderjump[id]=true;
  3248.                     find_sphere_class (id, "func_ladder",18.0, entlist1, 1);
  3249.                    
  3250.                     if(entlist1[0]!=0)
  3251.                     {
  3252.                         for(new i=0;i<nLadder;i++)
  3253.                         {
  3254.                             if(entlist[i]==entlist1[0])
  3255.                             {
  3256.                                 nashladder=i;  
  3257.                             }
  3258.                         }
  3259.                     }
  3260.            
  3261.                     prestrafe[id]   = speed[id];
  3262.                     maxspeed[id]    = speed[id];
  3263.                 }
  3264.                
  3265.                 if( (movetype[id] == MOVETYPE_FLY) &&  button&IN_JUMP )
  3266.                 {
  3267.                     jump_type[id]=Type_ladderBhop;
  3268.                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_LDBJ");
  3269.                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_LDBJ");
  3270.                     ladderjump[id]=false;
  3271.                     in_air[id]=false;
  3272.                     in_ladder[id]=false;
  3273.                     bhopaem[id]=false;
  3274.                     notjump[id]=true;
  3275.                     dropbhop[id]=false;    
  3276.                 }
  3277.                
  3278.                 if( movetype[id] != MOVETYPE_FLY && ladderjump[id]==true)
  3279.                 {
  3280.                     if(touch_ent[id])
  3281.                     {
  3282.                         JumpReset(id,103);
  3283.                     }
  3284.                     notjump[id]=true;
  3285.                     dropbhop[id]=false;
  3286.                     pev(id, pev_origin, origin);
  3287.                     jumpoff_origin[id] = origin;
  3288.                     jumpoff_origin[id][2]=ladderxyz[nashladder][2]+35.031250;
  3289.                    
  3290.                     jumpoff_time[id] = get_gametime( );
  3291.                     strafecounter_oldbuttons[id] = INFO_ZERO;
  3292.                    
  3293.                     jump_type[id]=Type_ladder;
  3294.                     laddertime[id]=get_gametime();
  3295.            
  3296.                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_LDJ");
  3297.                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_LDJ");
  3298.                    
  3299.                     if(laddersize[nashladder][0]<=laddersize[nashladder][1])
  3300.                     {
  3301.                         laddist[id]=laddersize[nashladder][0]+0.03125;
  3302.                     }
  3303.                     else if(laddersize[nashladder][0]>laddersize[nashladder][1])
  3304.                     {
  3305.                         laddist[id]=laddersize[nashladder][1]+0.03125;
  3306.                     }
  3307.                    
  3308.                     if(laddist[id]>10)
  3309.                     {
  3310.                         laddist[id]=4.0;
  3311.                     }
  3312.                     ladderjump[id]=false;  
  3313.                     TempSpeed[id] = 0.0;
  3314.                     static i;
  3315.                     for( i = INFO_ZERO; i < NSTRAFES; i++ )
  3316.                     {
  3317.                         strafe_stat_speed[id][i][0] = 0.0;
  3318.                         strafe_stat_speed[id][i][1] = 0.0;
  3319.                         strafe_stat_sync[id][i][0] = INFO_ZERO;
  3320.                         strafe_stat_sync[id][i][1] = INFO_ZERO;
  3321.                         strafe_stat_time[id][i] = 0.0;
  3322.                         strafe_lost_frame[id][i] = 0;
  3323.                        
  3324.                     }
  3325.                     in_air[id]  = true;
  3326.                     in_ladder[id]=true;
  3327.                     g_Jumped[id]    = true;
  3328.                     first_frame[id] = true;
  3329.                    
  3330.                     turning_right[id] = false;
  3331.                     turning_left[id] = false;
  3332.                    
  3333.                     for( i = INFO_ZERO; i < 2; i++ )
  3334.                     {
  3335.                         frame_origin[id][i][0] = 0.0;
  3336.                         frame_origin[id][i][1] = 0.0;
  3337.                         frame_origin[id][i][2] = 0.0;
  3338.                        
  3339.                         frame_velocity[id][i][0] = 0.0;
  3340.                         frame_velocity[id][i][1] = 0.0;
  3341.                         frame_velocity[id][i][2] = 0.0;
  3342.                     }
  3343.                     for( i = INFO_ONE; i < max_players; i++ )
  3344.                     {
  3345.                         if( (i == id || is_spec_user[i]))
  3346.                         {
  3347.                             if(showpre[id]==true && uq_ladder==1 )
  3348.                             {
  3349.                                 set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 1.0, 0.1, 0.1, h_prest);
  3350.                                 show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE31",prestrafe[id]);
  3351.                             }
  3352.                         }
  3353.                     }
  3354.                 }
  3355.                
  3356.                
  3357.                 if((button & IN_JUMP && flags & FL_ONGROUND) || in_ladder[id])
  3358.                 {
  3359.                     x_jump[id]=true;
  3360.                     if(is_user_ducking(id))
  3361.                     {
  3362.                         x_heightland_origin[id]=origin[2]+18;
  3363.                     }
  3364.                     else x_heightland_origin[id]=origin[2];
  3365.                 }
  3366.                
  3367.                 if((x_jump[id]==true || in_ladder[id]) && button & IN_DUCK && !(oldbuttons &IN_DUCK) && flags & FL_ONGROUND )
  3368.                 {
  3369.                     if(x_jump[id])
  3370.                     {
  3371.                         x_jump[id]=false;
  3372.                        
  3373.                         new Float:heightland_origin;
  3374.                         if(is_user_ducking(id))
  3375.                         {
  3376.                             heightland_origin=origin[2]+18;
  3377.                         }
  3378.                         else heightland_origin=origin[2];
  3379.                         if(heightland_origin-x_heightland_origin[id]>0 && !in_ladder[id])
  3380.                         {
  3381.                             JumpReset(id,45);
  3382.                            
  3383.                             UpcjFail[id]=true;
  3384.                                
  3385.                             return FMRES_IGNORED;
  3386.                         }
  3387.                        
  3388.                         if(bhopaem[id] && !ddforcjafterbhop[id])
  3389.                         {
  3390.                             ddforcjafterbhop[id]=true;
  3391.                         }
  3392.                         else ddforcjafterbhop[id]=false;
  3393.                        
  3394.                         if(in_ladder[id] && !ddforcjafterladder[id])
  3395.                         {
  3396.                             ddforcjafterladder[id]=true;
  3397.                         }
  3398.                         else ddforcjafterladder[id]=false;
  3399.                        
  3400.                         ddforcj[id]=true;
  3401.                     }
  3402.                    
  3403.                 }
  3404.                
  3405.                 if(cjjump[id]==false && (button & IN_DUCK || oldbuttons & IN_DUCK) && (jump_type[id] == Type_Drop_CountJump || ddforcj[id] || ddafterJump[id] || jump_type[id]==Type_CountJump || jump_type[id]==Type_Multi_CountJump || jump_type[id]==Type_Double_CountJump))
  3406.                 {
  3407.                     if(origin[2]-duckstartz[id]<-1.21 && origin[2]-duckstartz[id]>-2.0)
  3408.                     {
  3409.                         if(ddstandcj[id])
  3410.                         {
  3411.                             nextbhop[id]=false;
  3412.                             bhopaem[id]=false;
  3413.                         }
  3414.                         if(jump_typeOld[id]==1)
  3415.                         {
  3416.                             multiscj[id]=0;
  3417.                         }
  3418.                         else if(jump_typeOld[id]==2)
  3419.                         {
  3420.                             multiscj[id]=1;
  3421.                         }
  3422.                         else if(jump_typeOld[id]==3)
  3423.                         {
  3424.                             multiscj[id]=2;
  3425.                         }
  3426.                         jump_type[id] = Type_StandUp_CountJump;
  3427.                                                
  3428.                         formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_SCJ");
  3429.                         formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_SCJ");
  3430.                            
  3431.                         FallTime[id]=get_gametime();
  3432.                     }
  3433.                 }
  3434.                 if( button & IN_DUCK && !(oldbuttons &IN_DUCK) && flags & FL_ONGROUND)
  3435.                 {
  3436.                     nextbhop[id]=false;
  3437.                     bhopaem[id]=false;
  3438.                     doubleduck[id]=true;
  3439.                    
  3440.                     sync_doubleduck[id]=true;
  3441.                    
  3442.                     doubletime[id]=get_gametime();
  3443.                     FallTime1[id]=get_gametime();
  3444.                     ddnum[id]++;
  3445.                 }
  3446.                 if(sync_doubleduck[id] && g_Jumped[id])
  3447.                 {
  3448.                     sync_doubleduck[id]=false;
  3449.                     doubleduck_stat_sync[id][0]=0;
  3450.                     doubleduck_stat_sync[id][1]=0;
  3451.                 }
  3452.                 if(flags & FL_ONGROUND)
  3453.                 {
  3454.                     if(duckstartz[id]-origin[2]<18.0 && doubleduck[id]==true && (get_gametime()-doubletime[id]>0.4) && ddbeforwj[id]==false && (jump_type[id]==Type_CountJump || jump_type[id]==Type_Multi_CountJump || jump_type[id]==Type_Double_CountJump))
  3455.                     {
  3456.                         JumpReset(id,2);
  3457.                         doubleduck[id]=false;
  3458.                     }  
  3459.                 }
  3460.                 pev(id, pev_origin, origin);
  3461.                
  3462.                 if(slide_protec[id]==false && button & IN_JUMP && !( oldbuttons & IN_JUMP ) && flags & FL_ONGROUND && bhopaem[id]==false && UpcjFail[id]==false)
  3463.                 {  
  3464.                     bhop_num[id]=0;
  3465.                     notjump[id]=false;
  3466.                     if(ddforcj[id]==true)
  3467.                     {
  3468.                         if(jump_type[id] == Type_StandUp_CountJump)
  3469.                         {
  3470.                             ddstandcj[id]=true;
  3471.                         }
  3472.                            
  3473.                         ddforcj[id]=false;
  3474.                            
  3475.                         if(jump_type[id] != Type_StandUp_CountJump && (jump_type[id]!=Type_Drop_CountJump || ddforcjafterladder[id]))
  3476.                         {
  3477.                             if(ddnum[id]==1)
  3478.                             {
  3479.                                 jump_type[id]=Type_CountJump;
  3480.                                 CjafterJump[id]=1;
  3481.                             }
  3482.                             else if(ddnum[id]==2)
  3483.                             {
  3484.                                 jump_type[id] = Type_Double_CountJump ;
  3485.                                 CjafterJump[id]=2;
  3486.                             }
  3487.                             else if(ddnum[id]>=3)
  3488.                             {
  3489.                                 jump_type[id] = Type_Multi_CountJump;
  3490.                                 CjafterJump[id]=3;
  3491.                             }
  3492.                            
  3493.                             ddnum[id]=0;
  3494.                             nextbhop[id]=false;
  3495.                             bhopaem[id]=false;
  3496.                         }
  3497.                     }
  3498.                    
  3499.                     oldjump_height[id]=0.0;
  3500.                     jheight[id]=0.0;
  3501.                    
  3502.                     if(nextbhop[id] && ddafterJump[id]==false)
  3503.                     {
  3504.                         FullJumpFrames[id]=0;
  3505.                         direct_for_strafe[id]=0;
  3506.                         angles_arry[id]=0;
  3507.                        
  3508.                         if(uq_istrafe)
  3509.                         {
  3510.                             for(new i=0;i<=line_erase_strnum[id];i++)
  3511.                             {
  3512.                                 for( new j = 0; j <= line_erase[id][i]; j++ )
  3513.                                 {
  3514.                                     line_lost[id][i][j]=0;
  3515.                                     lost_frame_count[id][i]=0;
  3516.                                 }
  3517.                             }
  3518.                         }
  3519.                        
  3520.                         edgedone[id]=false;
  3521.                         if(get_gametime()-checkladdertime[id]<0.5)
  3522.                         {
  3523.                             ladderbug[id]=true;
  3524.                         }
  3525.                        
  3526.                         if(touch_ent[id])
  3527.                         {
  3528.                             JumpReset(id,105);
  3529.                         }
  3530.                         ddnum[id]=0;
  3531.                        
  3532.                         if(cjjump[id]==true && (get_gametime()-duckoff_time[id])<0.2)
  3533.                         {
  3534.                             JumpReset(id,35);
  3535.                             return FMRES_IGNORED;
  3536.                            
  3537.                         }
  3538.                    
  3539.                         if(oldbuttons & IN_DUCK && button & IN_DUCK && duckbhop[id]==true && (jump_type[id]==Type_HighJump || jump_type[id]==Type_LongJump || jump_type[id]==Type_None))
  3540.                         {
  3541.                             jump_type[id]=Type_DuckBhop;
  3542.                             formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_DKBJ");
  3543.                             formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_DKBJ");
  3544.                             duckbhop[id]=false;
  3545.                         }
  3546.                        
  3547.                         bhopaem[id]=true;
  3548.                        
  3549.                         pev(id, pev_origin, origin);
  3550.                         static bool:ducking;
  3551.                         ducking = is_user_ducking( id );
  3552.                         strafecounter_oldbuttons[id] = INFO_ZERO;
  3553.                    
  3554.                         strafe_num[id] = 0;
  3555.                         TempSpeed[id] = 0.0;
  3556.                         in_bhop[id] = true;
  3557.                         pre_jumpoff_origin[id] = jumpoff_origin[id];
  3558.                         jumpoff_foot_height[id] = ducking ? origin[2] - 18.0 : origin[2] - 36.0; //todo:think about this gavno
  3559.                        
  3560.                         jumpoff_time[id] = get_gametime( );
  3561.                        
  3562.                         new Float:checkbhop;
  3563.                        
  3564.                         if(is_user_ducking(id)==true)
  3565.                         {
  3566.                             checkbhop=jumpoff_origin[id][2]-origin[2]-18.0;
  3567.                         }
  3568.                         else checkbhop=jumpoff_origin[id][2]-origin[2];
  3569.                        
  3570.                         if(checkbhop<-1.0)
  3571.                         {
  3572.                             if(button & IN_DUCK )
  3573.                             {
  3574.                                 jump_type[id]=Type_Up_Bhop_In_Duck;
  3575.                             }
  3576.                             upbhop_koeff[id]=UpBhop_calc(floatabs(checkbhop));
  3577.                             upheight[id]=floatabs(checkbhop);
  3578.                             upBhop[id]=true;
  3579.                         }
  3580.                         else if(jump_type[id]!=Type_DuckBhop)
  3581.                         {
  3582.                             if(button & IN_DUCK )
  3583.                             {
  3584.                                 jump_type[id]=Type_Bhop_In_Duck;
  3585.                             }
  3586.                         }
  3587.                        
  3588.                         jumpoff_origin[id] = origin;
  3589.                         if(is_user_ducking( id )==true)
  3590.                         {
  3591.                            
  3592.                             jumpoff_origin[id][2] = origin[2]+18.0;
  3593.                         }
  3594.                         else jumpoff_origin[id][2] = origin[2];
  3595.                        
  3596.                         pev(id, pev_velocity, velocity);
  3597.                         first_frame[id] = true;
  3598.                        
  3599.                         prestrafe[id] = speed[id];
  3600.                         maxspeed[id] = speed[id];
  3601.                        
  3602.                         static i;
  3603.                         for( i = INFO_ZERO; i < NSTRAFES; i++ )
  3604.                         {
  3605.                             strafe_stat_speed[id][i][0] = 0.0;
  3606.                             strafe_stat_speed[id][i][1] = 0.0;
  3607.                             strafe_stat_sync[id][i][0] = INFO_ZERO;
  3608.                             strafe_stat_sync[id][i][1] = INFO_ZERO;
  3609.                             strafe_stat_time[id][i] = 0.0;
  3610.                             strafe_lost_frame[id][i] = 0;
  3611.                         }
  3612.                         for( i = INFO_ZERO; i < 2; i++ )
  3613.                         {
  3614.                             frame_origin[id][i][0] = 0.0;
  3615.                             frame_origin[id][i][1] = 0.0;
  3616.                             frame_origin[id][i][2] = 0.0;
  3617.                            
  3618.                             frame_velocity[id][i][0] = 0.0;
  3619.                             frame_velocity[id][i][1] = 0.0;
  3620.                             frame_velocity[id][i][2] = 0.0;
  3621.                         }
  3622.                         in_air[id]  = true;
  3623.                         g_Jumped[id]    = true;
  3624.                         turning_right[id] = false;
  3625.                         turning_left[id] = false;
  3626.                     }
  3627.                     else
  3628.                     {
  3629.                         if(get_gametime()-checkladdertime[id]<0.5 && jump_type[id]!=Type_ladderBhop)
  3630.                         {
  3631.                             ladderbug[id]=true;
  3632.                         }
  3633.                        
  3634.                         if(touch_ent[id])
  3635.                         {
  3636.                             JumpReset(id,106);
  3637.                         }  
  3638.                         ddnum[id]=0;
  3639.                         if(in_ladder[id]==true)
  3640.                         {
  3641.                             in_ladder[id]=false;
  3642.                            
  3643.                             jump_type[id]=Type_Real_ladder_Bhop;
  3644.                            
  3645.                             formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_RLDBJ");
  3646.                             formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_RLDBJ");
  3647.                            
  3648.                         }
  3649.                        
  3650.                         strafe_num[id]=0;
  3651.                        
  3652.                         if(get_gametime()-changetime[id]<0.5)
  3653.                         {
  3654.                             JumpReset(id,38);
  3655.                             return FMRES_IGNORED;
  3656.                         }
  3657.                        
  3658.                         if(task_exists(id+2311))
  3659.                             remove_task(id+2311);
  3660.                        
  3661.                         pev(id, pev_velocity, velocity);
  3662.                        
  3663.                         if(jump_type[id]!=Type_ladderBhop)
  3664.                         {
  3665.                             if(oldjump_typ1[id]==1)
  3666.                             {
  3667.                                 jump_type[id]=Type_ladderBhop;
  3668.                                 oldjump_typ1[id]=0;
  3669.                             }
  3670.                         }
  3671.                        
  3672.                        
  3673.                        
  3674.                         jumpoff_origin[id] = origin;
  3675.                        
  3676.                         if(is_user_ducking(id))
  3677.                         {
  3678.                             jumpoff_origin[id][2] = origin[2]+18.0;
  3679.                         }
  3680.                         else jumpoff_origin[id][2] = origin[2];
  3681.                        
  3682.                         jumpoff_time[id] = get_gametime( );
  3683.                         strafecounter_oldbuttons[id] = INFO_ZERO;
  3684.                        
  3685.                         pev(id, pev_origin, origin);
  3686.                         if(is_user_ducking(id))
  3687.                         {
  3688.                             dropbjorigin[id][2]=origin[2]+18;
  3689.                         }
  3690.                         else dropbjorigin[id][2]=origin[2];
  3691.                         dropbjorigin[id][0]=origin[0];
  3692.                         dropbjorigin[id][1]=origin[1];
  3693.                         pev(id, pev_velocity, velocity);
  3694.                         secorig[id]=origin;
  3695.                        
  3696.                         nextbhop[id]=true;
  3697.                        
  3698.                        
  3699.                         if(dropbhop[id] && jump_type[id] != Type_Drop_CountJump && jump_type[id] != Type_StandUp_CountJump)
  3700.                         {
  3701.                             dropbhop[id]=false;
  3702.                             jump_type[id] = Type_Drop_BhopLongJump;
  3703.                         }
  3704.                         else dropbhop[id]=false;
  3705.                        
  3706.                         if(jump_type[id]==Type_CountJump || jump_type[id]==Type_Multi_CountJump || jump_type[id]==Type_Double_CountJump)
  3707.                         {
  3708.                             cjjump[id]=true;
  3709.                         }
  3710.                         if (!ddstandcj[id] && !CjafterJump[id] && (jump_type[id] == Type_CountJump || jump_type[id] == Type_Multi_CountJump || jump_type[id] == Type_Double_CountJump) && floatabs(duckstartz[id]-jumpoff_origin[id][2])>4.0)
  3711.                         {
  3712.                             if(speed[id]<200.0)
  3713.                             {
  3714.                                 jump_type[id] = Type_LongJump;
  3715.                                 formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_LJ");
  3716.                                 formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_LJ");
  3717.                             }
  3718.                             else
  3719.                             {
  3720.                                 jump_type[id] = Type_WeirdLongJump;
  3721.                                                                
  3722.                                 formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_WJ");
  3723.                                 formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_WJ");
  3724.                             }
  3725.                         }
  3726.                         if(jump_type[id] == Type_Drop_CountJump && multidropcj[id]==0 && (origin[2]-first_duck_z[id])>4)
  3727.                         {
  3728.                             JumpReset(id,146);
  3729.                             return FMRES_IGNORED;
  3730.                         }
  3731.                         prestrafe[id]   = speed[id];
  3732.                         maxspeed[id]    = speed[id];
  3733.                         new Float:kkk;
  3734.                            
  3735.                         kkk=1.112*Pmaxspeed;
  3736.                        
  3737.                         if(prestrafe[id]<kkk && jump_type[id] !=Type_ladderBhop && jump_type[id] != Type_Drop_BhopLongJump && jump_type[id] != Type_WeirdLongJump && jump_type[id] != Type_CountJump && jump_type[id] != Type_Multi_CountJump && jump_type[id] != Type_Double_CountJump && jump_type[id] != Type_BhopLongJump && jump_type[id] != Type_StandupBhopLongJump && jump_type[id] != Type_Drop_CountJump)
  3738.                         {
  3739.                             if(jump_type[id] != Type_Drop_CountJump && jump_type[id] != Type_StandUp_CountJump && jump_type[id] !=Type_Real_ladder_Bhop)
  3740.                             {
  3741.                                 jump_type[id] = Type_LongJump;
  3742.                                 formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_LJ");
  3743.                                 formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_LJ");
  3744.                                
  3745.                                 if((jumpoff_origin[id][2]-origin[2])==18.0 && oldbuttons & IN_DUCK && button & IN_DUCK && duckbhop[id]==false)
  3746.                                 {
  3747.                                     duckbhop[id]=true;
  3748.                                     //client_print(id,print_chat,"%f",jumpoff_origin[id][2]-origin[2]);
  3749.                                    
  3750.                                     find_sphere_class (id, "func_ladder",100.0, entlist1, 1);
  3751.                                     if(entlist1[0]!=0)
  3752.                                     {
  3753.                                         if(get_gametime()-checkladdertime[id]<0.1 || prestrafe[id]>110)
  3754.                                         {
  3755.                                             ladderbug[id]=true;
  3756.                                         }
  3757.                                         else if(entlist1[0]!=0)
  3758.                                         {
  3759.                                             ladderbug[id]=true;
  3760.                                         }
  3761.                                         find_ladder[id]=true;
  3762.                                     }
  3763.                                 }
  3764.                                 else duckbhop[id]=false;
  3765.                             }
  3766.                         }
  3767.                        
  3768.                         TempSpeed[id] = 0.0;
  3769.                        
  3770.                         static i;
  3771.                         for( i = INFO_ZERO; i < NSTRAFES; i++ )
  3772.                         {
  3773.                             strafe_stat_speed[id][i][0] = 0.0;
  3774.                             strafe_stat_speed[id][i][1] = 0.0;
  3775.                             strafe_stat_sync[id][i][0] = INFO_ZERO;
  3776.                             strafe_stat_sync[id][i][1] = INFO_ZERO;
  3777.                             strafe_stat_time[id][i] = 0.0;
  3778.                             strafe_lost_frame[id][i] = 0;
  3779.                         }
  3780.                         in_air[id]  = true;
  3781.                         g_Jumped[id]    = true;
  3782.                         first_frame[id] = true;
  3783.                        
  3784.                         prestrafe[id]   = speed[id];
  3785.                         maxspeed[id]    = speed[id];
  3786.                        
  3787.                         turning_right[id] = false;
  3788.                         turning_left[id] = false;
  3789.                        
  3790.                         for( i = INFO_ZERO; i < 2; i++ )
  3791.                         {
  3792.                             frame_origin[id][i][0] = 0.0;
  3793.                             frame_origin[id][i][1] = 0.0;
  3794.                             frame_origin[id][i][2] = 0.0;
  3795.                            
  3796.                             frame_velocity[id][i][0] = 0.0;
  3797.                             frame_velocity[id][i][1] = 0.0;
  3798.                             frame_velocity[id][i][2] = 0.0;
  3799.                         }
  3800.                        
  3801.                         if(jump_type[id]==Type_LongJump && prestrafe[id]>kkk)
  3802.                         {
  3803.                             jump_type[id] = Type_WeirdLongJump;
  3804.                            
  3805.                            
  3806.                             formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_WJ");
  3807.                             formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_WJ");
  3808.                         }
  3809.                        
  3810.                        
  3811.                         if ((doubleduck_stat_sync[id][0]+doubleduck_stat_sync[id][1]) > 0)
  3812.                         {
  3813.                             dd_sync[id] =(doubleduck_stat_sync[id][0] * 100)/(doubleduck_stat_sync[id][0]+doubleduck_stat_sync[id][1]);
  3814.                            
  3815.                             if(dd_sync[id]<96)
  3816.                                 dd_sync[id] =5+dd_sync[id];        
  3817.                            
  3818.                         }              
  3819.                         else
  3820.                         {
  3821.                             dd_sync[id] = 0;
  3822.                         }
  3823.                        
  3824.                         for( i = INFO_ONE; i < max_players; i++ )
  3825.                         {
  3826.                             if( (i == id || is_spec_user[i]))
  3827.                             {
  3828.                                 if((Pmaxspeed * 1.2)>prestrafe[id])
  3829.                                 {  
  3830.                                     if(prestrafe[id]>min_prestrafe[id])
  3831.                                     {
  3832.                                         if(jump_type[id] == Type_Double_CountJump && showpre[id]==true && uq_dcj==1)
  3833.                                         {
  3834.                                             if(CjafterJump[id]==2)
  3835.                                             {
  3836.                                                 set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3837.                                                
  3838.                                                 if(ddforcjafterbhop[id])
  3839.                                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE1",prestrafe[id])
  3840.                                                 else if(ddforcjafterladder[id])
  3841.                                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE2",prestrafe[id]);
  3842.                                                 else
  3843.                                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE3",prestrafe[id])
  3844.                                            
  3845.                                             }
  3846.                                             else
  3847.                                             {
  3848.                                                 set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3849.                                                 show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE4",prestrafe[id]);
  3850.                                             }
  3851.                                         }
  3852.                                         else if(jump_type[id] == Type_CountJump && showpre[id]==true && uq_cj==1)
  3853.                                         {
  3854.                                             if(CjafterJump[id]==1)
  3855.                                             {
  3856.                                                 set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3857.                                                
  3858.                                                 if(ddforcjafterbhop[id])
  3859.                                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE5",prestrafe[id])
  3860.                                                 else if(ddforcjafterladder[id])
  3861.                                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE6",prestrafe[id]);
  3862.                                                 else
  3863.                                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE7",prestrafe[id]);
  3864.                                             }
  3865.                                             else
  3866.                                             {
  3867.                                                 set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3868.                                                 show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE8",prestrafe[id]);
  3869.                                             }
  3870.                                         }
  3871.                                         else if(jump_type[id] == Type_Multi_CountJump  && showpre[id]==true  && uq_mcj==1)
  3872.                                         {
  3873.                                             if(CjafterJump[id]==3)
  3874.                                             {
  3875.                                                 set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3876.                                                
  3877.                                                 if(ddforcjafterbhop[id])
  3878.                                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE9",prestrafe[id])
  3879.                                                 else if(ddforcjafterladder[id])
  3880.                                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE10",prestrafe[id]);
  3881.                                                 else
  3882.                                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE11",prestrafe[id]);
  3883.                                             }
  3884.                                             else
  3885.                                             {
  3886.                                                 set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3887.                                                 show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE12",prestrafe[id]);
  3888.                                             }
  3889.                                         }
  3890.                                         else if(jump_type[id] == Type_LongJump && showpre[id]==true && ljpre[id]==true && uq_lj==1)
  3891.                                         {
  3892.                                             set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3893.                                             show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE13",prestrafe[id]);
  3894.                                         }
  3895.                                         else if(jump_type[id] == Type_WeirdLongJump && showpre[id]==true && ddbeforwj[id]==true  && uq_wj==1)
  3896.                                         {
  3897.                                             set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3898.                                             show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE14",prestrafe[id]);
  3899.                                         }
  3900.                                         else if(jump_type[id] == Type_WeirdLongJump && showpre[id]==true && ddbeforwj[id]==false && uq_wj==1)
  3901.                                         {
  3902.                                             set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3903.                                             show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE15",prestrafe[id]);
  3904.                                         }
  3905.                                         else if((jump_type[id] == Type_Drop_BhopLongJump)&& showpre[id]==true && uq_drbj==1 )
  3906.                                         {
  3907.                                             set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3908.                                             show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE16",prestrafe[id]);
  3909.                                         }
  3910.                                         else if((jump_type[id] == Type_ladderBhop)&& showpre[id]==true && uq_ldbj==1 )
  3911.                                         {
  3912.                                             set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3913.                                             show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE17",prestrafe[id]);
  3914.                                         }
  3915.                                         else if((jump_type[id]==Type_Drop_CountJump)&& showpre[id]==true)
  3916.                                         {
  3917.                                             if(multidropcj[id]==0 && uq_drcj==1)
  3918.                                             {
  3919.                                                 set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3920.                                                 show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE18",prestrafe[id]);
  3921.                                             }
  3922.                                             else if(multidropcj[id]==1 && uq_dropdcj==1)
  3923.                                             {
  3924.                                                 set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3925.                                                 show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE19",prestrafe[id]);
  3926.                                             }
  3927.                                             else if(multidropcj[id]==2 && uq_dropmcj==1)
  3928.                                             {
  3929.                                                 set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3930.                                                 show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE20",prestrafe[id]);
  3931.                                             }
  3932.                                         }
  3933.                                         else if((jump_type[id]==Type_StandUp_CountJump) && showpre[id]==true && uq_drsbj==1)
  3934.                                         {
  3935.                                             if(dropaem[id])
  3936.                                             {
  3937.                                                 if(multiscj[id]==0 && uq_dropscj==1)
  3938.                                                 {
  3939.                                                     set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3940.                                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE21",prestrafe[id]);
  3941.                                                 }
  3942.                                                 else if(multiscj[id]==1 && uq_dropdscj==1)
  3943.                                                 {
  3944.                                                     set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3945.                                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE22",prestrafe[id]);
  3946.                                                 }
  3947.                                                 else if(multiscj[id]==2 && uq_dropmscj==1)
  3948.                                                 {
  3949.                                                     set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3950.                                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE23",prestrafe[id]);
  3951.                                                 }
  3952.                                             }
  3953.                                             else if(ddstandcj[id])
  3954.                                             {
  3955.                                                 if(multiscj[id]==0)
  3956.                                                 {
  3957.                                                     set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3958.                                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE24",prestrafe[id]);
  3959.                                                 }
  3960.                                                 else if(multiscj[id]==1)
  3961.                                                 {
  3962.                                                     set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3963.                                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE25",prestrafe[id]);
  3964.                                                 }
  3965.                                                 else if(multiscj[id]==2)
  3966.                                                 {
  3967.                                                     set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3968.                                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE26",prestrafe[id]);
  3969.                                                 }
  3970.                                             }
  3971.                                             else
  3972.                                             {
  3973.                                                 if(multiscj[id]==0 && uq_drsbj==1)
  3974.                                                 {
  3975.                                                     set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3976.                                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE27",prestrafe[id]);
  3977.                                                 }
  3978.                                                 else if(multiscj[id]==1 && uq_dscj==1)
  3979.                                                 {
  3980.                                                     set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3981.                                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE28",prestrafe[id]);
  3982.                                                 }
  3983.                                                 else if(multiscj[id]==2 && uq_mscj==1)
  3984.                                                 {
  3985.                                                     set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3986.                                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE29",prestrafe[id]);
  3987.                                                 }
  3988.                                             }
  3989.                                         }
  3990.                                         else if((jump_type[id]==Type_Real_ladder_Bhop) && showpre[id]==true && uq_realldbhop==1)
  3991.                                         {
  3992.                                             set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  3993.                                             show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PRE30",prestrafe[id]);
  3994.                                         }
  3995.                                     }
  3996.                                 }
  3997.                                 else if(showpre[id]==true)
  3998.                                 {
  3999.                                     set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 1.5, 0.1, 0.1, h_prest);
  4000.                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PREHIGH",prestrafe[id],Pmaxspeed * 1.2);
  4001.                                 }
  4002.                             }
  4003.                         }
  4004.                     }
  4005.                 }
  4006.                 else if(slide_protec[id]==false && ddafterJump[id]==false && UpcjFail[id]==false && bhopaem[id]==true && button & IN_JUMP && !( oldbuttons & IN_JUMP ) && flags & FL_ONGROUND)
  4007.                 {
  4008.                     if(touch_ent[id])
  4009.                     {
  4010.                         JumpReset(id,106);
  4011.                     }
  4012.                     ddnum[id]=0;
  4013.                     if(ddforcj[id]==true)
  4014.                     {
  4015.                         ddforcj[id]=false;
  4016.                         JumpReset(id,46);
  4017.                         return FMRES_IGNORED;
  4018.                     }
  4019.                     pev(id, pev_origin, origin);
  4020.                     static bool:ducking;
  4021.                     ducking = is_user_ducking( id );
  4022.                     strafecounter_oldbuttons[id] = INFO_ZERO;
  4023.                
  4024.                     strafe_num[id] = 0;
  4025.                     TempSpeed[id] = 0.0;
  4026.                    
  4027.                     pre_jumpoff_origin[id] = jumpoff_origin[id];
  4028.                     jumpoff_foot_height[id] = ducking ? origin[2] - 18.0 : origin[2] - 36.0;
  4029.                    
  4030.                     jumpoff_time[id] = get_gametime( );
  4031.                    
  4032.                     jumpoff_origin[id] = origin;
  4033.                     if(is_user_ducking( id )==true)
  4034.                     {
  4035.                         jumpoff_origin[id][2] = origin[2]+18.0;
  4036.                     }
  4037.                     else jumpoff_origin[id][2] = origin[2];
  4038.                     pev(id, pev_velocity, velocity);
  4039.                    
  4040.                     first_frame[id] = true;
  4041.                    
  4042.                     prestrafe[id] = speed[id];
  4043.                     maxspeed[id] = speed[id];
  4044.                    
  4045.                     static i;
  4046.                     for( i = INFO_ZERO; i < NSTRAFES; i++ )
  4047.                     {
  4048.                         strafe_stat_speed[id][i][0] = 0.0;
  4049.                         strafe_stat_speed[id][i][1] = 0.0;
  4050.                         strafe_stat_sync[id][i][0] = INFO_ZERO;
  4051.                         strafe_stat_sync[id][i][1] = INFO_ZERO;
  4052.                         strafe_stat_time[id][i] = 0.0;
  4053.                         strafe_lost_frame[id][i] = 0;
  4054.                     }
  4055.                     for( i = INFO_ZERO; i < 2; i++ )
  4056.                     {
  4057.                         frame_origin[id][i][0] = 0.0;
  4058.                         frame_origin[id][i][1] = 0.0;
  4059.                         frame_origin[id][i][2] = 0.0;
  4060.                        
  4061.                         frame_velocity[id][i][0] = 0.0;
  4062.                         frame_velocity[id][i][1] = 0.0;
  4063.                         frame_velocity[id][i][2] = 0.0;
  4064.                     }
  4065.                     in_air[id]  = true;
  4066.                     g_Jumped[id]    = true;
  4067.                     turning_right[id] = false;
  4068.                     turning_left[id] = false;
  4069.                     jump_type[id]=Type_Multi_Bhop;
  4070.                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_MBJ");
  4071.                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_MBJ");
  4072.                
  4073.                     bhop_num[id]++;
  4074.                     for( new i = INFO_ONE; i < max_players; i++ )
  4075.                     {
  4076.                         if( (i == id || is_spec_user[i]))
  4077.                         {  
  4078.                             if(showpre[i]==true && multibhoppre[id] && speed[id]>50.0)
  4079.                             {
  4080.                                 if((Pmaxspeed * 1.2)>speed[id] && (uq_bj==1 || uq_sbj==1))
  4081.                                 {
  4082.                                     set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  4083.                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_MBPRE",speed[id]);
  4084.                                 }
  4085.                                 else
  4086.                                 {   if((uq_bj==1 || uq_sbj==1))
  4087.                                     {
  4088.                                         set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 1.5, 0.1, 0.1, h_prest);
  4089.                                         show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_PREHIGH",prestrafe[id],Pmaxspeed * 1.2);
  4090.                                     }
  4091.                                 }
  4092.                             }
  4093.                         }
  4094.                     }
  4095.                 }
  4096.                 else if(slide_protec[id]==false && ddafterJump[id]==false && UpcjFail[id]==false && !(button&IN_JUMP) && oldbuttons&IN_JUMP && flags & FL_ONGROUND && nextbhop[id]==true && cjjump[id]==false && bhopaem[id]==false && jump_type[id]!=Type_Drop_BhopLongJump)  
  4097.                 {      
  4098.                     if(touch_ent[id])
  4099.                     {
  4100.                         JumpReset(id,109);
  4101.                     }
  4102.                     ddnum[id]=0;
  4103.                     if(ddforcj[id]==true)
  4104.                     {
  4105.                         JumpReset(id,46);
  4106.                         return FMRES_IGNORED;
  4107.                     }
  4108.                     bhop_num[id]=0;
  4109.            
  4110.                     if(oldbuttons & IN_DUCK && button & IN_DUCK && duckbhop[id]==true && (jump_type[id]==Type_LongJump || jump_type[id]==Type_None))
  4111.                     {
  4112.                         jump_type[id]=Type_DuckBhop;
  4113.                         formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_DKBJ");
  4114.                         formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_DKBJ");
  4115.                         duckbhop[id]=false;
  4116.                     }
  4117.                     else
  4118.                     {
  4119.                         bhopaem[id]=true;
  4120.                        
  4121.                         static i;
  4122.                         for( i = INFO_ONE; i < max_players; i++ )
  4123.                         {
  4124.                             if( (i == id || is_spec_user[i]))
  4125.                             {  
  4126.                                 if(showpre[id]==true && failearly[id]==true && (uq_bj==1 || uq_sbj==1))
  4127.                                 {
  4128.                                     set_hudmessage(255, 0, 109, -1.0, 0.70, 0, 0.0, 0.5, 0.1, 0.1, h_stats);
  4129.                                     show_hudmessage(id, "%L",LANG_SERVER,"UQSTATS_JEARLY");
  4130.                                 }
  4131.                             }
  4132.                         }
  4133.                     }
  4134.                 }
  4135.                 else if( ( failed_jump[id] || flags&FL_ONGROUND)&& in_air[id] )
  4136.                 {  
  4137.                     if(old_type_dropbj[id]!=Type_Null && jump_type[id]==Type_Drop_BhopLongJump)
  4138.                     {
  4139.                         jump_type[id]=old_type_dropbj[id];
  4140.                        
  4141.                         formatex(Jtype[id],32,Jtype_old_dropbj[id]);
  4142.                         formatex(Jtype1[id],32,Jtype_old_dropbj1[id]);
  4143.                     }
  4144.                     if(bug_true[id])
  4145.                     {
  4146.                         JumpReset(id,322);
  4147.                         return FMRES_IGNORED;
  4148.                     }
  4149.                     if(prestrafe[id]>200 && jump_type[id]==Type_DuckBhop)
  4150.                     {
  4151.                         duckbhop_bug_pre[id]=true;
  4152.                         set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 1.5, 0.1, 0.1, h_prest);
  4153.                         show_hudmessage(id, "%L",LANG_SERVER,"UQSTATS_PROBBUG",prestrafe[id]);
  4154.                     }
  4155.                     new summad,summws;
  4156.                     for(new i=0;i<NSTRAFES;i++)
  4157.                     {
  4158.                         if(type_button_what[id][i]==1)
  4159.                         summad++;
  4160.                         if(type_button_what[id][i]==2)
  4161.                         summws++;
  4162.                     }
  4163.                     if(summws>summad)
  4164.                     {
  4165.                         if(backwards[id])
  4166.                         {
  4167.                             formatex(pre_type[id],32,"%L",LANG_SERVER,"UQSTATS_PRETYPE1"); //Back-Side?? don't know...
  4168.                         }
  4169.                         else formatex(pre_type[id],32,"%L",LANG_SERVER,"UQSTATS_PRETYPE1");
  4170.                     }
  4171.                     else if(backwards[id])
  4172.                     {
  4173.                         formatex(pre_type[id],32,"%L",LANG_SERVER,"UQSTATS_PRETYPE2");
  4174.                     }
  4175.                     else pre_type[id] = "";
  4176.            
  4177.                     static bool:ducking;
  4178.                    
  4179.                     static type[33];
  4180.                     type[0] = '^0';
  4181.                     new bool:failed;
  4182.                     if (failed_jump[id] == true)
  4183.                     {
  4184.                         formatex( type, 32, "" );
  4185.                         failed=true;
  4186.                         origin=failed_origin[id];
  4187.                     }
  4188.                     else
  4189.                     {
  4190.                         pev(id, pev_origin, origin);
  4191.                         ducking = is_user_ducking( id );
  4192.                         failed=false;
  4193.                     }
  4194.                    
  4195.                     if(donehook[id])
  4196.                     {
  4197.                         donehook[id]=false;
  4198.                         failed_jump[id]=true;
  4199.                         client_print(id,print_center,"%L",LANG_SERVER,"UQSTATS_HOOKPROTECT");      
  4200.                     }  
  4201.                     if(failed==false)
  4202.                     {
  4203.                         height_difference[id] =  ducking ? jumpoff_origin[id][2] - origin[2] - 18.0 : jumpoff_origin[id][2] - origin[2];
  4204.                         if(jump_type[id] == Type_BhopLongJump || jump_type[id] == Type_StandupBhopLongJump || jump_type[id]==Type_Bhop_In_Duck)
  4205.                         {
  4206.                             if(height_difference[id] <-22.0)
  4207.                             {
  4208.                                 JumpReset(id,4);
  4209.                                 return FMRES_IGNORED;
  4210.                             }
  4211.                            
  4212.                             if(height_difference[id] > -18.0)
  4213.                             {
  4214.                                 if(height_difference[id] <= -1.0)
  4215.                                 {
  4216.                                     JumpReset(id,5);
  4217.                                     return FMRES_IGNORED;
  4218.                                 }  
  4219.                             }
  4220.                         }
  4221.                         else
  4222.                         {
  4223.                             if(height_difference[id] < -1.0)
  4224.                             {
  4225.                                 if((jump_type[id]==Type_Drop_BhopLongJump || jump_type[id]==Type_StandUp_CountJump) && height_difference[id]==-18.0)
  4226.                                 {
  4227.                                     //ColorChat(id, GREEN, "ne reset");
  4228.                                 }
  4229.                                 else
  4230.                                 {  
  4231.                                     JumpReset(id,6);
  4232.                                     return FMRES_IGNORED;  
  4233.                                 }
  4234.                             }  
  4235.                         }
  4236.                         if(jump_type[id]==Type_StandupBhopLongJump)
  4237.                         {
  4238.                             if(height_difference[id] > 1.0)
  4239.                             failed_jump[id]=true;
  4240.                         }
  4241.                         else if(height_difference[id] > 0.0 && jump_type[id]!=Type_Drop_BhopLongJump )
  4242.                         {
  4243.                             JumpReset(id,7);
  4244.                             return FMRES_IGNORED;
  4245.                         }
  4246.                         else if(height_difference[id] > 0.02 && jump_type[id]==Type_Drop_BhopLongJump )
  4247.                         {
  4248.                             failed_jump[id]=true;
  4249.                         }
  4250.                     }
  4251.                    
  4252.                     if( is_user_ducking(id))
  4253.                     {
  4254.                         origin[2]+=18.0;
  4255.                     }
  4256.                    
  4257.                     static Float:distance1;
  4258.                     if(jump_type[id] == Type_ladder)
  4259.                     {
  4260.                         if(floatabs(jumpoff_origin[id][2]-origin[2])>4.0)
  4261.                         {
  4262.                             failed_jump[id]=true;
  4263.                         }
  4264.                        
  4265.                         distance1 = get_distance_f( jumpoff_origin[id], origin )+laddist[id];
  4266.                     }
  4267.                     else distance1 = get_distance_f( jumpoff_origin[id], origin ) + 32.0;
  4268.                    
  4269.                     if( is_user_ducking(id) )
  4270.                     {
  4271.                         origin[2]-=18.0;
  4272.                     }
  4273.                    
  4274.                     if( frame_velocity[id][1][0] < 0.0 ) frame_velocity[id][1][0] *= -1.0;
  4275.                     if( frame_velocity[id][1][1] < 0.0 ) frame_velocity[id][1][1] *= -1.0;
  4276.                    
  4277.                     static Float:land_origin[3];
  4278.                    
  4279.                     land_origin[2] = frame_velocity[id][0][2] * frame_velocity[id][0][2] + (2 * get_pcvar_float(sv_gravity) * (frame_origin[id][0][2] - origin[2]));
  4280.                    
  4281.                     rDistance[0] = (floatsqroot(land_origin[2]) * -1) - frame_velocity[id][1][2];
  4282.                     rDistance[1] = get_pcvar_float(sv_gravity)*-1;
  4283.                    
  4284.                     frame2time = floatdiv(rDistance[0], rDistance[1]);
  4285.                     if(frame_velocity[id][1][0] < 0 )
  4286.                     frame_velocity[id][1][0] = frame_velocity[id][1][0]*-1;
  4287.                     rDistance[0] = frame2time*frame_velocity[id][1][0];
  4288.                        
  4289.                     if( frame_velocity[id][1][1] < 0 )
  4290.                     frame_velocity[id][1][1] = frame_velocity[id][1][1]*-1;
  4291.                     rDistance[1] = frame2time*frame_velocity[id][1][1];
  4292.            
  4293.                     if( frame_velocity[id][1][2] < 0 )
  4294.                     frame_velocity[id][1][2] = frame_velocity[id][1][2]*-1;
  4295.                     rDistance[2] = frame2time*frame_velocity[id][1][2];
  4296.                    
  4297.                     if( frame_origin[id][1][0] < origin[0] )
  4298.                     land_origin[0] = frame_origin[id][1][0] + rDistance[0];
  4299.                     else
  4300.                     land_origin[0] = frame_origin[id][1][0] - rDistance[0];
  4301.                     if( frame_origin[id][1][1] < origin[1] )
  4302.                     land_origin[1] = frame_origin[id][1][1] + rDistance[1];
  4303.                     else
  4304.                     land_origin[1] = frame_origin[id][1][1] - rDistance[1];
  4305.                    
  4306.                     if( is_user_ducking(id) )
  4307.                     {
  4308.                         origin[2]+=18.0;
  4309.                         duckstring[id]=true;
  4310.                     }
  4311.            
  4312.                     land_origin[2] = origin[2];
  4313.                    
  4314.                     frame2time += (last_land_time[id]-jumpoff_time[id]);
  4315.                    
  4316.                     static Float:distance2;
  4317.                     if(jump_type[id] == Type_ladder)
  4318.                     {
  4319.                         distance2 = get_distance_f( jumpoff_origin[id], land_origin ) +laddist[id];
  4320.                     }
  4321.                     else distance2 = get_distance_f( jumpoff_origin[id], land_origin ) + 32.0;
  4322.                    
  4323.                     if(failed==true)
  4324.                     {
  4325.                         if(jump_type[id] == Type_ladder)
  4326.                         {
  4327.                             distance[id] = GetFailedDistance(laddist[id],failed_ducking[id], GRAVITY, jumpoff_origin[id], velocity, failed_origin[id], failed_velocity[id]);
  4328.                         }
  4329.                         else distance[id] = GetFailedDistance(32.0,failed_ducking[id], GRAVITY, jumpoff_origin[id], velocity, failed_origin[id], failed_velocity[id]);
  4330.                     }
  4331.                     else distance[id] = distance1 > distance2 ? distance2 : distance1; //distance
  4332.                    
  4333.                    
  4334.                     new Float:Landing,bool:land_bug;
  4335.                    
  4336.                     if(jump_type[id]!=Type_ladder && distance[id]>64.0)
  4337.                     {
  4338.                         new Float:landing_orig[3];
  4339.                        
  4340.                         landing_orig=origin;
  4341.                         landing_orig[2]=landing_orig[2]-36.1;
  4342.                        
  4343.                         Landing=LandingCalculate(id,landing_orig,jumpoff_origin[id]);
  4344.                         if(distance[id]<(jumpblock[id]+edgedist[id]+Landing))
  4345.                         {
  4346.                             landing_orig=land_origin;
  4347.                             landing_orig[2]=landing_orig[2]-36.1;
  4348.                            
  4349.                             Landing=LandingCalculate(id,landing_orig,jumpoff_origin[id]);
  4350.                             Landing=Landing-0.06250;
  4351.                             land_bug=true;
  4352.                         }
  4353.                         else land_bug=false;
  4354.                     }
  4355.                    
  4356.                     if(!uq_noslow && entity_get_float(id,EV_FL_fuser2)==0.0 && jump_type[id] != Type_ladder)
  4357.                     {
  4358.                         failed_jump[id]=true;
  4359.                     }
  4360.                     if(fps_hight[id] && jump_type[id]!=Type_ladder)
  4361.                     {
  4362.                         failed_jump[id]=true;
  4363.                     }
  4364.                     if(duckbhop_bug_pre[id])
  4365.                     {
  4366.                         failed_jump[id]=true;
  4367.                     }
  4368.                    
  4369.                     new tmp_dist,tmp_min_dist,tmp_maxdist,tmp_mindist_other;
  4370.                     if(Pmaxspeed != 250.0 && jump_type[id]!=Type_ladder)
  4371.                     {
  4372.                         tmp_dist=floatround((250.0-Pmaxspeed)*0.73,floatround_floor);
  4373.                        
  4374.                         tmp_min_dist=min_distance-tmp_dist;
  4375.                        
  4376.                     }
  4377.                     else tmp_min_dist=min_distance;
  4378.                    
  4379.                     tmp_maxdist=max_distance;
  4380.                     tmp_mindist_other=min_distance_other;
  4381.                    
  4382.                     if(jump_type[id]!=Type_Bhop_In_Duck && jump_type[id]!=Type_Up_Bhop_In_Duck && jump_type[id]!=Type_Up_Stand_Bhop  && jump_type[id] != Type_Up_Bhop && jump_type[id] != Type_ladder && jump_type[id] != Type_Multi_Bhop && jump_type[id]!=Type_DuckBhop && jump_type[id]!=Type_Real_ladder_Bhop)
  4383.                     {
  4384.                         if( distance[id] < tmp_min_dist || tmp_maxdist < distance[id] )
  4385.                         {
  4386.                             JumpReset(id,8);
  4387.                             return FMRES_IGNORED;
  4388.                         }
  4389.                     }
  4390.                     else if( jump_type[id] == Type_ladder && (distance[id] > tmp_maxdist || distance[id] < tmp_mindist_other))
  4391.                     {
  4392.                         JumpReset(id,9);
  4393.                         return FMRES_IGNORED;
  4394.                     }
  4395.                     else if( (jump_type[id] == Type_Multi_Bhop || jump_type[id]==Type_Real_ladder_Bhop) && (distance[id] > tmp_maxdist || distance[id] < tmp_mindist_other))
  4396.                     {
  4397.                         JumpReset(id,10);
  4398.                         return FMRES_IGNORED;
  4399.                     }
  4400.                     else if( (jump_type[id]==Type_Bhop_In_Duck || jump_type[id]==Type_Up_Bhop_In_Duck || jump_type[id]==Type_Up_Stand_Bhop ||  jump_type[id] == Type_Up_Bhop || jump_type[id]==Type_Real_ladder_Bhop)&& (distance[id] > tmp_maxdist || distance[id] < tmp_mindist_other))
  4401.                     {
  4402.                         JumpReset(id,11);
  4403.                         return FMRES_IGNORED;
  4404.                     }
  4405.                     else if( jump_type[id]==Type_DuckBhop && (distance[id] > tmp_maxdist || distance[id] < tmp_min_dist-150))
  4406.                     {
  4407.                         JumpReset(id,1111);
  4408.                         return FMRES_IGNORED;
  4409.                     }
  4410.                    
  4411.                    
  4412.                    
  4413.                     if( jump_type[id] == Type_LongJump )
  4414.                     {          
  4415.                         oldjump_type[id]=1;
  4416.                     }
  4417.                     else oldjump_type[id]=0;
  4418.                    
  4419.                     if(jump_type[id] == Type_LongJump && detecthj[id]==1)
  4420.                     {
  4421.                         jump_type[id] = Type_HighJump;
  4422.                         formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_HJ");
  4423.                         formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_HJ");
  4424.                     }
  4425.                     new Float:kkk;
  4426.                            
  4427.                     kkk=1.112*Pmaxspeed;
  4428.                    
  4429.                     if((jump_type[id] == Type_LongJump || jump_type[id] == Type_HighJump) && prestrafe[id]>kkk)
  4430.                     {
  4431.                         jump_type[id] = Type_Drop_BhopLongJump;
  4432.                         formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_DRBJ");
  4433.                         formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_DRBJ");
  4434.                     }
  4435.                     if(touch_somthing[id])
  4436.                     {
  4437.                         failed_jump[id]=true;
  4438.                     }
  4439.                     if(trigger_protection[id])
  4440.                     {
  4441.                         failed_jump[id]=true;
  4442.                     }
  4443.                     new wpn,weapon_name[21],weapon_name1[21],clip,ammo;
  4444.                    
  4445.                     wpn = get_user_weapon(id,clip,ammo);
  4446.                     if(wpn)
  4447.                     {
  4448.                         get_weaponname(wpn,weapon_name,20);
  4449.                         get_weaponname(wpn,weapon_name1,20);
  4450.                        
  4451.                         replace(weapon_name,20,"weapon_","");
  4452.                     }
  4453.                     else formatex(weapon_name,20,"Unknow");
  4454.    
  4455.                     new t_type;
  4456.                     t_type=0;
  4457.                    
  4458.                     switch(jump_type[id])
  4459.                     {
  4460.                         case 0: t_type=1;
  4461.                         case 1: t_type=1;
  4462.                         case 2: t_type=2;
  4463.                         case 9: t_type=2;
  4464.                         case 11:t_type=2;
  4465.                         case 6: t_type=2;
  4466.                         case 7: t_type=2;
  4467.                         case 15: t_type=2;
  4468.                         case 17: t_type=2;
  4469.                         case 18: t_type=2;
  4470.                         case 19: t_type=2;
  4471.                         case 3: t_type=3;
  4472.                         case 5: t_type=3;
  4473.                         case 21: t_type=3;
  4474.                         case 22: t_type=3;
  4475.                         case 13: t_type=4;
  4476.                         case 23: t_type=5;
  4477.                         case 24:t_type=5;
  4478.                         case 12: t_type=6;
  4479.                     }
  4480.                    
  4481.                     if(uq_bug==1 && check_for_bug_distance(distance[id],t_type,Pmaxspeed))
  4482.                     {
  4483.                         JumpReset(id,2311);
  4484.                         return FMRES_IGNORED;
  4485.                     }
  4486.                     if(uq_bug==1)
  4487.                     {
  4488.                         new Float:b_check=2.1;
  4489.                        
  4490.                         if(jump_type[id]==Type_ladder)
  4491.                         {
  4492.                             b_check=b_check-0.1;
  4493.                         }
  4494.                        
  4495.                         if((maxspeed[id]+prestrafe[id])/distance[id]<b_check)
  4496.                         {
  4497.                             JumpReset(id,23451);
  4498.                             return FMRES_IGNORED;
  4499.                         }
  4500.                     }
  4501.                     new god_dist,leet_dist,holy_dist,pro_dist,good_dist;
  4502.                     new d_array[5];
  4503.                    
  4504.                     d_array=get_colorchat_by_distance(jump_type[id],Pmaxspeed,tmp_dist,dropaem[id],multiscj[id],aircj);
  4505.                     god_dist=d_array[4];
  4506.                     leet_dist=d_array[3];
  4507.                     holy_dist=d_array[2];
  4508.                     pro_dist=d_array[1];
  4509.                     good_dist=d_array[0];
  4510.                    
  4511.                     new script_dist;
  4512.                     if(angles_arry[id]>SCRIPTFRAMES && uq_script_detection)
  4513.                     {
  4514.                         script_dist=god_dist;
  4515.                        
  4516.                         switch(uq_script_work)
  4517.                         {
  4518.                             case 0:
  4519.                                 script_dist=good_dist;
  4520.                             case 1:
  4521.                                 script_dist=pro_dist;
  4522.                             case 2:
  4523.                                 script_dist=holy_dist;
  4524.                             case 3:
  4525.                                 script_dist=leet_dist;
  4526.                             case 4:
  4527.                                 script_dist=god_dist;
  4528.                         }
  4529.                     }
  4530.                    
  4531.                     new bool:not_save;
  4532.                     if((jump_type[id]==Type_LongJump || jump_type[id]==Type_HighJump) && prestrafe[id]>kkk && !uq_noslow)
  4533.                     {
  4534.                         not_save=true;
  4535.                     }
  4536.                     else if(prestrafe[id]>Pmaxspeed*1.2 && !uq_noslow)
  4537.                     {
  4538.                         not_save=true;
  4539.                     }
  4540.                     else not_save=false;
  4541.                    
  4542.                     new bool:find_script;
  4543.                    
  4544.                     if(strafe_num[id]>4 && angles_arry[id]>SCRIPTFRAMES && uq_script_detection && distance[id]>script_dist && !not_save)
  4545.                     {
  4546.                         if(FullJumpFrames[id]>80)
  4547.                             failed_jump[id]=true;
  4548.                         else
  4549.                             find_script=true;
  4550.                     }
  4551.                    
  4552.                     //streifs stat
  4553.                     sync_[id] = INFO_ZERO;
  4554.                     strMess[0] = '^0'; //unnecessary?
  4555.                     strMessBuf[0] = '^0'; //unnecessary?
  4556.                     strLen = INFO_ZERO;
  4557.                     badSyncTemp = INFO_ZERO;
  4558.                     goodSyncTemp = INFO_ZERO;
  4559.                     new Float:tmpstatspeed[NSTRAFES],Float:tmpstatpoteri[NSTRAFES];
  4560.                                
  4561.                     Fulltime = last_land_time[id]-jumpoff_time[id];
  4562.                     if(strafe_num[id] < NSTRAFES)
  4563.                     {
  4564.                         strafe_stat_time[id][0] = jumpoff_time[id];
  4565.                         strafe_stat_time[id][strafe_num[id]] =last_land_time[id];
  4566.                         for(jj = 1;jj <= strafe_num[id]; jj++)
  4567.                         {
  4568.                             //client_print(id,print_chat,"%d=%d,%d - %d",jj,strafe_stat_sync[id][jj][0],strafe_stat_sync[id][jj][1],strafe_lost_frame[id][jj]);
  4569.  
  4570.                             time_ = ((strafe_stat_time[id][jj] - strafe_stat_time[id][jj-1])*100) / (Fulltime);
  4571.                             if ((strafe_stat_sync[id][jj][0]+strafe_stat_sync[id][jj][1]) > 0)
  4572.                             {
  4573.                                 sync_[id] =(strafe_stat_sync[id][jj][0] * 100)/(strafe_stat_sync[id][jj][0]+strafe_stat_sync[id][jj][1]); //using like a buffer    
  4574.                             }              
  4575.                             else
  4576.                             {
  4577.                                 sync_[id] = 0;
  4578.                             }
  4579.                             strLen += format(strMess[strLen],(40*NSTRAFES)-strLen-1, "%L",LANG_SERVER,"UQSTATS_HUDSTRSTATS1", jj, strafe_stat_speed[id][jj][0], strafe_stat_speed[id][jj][1], time_, sync_[id]);
  4580.                             goodSyncTemp += strafe_stat_sync[id][jj][0];
  4581.                             badSyncTemp += strafe_stat_sync[id][jj][1];
  4582.                             tmpstatspeed[jj]=strafe_stat_speed[id][jj][0];
  4583.                             tmpstatpoteri[jj]=strafe_stat_speed[id][jj][1];
  4584.                            
  4585.                             if(tmpstatpoteri[jj]>200)
  4586.                             {
  4587.                                 if(duckstring[id]==false)
  4588.                                 duckstring[id]=true;
  4589.                             }
  4590.                             if(tmpstatpoteri[jj]>200 && Checkframes[id])
  4591.                             {
  4592.                                 Checkframes[id]=false;
  4593.                                 failed_jump[id]=true;
  4594.                             }
  4595.                         }
  4596.                         //client_print(id,print_chat,"full=%d - %d,%d",FullJumpFrames[id],strafe_stat_sync[id][0][0],strafe_stat_sync[id][0][1]);
  4597.  
  4598.                         if(strafe_num[id]!=0)
  4599.                         {
  4600.                             if (jump_type[id]==Type_ladder && strafe_stat_speed[id][0][0]!=0)
  4601.                             {  
  4602.                                 strLen += format(strMess[strLen],(40*NSTRAFES)-strLen-1, "%L",LANG_SERVER,"UQSTATS_HUDSTRSTATS2",strafe_stat_speed[id][0][0]);
  4603.                             }
  4604.                             if (duckstring[id]==false)
  4605.                             {                          
  4606.                                 strLen += format(strMess[strLen],(40*NSTRAFES)-strLen-1, "%L",LANG_SERVER,"UQSTATS_HUDSTRSTATS3");
  4607.                             }
  4608.                             if (jump_type[id]==Type_StandupBhopLongJump || jump_type[id]==Type_Up_Stand_Bhop)
  4609.                             {
  4610.                                 strLen += format(strMess[strLen],(40*NSTRAFES)-strLen-1, "%L",LANG_SERVER,"UQSTATS_HUDSTRSTATS4");
  4611.                             }
  4612.                             if(wpn!=29 && wpn!=17 && wpn!=16)
  4613.                             {
  4614.                                 strLen += format(strMess[strLen],(40*NSTRAFES)-strLen-1, "%L",LANG_SERVER,"UQSTATS_HUDSTRSTATS5",weapon_name);
  4615.                             }
  4616.                            
  4617.                             if(Show_edge[id] && failed_jump[id]==false && jump_type[id]!=Type_ladder && jumpblock[id]<user_block[id][0] && jumpblock[id]>user_block[id][1] && edgedist[id]<100.0 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  4618.                             {
  4619.                                 if((jumpblock[id]+Landing+edgedist[id])>(distance[id]+10.0) || Landing<=0.0)
  4620.                                 {
  4621.                                     strLen =strLen+format(strMess[strLen],(40*NSTRAFES)-strLen-1, "%L",LANG_SERVER,"UQSTATS_HUDSTRSTATS6",jumpblock[id],edgedist[id]);
  4622.                                 }
  4623.                                 else if(land_bug)
  4624.                                 {
  4625.                                     strLen =strLen+format(strMess[strLen],(40*NSTRAFES)-strLen-1, "%L",LANG_SERVER,"UQSTATS_HUDSTRSTATS7",jumpblock[id],edgedist[id],Landing);
  4626.                                 }
  4627.                                 else strLen =strLen+format(strMess[strLen],(40*NSTRAFES)-strLen-1, "%L",LANG_SERVER,"UQSTATS_HUDSTRSTATS8",jumpblock[id],edgedist[id],Landing);
  4628.                             }
  4629.                             else if(Show_edge[id] && failed_jump[id] && jump_type[id]!=Type_ladder && jumpblock[id]<user_block[id][0] && jumpblock[id]>user_block[id][1] && edgedist[id]<100.0 && edgedist[id]!=0.0)
  4630.                             {
  4631.                                 strLen =strLen+format(strMess[strLen],(40*NSTRAFES)-strLen-1, "%L",LANG_SERVER,"UQSTATS_HUDSTRSTATS9",jumpblock[id],edgedist[id]);
  4632.                             }
  4633.                             else if(Show_edge_Fail[id] && failed_jump[id] && jump_type[id]!=Type_ladder && edgedist[id]<100.0 && edgedist[id]!=0.0)
  4634.                             {
  4635.                                 strLen =strLen+format(strMess[strLen],(40*NSTRAFES)-strLen-1, "%L",LANG_SERVER,"UQSTATS_HUDSTRSTATS10",edgedist[id]);  
  4636.                             }
  4637.                             if(jump_type[id]==Type_Up_Bhop || jump_type[id]==Type_Up_Stand_Bhop || jump_type[id]==Type_Up_Bhop_In_Duck)
  4638.                             {
  4639.                                 strLen += format(strMess[strLen],(40*NSTRAFES)-strLen-1, "%L",LANG_SERVER,"UQSTATS_HUDSTRSTATS11",upheight[id]);
  4640.                             }
  4641.                             if(fps_hight[id] && jump_type[id]!=Type_ladder)
  4642.                             {
  4643.                                 strLen += format(strMess[strLen],(40*NSTRAFES)-strLen-1, "%L",LANG_SERVER,"UQSTATS_HUDSTRSTATS12");
  4644.                             }
  4645.                             if(ladderbug[id])
  4646.                             {
  4647.                                 strLen += format(strMess[strLen],(40*NSTRAFES)-strLen-1, "%L",LANG_SERVER,"UQSTATS_HUDSTRSTATS13");
  4648.                                 failed_jump[id]=true;
  4649.                             }
  4650.                             if(find_ladder[id] && jump_type[id]==Type_DuckBhop)
  4651.                             {
  4652.                                 strLen += format(strMess[strLen],(40*NSTRAFES)-strLen-1, "%L",LANG_SERVER,"UQSTATS_HUDSTRSTATS14");
  4653.                                 failed_jump[id]=true;
  4654.                             }
  4655.                             if(touch_somthing[id])
  4656.                             {
  4657.                                 strLen += format(strMess[strLen],(40*NSTRAFES)-strLen-1, "%L",LANG_SERVER,"UQSTATS_HUDSTRSTATS15");
  4658.                             }
  4659.                             if(find_script)
  4660.                             {
  4661.                                 strLen += format(strMess[strLen],(40*NSTRAFES)-strLen-1, "%L",LANG_SERVER,"UQSTATS_HUDSTRSTATS16");
  4662.                                 failed_jump[id]=true;
  4663.                             }
  4664.                             if(trigger_protection[id])
  4665.                             {
  4666.                                 strLen += format(strMess[strLen],(40*NSTRAFES)-strLen-1, "%L",LANG_SERVER,"UQSTATS_TRIGGERPROTECT");
  4667.                             }
  4668.                         }
  4669.                     }
  4670.                     //Sync
  4671.                     if( goodSyncTemp > 0 ) sync_[id]= (goodSyncTemp*100/(goodSyncTemp+badSyncTemp));
  4672.                     else sync_[id] = INFO_ZERO;
  4673.                    
  4674.                     switch( jump_type[id] )
  4675.                     {
  4676.                         case 0: formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE1"); //Lj
  4677.                         case 1: formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE2" ); //hj
  4678.                         case 2:
  4679.                         {
  4680.                             if(CjafterJump[id]==1)
  4681.                             {
  4682.                                 if(ddforcjafterbhop[id])
  4683.                                 {
  4684.                                     formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE3" );
  4685.                                    
  4686.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_CJAB");
  4687.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_CJAB");
  4688.                                 }
  4689.                                 else if(ddforcjafterladder[id])
  4690.                                 {
  4691.                                     formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE4" );
  4692.                                    
  4693.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_CJAL");
  4694.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_CJAL");
  4695.                                 }
  4696.                                 else
  4697.                                 {
  4698.                                     formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE5" );
  4699.                                    
  4700.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_CJAJ");
  4701.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_CJAJ");
  4702.                                 }
  4703.                             }
  4704.                             else formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE6" ); //cj
  4705.                         }
  4706.                         case 3: formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE7" );//bj
  4707.                         case 4: formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE8" );//??
  4708.                         case 5: formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE9" );//sbj
  4709.                         case 6:
  4710.                         {
  4711.                             if(ddbeforwj[id]==false)
  4712.                             {
  4713.                                 formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE10" ); //wj
  4714.                             }
  4715.                             else
  4716.                             {
  4717.                                 formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE11" );
  4718.                             }
  4719.                         }
  4720.                         case 7: formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE12" );
  4721.                         case 9:
  4722.                         {
  4723.                             if(CjafterJump[id]==2)
  4724.                             {
  4725.                                 if(ddforcjafterbhop[id])
  4726.                                 {
  4727.                                     formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE13" );
  4728.                                    
  4729.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_DCJAB");
  4730.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_DCJAB");
  4731.                                 }
  4732.                                 else if(ddforcjafterladder[id])
  4733.                                 {
  4734.                                     formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE14" );
  4735.                                    
  4736.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_DCJAL");
  4737.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_DCJAL");
  4738.                                 }
  4739.                                 else
  4740.                                 {
  4741.                                     formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE15" );
  4742.                                    
  4743.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_DCJAJ");
  4744.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_DCJAJ");
  4745.                                 }
  4746.                             }
  4747.                             else formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE16" ); //dcj
  4748.                         }
  4749.                         case 11:
  4750.                         {
  4751.                             if(CjafterJump[id]==3)
  4752.                             {
  4753.                                 if(ddforcjafterbhop[id])
  4754.                                 {
  4755.                                     formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE17" );
  4756.                                    
  4757.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_MCJAB");
  4758.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_MCJAB");
  4759.                                 }
  4760.                                 else if(ddforcjafterladder[id])
  4761.                                 {
  4762.                                     formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE18" );
  4763.                                    
  4764.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_MCJAL");
  4765.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_MCJAL");
  4766.                                 }
  4767.                                 else
  4768.                                 {
  4769.                                     formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE19" );
  4770.                                    
  4771.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_MCJAJ");
  4772.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_MCJAJ");
  4773.                                 }
  4774.                             }
  4775.                             else formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE20" );//mcj
  4776.                         }
  4777.                         case 12: formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE21" );//nothing
  4778.                         case 13: formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE22" );//ld
  4779.                         case 15: formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE23" );
  4780.                         case 16: formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE24" );
  4781.                         case 17: formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE25" );
  4782.                         case 18:
  4783.                         {  
  4784.                             if(multidropcj[id]==0)
  4785.                             {
  4786.                                 formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE26" );
  4787.                             }
  4788.                             else if(multidropcj[id]==1)
  4789.                             {
  4790.                                 formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE27" );
  4791.                                 formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_DROPDCJ");
  4792.                             }
  4793.                             else if(multidropcj[id]==2)
  4794.                             {
  4795.                                 formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE28" );
  4796.                                 formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_DROPMCJ");
  4797.                             }
  4798.                         }
  4799.                         case 19:
  4800.                         {   if(dropaem[id])
  4801.                             {
  4802.                                 if(multiscj[id]==0)
  4803.                                 {
  4804.                                     formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE29" );
  4805.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_DROPSCJ");
  4806.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_DROPSCJ");
  4807.                                 }
  4808.                                 else if(multiscj[id]==1)
  4809.                                 {
  4810.                                     formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE30" );
  4811.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_DROPDSCJ");
  4812.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_DROPDSCJ");
  4813.                                 }
  4814.                                 else if(multiscj[id]==2)
  4815.                                 {
  4816.                                     formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE31" );
  4817.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_DROPMSCJ");
  4818.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_DROPMSCJ");
  4819.                                    
  4820.                                 }
  4821.                             }
  4822.                             else if(ddstandcj[id])
  4823.                             {
  4824.                                 if(multiscj[id]==0)
  4825.                                 {
  4826.                                     formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE32" );
  4827.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_SCJAF");
  4828.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_SCJAF");
  4829.                                 }
  4830.                                 else if(multiscj[id]==1)
  4831.                                 {
  4832.                                     formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE33" );
  4833.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_DSCJAF");
  4834.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_DSCJAF");
  4835.                                 }
  4836.                                 else if(multiscj[id]==2)
  4837.                                 {
  4838.                                     formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE34" );
  4839.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_MSCJAF");
  4840.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_MSCJAF");
  4841.                                 }
  4842.                             }
  4843.                             else
  4844.                             {
  4845.                                 if(multiscj[id]==0)
  4846.                                 {
  4847.                                     formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE35" );
  4848.                                 }
  4849.                                 else if(multiscj[id]==1)
  4850.                                 {
  4851.                                     formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE36" );
  4852.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_DSCJ");
  4853.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_DSCJ");
  4854.                                 }
  4855.                                 else if(multiscj[id]==2)
  4856.                                 {
  4857.                                     formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE37" );
  4858.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_MSCJ");
  4859.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_MSCJ");
  4860.                                 }
  4861.                             }
  4862.                         }
  4863.                         case 20:formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE38" );
  4864.                         case 21:formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE39" );
  4865.                         case 22:formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE40" );
  4866.                         case 23:formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE41");
  4867.                         case 24:formatex( type, 32, "%L",LANG_SERVER,"UQSTATS_HUD_JUMPTYPE42");
  4868.                     }
  4869.                     //gain
  4870.                    
  4871.                    
  4872.                    
  4873.                     new Float:gain[33];
  4874.                     gain[id] = floatsub( maxspeed[id], prestrafe[id] );
  4875.            
  4876.                     if(jump_type[id]==Type_StandUp_CountJump && dropaem[id]==false && multiscj[id]==0 && uq_drsbj==0)
  4877.                     {
  4878.                         JumpReset(id,12);
  4879.                         return FMRES_IGNORED;
  4880.                     }
  4881.                     else if(jump_type[id]==Type_StandUp_CountJump && dropaem[id]==false && multiscj[id]==1 && uq_dscj==0)
  4882.                     {
  4883.                         JumpReset(id,12);
  4884.                         return FMRES_IGNORED;
  4885.                     }
  4886.                     else if(jump_type[id]==Type_StandUp_CountJump && dropaem[id]==false && multiscj[id]==2 && uq_mscj==0)
  4887.                     {
  4888.                         JumpReset(id,12);
  4889.                         return FMRES_IGNORED;
  4890.                     }
  4891.                     else if(jump_type[id]==Type_StandUp_CountJump && dropaem[id] && multiscj[id]==0 && uq_dropscj==0)
  4892.                     {
  4893.                         JumpReset(id,12);
  4894.                         return FMRES_IGNORED;
  4895.                     }
  4896.                     else if(jump_type[id]==Type_StandUp_CountJump && dropaem[id] && multiscj[id]==1 && uq_dropdscj==0)
  4897.                     {
  4898.                         JumpReset(id,12);
  4899.                         return FMRES_IGNORED;
  4900.                     }
  4901.                     else if(jump_type[id]==Type_StandUp_CountJump && dropaem[id] && multiscj[id]==2 && uq_dropmscj==0)
  4902.                     {
  4903.                         JumpReset(id,12);
  4904.                         return FMRES_IGNORED;
  4905.                     }
  4906.                     else if(jump_type[id]==Type_Double_CountJump&& uq_dcj==0)
  4907.                     {
  4908.                         JumpReset(id,13);
  4909.                         return FMRES_IGNORED;
  4910.                     }
  4911.                     else if(jump_type[id]==Type_Multi_CountJump && uq_mcj==0)
  4912.                     {
  4913.                         JumpReset(id,14);
  4914.                         return FMRES_IGNORED;
  4915.                     }
  4916.                     else if(jump_type[id]==Type_CountJump && uq_cj==0)
  4917.                     {
  4918.                         JumpReset(id,15);
  4919.                         return FMRES_IGNORED;
  4920.                     }
  4921.                     else if((jump_type[id]==Type_LongJump || jump_type[id]==Type_HighJump) && uq_lj==0)
  4922.                     {
  4923.                         JumpReset(id,16);
  4924.                         return FMRES_IGNORED;
  4925.                     }
  4926.                     else if(jump_type[id]==Type_ladder && uq_ladder==0)
  4927.                     {
  4928.                         JumpReset(id,17);
  4929.                         return FMRES_IGNORED;
  4930.                     }
  4931.                     else if(jump_type[id]==Type_Bhop_In_Duck && (uq_bhopinduck==0 ))
  4932.                     {
  4933.                         JumpReset(id,18);
  4934.                         return FMRES_IGNORED;
  4935.                     }
  4936.                     else if(jump_type[id]==Type_DuckBhop && (uq_duckbhop==0 ))
  4937.                     {
  4938.                         JumpReset(id,18);
  4939.                         return FMRES_IGNORED;
  4940.                     }
  4941.                     else if(jump_type[id]==Type_Up_Bhop && (uq_upbj==0) )
  4942.                     {
  4943.                         JumpReset(id,18);
  4944.                         return FMRES_IGNORED;
  4945.                     }
  4946.                     else if(jump_type[id]==Type_Up_Bhop_In_Duck && (uq_upbhopinduck==0 ))
  4947.                     {
  4948.                         JumpReset(id,18);
  4949.                         return FMRES_IGNORED;
  4950.                     }
  4951.                     else if(jump_type[id]==Type_BhopLongJump && uq_bj==0)
  4952.                     {
  4953.                         JumpReset(id,19);
  4954.                         return FMRES_IGNORED;
  4955.                     }
  4956.                     else if(jump_type[id]==Type_ladderBhop && uq_ldbj==0)
  4957.                     {
  4958.                         JumpReset(id,20);
  4959.                         return FMRES_IGNORED;
  4960.                     }
  4961.                     else if(jump_type[id]==Type_Real_ladder_Bhop && uq_realldbhop==0)
  4962.                     {
  4963.                         JumpReset(id,20);
  4964.                         return FMRES_IGNORED;
  4965.                     }
  4966.                     else if(jump_type[id]==Type_WeirdLongJump && uq_wj==0)
  4967.                     {
  4968.                         JumpReset(id,21);
  4969.                         return FMRES_IGNORED;
  4970.                     }
  4971.                     else if(jump_type[id]==Type_Drop_CountJump && multidropcj[id]==0 && uq_drcj==0)
  4972.                     {
  4973.                         JumpReset(id,22);
  4974.                         return FMRES_IGNORED;
  4975.                     }
  4976.                     else if(jump_type[id]==Type_Drop_CountJump && multidropcj[id]==1 && uq_dropdcj==0)
  4977.                     {
  4978.                         JumpReset(id,22);
  4979.                         return FMRES_IGNORED;
  4980.                     }
  4981.                     else if(jump_type[id]==Type_Drop_CountJump && multidropcj[id]==2 && uq_dropmcj==0)
  4982.                     {
  4983.                         JumpReset(id,22);
  4984.                         return FMRES_IGNORED;
  4985.                     }
  4986.                     else if(jump_type[id]==Type_Drop_BhopLongJump && uq_drbj==0)
  4987.                     {
  4988.                         JumpReset(id,23);
  4989.                         return FMRES_IGNORED;
  4990.                     }
  4991.                     else if(jump_type[id]==Type_StandupBhopLongJump && uq_sbj==0)
  4992.                     {
  4993.                         JumpReset(id,24);
  4994.                         return FMRES_IGNORED;
  4995.                     }
  4996.                     else if(jump_type[id]==Type_Up_Stand_Bhop && uq_upsbj==0)
  4997.                     {
  4998.                         JumpReset(id,24);
  4999.                         return FMRES_IGNORED;
  5000.                     }
  5001.                     else if(jump_type[id]==Type_Multi_Bhop && uq_multibhop==0)
  5002.                     {
  5003.                         JumpReset(id,242);
  5004.                         return FMRES_IGNORED;
  5005.                     }
  5006.                    
  5007.                     for(new i=1;i<NSTRAFES;i++)
  5008.                     {
  5009.                         if(tmpstatspeed[i]>40 && jump_type[id]!=Type_ladder && jump_type[id]!=Type_Real_ladder_Bhop && jump_type[id]!=Type_Slide)
  5010.                         {
  5011.                             JumpReset(id,40);
  5012.                             return FMRES_IGNORED;
  5013.                         }
  5014.                     }
  5015.                    
  5016.                     if(jump_type[id]==Type_Multi_Bhop && multibhoppre[id]==false)
  5017.                     {
  5018.                         g_reset[id]=true;
  5019.                         return FMRES_IGNORED;
  5020.                     }
  5021.                     if(!failed_jump[id] && !not_save)
  5022.                     {
  5023.                         new tmp_type_num=-1;
  5024.                        
  5025.                         //saving tops
  5026.                         if(!ddstandcj[id] && !CjafterJump[id] && jump_type[id]!=Type_None && jump_type[id]!=Type_Null && jump_type[id]!=Type_Nothing && jump_type[id]!=Type_Nothing2 && Pmaxspeed==250.0 && kz_top==1 && kz_map_top==1)
  5027.                         {
  5028.                             checkmap( id, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id],Jtype1[id]);
  5029.                         }
  5030.                        
  5031.                         if(!CjafterJump[id] && jump_type[id]==Type_Double_CountJump && kz_top==1 && uq_dcj==1)
  5032.                         {
  5033.                             if(kz_sql==0)
  5034.                             {
  5035.                                 if(Pmaxspeed==250.0)
  5036.                                 {
  5037.                                     checktops1( id,Type_List[10],10, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id]);
  5038.                                    
  5039.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5040.                                     {
  5041.                                         checktops_block( id,Type_List[10],10, distance[id], edgedist[id], jumpblock[id]);
  5042.                                     }
  5043.                                 }
  5044.                                 else if(Pmaxspeed!=250.0 && kz_weapon)
  5045.                                 {
  5046.                                     checktops_weapon( id,Pmaxspeed,weapon_rank(Pmaxspeed),Type_List_weapon[6],6, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id],weapon_name);
  5047.                                    
  5048.                                     if(kz_wpn_block_top && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5049.                                     {
  5050.                                         checktops_block_weapon(id,Pmaxspeed,weapon_rank(Pmaxspeed),Type_List_weapon[6],6,distance[id],edgedist[id],jumpblock[id],weapon_name);
  5051.                                     }
  5052.                                 }
  5053.                             }
  5054.                             if(kz_sql==1)
  5055.                             {
  5056.                                 formatex(sql_JumpType[id],25,"doublecj_top");
  5057.                                 tmp_type_num=10;
  5058.                             }
  5059.                         }
  5060.                         else if(!CjafterJump[id] && jump_type[id]==Type_Multi_CountJump && kz_top==1 && uq_mcj==1)
  5061.                         {
  5062.                             if(kz_sql==0)
  5063.                             {
  5064.                                 if(Pmaxspeed==250.0)
  5065.                                 {
  5066.                                     checktops2( id,Type_List[21],21, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id],ducks[id]);
  5067.                                    
  5068.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5069.                                     {
  5070.                                         checktops_block( id,Type_List[21],21, distance[id], edgedist[id], jumpblock[id]);
  5071.                                     }
  5072.                                 }
  5073.                                 else if(Pmaxspeed!=250.0 && kz_weapon)
  5074.                                 {
  5075.                                     checktops_weapon( id,Pmaxspeed,weapon_rank(Pmaxspeed),Type_List_weapon[7],7, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id],weapon_name);
  5076.                                    
  5077.                                     if(kz_wpn_block_top && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5078.                                     {
  5079.                                         checktops_block_weapon(id,Pmaxspeed,weapon_rank(Pmaxspeed),Type_List_weapon[7],7,distance[id],edgedist[id],jumpblock[id],weapon_name);
  5080.                                     }
  5081.                                 }
  5082.                             }
  5083.                             if(kz_sql==1)
  5084.                             {
  5085.                                 formatex(sql_JumpType[id],25,"multicj_top");
  5086.                                 tmp_type_num=21;
  5087.                             }
  5088.                         }
  5089.                         else if(!CjafterJump[id] && jump_type[id]==Type_CountJump && kz_top==1 && uq_cj==1)
  5090.                         {
  5091.                             if(kz_sql==0)
  5092.                             {
  5093.                                 if(Pmaxspeed==250.0)
  5094.                                 {
  5095.                                     checktops1( id,Type_List[2],2, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id]);
  5096.                                    
  5097.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5098.                                     {
  5099.                                         checktops_block( id,Type_List[2],2, distance[id], edgedist[id], jumpblock[id]);
  5100.                                     }
  5101.                                 }
  5102.                                 else if(Pmaxspeed!=250.0 && kz_weapon)
  5103.                                 {
  5104.                                     checktops_weapon( id,Pmaxspeed,weapon_rank(Pmaxspeed),Type_List_weapon[1],1, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id],weapon_name);
  5105.                                    
  5106.                                     if(kz_wpn_block_top && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5107.                                     {
  5108.                                         checktops_block_weapon(id,Pmaxspeed,weapon_rank(Pmaxspeed),Type_List_weapon[1],1,distance[id],edgedist[id],jumpblock[id],weapon_name);
  5109.                                     }
  5110.                                 }
  5111.                             }
  5112.                             if(kz_sql==1)
  5113.                             {
  5114.                                 formatex(sql_JumpType[id],25,"cj_top");
  5115.                                 tmp_type_num=2;
  5116.                             }
  5117.                         }
  5118.                         else if((jump_type[id]==Type_LongJump || jump_type[id]==Type_HighJump) && kz_top==1 && uq_lj==1)
  5119.                         {
  5120.                             if(kz_sql==0)
  5121.                             {
  5122.                                 if(Pmaxspeed==250.0)
  5123.                                 {
  5124.                                     checktops1( id,Type_List[0],0, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id]);
  5125.                                    
  5126.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5127.                                     {
  5128.                                         if(jump_type[id]==Type_HighJump)
  5129.                                         {
  5130.                                             checktops_block( id,"hj",6, distance[id], edgedist[id], jumpblock[id]);
  5131.                                         }
  5132.                                         else checktops_block( id,Type_List[0],0, distance[id], edgedist[id], jumpblock[id]);
  5133.                                     }
  5134.                                 }
  5135.                                 else if(Pmaxspeed!=250.0 && kz_weapon)
  5136.                                 {
  5137.                                     checktops_weapon( id,Pmaxspeed,weapon_rank(Pmaxspeed),Type_List_weapon[0],0, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id],weapon_name);
  5138.                                
  5139.                                     if(kz_wpn_block_top && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5140.                                     {
  5141.                                         if(jump_type[id]==Type_HighJump)
  5142.                                         {
  5143.                                             checktops_block_weapon(id,Pmaxspeed,weapon_rank(Pmaxspeed),"hj",9,distance[id],edgedist[id],jumpblock[id],weapon_name);
  5144.                                         }
  5145.                                         else checktops_block_weapon(id,Pmaxspeed,weapon_rank(Pmaxspeed),Type_List_weapon[0],0,distance[id],edgedist[id],jumpblock[id],weapon_name);
  5146.                                     }
  5147.                                 }
  5148.                             }
  5149.                             if(kz_sql==1)
  5150.                             {
  5151.                                 formatex(sql_JumpType[id],25,"lj_top");
  5152.                                 tmp_type_num=0;
  5153.                             }
  5154.                         }
  5155.                         else if(jump_type[id]==Type_ladder && kz_top==1 && uq_ladder==1)
  5156.                         {
  5157.                             if(kz_sql==0)
  5158.                             {
  5159.                                 if(Pmaxspeed==250.0)
  5160.                                 {
  5161.                                     checktops1( id,Type_List[6],6, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id]);
  5162.                                    
  5163.                                 }
  5164.                                
  5165.                             }
  5166.                             if(kz_sql==1)
  5167.                             {
  5168.                                 formatex(sql_JumpType[id],25,"ladder_top");
  5169.                                 tmp_type_num=6;
  5170.                             }
  5171.                         }
  5172.                         else if(jump_type[id]==Type_BhopLongJump && kz_top==1 && uq_bj==1)
  5173.                         {
  5174.                             if(kz_sql==0)
  5175.                             {
  5176.                                 if(Pmaxspeed==250.0)
  5177.                                 {
  5178.                                     checktops1( id,Type_List[4],4, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id]);
  5179.                                    
  5180.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5181.                                     {
  5182.                                         checktops_block( id,Type_List[4],4, distance[id], edgedist[id], jumpblock[id]);
  5183.                                     }
  5184.                                 }
  5185.                                 else if(Pmaxspeed!=250.0 && kz_weapon)
  5186.                                 {
  5187.                                     checktops_weapon( id,Pmaxspeed,weapon_rank(Pmaxspeed),Type_List_weapon[3],3, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id],weapon_name);
  5188.                                
  5189.                                     if(kz_wpn_block_top && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5190.                                     {
  5191.                                         checktops_block_weapon(id,Pmaxspeed,weapon_rank(Pmaxspeed),Type_List_weapon[3],3,distance[id],edgedist[id],jumpblock[id],weapon_name);
  5192.                                     }
  5193.                                 }
  5194.                             }
  5195.                             if(kz_sql==1)
  5196.                             {
  5197.                                 formatex(sql_JumpType[id],25,"bj_top");
  5198.                                 tmp_type_num=4;
  5199.                             }
  5200.                         }
  5201.                         else if(jump_type[id]==Type_ladderBhop && kz_top==1 && uq_ldbj==1)
  5202.                         {
  5203.                             if(kz_sql==0)
  5204.                             {
  5205.                                 if(Pmaxspeed==250.0)
  5206.                                 {
  5207.                                     checktops1( id,Type_List[7],7, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id]);
  5208.                                    
  5209.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5210.                                     {
  5211.                                         checktops_block( id,Type_List[7],7, distance[id], edgedist[id], jumpblock[id]);
  5212.                                     }
  5213.                                 }
  5214.                             }
  5215.                             if(kz_sql==1)
  5216.                             {
  5217.                                 formatex(sql_JumpType[id],25,"ladderbhop_top");
  5218.                                 tmp_type_num=7;
  5219.                             }
  5220.                         }
  5221.                         else if(jump_type[id]==Type_WeirdLongJump && kz_top==1 && uq_wj==1)
  5222.                         {
  5223.                             if(kz_sql==0)
  5224.                             {
  5225.                                 if(Pmaxspeed==250.0)
  5226.                                 {
  5227.                                     checktops1( id,Type_List[3],3, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id]);
  5228.                                    
  5229.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5230.                                     {
  5231.                                         checktops_block( id,Type_List[3],3, distance[id], edgedist[id], jumpblock[id]);
  5232.                                     }
  5233.                                 }
  5234.                                 else if(Pmaxspeed!=250.0 && kz_weapon)
  5235.                                 {
  5236.                                     checktops_weapon( id,Pmaxspeed,weapon_rank(Pmaxspeed),Type_List_weapon[2],2, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id],weapon_name);
  5237.                                    
  5238.                                     if(kz_wpn_block_top && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5239.                                     {
  5240.                                         checktops_block_weapon(id,Pmaxspeed,weapon_rank(Pmaxspeed),Type_List_weapon[2],2,distance[id],edgedist[id],jumpblock[id],weapon_name);
  5241.                                     }
  5242.                                 }
  5243.                             }
  5244.                             if(kz_sql==1)
  5245.                             {
  5246.                                 formatex(sql_JumpType[id],25,"wj_top");
  5247.                                 tmp_type_num=3;
  5248.                             }
  5249.                         }
  5250.                         else if(jump_type[id]==Type_Drop_BhopLongJump && kz_top==1 && uq_drbj==1)
  5251.                         {
  5252.                             if(kz_sql==0)
  5253.                             {
  5254.                                 if(Pmaxspeed==250.0)
  5255.                                 {
  5256.                                     checktops1( id,Type_List[9],9, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id]);  
  5257.                                    
  5258.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5259.                                     {
  5260.                                         checktops_block( id,Type_List[9],9, distance[id], edgedist[id], jumpblock[id]);
  5261.                                     }
  5262.                                 }
  5263.                                 else if(Pmaxspeed!=250.0 && kz_weapon)
  5264.                                 {
  5265.                                     checktops_weapon( id,Pmaxspeed,weapon_rank(Pmaxspeed),Type_List_weapon[5],5, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id],weapon_name);
  5266.                                
  5267.                                     if(kz_wpn_block_top && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5268.                                     {
  5269.                                         checktops_block_weapon(id,Pmaxspeed,weapon_rank(Pmaxspeed),Type_List_weapon[5],5,distance[id],edgedist[id],jumpblock[id],weapon_name);
  5270.                                     }
  5271.                                 }
  5272.                             }
  5273.                             if(kz_sql==1)
  5274.                             {
  5275.                                 formatex(sql_JumpType[id],25,"dropbj_top");
  5276.                                 tmp_type_num=9;
  5277.                             }
  5278.                         }
  5279.                         else if(jump_type[id]==Type_StandupBhopLongJump && kz_top==1 && uq_sbj==1)
  5280.                         {
  5281.                             if(kz_sql==0)
  5282.                             {
  5283.                                 if(Pmaxspeed==250.0)
  5284.                                 {
  5285.                                     checktops1( id,Type_List[5],5, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id]);  
  5286.                                    
  5287.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5288.                                     {
  5289.                                         checktops_block( id,Type_List[5],5, distance[id], edgedist[id], jumpblock[id]);
  5290.                                     }
  5291.                                 }
  5292.                                 else if(Pmaxspeed!=250.0 && kz_weapon)
  5293.                                 {
  5294.                                     checktops_weapon( id,Pmaxspeed,weapon_rank(Pmaxspeed),Type_List_weapon[4],4, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id],weapon_name);
  5295.                                
  5296.                                     if(kz_wpn_block_top && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5297.                                     {
  5298.                                         checktops_block_weapon(id,Pmaxspeed,weapon_rank(Pmaxspeed),Type_List_weapon[4],4,distance[id],edgedist[id],jumpblock[id],weapon_name);
  5299.                                     }
  5300.                                 }
  5301.                             }
  5302.                             if(kz_sql==1)
  5303.                             {
  5304.                                 formatex(sql_JumpType[id],25,"sbj_top");
  5305.                                 tmp_type_num=5;
  5306.                             }
  5307.                         }
  5308.                         else if(!ddstandcj[id] && jump_type[id]==Type_StandUp_CountJump && dropaem[id]==false && multiscj[id]==0 && kz_extras==1 && kz_top==1 && uq_drsbj==1)
  5309.                         {
  5310.                             if(kz_sql==0)
  5311.                             {
  5312.                                 if(Pmaxspeed==250.0)
  5313.                                 {
  5314.                                     checktops1( id,Type_List[1],1, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id]);  
  5315.                                    
  5316.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5317.                                     {
  5318.                                         checktops_block( id,Type_List[1],1, distance[id], edgedist[id], jumpblock[id]);
  5319.                                     }
  5320.                                
  5321.                                 }
  5322.                             }
  5323.                             if(kz_sql==1)
  5324.                             {
  5325.                                 formatex(sql_JumpType[id],25,"scj_top");
  5326.                                 tmp_type_num=1;
  5327.                             }
  5328.                         }
  5329.                         else if(!ddstandcj[id] && jump_type[id]==Type_StandUp_CountJump && dropaem[id]==false && multiscj[id]==1 && kz_extras==1 && kz_top==1 && uq_dscj==1)
  5330.                         {
  5331.                             if(kz_sql==0)
  5332.                             {
  5333.                                 if(Pmaxspeed==250.0)
  5334.                                 {
  5335.                                     checktops1( id,Type_List[11],11, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id]);
  5336.                                    
  5337.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5338.                                     {
  5339.                                         checktops_block( id,Type_List[11],11, distance[id], edgedist[id], jumpblock[id]);
  5340.                                     }
  5341.                                 }
  5342.                             }
  5343.                             if(kz_sql==1)
  5344.                             {
  5345.                                 formatex(sql_JumpType[id],25,"doublescj_top");
  5346.                                 tmp_type_num=11;
  5347.                             }
  5348.                         }
  5349.                         else if(!ddstandcj[id] && jump_type[id]==Type_StandUp_CountJump && dropaem[id]==false && multiscj[id]==2 && kz_extras==1 && kz_top==1 && uq_mscj==1)
  5350.                         {
  5351.                             if(kz_sql==0)
  5352.                             {
  5353.                                 if(Pmaxspeed==250.0)
  5354.                                 {
  5355.                                     checktops2( id,Type_List[22],22, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id],ducks[id]);  
  5356.                                    
  5357.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5358.                                     {
  5359.                                         checktops_block( id,Type_List[22],22, distance[id], edgedist[id], jumpblock[id]);
  5360.                                     }
  5361.                                 }
  5362.                             }
  5363.                             if(kz_sql==1)
  5364.                             {
  5365.                                 formatex(sql_JumpType[id],25,"multiscj_top");
  5366.                                 tmp_type_num=22;
  5367.                             }
  5368.                         }
  5369.                         else if(!ddstandcj[id] && jump_type[id]==Type_StandUp_CountJump && dropaem[id] && multiscj[id]==0 && kz_extras==1 && kz_top==1 && uq_dropscj==1)
  5370.                         {
  5371.                             if(kz_sql==0)
  5372.                             {
  5373.                                 if(Pmaxspeed==250.0)
  5374.                                 {
  5375.                                     checktops1( id,Type_List[12],12, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id]);  
  5376.                                    
  5377.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5378.                                     {
  5379.                                         checktops_block( id,Type_List[12],12, distance[id], edgedist[id], jumpblock[id]);
  5380.                                     }
  5381.                                 }
  5382.                             }
  5383.                             if(kz_sql==1)
  5384.                             {
  5385.                                 formatex(sql_JumpType[id],25,"dropscj_top");
  5386.                                 tmp_type_num=12;
  5387.                             }
  5388.                         }
  5389.                         else if(!ddstandcj[id] && jump_type[id]==Type_StandUp_CountJump && dropaem[id] && multiscj[id]==1 && kz_extras==1 && kz_top==1 && uq_dropdscj==1)
  5390.                         {
  5391.                             if(kz_sql==0)
  5392.                             {
  5393.                                 if(Pmaxspeed==250.0)
  5394.                                 {
  5395.                                     checktops1( id,Type_List[13],13, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id]);
  5396.                                    
  5397.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5398.                                     {
  5399.                                         checktops_block( id,Type_List[13],13, distance[id], edgedist[id], jumpblock[id]);
  5400.                                     }
  5401.                                 }
  5402.                             }
  5403.                             if(kz_sql==1)
  5404.                             {
  5405.                                 formatex(sql_JumpType[id],25,"dropdoublescj_top");
  5406.                                 tmp_type_num=13;
  5407.                             }
  5408.                         }
  5409.                         else if(!ddstandcj[id] && jump_type[id]==Type_StandUp_CountJump && dropaem[id] && multiscj[id]==2 && kz_extras==1 && kz_top==1 && uq_dropmscj==1)
  5410.                         {
  5411.                             if(kz_sql==0)
  5412.                             {
  5413.                                 if(Pmaxspeed==250.0)
  5414.                                 {
  5415.                                     checktops2( id,Type_List[23],23, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id],ducks[id]);
  5416.                                    
  5417.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5418.                                     {
  5419.                                         checktops_block( id,Type_List[23],23, distance[id], edgedist[id], jumpblock[id]);
  5420.                                     }
  5421.                                 }
  5422.                             }
  5423.                             if(kz_sql==1)
  5424.                             {
  5425.                                 formatex(sql_JumpType[id],25,"dropmultiscj_top");
  5426.                                 tmp_type_num=23;
  5427.                             }
  5428.                         }
  5429.                         else if(jump_type[id]==Type_DuckBhop && kz_extras==1 && kz_top==1 && uq_duckbhop==1)
  5430.                         {
  5431.                             if(kz_sql==0)
  5432.                             {
  5433.                                 if(Pmaxspeed==250.0)
  5434.                                 {
  5435.                                     checktops1( id,Type_List[14],14, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id]);
  5436.                                    
  5437.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5438.                                     {
  5439.                                         checktops_block( id,Type_List[14],14, distance[id], edgedist[id], jumpblock[id]);
  5440.                                     }
  5441.                                 }
  5442.                             }
  5443.                             if(kz_sql==1)
  5444.                             {
  5445.                                 formatex(sql_JumpType[id],25,"duckbhop_top");
  5446.                                 tmp_type_num=14;
  5447.                             }
  5448.                         }
  5449.                         else if(jump_type[id]==Type_Bhop_In_Duck && kz_extras==1 && kz_top==1 && uq_bhopinduck==1)
  5450.                         {
  5451.                             if(kz_sql==0)
  5452.                             {
  5453.                                 if(Pmaxspeed==250.0)
  5454.                                 {
  5455.                                     checktops1( id,Type_List[15],15, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id]);
  5456.                                    
  5457.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5458.                                     {
  5459.                                         checktops_block( id,Type_List[15],15, distance[id], edgedist[id], jumpblock[id]);
  5460.                                     }
  5461.                                 }
  5462.                             }
  5463.                             if(kz_sql==1)
  5464.                             {
  5465.                                 formatex(sql_JumpType[id],25,"bhopinduck_top");
  5466.                                 tmp_type_num=15;
  5467.                             }
  5468.                         }
  5469.                         else if(jump_type[id]==Type_Real_ladder_Bhop && kz_extras==1 && kz_top==1 && uq_realldbhop==1)
  5470.                         {
  5471.                             if(kz_sql==0)
  5472.                             {
  5473.                                 if(Pmaxspeed==250.0)
  5474.                                 {
  5475.                                     checktops1( id,Type_List[16],16, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id]);
  5476.                                    
  5477.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5478.                                     {
  5479.                                         checktops_block( id,Type_List[16],16, distance[id], edgedist[id], jumpblock[id]);
  5480.                                     }
  5481.                                 }
  5482.                             }
  5483.                             if(kz_sql==1)
  5484.                             {
  5485.                                 formatex(sql_JumpType[id],25,"realladderbhop_top");
  5486.                                 tmp_type_num=16;
  5487.                             }
  5488.                         }
  5489.                         else if(jump_type[id]==Type_Up_Bhop && kz_extras==1 && kz_top==1 && uq_upbj==1)
  5490.                         {
  5491.                             if(kz_sql==0)
  5492.                             {
  5493.                                 if(Pmaxspeed==250.0)
  5494.                                 {
  5495.                                     checktops1( id,Type_List[17],17, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id]);
  5496.                                    
  5497.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5498.                                     {
  5499.                                         checktops_block( id,Type_List[17],17, distance[id], edgedist[id], jumpblock[id]);
  5500.                                     }
  5501.                                 }
  5502.                             }
  5503.                             if(kz_sql==1)
  5504.                             {
  5505.                                 formatex(sql_JumpType[id],25,"upbj_top");
  5506.                                 tmp_type_num=17;
  5507.                             }
  5508.                         }
  5509.                         else if(jump_type[id]==Type_Up_Bhop_In_Duck && kz_extras==1 && kz_top==1 && uq_upbhopinduck==1)
  5510.                         {
  5511.                             if(kz_sql==0)
  5512.                             {
  5513.                                 if(Pmaxspeed==250.0)
  5514.                                 {
  5515.                                     checktops1( id,Type_List[19],19, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id]);
  5516.                                    
  5517.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5518.                                     {
  5519.                                         checktops_block( id,Type_List[19],19, distance[id], edgedist[id], jumpblock[id]);
  5520.                                     }
  5521.                                 }
  5522.                             }
  5523.                             if(kz_sql==1)
  5524.                             {
  5525.                                 formatex(sql_JumpType[id],25,"upbhopinduck_top");
  5526.                                 tmp_type_num=19;
  5527.                             }
  5528.                         }
  5529.                         else if(jump_type[id]==Type_Up_Stand_Bhop && kz_extras==1 && kz_top==1 && uq_upsbj==1)
  5530.                         {
  5531.                             if(kz_sql==0)
  5532.                             {
  5533.                                 if(Pmaxspeed==250.0)
  5534.                                 {
  5535.                                     checktops1( id,Type_List[18],18, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id]);
  5536.                                    
  5537.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5538.                                     {
  5539.                                         checktops_block( id,Type_List[18],18, distance[id], edgedist[id], jumpblock[id]);
  5540.                                     }
  5541.                                 }
  5542.                             }
  5543.                             if(kz_sql==1)
  5544.                             {
  5545.                                 formatex(sql_JumpType[id],25,"upsbj_top");
  5546.                                 tmp_type_num=18;
  5547.                             }
  5548.                         }
  5549.                         else if(jump_type[id]==Type_Multi_Bhop && kz_extras==1 && kz_top==1 && uq_multibhop==1)
  5550.                         {
  5551.                             if(kz_sql==0)
  5552.                             {
  5553.                                 if(Pmaxspeed==250.0)
  5554.                                 {
  5555.                                     checktops2( id,Type_List[24],24, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id],bhop_num[id]);
  5556.                                    
  5557.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5558.                                     {
  5559.                                         checktops_block( id,Type_List[24],24, distance[id], edgedist[id], jumpblock[id]);
  5560.                                     }
  5561.                                 }
  5562.                             }
  5563.                             if(kz_sql==1)
  5564.                             {
  5565.                                 formatex(sql_JumpType[id],25,"multibhop_top");
  5566.                                 tmp_type_num=24;
  5567.                             }
  5568.                         }
  5569.                         else if(jump_type[id]==Type_Drop_CountJump && multidropcj[id]==2 && kz_extras==1 && kz_top==1 && uq_dropmcj==1)
  5570.                         {
  5571.                             if(kz_sql==0)
  5572.                             {
  5573.                                 if(Pmaxspeed==250.0)
  5574.                                 {
  5575.                                     checktops2( id,Type_List[25],25, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id],ducks[id]);
  5576.                                    
  5577.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5578.                                     {
  5579.                                         checktops_block( id,Type_List[25],25, distance[id], edgedist[id], jumpblock[id]);
  5580.                                     }
  5581.                                 }
  5582.                             }
  5583.                             if(kz_sql==1)
  5584.                             {
  5585.                                 formatex(sql_JumpType[id],25,"multidropcj_top");
  5586.                                 tmp_type_num=25;
  5587.                             }
  5588.                         }
  5589.                         else if(jump_type[id]==Type_Drop_CountJump && multidropcj[id]==1 && kz_extras==1 && kz_top==1 && uq_dropdcj==1)
  5590.                         {
  5591.                             if(kz_sql==0)
  5592.                             {
  5593.                                 if(Pmaxspeed==250.0)
  5594.                                 {
  5595.                                     checktops1( id,Type_List[20],20, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id]);
  5596.                                    
  5597.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5598.                                     {
  5599.                                         checktops_block( id,Type_List[20],20, distance[id], edgedist[id], jumpblock[id]);
  5600.                                     }
  5601.                                 }
  5602.                             }
  5603.                             if(kz_sql==1)
  5604.                             {
  5605.                                 formatex(sql_JumpType[id],25,"doubledropcj_top");
  5606.                                
  5607.                                 tmp_type_num=20;
  5608.                             }
  5609.                         }
  5610.                         else if(jump_type[id]==Type_Drop_CountJump && multidropcj[id]==0 && kz_top==1 && uq_drcj==1)
  5611.                         {
  5612.                             if(kz_sql==0)
  5613.                             {
  5614.                                 if(Pmaxspeed==250.0)
  5615.                                 {
  5616.                                     checktops1( id,Type_List[8],8, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id]);
  5617.                                    
  5618.                                     if(kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5619.                                     {
  5620.                                         checktops_block( id,Type_List[8],8, distance[id], edgedist[id], jumpblock[id]);
  5621.                                     }
  5622.                                 }
  5623.                                 else if(Pmaxspeed!=250.0 && kz_weapon)
  5624.                                 {
  5625.                                     checktops_weapon( id,Pmaxspeed,weapon_rank(Pmaxspeed),Type_List_weapon[8],8, distance[id], maxspeed[id], prestrafe[id], strafe_num[id], sync_[id],weapon_name);
  5626.                                
  5627.                                     if(kz_wpn_block_top && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5628.                                     {
  5629.                                         checktops_block_weapon(id,Pmaxspeed,weapon_rank(Pmaxspeed),Type_List_weapon[8],8,distance[id],edgedist[id],jumpblock[id],weapon_name);
  5630.                                     }
  5631.                                 }
  5632.                             }
  5633.                             if(kz_sql==1)
  5634.                             {
  5635.                                 formatex(sql_JumpType[id],25,"dropcj_top");
  5636.                                
  5637.                                 tmp_type_num=8;
  5638.                             }
  5639.                         }
  5640.                        
  5641.                    
  5642.                         if(tmp_type_num!=-1 && !ddstandcj[id] && !CjafterJump[id] && kz_sql==1 && jump_type[id]!=Type_None && jump_type[id]!=Type_Null && jump_type[id]!=Type_Nothing && jump_type[id]!=Type_Nothing2)
  5643.                         {
  5644.                             if(jumpblock[id]>100 && kz_block_top==1 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5645.                             {
  5646.                                 new cData[6];
  5647.                                
  5648.                                 cData[0] = floatround(distance[id]*1000000);
  5649.                                 cData[1] = floatround(edgedist[id]*1000000);
  5650.                                 cData[2] = jumpblock[id];
  5651.                                
  5652.                                 if(jump_type[id]==Type_HighJump)
  5653.                                 {
  5654.                                     cData[3]=6;
  5655.                                 }
  5656.                                 else cData[3] = tmp_type_num;
  5657.                                
  5658.                                 cData[4] = Pmaxspeed;
  5659.                                 cData[5] = wpn;
  5660.                                
  5661.                                 PlayerSaveData_to_SQL_block(id, cData);
  5662.                             }
  5663.                            
  5664.                             new cData[9];
  5665.                             cData[0] = floatround(distance[id]*1000000);
  5666.                             cData[1] = floatround(maxspeed[id]*1000000);
  5667.                             cData[2] = floatround(prestrafe[id]*1000000);
  5668.                             cData[3] = strafe_num[id];
  5669.                             cData[4] = sync_[id];
  5670.                            
  5671.                            
  5672.                             if(jump_type[id]==Type_Multi_Bhop)
  5673.                             {
  5674.                                 cData[5]=bhop_num[id];
  5675.                             }
  5676.                             else cData[5] = ducks[id];
  5677.                            
  5678.                             cData[6] = tmp_type_num;
  5679.                             cData[7] = Pmaxspeed;
  5680.                             cData[8] = wpn;
  5681.                            
  5682.                             PlayerSaveData_to_SQL(id, cData);
  5683.                         }
  5684.                     }
  5685.                    
  5686.            
  5687.                     if(kz_stats_pre[id]==true)//ducks stat for mcj
  5688.                     {
  5689.                         strM[0] = '^0';
  5690.                         strMBuf[0] = '^0';
  5691.                         strL = INFO_ZERO;
  5692.                         for(jj = 2;jj <= ducks[id]; jj++)
  5693.                         {
  5694.                             strL += format(strM[strL],(40*NSTRAFES)-strL-1, "%L",LANG_SERVER,"UQSTATS_HUD_PRINT8", jj-1,statsduckspeed[id][jj]);
  5695.                         }
  5696.                         copy(strMBuf,strL,strM);//dlya stat ducks
  5697.                     }
  5698.                     if(uq_istrafe)
  5699.                     {
  5700.                         new st1[NSTRAFES],st2[NSTRAFES];
  5701.                         for(new i = 1;i <= strafe_num[id]; i++)
  5702.                         {
  5703.                             if(i<NSTRAFES)
  5704.                             {
  5705.                                 st1[i]=strafe_stat_sync[id][i][0];
  5706.                                 st2[i]=strafe_stat_sync[id][i][1];
  5707.                             }
  5708.                         }
  5709.                        
  5710.                         for( new i = INFO_ONE; i < max_players; i++ )
  5711.                         {
  5712.                             if( (i == id || is_spec_user[i]))
  5713.                             {
  5714.                                 if(ingame_strafe[i])
  5715.                                 {
  5716.                                     new Float:or[3];
  5717.                                     pev(id,pev_origin,or);
  5718.                                    
  5719.                                     remove_beam_ent(i);
  5720.                                    
  5721.                                     epta(i,or,direct_for_strafe[id],line_lost[id],FullJumpFrames[id],is_user_ducking(id),strafe_num[id],st1,st2,strafe_lost_frame[id]);
  5722.                                 }
  5723.                             }
  5724.                         }
  5725.                     }
  5726.                     for( new i = INFO_ONE; i < max_players; i++ )
  5727.                     {
  5728.                         if( (i == id || is_spec_user[i]) && g_lj_stats[i]==true)
  5729.                         {  
  5730.                             copy(strMessBuf,strLen,strMess);
  5731.                             //stats
  5732.                             if(jump_type[id]==Type_Multi_Bhop &&!failed_jump[id])
  5733.                             {
  5734.                                 set_hudmessage(stats_r, stats_g, stats_b, stats_x, stats_y, 0, 6.0, 2.5, 0.1, 0.3, h_stats  )
  5735.                                 show_hudmessage( i, "%L",LANG_SERVER,"UQSTATS_HUD_PRINT1", type, distance[id], maxspeed[id], gain[id], prestrafe[id],strafe_num[id], sync_[id],bhop_num[id]);
  5736.                             }
  5737.                             else if((jump_type[id]==Type_Double_CountJump || (multiscj[id]==1 && jump_type[id]==Type_StandUp_CountJump) || (multidropcj[id]==1 && jump_type[id] == Type_Drop_CountJump)) &&!failed_jump[id])
  5738.                             {
  5739.                                 set_hudmessage(stats_r, stats_g, stats_b, stats_x, stats_y, 0, 6.0, 2.5, 0.1, 0.3, h_stats );  
  5740.                                 show_hudmessage( i, "%L",LANG_SERVER,"UQSTATS_HUD_PRINT2", type, distance[id], maxspeed[id], gain[id], prest1[id],prest[id], prestrafe[id],strafe_num[id], sync_[id],dd_sync[id]);
  5741.                             }
  5742.                             else if((jump_type[id]==Type_ladderBhop || jump_type[id]==Type_ladder || jump_type[id]==Type_Drop_BhopLongJump || jump_type[id]==Type_WeirdLongJump || jump_type[id]==Type_LongJump || jump_type[id]==Type_HighJump) &&!failed_jump[id])
  5743.                             {
  5744.                                 set_hudmessage(stats_r, stats_g, stats_b, stats_x, stats_y, 0, 6.0, 2.5, 0.1, 0.3, h_stats  )
  5745.                                 show_hudmessage( i, "%L",LANG_SERVER,"UQSTATS_HUD_PRINT0", type, distance[id], maxspeed[id], gain[id], prestrafe[id],strafe_num[id], sync_[id]);
  5746.                             }
  5747.                             else if((jump_type[id]==Type_CountJump || (multiscj[id]==0 && jump_type[id]==Type_StandUp_CountJump) || (multidropcj[id]==0 && jump_type[id] == Type_Drop_CountJump)) && !failed_jump[id])
  5748.                             {
  5749.                                 set_hudmessage(stats_r, stats_g, stats_b, stats_x, stats_y, 0, 6.0, 2.5, 0.1, 0.3, h_stats);
  5750.                                 show_hudmessage( i, "%L",LANG_SERVER,"UQSTATS_HUD_PRINT4", type, distance[id], maxspeed[id], gain[id], prest1[id],prestrafe[id],strafe_num[id], sync_[id],dd_sync[id]);
  5751.                             }
  5752.                             else if((jump_type[id]==Type_Bhop_In_Duck || jump_type[id]==Type_Up_Bhop_In_Duck || jump_type[id]==Type_Up_Stand_Bhop || jump_type[id]==Type_Up_Bhop || jump_type[id]==Type_Real_ladder_Bhop || jump_type[id]==Type_DuckBhop || jump_type[id] == Type_BhopLongJump || jump_type[id] == Type_StandupBhopLongJump ) && !failed_jump[id])
  5753.                             {
  5754.                                 set_hudmessage(stats_r, stats_g, stats_b, stats_x, stats_y, 0, 6.0, 2.5, 0.1, 0.3, h_stats);
  5755.                                 show_hudmessage( i, "%L",LANG_SERVER,"UQSTATS_HUD_PRINT0", type, distance[id], maxspeed[id], gain[id],prestrafe[id],strafe_num[id], sync_[id]);
  5756.                             }
  5757.                             else if((jump_type[id]==Type_Multi_CountJump || (multiscj[id]==2 && jump_type[id]==Type_StandUp_CountJump) || (multidropcj[id]==2 && jump_type[id] == Type_Drop_CountJump)) && !failed_jump[id])
  5758.                             {
  5759.                                 set_hudmessage(stats_r, stats_g, stats_b, stats_x, stats_y, 0, 6.0, 2.5, 0.1, 0.3, h_stats );
  5760.                                 show_hudmessage( i, "%L",LANG_SERVER,"UQSTATS_HUD_PRINT6", type, distance[id], maxspeed[id], gain[id], prest1[id],prestrafe[id],ducks[id], strafe_num[id], sync_[id],dd_sync[id]);
  5761.                             }
  5762.                            
  5763.                             if(jump_type[id] != Type_Slide && streifstat[id]==true && jump_type[id]!=Type_None && !failed_jump[id])
  5764.                             {
  5765.                                 set_hudmessage(stats_r, stats_g, stats_b, strafe_x, strafe_y, 0, 6.0, 2.5, 0.1, 0.3, h_streif);
  5766.                                 show_hudmessage(i,"%L",LANG_SERVER,"UQSTATS_HUD_PRINT7",strMessBuf); //stata streifof
  5767.                             }
  5768.                            
  5769.                             if(kz_stats_pre[id]==true && (jump_type[id]==Type_Multi_CountJump || (multiscj[id]==2 && jump_type[id]==Type_StandUp_CountJump) || (multidropcj[id]==2 && jump_type[id] == Type_Drop_CountJump)) && !failed_jump[id])
  5770.                             {
  5771.                                 set_hudmessage(stats_r, stats_g, stats_b, duck_x,duck_y, 0, 6.0, 2.5, 0.1, 0.3, h_duck);   
  5772.                                 show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_HUD_PRINT7",strMBuf);//stata duckov
  5773.                             }
  5774.                            
  5775.                             //failstats
  5776.                             if(jump_type[id]==Type_Multi_Bhop  && (failed_jump[id]))
  5777.                             {
  5778.                                 set_hudmessage( f_stats_r, f_stats_g, f_stats_b, stats_x, stats_y, 0, 6.0, 2.5, 0.1, 0.3, h_stats );
  5779.                                 show_hudmessage( i, "%L",LANG_SERVER,"UQSTATS_HUD_PRINT1", type, distance[id], maxspeed[id], gain[id], prestrafe[id],strafe_num[id], sync_[id],bhop_num[id]);
  5780.                             }
  5781.                             else if((jump_type[id]==Type_ladderBhop || jump_type[id]==Type_ladder || jump_type[id]==Type_Drop_BhopLongJump || jump_type[id]==Type_WeirdLongJump || jump_type[id]==Type_LongJump || jump_type[id]==Type_HighJump)  && (failed_jump[id]))
  5782.                             {
  5783.                                 set_hudmessage( f_stats_r, f_stats_g, f_stats_b, stats_x, stats_y, 0, 6.0, 2.5, 0.1, 0.3, h_stats );
  5784.                                 show_hudmessage( i, "%L",LANG_SERVER,"UQSTATS_HUD_PRINT0", type, distance[id], maxspeed[id], gain[id], prestrafe[id],strafe_num[id], sync_[id]);
  5785.                             }
  5786.                             else if((jump_type[id]==Type_CountJump || (multiscj[id]==0 && jump_type[id]==Type_StandUp_CountJump) || (multidropcj[id]==0 && jump_type[id] == Type_Drop_CountJump)) && (failed_jump[id]))
  5787.                             {
  5788.                                 set_hudmessage(f_stats_r, f_stats_g, f_stats_b, stats_x, stats_y, 0, 6.0, 2.5, 0.1, 0.3, h_stats );
  5789.                                 show_hudmessage( i, "%L",LANG_SERVER,"UQSTATS_HUD_PRINT4", type, distance[id], maxspeed[id], gain[id], prest1[id],prestrafe[id],strafe_num[id], sync_[id],dd_sync[id]);
  5790.                             }
  5791.                             else if((jump_type[id]==Type_Bhop_In_Duck || jump_type[id]==Type_Up_Bhop_In_Duck || jump_type[id]==Type_Up_Stand_Bhop || jump_type[id]==Type_Up_Bhop || jump_type[id]==Type_Real_ladder_Bhop || jump_type[id]==Type_DuckBhop || jump_type[id] == Type_BhopLongJump || jump_type[id] == Type_StandupBhopLongJump ) && (failed_jump[id]))
  5792.                             {
  5793.                                 set_hudmessage(f_stats_r, f_stats_g, f_stats_b, stats_x, stats_y, 0, 6.0, 2.5, 0.1, 0.3, h_stats );
  5794.                                 show_hudmessage( i, "%L",LANG_SERVER,"UQSTATS_HUD_PRINT0", type, distance[id], maxspeed[id], gain[id], prestrafe[id],strafe_num[id], sync_[id]);
  5795.                             }
  5796.                             else if((jump_type[id]==Type_Double_CountJump || (multiscj[id]==1 && jump_type[id]==Type_StandUp_CountJump) || (multidropcj[id]==1 && jump_type[id] == Type_Drop_CountJump)) && (failed_jump[id]))
  5797.                             {
  5798.                                 set_hudmessage( f_stats_r, f_stats_g, f_stats_b, stats_x, stats_y, 0, 6.0, 2.5, 0.1, 0.3, h_stats );
  5799.                                 show_hudmessage( i, "%L",LANG_SERVER,"UQSTATS_HUD_PRINT2", type, distance[id], maxspeed[id], gain[id], prest1[id],prest[id], prestrafe[id],strafe_num[id], sync_[id],dd_sync[id]);
  5800.                             }
  5801.                             else if((jump_type[id]==Type_Multi_CountJump || (multiscj[id]==2 && jump_type[id]==Type_StandUp_CountJump) || (multidropcj[id]==2 && jump_type[id] == Type_Drop_CountJump)) && (failed_jump[id]))
  5802.                             {
  5803.                                 set_hudmessage(f_stats_r, f_stats_g, f_stats_b, stats_x, stats_y, 0, 6.0, 2.5, 0.1, 0.3, h_stats );
  5804.                                 show_hudmessage( i, "%L",LANG_SERVER,"UQSTATS_HUD_PRINT6", type, distance[id], maxspeed[id], gain[id], prest1[id],prestrafe[id],ducks[id],strafe_num[id], sync_[id],dd_sync[id]);
  5805.                             }
  5806.                                                    
  5807.                             if(jump_type[id] != Type_Slide && streifstat[id]==true && jump_type[id]!=Type_None && (failed_jump[id]))
  5808.                             {
  5809.                                 set_hudmessage(f_stats_r, f_stats_g, f_stats_b, strafe_x, strafe_y, 0, 6.0, 2.5, 0.1, 0.3, h_streif );
  5810.                                 show_hudmessage(i,"%L",LANG_SERVER,"UQSTATS_HUD_PRINT7",strMessBuf);  //stata streifof fail
  5811.                             }
  5812.                            
  5813.                             if(kz_stats_pre[id]==true && (jump_type[id]==Type_Multi_CountJump || (multiscj[id]==2 && jump_type[id]==Type_StandUp_CountJump) || (multidropcj[id]==2 && jump_type[id] == Type_Drop_CountJump)) && (failed_jump[id]))
  5814.                             {
  5815.                                 set_hudmessage(f_stats_r, f_stats_g, f_stats_b, duck_x,duck_y, 0, 6.0, 2.5, 0.1, 0.3, h_duck)
  5816.                                 show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_HUD_PRINT7",strMBuf); //stata duckov fail
  5817.                             }                  
  5818.                         }
  5819.                     }
  5820.                    
  5821.                     //console prints
  5822.                     for( new i = INFO_ONE; i < max_players; i++ )
  5823.                     {
  5824.                         if( (i == id || is_spec_user[i]) && g_lj_stats[i]==true)
  5825.                         {
  5826.                             copy(strMessBuf,strLen,strMess);
  5827.                             if((jump_type[id]==Type_ladderBhop || jump_type[id]==Type_ladder || jump_type[id]==Type_Drop_BhopLongJump || jump_type[id]==Type_WeirdLongJump || jump_type[id]==Type_LongJump || jump_type[id]==Type_HighJump) )
  5828.                             {
  5829.                                 client_print( i, print_console, " ");
  5830.                                 client_print( i, print_console, "%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT1", type, distance[id], maxspeed[id], gain[id], prestrafe[id], strafe_num[id],sync_[id] );
  5831.                             }
  5832.                             else if(jump_type[id]==Type_Multi_Bhop )
  5833.                             {
  5834.                                 client_print( i, print_console, " ");
  5835.                                 client_print( i, print_console, "%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT2", type, distance[id], maxspeed[id], gain[id], prestrafe[id], strafe_num[id],sync_[id] ,bhop_num[id]);
  5836.                            
  5837.                             }
  5838.                             else if(jump_type[id]==Type_CountJump || (multiscj[id]==0 && jump_type[id]==Type_StandUp_CountJump) || (multidropcj[id]==0 && jump_type[id] == Type_Drop_CountJump))
  5839.                             {
  5840.                                 client_print( i, print_console, " ");
  5841.                                 client_print( i, print_console, "%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT3", type, distance[id], maxspeed[id], gain[id], prest1[id], prestrafe[id], strafe_num[id],sync_[id],dd_sync[id] );
  5842.                             }
  5843.                             else if(jump_type[id]==Type_Bhop_In_Duck || jump_type[id]==Type_Up_Bhop_In_Duck || jump_type[id]==Type_Up_Stand_Bhop || jump_type[id]==Type_Up_Bhop || jump_type[id]==Type_Real_ladder_Bhop || jump_type[id]==Type_DuckBhop || jump_type[id] == Type_BhopLongJump || jump_type[id] == Type_StandupBhopLongJump)
  5844.                             {
  5845.                                 client_print( i, print_console, " ");
  5846.                                 client_print( i, print_console, "%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT1", type, distance[id], maxspeed[id], gain[id], prestrafe[id], strafe_num[id],sync_[id] );
  5847.                             }
  5848.                             else if(jump_type[id]==Type_Double_CountJump || (multiscj[id]==1 && jump_type[id]==Type_StandUp_CountJump) || (multidropcj[id]==1 && jump_type[id] == Type_Drop_CountJump))
  5849.                             {
  5850.                                 client_print( i, print_console, " ");
  5851.                                 client_print( i, print_console, "%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT4", type, distance[id], maxspeed[id], gain[id], prest1[id],prest[id], prestrafe[id], strafe_num[id],sync_[id],dd_sync[id] );
  5852.                                 client_print( i, print_console, "%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT5",dd_sync[id]);
  5853.                            
  5854.                             }
  5855.                             else if(jump_type[id]==Type_Multi_CountJump || (multiscj[id]==2 && jump_type[id]==Type_StandUp_CountJump) || (multidropcj[id]==2 && jump_type[id] == Type_Drop_CountJump))
  5856.                             {
  5857.                                 client_print( i, print_console, " ");
  5858.                                 client_print( i, print_console, "%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT6", type, distance[id], maxspeed[id], gain[id], prest1[id],prestrafe[id],ducks[id],strafe_num[id], sync_[id]);
  5859.                                 client_print( i, print_console, "%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT5",dd_sync[id]);
  5860.                            
  5861.                             }
  5862.                            
  5863.                             if(jump_type[id]!=Type_None)
  5864.                             {
  5865.                                 static strMessHalf[40];
  5866.                                 for(jj=INFO_ONE; (jj <= strafe_num[id]) && (jj < NSTRAFES);jj++)
  5867.                                 {
  5868.                                         strtok(strMessBuf,strMessHalf,40,strMessBuf,40*NSTRAFES,'^n');
  5869.                                         replace(strMessHalf,40,"^n","");
  5870.                                         client_print(i, print_console, "%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT7", strMessHalf);
  5871.                                 }
  5872.                             }
  5873.                            
  5874.                             if(jump_type[id]==Type_ladder && strafe_stat_speed[id][0][0]!=0)
  5875.                             {
  5876.                                 client_print(i, print_console, "%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT12", strafe_stat_speed[id][0][0]);
  5877.                             }
  5878.                             else if(jump_type[id]==Type_Multi_CountJump || (multiscj[id]==2 && jump_type[id]==Type_StandUp_CountJump) || (multidropcj[id]==2 && jump_type[id] == Type_Drop_CountJump))
  5879.                             {
  5880.                                 client_print( i, print_console, "..................................................");
  5881.                                 client_print( i, print_console, "%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT8",prest1[id]);
  5882.                                 for(new ss=2;ss<=ducks[id];ss++)
  5883.                                 client_print( i, print_console, "%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT9",ss-1,statsduckspeed[id][ss]);
  5884.                                 client_print( i, print_console, "%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT10",prestrafe[id]);
  5885.                                 client_print( i, print_console, "..................................................");
  5886.                             }
  5887.                             else if(jump_type[id]==Type_Double_CountJump || (multiscj[id]==1 && jump_type[id]==Type_StandUp_CountJump) || (multidropcj[id]==1 && jump_type[id] == Type_Drop_CountJump))
  5888.                             {
  5889.                                 client_print( i, print_console, "..................................................");
  5890.                                 client_print( i, print_console, "%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT8",prest1[id]);
  5891.                                 client_print( i, print_console, "%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT11",prest[id]);
  5892.                                 client_print( i, print_console, "%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT10",prestrafe[id]);
  5893.                                 client_print( i, print_console, "..................................................");
  5894.                             }
  5895.                             else if(jump_type[id]==Type_Up_Bhop || jump_type[id]==Type_Up_Stand_Bhop || jump_type[id]==Type_Up_Bhop_In_Duck)
  5896.                             {
  5897.                                 client_print( i, print_console,"%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT13",upheight[id]);
  5898.                             }
  5899.                             if(wpn!=29 && wpn!=17 && wpn!=16)
  5900.                             {
  5901.                                 client_print( i, print_console,"%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT14",weapon_name);
  5902.                             }
  5903.                             if(fps_hight[id] && jump_type[id]!=Type_ladder)
  5904.                             {
  5905.                                 client_print( i, print_console,"%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT15");
  5906.                                 fps_hight[id]=false;
  5907.                             }
  5908.                             if(ladderbug[id])
  5909.                             {
  5910.                                 client_print( i, print_console,"%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT16");
  5911.                                 ladderbug[id]=false;
  5912.                             }
  5913.                             if(find_ladder[id] && jump_type[id]==Type_DuckBhop)
  5914.                             {
  5915.                                 client_print( i, print_console,"%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT17");
  5916.                                 find_ladder[id]=false;
  5917.                             }
  5918.                             if(touch_somthing[id])
  5919.                             {
  5920.                                 client_print( i, print_console,"%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT18");
  5921.                             }
  5922.                             if(Show_edge[id] && failed_jump[id]==false && jump_type[id]!=Type_ladder && jumpblock[id]<user_block[id][0] && jumpblock[id]>user_block[id][1] && edgedist[id]<100.0 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5923.                             {
  5924.                                 if((jumpblock[id]+Landing+edgedist[id])>(distance[id]+10.0) || Landing<=0.0)
  5925.                                 {
  5926.                                     client_print( i, print_console,"%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT21",jumpblock[id],edgedist[id]);
  5927.                                 }
  5928.                                 else if(land_bug )
  5929.                                 {
  5930.                                     client_print( i, print_console,"%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT19",jumpblock[id],edgedist[id],Landing);
  5931.                                 }
  5932.                                 else client_print( i, print_console,"%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT20",jumpblock[id],edgedist[id],Landing);
  5933.                             }
  5934.                             else if(Show_edge[id] && failed_jump[id] && jump_type[id]!=Type_ladder && jumpblock[id]<user_block[id][0] && jumpblock[id]>user_block[id][1] && edgedist[id]<100.0 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  5935.                             {
  5936.                                 client_print( i, print_console,"%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT21",jumpblock[id],edgedist[id]);
  5937.                             }
  5938.                             else if(Show_edge_Fail[id] && failed_jump[id] && jump_type[id]!=Type_ladder && edgedist[id]<100.0 && edgedist[id]!=0.0)
  5939.                             {
  5940.                                 client_print( i, print_console,"%L",LANG_SERVER,"UQSTATS_CONSOLE_PRINT22",edgedist[id]);   
  5941.                             }
  5942.                             if(find_script)
  5943.                             {
  5944.                                 client_print( i, print_console,"%L",LANG_SERVER,"UQSTATS_PROBSCRIPT");
  5945.                                
  5946.                             }
  5947.                             if(trigger_protection[id])
  5948.                             {
  5949.                                 client_print( i, print_console,"%L",LANG_SERVER,"UQSTATS_CTRIGGERPROTECT");
  5950.                                 trigger_protection[id]=false;
  5951.                             }
  5952.                         }
  5953.                     }
  5954.                    
  5955.                     if(wpn==29 || wpn==17 || wpn==16 || wpn==4 || wpn==9 || wpn==25)
  5956.                     {
  5957.                         formatex(weapon_name,20,"");
  5958.                     }
  5959.                     else
  5960.                     {
  5961.                         new tmp_str[21];
  5962.                        
  5963.                         formatex(tmp_str,20,"[");
  5964.                         add(weapon_name, 20, "]");
  5965.                         add(tmp_str, 20, weapon_name);
  5966.                         formatex(weapon_name,20,tmp_str);
  5967.                     }
  5968.                    
  5969.                     if(find_script)
  5970.                     {
  5971.                         new punishment[64];
  5972.                         formatex(punishment,63,"%L",LANG_SERVER,"UQSTATS_PUNISHBLOCK");
  5973.                        
  5974.                         switch(uq_script_punishment)
  5975.                         {
  5976.                             case 1:
  5977.                             {
  5978.                                 formatex(punishment,63,"%L",LANG_SERVER,"UQSTATS_PUNISHKICK");
  5979.                             }
  5980.                             case 2:
  5981.                             {
  5982.                                 formatex(punishment,63,"%L",LANG_SERVER,"UQSTATS_PUNISHBAN",uq_ban_minutes);
  5983.                             }
  5984.                         }
  5985.                        
  5986.                         if(jump_type[id]!=Type_None)
  5987.                         {
  5988.                             Log_script(FullJumpFrames[id],angles_arry[id],id,distance[id],maxspeed[id],prestrafe[id],strafe_num[id],goodSyncTemp*100/(goodSyncTemp+badSyncTemp),Jtype[id],weapon_name1,punishment,strMess);
  5989.                    
  5990.                             switch(uq_script_punishment)
  5991.                             {
  5992.                                 case 1:
  5993.                                 {
  5994.                                     kick_function(id,Jtype[id]);                                       
  5995.                                 }
  5996.                                 case 2:
  5997.                                 {
  5998.                                     ban_function(id,Jtype[id]);
  5999.                                 }
  6000.                             }
  6001.                         }
  6002.                     }
  6003.                    
  6004.                    
  6005.                     new block_colorchat_dist;
  6006.                     if(uq_block_chat_show)
  6007.                     {
  6008.                         block_colorchat_dist=god_dist;
  6009.                        
  6010.                         switch(uq_block_chat_min)
  6011.                         {
  6012.                             case 0:
  6013.                                 block_colorchat_dist=good_dist;
  6014.                             case 1:
  6015.                                 block_colorchat_dist=pro_dist;
  6016.                             case 2:
  6017.                                 block_colorchat_dist=holy_dist;
  6018.                             case 3:
  6019.                                 block_colorchat_dist=leet_dist;
  6020.                             case 4:
  6021.                                 block_colorchat_dist=god_dist;
  6022.                         }
  6023.                     }
  6024.                    
  6025.                     new block_str[20];
  6026.                    
  6027.                     if(jumpblock[id]>=block_colorchat_dist && uq_block_chat_show && jumpblock[id]<user_block[id][0] && jumpblock[id]>user_block[id][1] && edgedist[id]<100.0 && edgedist[id]!=0.0 && (jumpblock[id]+edgedist[id])<distance[id])
  6028.                     {
  6029.                         formatex(block_str,19,"%L",LANG_SERVER,"UQSTATS_COLORCHAT_BLOCK",jumpblock[id]);
  6030.                     }
  6031.                     else
  6032.                     {
  6033.                         formatex(block_str,19,"");
  6034.                     }
  6035.                    
  6036.                     new iPlayers[32],iNum;
  6037.                     get_players( iPlayers, iNum,"ch") ;
  6038.                    
  6039.                     for(new i=0;i<iNum;i++)
  6040.                     {
  6041.                         new ids=iPlayers[i];
  6042.                         if(gHasColorChat[ids] ==true || ids==id)
  6043.                         {  
  6044.                             if( !failed_jump[id] )
  6045.                             {
  6046.                                 if((jump_type[id]==Type_Bhop_In_Duck || jump_type[id]==Type_Up_Bhop_In_Duck || jump_type[id]==Type_Up_Stand_Bhop || jump_type[id]==Type_Up_Bhop || jump_type[id]==Type_DuckBhop || jump_type[id]==Type_Real_ladder_Bhop || jump_type[id]==Type_Double_CountJump
  6047.                                              || (multiscj[id]!=2 && jump_type[id]==Type_StandUp_CountJump) || (multidropcj[id]!=2 && jump_type[id]==Type_Drop_CountJump) || jump_type[id]==Type_CountJump
  6048.                                              || jump_type[id]==Type_Drop_BhopLongJump || jump_type[id]==Type_BhopLongJump || jump_type[id]==Type_StandupBhopLongJump || jump_type[id]==Type_WeirdLongJump
  6049.                                              || jump_type[id]==Type_ladderBhop || jump_type[id]==Type_ladder || jump_type[id]==Type_LongJump || jump_type[id]==Type_HighJump))
  6050.                                 {
  6051.                                     if ( distance[id] >= god_dist ) {
  6052.                                         if( uq_sounds && enable_sound[ids]==true )
  6053.                                         {
  6054.                                             client_cmd(ids, "speak misc/mod_godlike");
  6055.                                         }
  6056.                                         if( uq_light ) krasnota(id);
  6057.                                         Color_Chat_Lang(ids, RED, "%L",LANG_SERVER,"UQSTATS_CCHAT_NORMALA",prefix, g_playername[id], distance[id],Jtype[id],block_str,weapon_name,pre_type[id],airacel[id]);
  6058.                                     }
  6059.                                     else if ( distance[id] >= leet_dist  ) {
  6060.                                         if( uq_sounds && enable_sound[id]==true ) client_cmd(id, "speak misc/mod_wickedsick");
  6061.                                    
  6062.                                         if( uq_light ) krasnota(id);
  6063.                                         Color_Chat_Lang(ids, RED, "%L",LANG_SERVER,"UQSTATS_CCHAT_NORMALA",prefix, g_playername[id], distance[id],Jtype[id],block_str,weapon_name,pre_type[id],airacel[id]);
  6064.                                     }
  6065.                                     else if ( distance[id] >= holy_dist ) {
  6066.                                         if( uq_sounds && enable_sound[id]==true ) client_cmd(id, "speak misc/holyshit");
  6067.                                    
  6068.                                         if( uq_light ) sineva(id);
  6069.                                         Color_Chat_Lang(ids, BLUE, "%L",LANG_SERVER,"UQSTATS_CCHAT_NORMALA",prefix, g_playername[id], distance[id],Jtype[id],block_str,weapon_name,pre_type[id],airacel[id]);
  6070.                                     }
  6071.                                     else if ( distance[id] >= pro_dist ) {
  6072.                                         if( uq_sounds && enable_sound[id]==true ) client_cmd(id, "speak misc/perfect");
  6073.                                    
  6074.                                         Color_Chat_Lang(ids, GREEN, "%L",LANG_SERVER,"UQSTATS_CCHAT_NORMALB",prefix, g_playername[id], distance[id],Jtype[id],block_str,weapon_name,pre_type[id],airacel[id]);
  6075.                                     }
  6076.                                     else if ( distance[id] >=good_dist ) {
  6077.                                         if( uq_sounds && enable_sound[id]==true ) client_cmd(id, "speak misc/impressive");
  6078.                                    
  6079.                                         Color_Chat_Lang(ids, GREY, "%L",LANG_SERVER,"UQSTATS_CCHAT_NORMALA",prefix, g_playername[id], distance[id],Jtype[id],block_str,weapon_name,pre_type[id],airacel[id]);
  6080.                                     }
  6081.                                 }
  6082.                                 else if(jump_type[id]==Type_Multi_CountJump || (multiscj[id]==2 && jump_type[id]==Type_StandUp_CountJump) || (multidropcj[id]==2 && jump_type[id]==Type_Drop_CountJump))
  6083.                                 {
  6084.                                     if ( distance[id] >= god_dist ) {
  6085.                                         if( uq_sounds && enable_sound[ids]==true )
  6086.                                         {
  6087.                                             client_cmd(ids, "speak misc/mod_godlike");
  6088.                                         }
  6089.                                         if( uq_light ) krasnota(id);
  6090.                                         Color_Chat_Lang(ids,RED,"%L",LANG_SERVER,"UQSTATS_COLORCHAT_MULTIDUCKA",prefix, g_playername[id], distance[id],Jtype[id],ducks[id],block_str,weapon_name,pre_type[id],airacel[id]);
  6091.                                     }
  6092.                                     else if ( distance[id] >= leet_dist  ) {
  6093.                                         if( uq_sounds && enable_sound[id]==true ) client_cmd(id, "speak misc/mod_wickedsick");
  6094.                                    
  6095.                                         if( uq_light ) krasnota(id);
  6096.                                         Color_Chat_Lang(ids,RED,"%L",LANG_SERVER,"UQSTATS_COLORCHAT_MULTIDUCKA",prefix, g_playername[id], distance[id],Jtype[id],ducks[id],block_str,weapon_name,pre_type[id],airacel[id]);
  6097.                                     }
  6098.                                     else if ( distance[id] >= holy_dist ) {
  6099.                                         if( uq_sounds && enable_sound[id]==true ) client_cmd(id, "speak misc/holyshit");
  6100.                                    
  6101.                                         if( uq_light ) sineva(id);
  6102.                                         Color_Chat_Lang(ids,BLUE,"%L",LANG_SERVER,"UQSTATS_COLORCHAT_MULTIDUCKA",prefix, g_playername[id], distance[id],Jtype[id],ducks[id],block_str,weapon_name,pre_type[id],airacel[id]);
  6103.                                     }
  6104.                                     else if ( distance[id] >= pro_dist ) {
  6105.                                         if( uq_sounds && enable_sound[id]==true ) client_cmd(id, "speak misc/perfect");
  6106.                                    
  6107.                                         Color_Chat_Lang(ids,GREEN,"%L",LANG_SERVER,"UQSTATS_COLORCHAT_MULTIDUCKB",prefix, g_playername[id], distance[id],Jtype[id],ducks[id],block_str,weapon_name,pre_type[id],airacel[id]);
  6108.                                     }
  6109.                                     else if ( distance[id] >=good_dist ) {
  6110.                                         if( uq_sounds && enable_sound[id]==true ) client_cmd(id, "speak misc/impressive");
  6111.                                    
  6112.                                         Color_Chat_Lang(ids,GREY,"%L",LANG_SERVER,"UQSTATS_COLORCHAT_MULTIDUCKA",prefix, g_playername[id], distance[id],Jtype[id],ducks[id],block_str,weapon_name,pre_type[id],airacel[id]);
  6113.                                     }
  6114.                                 }
  6115.                             }  
  6116.                         }
  6117.                     }
  6118.                    
  6119.                     // UberBeam start
  6120.                     if( kz_beam[id]==true)
  6121.                         {
  6122.                         for( new i = 0; i < 100; i++ ) {
  6123.                             if( gBeam_points[id][i][0] == 0.0
  6124.                             && gBeam_points[id][i][1] == 0.0
  6125.                             && gBeam_points[id][i][2] == 0.0 ) {
  6126.                                 continue;
  6127.                             }
  6128.                        
  6129.                             message_begin(MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, {0, 0, 0}, id);
  6130.                             write_byte ( TE_BEAMPOINTS );
  6131.                             if( i == 100 ) {
  6132.                                 write_coord(floatround(gBeam_points[id][i][0]));
  6133.                                 write_coord(floatround(gBeam_points[id][i][1]));
  6134.                                 write_coord(floatround(jumpoff_origin[id][2]-34.0));
  6135.                                 write_coord(floatround(land_origin[0]));
  6136.                                 write_coord(floatround(land_origin[1]));
  6137.                                 write_coord(floatround(jumpoff_origin[id][2]-34.0));
  6138.                             } else {
  6139.                                 if ( i > 2 ) {
  6140.                                     write_coord(floatround(gBeam_points[id][i-1][0]));
  6141.                                     write_coord(floatround(gBeam_points[id][i-1][1]));
  6142.                                     write_coord(floatround(jumpoff_origin[id][2]-34.0));
  6143.                                 } else {
  6144.                                     write_coord(floatround(jumpoff_origin[id][0]));
  6145.                                     write_coord(floatround(jumpoff_origin[id][1]));
  6146.                                     write_coord(floatround(jumpoff_origin[id][2]-34.0));
  6147.                                 }
  6148.                                 write_coord(floatround(gBeam_points[id][i][0]));
  6149.                                 write_coord(floatround(gBeam_points[id][i][1]));
  6150.                                 write_coord(floatround(jumpoff_origin[id][2]-34.0));
  6151.                             }
  6152.                             write_short(gBeam);
  6153.                             write_byte(1);
  6154.                             write_byte(5);
  6155.                             write_byte(30);
  6156.                             write_byte(20);
  6157.                             write_byte(0);
  6158.                             if(gBeam_duck[id][i])
  6159.                             {
  6160.                                
  6161.                                 write_byte(255);
  6162.                                 write_byte(0);
  6163.                                 write_byte(0);
  6164.                             }
  6165.                             else if(beam_type[id]==2 && gBeam_button[id][i])
  6166.                             {
  6167.                                 if(gBeam_button_what[id][i]==1)
  6168.                                 {
  6169.                                     write_byte(0);
  6170.                                     write_byte(255);
  6171.                                     write_byte(0);
  6172.                                 }
  6173.                                 else if(gBeam_button_what[id][i]==2)
  6174.                                 {
  6175.                                     write_byte(0);
  6176.                                     write_byte(0);
  6177.                                     write_byte(255);
  6178.                                 }
  6179.                             }
  6180.                             else
  6181.                             {
  6182.                                 write_byte(255);
  6183.                                 write_byte(255);
  6184.                                 write_byte(0);
  6185.                             }
  6186.                             write_byte(200);
  6187.                             write_byte(200);
  6188.                             message_end();
  6189.                            
  6190.                         }
  6191.                     }
  6192.                    
  6193.                     JumpReset(id,25);
  6194.            
  6195.                 }
  6196.                
  6197.                 new bool:posible_dropcj;
  6198.                 if(button & IN_DUCK && !(oldbuttons &IN_DUCK) && (jump_type[id]==Type_Drop_BhopLongJump || jump_type[id]==Type_WeirdLongJump))
  6199.                 {
  6200.                     new Float:tmpdropcj_start[3],Float:tmpdropcj_end[3],Float:tmpdropcj_frame[3];
  6201.                     pev(id, pev_origin, origin);
  6202.                    
  6203.                     tmpdropcj_start=origin;
  6204.                     tmpdropcj_start[2]=tmpdropcj_start[2]-36.0;
  6205.                    
  6206.                     tmpdropcj_end=tmpdropcj_start;
  6207.                     tmpdropcj_end[2]=tmpdropcj_end[2]-20;
  6208.                    
  6209.                     engfunc(EngFunc_TraceLine,origin,tmpdropcj_end, IGNORE_GLASS, id, 0);
  6210.                     get_tr2( 0, TR_vecEndPos, tmpdropcj_frame);
  6211.                    
  6212.                     if(tmpdropcj_start[2]-tmpdropcj_frame[2]<=18.0)
  6213.                     {
  6214.                         posible_dropcj=true;
  6215.                         in_duck[id]=false;
  6216.                     }
  6217.                     else posible_dropcj=false;
  6218.                    
  6219.                 }
  6220.                
  6221.                 if(!in_air[id] && button & IN_DUCK && !(oldbuttons &IN_DUCK) && (flags & FL_ONGROUND || posible_dropcj) && !in_duck[id] && UpcjFail[id]==false)
  6222.                 {  
  6223.                     if( get_gametime( ) - duckoff_time[id] < 0.3 )
  6224.                     {
  6225.                         started_multicj_pre[id] = true;
  6226.                         prest[id]= speed[id];
  6227.                         ducks[id]++;
  6228.                         statsduckspeed[id][ducks[id]]=speed[id];
  6229.                         new Float:tmporg_z;
  6230.                         if(is_user_ducking(id))
  6231.                         {
  6232.                             tmporg_z=origin[2]+18.0;
  6233.                         }
  6234.                         else tmporg_z=origin[2];
  6235.                        
  6236.                         if(tmporg_z-first_duck_z[id]>4.0)
  6237.                         {
  6238.                             JumpReset(id,654);
  6239.                             if(dropbhop[id])
  6240.                                 dropbhop[id]=false;
  6241.                             if(in_ladder[id])
  6242.                                 in_ladder[id]=false;
  6243.                                
  6244.                             dropupcj[id]=true;
  6245.                            
  6246.                             return FMRES_IGNORED;
  6247.                         }
  6248.                        
  6249.                         for( new i = INFO_ONE; i < max_players; i++ )
  6250.                         {
  6251.                             if( (i == id || is_spec_user[i]))
  6252.                             {
  6253.                                 if(showpre[id]==true && showduck[id]==true)
  6254.                                 {
  6255.                                     set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  6256.                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_DUCKPRE",speed[i]);
  6257.                                 }
  6258.                             }
  6259.                         }
  6260.                     }
  6261.                     else
  6262.                     {
  6263.                         pev(id, pev_origin, origin);
  6264.                        
  6265.                         ducks[id]=0;
  6266.                         prest1[id]= speed[id]; //ground pre
  6267.                         ducks[id]++;//schetchik duckov
  6268.                         duckstartz[id]=origin[2];
  6269.                         statsduckspeed[id][ducks[id]]=speed[id];//dlya vivoda stati po ducka
  6270.                        
  6271.                         started_cj_pre[id] = true;
  6272.                         nextbhop[id]=false;
  6273.                         bhopaem[id]=false;
  6274.                         if(first_duck_z[id] && (origin[2]-first_duck_z[id])>4)
  6275.                         {
  6276.                             dropupcj[id]=true;
  6277.                            
  6278.                             JumpReset(id,655);
  6279.                             if(dropbhop[id])
  6280.                                 dropbhop[id]=false;
  6281.                             if(in_ladder[id])
  6282.                                 in_ladder[id]=false;
  6283.                                
  6284.                             return FMRES_IGNORED;
  6285.                         }
  6286.                         if(ducks[id]==1)
  6287.                         {
  6288.                             if(is_user_ducking(id))
  6289.                             {
  6290.                                 first_duck_z[id]=origin[2]+18.0;
  6291.                             }
  6292.                             else first_duck_z[id]=origin[2];
  6293.                         }
  6294.                         if(dropupcj[id]==false && get_gametime()-FallTime[id]<0.3 && (in_ladder[id] || jump_type[id]==Type_ladderBhop || jump_type[id]==Type_Drop_BhopLongJump || jump_type[id]==Type_WeirdLongJump || dropbhop[id]))
  6295.                         {
  6296.                             in_ladder[id]=false;
  6297.                             jump_type[id] = Type_Drop_CountJump;
  6298.                             formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_DRCJ");
  6299.                             formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_DRCJ");
  6300.                             multidropcj[id]=0;
  6301.                             dropaem[id]=true;
  6302.                            
  6303.                             if(dropbhop[id])
  6304.                                 dropbhop[id]=false;
  6305.                             if(in_ladder[id])
  6306.                                 in_ladder[id]=false;
  6307.                         }
  6308.                        
  6309.                         for( new i = INFO_ONE; i < max_players; i++ )
  6310.                         {
  6311.                             if( (i == id || is_spec_user[i]))
  6312.                             {
  6313.                                 if(showpre[id]==true && showduck[id]==true)
  6314.                                 {
  6315.                                     set_hudmessage(prest_r,prest_g, prest_b, prest_x, prest_y, 0, 0.0, 0.7, 0.1, 0.1, h_prest);
  6316.                                     show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_DUCKPRE",speed[i]);
  6317.                                 }
  6318.                             }
  6319.                         }
  6320.                     }
  6321.                    
  6322.                     in_duck[id] = true;
  6323.                 }
  6324.                 else if( !in_air[id] && oldbuttons & IN_DUCK && (flags & FL_ONGROUND || posible_dropcj) && UpcjFail[id]==false)
  6325.                 {
  6326.                     if( !is_user_ducking( id ) )
  6327.                     {  
  6328.                         in_duck[id] = false;
  6329.                         if( started_cj_pre[id] )
  6330.                         {
  6331.                             started_cj_pre[id] = false;
  6332.                            
  6333.                             duckoff_time[id] = get_gametime( );
  6334.                             duckoff_origin[id] = origin;
  6335.                             FallTime1[id]=get_gametime();
  6336.                        
  6337.                             strafe_num[id] = 0;
  6338.                             TempSpeed[id] = 0.0;
  6339.                            
  6340.                             if(jump_type[id] != Type_Drop_CountJump)
  6341.                             {
  6342.                                 jump_type[id] = Type_CountJump;
  6343.                                 jump_typeOld[id]=1;        
  6344.                                 if(nextbhop[id] || bhopaem[id])
  6345.                                 {
  6346.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_CJAJ");
  6347.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_CJAJ");
  6348.                                    
  6349.                                     CjafterJump[id]=1;
  6350.            
  6351.                                     ddafterJump[id]=true;
  6352.                                 }
  6353.                                 else
  6354.                                 {
  6355.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_CJ");
  6356.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_CJ");
  6357.                                    
  6358.                                     CjafterJump[id]=0;
  6359.                                     ddafterJump[id]=false;
  6360.                                 }
  6361.                                
  6362.                             }
  6363.                             else
  6364.                             {
  6365.                                 FallTime[id]=get_gametime();
  6366.                                 multidropcj[id]=0;
  6367.                                 jump_typeOld[id]=1;
  6368.                             }
  6369.                         }
  6370.                         else if( started_multicj_pre[id] )
  6371.                         {
  6372.                             started_multicj_pre[id] = false;
  6373.                            
  6374.                             duckoff_time[id] = get_gametime( );
  6375.                             duckoff_origin[id] = origin;
  6376.                             FallTime1[id]=get_gametime();
  6377.                            
  6378.                             strafe_num[id] = 0;
  6379.                             TempSpeed[id] = 0.0;
  6380.                            
  6381.                             if(jump_type[id] != Type_Drop_CountJump)
  6382.                             {
  6383.                                 jump_type[id] = Type_Double_CountJump;
  6384.                                 jump_typeOld[id]=2;
  6385.                                 if(nextbhop[id] || bhopaem[id])
  6386.                                 {
  6387.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_DCJAJ");
  6388.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_DCJAJ");
  6389.                                    
  6390.                                     CjafterJump[id]=2;
  6391.                                     ddafterJump[id]=true;
  6392.                                 }
  6393.                                 else
  6394.                                 {
  6395.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_DCJ");
  6396.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_DCJ");
  6397.                                    
  6398.                                     CjafterJump[id]=0;
  6399.                                     ddafterJump[id]=false;
  6400.                                 }
  6401.                             }
  6402.                             else
  6403.                             {  
  6404.                                 multidropcj[id]=1;
  6405.                                 FallTime[id]=get_gametime();
  6406.                                 jump_typeOld[id]=2;
  6407.                             }
  6408.                         }
  6409.                         if(ducks[id]>2)
  6410.                         {  
  6411.                             if(jump_type[id] != Type_Drop_CountJump)
  6412.                             {
  6413.                                 jump_type[id] = Type_Multi_CountJump; //detect mcj
  6414.                                 jump_typeOld[id]=3;
  6415.                                 if(nextbhop[id] || bhopaem[id])
  6416.                                 {
  6417.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_MCJAJ");
  6418.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_MCJAJ");
  6419.                                    
  6420.                                     CjafterJump[id]=3;
  6421.                                     ddafterJump[id]=true;
  6422.                                 }
  6423.                                 else
  6424.                                 {
  6425.                                     formatex(Jtype[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE_MCJ");
  6426.                                     formatex(Jtype1[id],32,"%L",LANG_SERVER,"UQSTATS_JTYPE1_MCJ");
  6427.                                    
  6428.                                     CjafterJump[id]=0;
  6429.                                     ddafterJump[id]=false;
  6430.                                 }
  6431.                             }
  6432.                             else
  6433.                             {  
  6434.                                 multidropcj[id]=2;
  6435.                                 FallTime[id]=get_gametime();
  6436.                                 jump_typeOld[id]=3;
  6437.                             }  
  6438.                         }
  6439.                     }
  6440.                 }
  6441.                
  6442.                
  6443.                 if(flags&FL_ONGROUND && g_Jumped[id]==false && jofon[id] && movetype[id] != MOVETYPE_FLY)
  6444.                 {
  6445.                     new Float:new_origin[3],Float:tmpOrigin[3], Float:tmpOrigin2[3];
  6446.                        
  6447.                     pev(id,pev_origin,new_origin);
  6448.                     new_origin[2]=new_origin[2]-36.1;
  6449.                    
  6450.                     pev(id, pev_velocity, velocity);
  6451.                    
  6452.                     for(new i=0,j=-18;i<3;i++,j=j+18)
  6453.                     {
  6454.                         tmpOrigin=new_origin;
  6455.                         tmpOrigin2=new_origin;
  6456.                        
  6457.                         if(velocity[1]>0 && floatabs(velocity[1])>floatabs(velocity[0]))
  6458.                         {
  6459.                             tmpOrigin[1]=new_origin[1]+200;
  6460.                             tmpOrigin2[1]=new_origin[1]-16;
  6461.                            
  6462.                             tmpOrigin[0]=tmpOrigin[0]+j;
  6463.                             tmpOrigin2[0]=tmpOrigin2[0]+j;
  6464.                            
  6465.                         }
  6466.                         else if(velocity[1]<0 && floatabs(velocity[1])>floatabs(velocity[0]))
  6467.                         {
  6468.                             tmpOrigin[1]=new_origin[1]-200;
  6469.                             tmpOrigin2[1]=new_origin[1]+16;
  6470.                            
  6471.                             tmpOrigin[0]=tmpOrigin[0]+j;
  6472.                             tmpOrigin2[0]=tmpOrigin2[0]+j;
  6473.                         }
  6474.                         else if(velocity[0]>0 && floatabs(velocity[0])>floatabs(velocity[1]))
  6475.                         {
  6476.                             tmpOrigin[0]=new_origin[0]+200;
  6477.                             tmpOrigin2[0]=new_origin[0]-16;
  6478.                            
  6479.                             tmpOrigin[1]=tmpOrigin[1]+j;
  6480.                             tmpOrigin2[1]=tmpOrigin2[1]+j;
  6481.                         }
  6482.                         else if(velocity[0]<0 && floatabs(velocity[0])>floatabs(velocity[1]))
  6483.                         {
  6484.                             tmpOrigin[0]=new_origin[0]-200;
  6485.                             tmpOrigin2[0]=new_origin[0]+16;
  6486.                            
  6487.                             tmpOrigin[1]=tmpOrigin[1]+j;
  6488.                             tmpOrigin2[1]=tmpOrigin2[1]+j;
  6489.                         }
  6490.                        
  6491.                         new Float:tmpEdgeOrigin[3];
  6492.                        
  6493.                         engfunc(EngFunc_TraceLine,tmpOrigin,tmpOrigin2, IGNORE_GLASS, id, 0);
  6494.                         get_tr2( 0, TR_vecEndPos, tmpEdgeOrigin);
  6495.                    
  6496.                         if(get_distance_f(tmpEdgeOrigin,tmpOrigin2)!=0.0)
  6497.                         {
  6498.                             jof[id]=get_distance_f(tmpEdgeOrigin,tmpOrigin2)-0.031250;
  6499.                         }
  6500.                     }
  6501.                 }
  6502.                 else if(!(flags&FL_ONGROUND) && g_Jumped[id] && edgedone[id]==false && movetype[id] != MOVETYPE_FLY)
  6503.                 {
  6504.                     new onbhopblock,bhop_block[1];
  6505.                    
  6506.                     find_sphere_class(id,"func_door", 48.0, bhop_block, 1, Float:{0.0, 0.0, 0.0} );
  6507.                    
  6508.                     if(bhop_block[0])
  6509.                     {
  6510.                         onbhopblock=true;
  6511.                     }
  6512.                     else
  6513.                     {
  6514.                         onbhopblock=false;
  6515.                     }
  6516.                    
  6517.                    
  6518.                     new Float:tmpblock[3],tmpjblock[3],Float:new_origin[3],Float:tmpOrigin[3], Float:tmpOrigin2[3];
  6519.                        
  6520.                     new_origin=jumpoff_origin[id];
  6521.                     if(onbhopblock)
  6522.                     {
  6523.                         new_origin[2]=new_origin[2]-40.0;
  6524.                     }
  6525.                     else new_origin[2]=new_origin[2]-36.1;
  6526.                    
  6527.                     pev(id, pev_velocity, velocity);
  6528.                    
  6529.                     new block_checking[3];
  6530.                    
  6531.                     for(new i=0,j=-18;i<3;i++,j=j+18)
  6532.                     {
  6533.                         tmpOrigin=new_origin;
  6534.                         tmpOrigin2=new_origin;
  6535.                         tmpblock=new_origin;
  6536.                         if(velocity[1]>0 && floatabs(velocity[1])>floatabs(velocity[0]))
  6537.                         {
  6538.                             tmpOrigin[1]=new_origin[1]+100;
  6539.                             tmpOrigin2[1]=new_origin[1]-16;
  6540.                            
  6541.                             tmpOrigin[0]=tmpOrigin[0]+j;
  6542.                             tmpOrigin2[0]=tmpOrigin2[0]+j;
  6543.                            
  6544.                             tmpblock[1]=new_origin[1]+uq_maxedge+1;
  6545.                             tmpblock[0]=tmpblock[0]+j;
  6546.                         }
  6547.                         else if(velocity[1]<0 && floatabs(velocity[1])>floatabs(velocity[0]))
  6548.                         {
  6549.                             tmpOrigin[1]=new_origin[1]-100;
  6550.                             tmpOrigin2[1]=new_origin[1]+16;
  6551.                            
  6552.                             tmpOrigin[0]=tmpOrigin[0]+j;
  6553.                             tmpOrigin2[0]=tmpOrigin2[0]+j;
  6554.                            
  6555.                             tmpblock[1]=new_origin[1]-uq_maxedge+1;
  6556.                             tmpblock[0]=tmpblock[0]+j;
  6557.                         }
  6558.                         else if(velocity[0]>0 && floatabs(velocity[0])>floatabs(velocity[1]))
  6559.                         {
  6560.                             tmpOrigin[0]=new_origin[0]+100;
  6561.                             tmpOrigin2[0]=new_origin[0]-16;
  6562.                            
  6563.                             tmpOrigin[1]=tmpOrigin[1]+j;
  6564.                             tmpOrigin2[1]=tmpOrigin2[1]+j;
  6565.                            
  6566.                             tmpblock[0]=new_origin[0]+uq_maxedge+1;
  6567.                             tmpblock[1]=tmpblock[1]+j;
  6568.                         }
  6569.                         else if(velocity[0]<0 && floatabs(velocity[0])>floatabs(velocity[1]))
  6570.                         {
  6571.                             tmpOrigin[0]=new_origin[0]-100;
  6572.                             tmpOrigin2[0]=new_origin[0]+16;
  6573.                            
  6574.                             tmpOrigin[1]=tmpOrigin[1]+j;
  6575.                             tmpOrigin2[1]=tmpOrigin2[1]+j;
  6576.                            
  6577.                             tmpblock[0]=new_origin[0]-uq_maxedge+1;
  6578.                             tmpblock[1]=tmpblock[1]+j;
  6579.                         }
  6580.                        
  6581.                         new Float:tmpEdgeOrigin[3];
  6582.                        
  6583.                         engfunc(EngFunc_TraceLine,tmpOrigin,tmpOrigin2, IGNORE_GLASS, id, 0);
  6584.                         get_tr2( 0, TR_vecEndPos, tmpEdgeOrigin);
  6585.                                
  6586.                         if(get_distance_f(tmpEdgeOrigin,tmpOrigin2)!=0.0)
  6587.                         {
  6588.                             edgedist[id]=get_distance_f(tmpEdgeOrigin,tmpOrigin2)-0.031250;
  6589.                         }
  6590.                        
  6591.                         new Float:tmpblockOrigin[3];
  6592.                        
  6593.                         engfunc(EngFunc_TraceLine,tmpEdgeOrigin,tmpblock, IGNORE_GLASS, id, 0);
  6594.                         get_tr2( 0, TR_vecEndPos, tmpblockOrigin);
  6595.                        
  6596.                         if(get_distance_f(tmpblockOrigin,tmpEdgeOrigin)!=0.0)
  6597.                         {
  6598.                             tmpjblock[i]=floatround(get_distance_f(tmpblockOrigin,tmpEdgeOrigin),floatround_floor)+1;
  6599.                         }
  6600.                        
  6601.                         new Float:checkblock1[3],Float:checkblock2[3];
  6602.                         tmpblockOrigin[2]=tmpblockOrigin[2]-1.0;
  6603.                        
  6604.                         checkblock1=tmpblockOrigin;
  6605.                        
  6606.                         if(velocity[1]>0 && floatabs(velocity[1])>floatabs(velocity[0]))
  6607.                         {
  6608.                             checkblock1[1]=checkblock1[1]+2.0;
  6609.                         }
  6610.                         else if(velocity[1]<0 && floatabs(velocity[1])>floatabs(velocity[0]))
  6611.                         {
  6612.                             checkblock1[1]=checkblock1[1]-2.0;
  6613.                         }
  6614.                         else if(velocity[0]>0 && floatabs(velocity[0])>floatabs(velocity[1]))
  6615.                         {
  6616.                             checkblock1[0]=checkblock1[0]+2.0;
  6617.                         }
  6618.                         else if(velocity[0]<0 && floatabs(velocity[0])>floatabs(velocity[1]))
  6619.                         {
  6620.                             checkblock1[0]=checkblock1[0]-2.0;
  6621.                         }
  6622.                        
  6623.                         checkblock2=checkblock1;
  6624.                         checkblock2[2]=checkblock2[2]+18.0;
  6625.                        
  6626.                         new Float:tmpcheckblock[3];
  6627.                         engfunc(EngFunc_TraceLine,checkblock2,checkblock1, IGNORE_GLASS, id, 0);
  6628.                         get_tr2( 0, TR_vecEndPos, tmpcheckblock);
  6629.                        
  6630.                         if(floatabs(tmpblockOrigin[2]-tmpcheckblock[2])==0.0)
  6631.                         {
  6632.                             block_checking[i]=1;
  6633.                         }
  6634.                        
  6635.                         edgedone[id]=true;
  6636.                     }
  6637.                    
  6638.                     if(tmpjblock[0]!=0 && tmpjblock[0]<=tmpjblock[1] && tmpjblock[0]<=tmpjblock[2])
  6639.                     {
  6640.                         if(!block_checking[0])
  6641.                             jumpblock[id]=tmpjblock[0];
  6642.                     }
  6643.                     else if(tmpjblock[1]!=0 && tmpjblock[1]<=tmpjblock[2] && tmpjblock[0]<=tmpjblock[0])
  6644.                     {
  6645.                         if(!block_checking[1])
  6646.                             jumpblock[id]=tmpjblock[1];
  6647.                     }
  6648.                     else if(tmpjblock[2]!=0 && tmpjblock[2]<=tmpjblock[1] && tmpjblock[0]<=tmpjblock[0])
  6649.                     {
  6650.                         if(!block_checking[2])
  6651.                             jumpblock[id]=tmpjblock[2];
  6652.                     }
  6653.                     else jumpblock[id]=0;
  6654.                    
  6655.                     if(equali(mapname,"prochallenge_longjump"))
  6656.                     {
  6657.                         jumpblock[id]=jumpblock[id]-1;
  6658.                     }
  6659.                    
  6660.                     new h_jof;
  6661.                    
  6662.                     if(jofon[id])
  6663.                     {
  6664.                         h_jof=h_speed;
  6665.                     }
  6666.                     else h_jof=4;
  6667.                    
  6668.                     for( new i = INFO_ONE; i < max_players; i++ )
  6669.                     {
  6670.                         if( (i == id || is_spec_user[i]))
  6671.                         {  
  6672.                             if(edgedist[i]!=0.0 && (showjofon[i] || jofon[id]))
  6673.                             {
  6674.                                 if(edgedist[i]>5.0)
  6675.                                 {
  6676.                                     set_hudmessage(255, 255, 255, -1.0, 0.6, 0, 0.0, 0.7, 0.0, 0.0, h_jof);
  6677.                                 }
  6678.                                 else
  6679.                                 {
  6680.                                     set_hudmessage(255, 0, 0, -1.0, 0.6, 0, 0.0, 0.7, 0.0, 0.0, h_jof);
  6681.                                 }
  6682.                                 show_hudmessage(i, "%L",LANG_SERVER,"UQSTATS_JOF", edgedist[id]);
  6683.                             }
  6684.                         }
  6685.                     }
  6686.                 }
  6687.                
  6688.                 new Float:checkfall;
  6689.                 if(jump_type[id]==Type_Drop_CountJump)
  6690.                 {
  6691.                     checkfall=0.5;
  6692.                 }
  6693.                 else checkfall=0.4;
  6694.                
  6695.                 if(flags&FL_ONGROUND && firstfall_ground[id]==true && get_gametime()-FallTime1[id]>checkfall)
  6696.                 {
  6697.                     touch_ent[id]=false;       
  6698.                     JumpReset(id,26);
  6699.                     dropbhop[id]=false;
  6700.                     ddnum[id]=0;
  6701.                     x_jump[id]=false;
  6702.                     firstfall_ground[id]=false;
  6703.                     in_ladder[id]=false;
  6704.                     nextbhop[id]=false;
  6705.                     bhopaem[id]=false;
  6706.                     UpcjFail[id]=false;
  6707.                     slide_protec[id]=false;
  6708.                     backwards[id]=false;
  6709.                     ladderbug[id]=false;
  6710.                     find_ladder[id]=false;
  6711.                     touch_somthing[id]=false;
  6712.                     duckbhop[id]=false;
  6713.                     dropupcj[id]=false;
  6714.                     ddstandcj[id]=false;
  6715.                     ddforcjafterbhop[id]=false;
  6716.                     ddforcjafterladder[id]=false;
  6717.                     //if(donehook[id]) ColorChat(id, RED, "reset ground %d %f",jump_type[id],get_gametime()-FallTime1[id]);
  6718.                     return FMRES_IGNORED;
  6719.                 }
  6720.                
  6721.                 if(flags&FL_ONGROUND && firstfall_ground[id]==false)
  6722.                 {
  6723.                     FallTime1[id]=get_gametime();
  6724.                     firstfall_ground[id]=true;
  6725.                 }
  6726.                 else if(!(flags&FL_ONGROUND) && firstfall_ground[id]==true)
  6727.                 {
  6728.                     firstfall_ground[id]=false;
  6729.                 }
  6730.                
  6731.                 if(flags&FL_ONGROUND && donehook[id] && hookcheck[id]==false)
  6732.                 {
  6733.                     timeonground[id]=get_gametime();
  6734.                     hookcheck[id]=true;
  6735.                 }
  6736.                 else if(!(flags&FL_ONGROUND) && donehook[id] && hookcheck[id])
  6737.                 {
  6738.                     timeonground[id]=get_gametime()-timeonground[id];
  6739.                     hookcheck[id]=false;
  6740.                    
  6741.                     if(timeonground[id]>0.4)
  6742.                     donehook[id]=false;
  6743.                 }
  6744.             }
  6745.         }
  6746.     }
  6747.     return FMRES_IGNORED;
  6748. }
  6749. public kick_function(id,j_type_str[])
  6750. {
  6751.     new szReason[64];
  6752.     formatex(szReason,63,"%L",LANG_SERVER,"UQSTATS_KICKREASON",j_type_str);
  6753.    
  6754.     emessage_begin( MSG_ONE, SVC_DISCONNECT, _, id );
  6755.     ewrite_string( szReason );
  6756.     emessage_end( );
  6757. }
  6758. public ban_function(id,j_type_str[])
  6759. {
  6760.     new szReason[64];
  6761.     formatex(szReason,63,"%s_script",j_type_str);
  6762.    
  6763.     new ban_authid[64];
  6764.    
  6765.     switch(uq_ban_authid)
  6766.     {
  6767.         case 0:
  6768.             get_user_name(id,ban_authid,63);
  6769.         case 1:
  6770.             get_user_ip(id,ban_authid,63,1);
  6771.         case 2:
  6772.             get_user_authid(id,ban_authid,63);
  6773.     }  
  6774.    
  6775.     switch(uq_ban_type)
  6776.     {
  6777.         case 0:
  6778.         {
  6779.             switch(uq_ban_authid)
  6780.             {
  6781.                 case 0:
  6782.                     server_cmd("amx_ban %s %d %s",ban_authid,uq_ban_minutes,szReason);
  6783.                 case 1:
  6784.                     server_cmd("amx_addban %s %d %s",ban_authid,uq_ban_minutes,szReason);
  6785.                 case 2:
  6786.                     server_cmd("amx_addban ^"%s^" %d %s",ban_authid,uq_ban_minutes,szReason);
  6787.             }
  6788.         }
  6789.         case 1:
  6790.         {
  6791.             if(uq_ban_authid==2)
  6792.                 server_cmd("amx_ban %d ^"%s^" %s",uq_ban_minutes,ban_authid,szReason);
  6793.             else if(uq_ban_authid==1 && uq_ban_authid==0)
  6794.                 server_cmd("amx_ban %d %s %s",uq_ban_minutes,ban_authid,szReason);
  6795.         }
  6796.     }
  6797. }
  6798. public ScreenShoot(id)
  6799. {
  6800.     id=id-15237;
  6801.     client_cmd(id,"snapshot");
  6802. }
  6803.  
  6804. public HamTouch( id, entity )
  6805. {
  6806.     if ( g_alive[id] )
  6807.     {
  6808.         static Float:Vvelocity[3];
  6809.         pev(id, pev_velocity, Vvelocity);
  6810.         if(!equali(mapname,"slide_gs_longjumps") && !equali(mapname,"b2j_slide_longjumps"))
  6811.         {
  6812.             if(g_Jumped[id] && !(pev(id, pev_flags)&FL_ONGROUND) && floatround(Vvelocity[2], floatround_floor) < 0)
  6813.             {
  6814.                 touch_somthing[id]=true;
  6815.             }
  6816.         }
  6817.     }
  6818. }
  6819. public fwdTouch(ent, id)
  6820. {
  6821.     static ClassName[32];
  6822.     if( pev_valid(ent) )
  6823.     {
  6824.         pev(ent, pev_classname, ClassName, 31);
  6825.     }
  6826.    
  6827.     static ClassName2[32];
  6828.     if( valid_id(id) )
  6829.     {
  6830.         pev(id, pev_classname, ClassName2, 31);
  6831.     }
  6832.     if( equali(ClassName2, "player") )
  6833.     {
  6834.         if( equali(ClassName, "func_train")
  6835.             || equali(ClassName, "func_conveyor")
  6836.             || equali(ClassName, "trigger_push") || equali(ClassName, "trigger_gravity"))
  6837.         {
  6838.             if(valid_id(id))
  6839.             {
  6840.                 touch_ent[id]=true;
  6841.                 trigger_protection[id]=true;
  6842.                 JumpReset(id,41);
  6843.                 set_task(0.4,"JumpReset1", id);
  6844.             }
  6845.         }
  6846.     }
  6847. }
  6848.  
  6849. ////////////////////////////////////////Save Tops///////////////////////////////////
  6850. public save_tops(type[],type_num,tmp_names[NTOP+1][33],tmp_ip[NTOP+1][33],tmp_distance[NTOP+1],tmp_maxspeed[NTOP+1],tmp_prestrafe[NTOP+1],tmp_strafes[NTOP+1],tmp_sync[NTOP+1],tmp_ddbh[NTOP+1])
  6851. {
  6852.     new profile[128];
  6853.     formatex(profile, 127, "%s/Top10_%s.dat", ljsDir,type);
  6854.    
  6855.     if( file_exists(profile) )
  6856.     {
  6857.         delete_file(profile);
  6858.     }
  6859.     new Data[256];
  6860.     new f = fopen(profile, "at");
  6861.     for(new i = 0; i < NTOP; i++)
  6862.     {
  6863.         new Trie:JumpStat;
  6864.         JumpStat = TrieCreate();
  6865.        
  6866.         TrieSetString(JumpStat, "name", tmp_names[i]);
  6867.         TrieSetString(JumpStat, "authid", tmp_ip[i]);
  6868.         TrieSetCell(JumpStat, "distance", tmp_distance[i]);
  6869.         TrieSetCell(JumpStat, "maxspeed", tmp_maxspeed[i]);
  6870.         TrieSetCell(JumpStat, "prestrafe", tmp_prestrafe[i]);
  6871.         TrieSetCell(JumpStat, "strafes", tmp_strafes[i]);
  6872.         TrieSetCell(JumpStat, "sync", tmp_sync[i]);
  6873.        
  6874.         if(type_num==21 || type_num==22 || type_num==23 || type_num==24 || type_num==25)
  6875.         {
  6876.             TrieSetCell(JumpStat, "ddbh", tmp_ddbh[i]);
  6877.             formatex(Data, 255, "^"%s^" ^"%s^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^"^n",tmp_names[i],tmp_ip[i], tmp_distance[i],tmp_maxspeed[i],tmp_prestrafe[i],tmp_strafes[i],tmp_sync[i],tmp_ddbh[i]);  
  6878.         }
  6879.         else formatex(Data, 255, "^"%s^" ^"%s^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^"^n",tmp_names[i],tmp_ip[i], tmp_distance[i],tmp_maxspeed[i],tmp_prestrafe[i],tmp_strafes[i],tmp_sync[i]);
  6880.         fputs(f, Data);
  6881.        
  6882.         new tmp_type[33];
  6883.         format(tmp_type, 32, "%s_%d_250", type, i);
  6884.  
  6885.         TrieSetCell(JData, tmp_type, JumpStat);
  6886.     }
  6887.     fclose(f);
  6888. }
  6889. public save_tops_block(type[],type_num,tmp_names[NTOP+1][33],tmp_ip[NTOP+1][33],tmp_distance[NTOP+1],tmp_block[NTOP+1],Float:tmp_jumpoff[NTOP+1])
  6890. {
  6891.     new profile[128];
  6892.     formatex(profile, 127, "%s/block20_%s.dat", ljsDir_block,type);
  6893.    
  6894.     if( file_exists(profile) )
  6895.     {
  6896.         delete_file(profile);
  6897.     }
  6898.     new Data[256];
  6899.     new f = fopen(profile, "at");
  6900.     for(new i = 0; i < NTOP; i++)
  6901.     {
  6902.         new Trie:JumpStat;
  6903.         JumpStat = TrieCreate();
  6904.        
  6905.         TrieSetString(JumpStat, "name", tmp_names[i]);
  6906.         TrieSetString(JumpStat, "authid", tmp_ip[i]);
  6907.         TrieSetCell(JumpStat, "distance", tmp_distance[i]);
  6908.         TrieSetCell(JumpStat, "block", tmp_block[i]);
  6909.         TrieSetCell(JumpStat, "jumpoff", tmp_jumpoff[i]);
  6910.        
  6911.         new tmp_type[33];
  6912.         format(tmp_type, 32, "block_%s_%d_250", type, i);
  6913.  
  6914.         TrieSetCell(JData_Block, tmp_type, JumpStat);
  6915.        
  6916.         formatex(Data, 255, "^"%s^" ^"%s^" ^"%d^" ^"%d^" ^"%f^"^n",tmp_names[i],tmp_ip[i],tmp_block[i],tmp_distance[i],tmp_jumpoff[i]);
  6917.         fputs(f, Data);
  6918.     }
  6919.     fclose(f);
  6920. }
  6921. public save_tops_block_weapon(type[],type_num,wpn_rank,tmp_names[NTOP+1][33],tmp_ip[NTOP+1][33],tmp_distance[NTOP+1],tmp_block[NTOP+1],Float:tmp_jumpoff[NTOP+1],tmp_weap_name[NTOP+1][33])
  6922. {
  6923.     new profile[128];
  6924.     formatex(profile, 127, "%s/block20_%s.dat", ljsDir_block_weapon[wpn_rank],type);
  6925.    
  6926.     if( file_exists(profile) )
  6927.     {
  6928.         delete_file(profile);
  6929.     }
  6930.     new Data[256];
  6931.     new f = fopen(profile, "at");
  6932.     for(new i = 0; i < NTOP; i++)
  6933.     {
  6934.         new Trie:JumpStat;
  6935.         JumpStat = TrieCreate();
  6936.        
  6937.         TrieSetString(JumpStat, "name", tmp_names[i]);
  6938.         TrieSetString(JumpStat, "authid", tmp_ip[i]);
  6939.         TrieSetCell(JumpStat, "distance", tmp_distance[i]);
  6940.         TrieSetCell(JumpStat, "block", tmp_block[i]);
  6941.         TrieSetCell(JumpStat, "jumpoff", tmp_jumpoff[i]);
  6942.         TrieSetCell(JumpStat, "pspeed", weapon_maxspeed(wpn_rank));
  6943.         TrieSetString(JumpStat, "wpn_name", tmp_weap_name[i]);
  6944.        
  6945.         new tmp_type[33];
  6946.         format(tmp_type, 32, "block_%s_%d_%d", type, i,weapon_maxspeed(wpn_rank));
  6947.  
  6948.         TrieSetCell(JData_Block, tmp_type, JumpStat);
  6949.        
  6950.         formatex(Data, 255, "^"%s^" ^"%s^" ^"%d^" ^"%d^" ^"%f^" ^"%s^"^n",tmp_names[i],tmp_ip[i],tmp_block[i],tmp_distance[i],tmp_jumpoff[i],tmp_weap_name[i]);
  6951.         fputs(f, Data);
  6952.     }
  6953.     fclose(f);
  6954. }
  6955. public save_tops_weapon(type[],type_num,wpn_rank,tmp_names[NTOP+1][33],tmp_ip[NTOP+1][33],tmp_distance[NTOP+1],tmp_maxspeed[NTOP+1],tmp_prestrafe[NTOP+1],tmp_strafes[NTOP+1],tmp_sync[NTOP+1],tmp_weap_name[NTOP+1][33])
  6956. {
  6957.     new profile[128];
  6958.  
  6959.     formatex(profile, 127, "%s/Top10_%s.dat",ljsDir_weapon[wpn_rank],type);
  6960.  
  6961.     if( file_exists(profile) )
  6962.     {
  6963.         delete_file(profile);
  6964.     }
  6965.     new Data[256];
  6966.     new f = fopen(profile, "at");
  6967.     for(new i = 0; i < NTOP; i++)
  6968.     {
  6969.         new Trie:JumpStat;
  6970.         JumpStat = TrieCreate();
  6971.        
  6972.         TrieSetString(JumpStat, "name", tmp_names[i]);
  6973.         TrieSetString(JumpStat, "authid", tmp_ip[i]);
  6974.         TrieSetCell(JumpStat, "distance", tmp_distance[i]);
  6975.         TrieSetCell(JumpStat, "maxspeed", tmp_maxspeed[i]);
  6976.         TrieSetCell(JumpStat, "prestrafe", tmp_prestrafe[i]);
  6977.         TrieSetCell(JumpStat, "strafes", tmp_strafes[i]);
  6978.         TrieSetCell(JumpStat, "sync", tmp_sync[i]);
  6979.         TrieSetCell(JumpStat, "pspeed", weapon_maxspeed(wpn_rank));
  6980.         TrieSetString(JumpStat, "wpn_name", tmp_weap_name[i]);
  6981.        
  6982.         new tmp_type[33];
  6983.         format(tmp_type, 32, "%s_%d_%d", type, i,weapon_maxspeed(wpn_rank));
  6984.  
  6985.         TrieSetCell(JData, tmp_type, JumpStat);
  6986.        
  6987.         formatex(Data, 255, "^"%s^" ^"%s^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%s^"^n",tmp_names[i],tmp_ip[i], tmp_distance[i],tmp_maxspeed[i],tmp_prestrafe[i],tmp_strafes[i],tmp_sync[i],tmp_weap_name[i]);
  6988.         fputs(f, Data);
  6989.     }
  6990.     fclose(f);
  6991. }
  6992. public save_maptop()
  6993. {
  6994.     new profile[128];
  6995.     formatex(profile, 127, "%s/Top10_maptop.dat", ljsDir);
  6996.    
  6997.     if( file_exists(profile) )
  6998.     {
  6999.         delete_file(profile);
  7000.     }
  7001.     new Data[256];
  7002.     new f = fopen(profile, "at");
  7003.     for(new i = 0; i < NTOP; i++)
  7004.     {
  7005.         formatex(Data, 255, "^"%s^" ^"%s^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%s^"^n",map_names[i],map_ip[i], map_dist[i],map_maxsped[i],map_prestr[i],map_streif[i],map_syncc[i],map_type[i]);
  7006.         fputs(f, Data);
  7007.     }
  7008.     fclose(f);
  7009. }
  7010. ////////////////////////////////////////Read Tops///////////////////////////////////
  7011. public read_tops(type[],type_num)
  7012. {
  7013.     new profile[128],prodata[256];
  7014.     formatex(profile, 127, "%s/Top10_%s.dat", ljsDir,type);
  7015.    
  7016.     new tmp_names[33],tmp_ip[33];
  7017.  
  7018.     new f = fopen(profile, "rt" );
  7019.     new i = 0;
  7020.     while( !feof(f) && i < (NTOP))
  7021.     {
  7022.         new Trie:JumpStat;
  7023.         JumpStat = TrieCreate();
  7024.        
  7025.         fgets(f, prodata, 255);
  7026.         new d[25], m[25], p[25], sf[25],s[25];
  7027.         new duk[25];
  7028.        
  7029.         if(type_num==21 || type_num==22 || type_num==23 || type_num==24 || type_num==25)
  7030.         {
  7031.             parse(prodata, tmp_names, 32, tmp_ip, 32,  d, 25, m, 25, p, 25, sf, 25,s, 25, duk, 25);
  7032.         }
  7033.         else
  7034.         {
  7035.             parse(prodata, tmp_names, 32, tmp_ip, 32,  d, 25, m, 25, p, 25, sf, 25,s, 25)
  7036.         }
  7037.                
  7038.         TrieSetString(JumpStat, "name", tmp_names);
  7039.         TrieSetString(JumpStat, "authid", tmp_ip);
  7040.         TrieSetCell(JumpStat, "distance", str_to_num(d));
  7041.         TrieSetCell(JumpStat, "maxspeed", str_to_num(m));
  7042.         TrieSetCell(JumpStat, "prestrafe", str_to_num(p));
  7043.         TrieSetCell(JumpStat, "strafes", str_to_num(sf));
  7044.         TrieSetCell(JumpStat, "sync", str_to_num(s));
  7045.        
  7046.         if(type_num==21 || type_num==22 || type_num==23 || type_num==24 || type_num==25)
  7047.         {
  7048.             TrieSetCell(JumpStat, "ddbh", str_to_num(duk));
  7049.         }
  7050.        
  7051.         new tmp_type[33];
  7052.         format(tmp_type, 32, "%s_%d_250", type, i);
  7053.  
  7054.         TrieSetCell(JData, tmp_type, JumpStat);
  7055.        
  7056.         i++;
  7057.     }
  7058.     fclose(f);
  7059. }
  7060. public read_tops_block(type[],type_num)
  7061. {
  7062.     new profile[128],prodata[256];
  7063.    
  7064.     if(type_num==6)
  7065.     {
  7066.         formatex(profile, 127, "%s/block20_hj.dat", ljsDir_block)
  7067.     }
  7068.     else formatex(profile, 127, "%s/block20_%s.dat", ljsDir_block,type);
  7069.    
  7070.     new tmp_names[33],tmp_ip[33];
  7071.    
  7072.     new f = fopen(profile, "rt" );
  7073.     new i = 0;
  7074.    
  7075.     while( !feof(f) && i < (NTOP))
  7076.     {
  7077.         new Trie:JumpStat;
  7078.         JumpStat = TrieCreate();
  7079.        
  7080.         fgets(f, prodata, 255);
  7081.         new d[25], b[25], j[25];
  7082.        
  7083.         parse(prodata, tmp_names, 32, tmp_ip, 32,  b, 25, d, 25, j, 25);
  7084.        
  7085.         TrieSetString(JumpStat, "name", tmp_names);
  7086.         TrieSetString(JumpStat, "authid", tmp_ip);
  7087.         TrieSetCell(JumpStat, "block", str_to_num(b));
  7088.         TrieSetCell(JumpStat, "distance", str_to_num(d));
  7089.         TrieSetCell(JumpStat, "jumpoff", str_to_float(j));
  7090.        
  7091.        
  7092.         new tmp_type[33];
  7093.         if(type_num==6)
  7094.         {
  7095.             format(tmp_type, 32, "block_hj_%d_250", i);
  7096.         }
  7097.         else format(tmp_type, 32, "block_%s_%d_250", type, i);
  7098.  
  7099.         TrieSetCell(JData_Block, tmp_type, JumpStat);
  7100.         i++;
  7101.     }
  7102.     fclose(f);
  7103. }
  7104. public read_tops_block_weapon(type[],type_num,wpn_rank)
  7105. {
  7106.     new profile[128],prodata[256];
  7107.    
  7108.     if(type_num==9)
  7109.     {
  7110.         formatex(profile, 127, "%s/block20_hj.dat", ljsDir_block_weapon[wpn_rank]);
  7111.     }
  7112.     else formatex(profile, 127, "%s/block20_%s.dat", ljsDir_block_weapon[wpn_rank],type);
  7113.    
  7114.     new tmp_names[33],tmp_ip[33],tmp_weap_name[33];
  7115.    
  7116.     new f = fopen(profile, "rt" );
  7117.     new i = 0;
  7118.    
  7119.     while( !feof(f) && i < (NTOP))
  7120.     {
  7121.         new Trie:JumpStat;
  7122.         JumpStat = TrieCreate();
  7123.        
  7124.         fgets(f, prodata, 255);
  7125.         new d[25], b[25], j[25];
  7126.        
  7127.         parse(prodata, tmp_names, 32, tmp_ip, 32,  b, 25, d, 25, j, 25,tmp_weap_name,32);
  7128.        
  7129.         TrieSetString(JumpStat, "name", tmp_names);
  7130.         TrieSetString(JumpStat, "authid", tmp_ip);
  7131.         TrieSetCell(JumpStat, "block", str_to_num(b));
  7132.         TrieSetCell(JumpStat, "distance", str_to_num(d));
  7133.         TrieSetCell(JumpStat, "jumpoff", str_to_float(j));
  7134.         TrieSetCell(JumpStat, "pspeed", weapon_maxspeed(wpn_rank));
  7135.         TrieSetString(JumpStat, "wpn_name", tmp_weap_name);
  7136.        
  7137.         new tmp_type[33];
  7138.         format(tmp_type, 32, "block_%s_%d_%d", type, i,weapon_maxspeed(wpn_rank));
  7139.  
  7140.         TrieSetCell(JData_Block, tmp_type, JumpStat);
  7141.         i++;
  7142.     }
  7143.     fclose(f);
  7144. }
  7145. public read_tops_weapon(type[],type_num,wpn_rank)
  7146. {  
  7147.     new profile[128],prodata[256];
  7148.  
  7149.     formatex(profile, 127, "%s/Top10_%s.dat",ljsDir_weapon[wpn_rank],type);
  7150.    
  7151.     new f = fopen(profile, "rt" );
  7152.     new i = 0;
  7153.     new tmp_names[33],tmp_ip[33],tmp_weap_name[33];
  7154.    
  7155.     while( !feof(f) && i < (NTOP))
  7156.     {
  7157.         new Trie:JumpStat;
  7158.         JumpStat = TrieCreate();
  7159.        
  7160.         fgets(f, prodata, 255);
  7161.         new d[25], m[25], p[25], sf[25],s[25];
  7162.        
  7163.         parse(prodata, tmp_names, 32, tmp_ip, 32,  d, 25, m, 25, p, 25, sf, 25,s, 25,tmp_weap_name,32);
  7164.        
  7165.         TrieSetString(JumpStat, "name", tmp_names);
  7166.         TrieSetString(JumpStat, "authid", tmp_ip);
  7167.         TrieSetString(JumpStat, "wpn_name", tmp_weap_name);
  7168.         TrieSetCell(JumpStat, "distance", str_to_num(d));
  7169.         TrieSetCell(JumpStat, "maxspeed", str_to_num(m));
  7170.         TrieSetCell(JumpStat, "prestrafe", str_to_num(p));
  7171.         TrieSetCell(JumpStat, "strafes", str_to_num(sf));
  7172.         TrieSetCell(JumpStat, "sync", str_to_num(s));
  7173.         TrieSetCell(JumpStat, "pspeed", weapon_maxspeed(wpn_rank));
  7174.        
  7175.        
  7176.         new tmp_type[33];
  7177.         format(tmp_type, 32, "%s_%d_%d", type, i,weapon_maxspeed(wpn_rank));
  7178.        
  7179.         TrieSetCell(JData, tmp_type, JumpStat);
  7180.         i++;
  7181.     }
  7182.     fclose(f);
  7183. }
  7184. ////////////////////////////////////////Sort Tops///////////////////////////////////
  7185. public checktops1(id,type[],type_num,Float:dd,Float:mm,Float:pp,sf,s)
  7186. {  
  7187.     new d,m,p,rb[64];
  7188.    
  7189.     d=floatround(dd*1000000);// todo: zdelat poproshe)
  7190.     m=floatround(mm*1000000);
  7191.     p=floatround(pp*1000000);
  7192.    
  7193.     switch(rankby) {
  7194.         case 0: {
  7195.             formatex(rb, 63, "%s", g_playername[id]);
  7196.         }
  7197.         case 1: {
  7198.             formatex(rb, 63, "%s", g_playerip[id]);
  7199.         }
  7200.         case 2: {
  7201.             formatex(rb, 63, "%s", g_playersteam[id]);
  7202.         }
  7203.     }
  7204.    
  7205.     new tmp_names[NTOP+1][33],tmp_ip[NTOP+1][33],tmp_distance[NTOP+1],tmp_maxspeed[NTOP+1],tmp_prestrafe[NTOP+1],tmp_strafes[NTOP+1],tmp_sync[NTOP+1];
  7206.        
  7207.     for (new i = 0; i < NTOP; i++)
  7208.     {
  7209.         new Trie:JS;
  7210.         new tmp_type[33];
  7211.    
  7212.         format(tmp_type, 32, "%s_%d_250", type, i);
  7213.        
  7214.         if(TrieKeyExists(JData, tmp_type))
  7215.         {  
  7216.             TrieGetCell(JData, tmp_type, JS);
  7217.            
  7218.             TrieGetString(JS,"name",tmp_names[i],32);
  7219.             TrieGetString(JS,"authid",tmp_ip[i],32);
  7220.             TrieGetCell(JS, "distance", tmp_distance[i]);
  7221.             TrieGetCell(JS, "maxspeed", tmp_maxspeed[i]);
  7222.             TrieGetCell(JS, "prestrafe", tmp_prestrafe[i]);
  7223.             TrieGetCell(JS, "strafes", tmp_strafes[i]);
  7224.             TrieGetCell(JS, "sync", tmp_sync[i]);
  7225.            
  7226.         }
  7227.         //server_print("%s",tmp_ip[i]);
  7228.     }
  7229.    
  7230.     for (new i = 0; i < NTOP; i++)
  7231.     {
  7232.         if( d > tmp_distance[i] )
  7233.         {
  7234.             new pos = i;   
  7235.             while( !equali(tmp_ip[pos], rb) && pos < NTOP )
  7236.             {
  7237.                 pos++;
  7238.             }
  7239.            
  7240.             for (new j = pos; j > i; j--)
  7241.             {
  7242.                 formatex(tmp_ip[j], 32, tmp_ip[j-1]);
  7243.                 formatex(tmp_names[j], 32, tmp_names[j-1]);
  7244.                 tmp_distance[j] = tmp_distance[j-1];
  7245.                 tmp_maxspeed[j] = tmp_maxspeed[j-1];
  7246.                 tmp_prestrafe[j] = tmp_prestrafe[j-1];
  7247.                 tmp_strafes[j] = tmp_strafes[j-1];
  7248.                 tmp_sync[j] = tmp_sync[j-1];
  7249.             }
  7250.            
  7251.             formatex(tmp_ip[i], 32, rb);
  7252.             formatex(tmp_names[i], 32, g_playername[id]);
  7253.             tmp_distance[i]=d;
  7254.             tmp_maxspeed[i] = m;
  7255.             tmp_prestrafe[i] = p;
  7256.             tmp_strafes[i] = sf;
  7257.             tmp_sync[i] = s;
  7258.            
  7259.             new tmp_ddbh[NTOP+1];
  7260.             save_tops(type,type_num,tmp_names,tmp_ip,tmp_distance,tmp_maxspeed,tmp_prestrafe,tmp_strafes,tmp_sync,tmp_ddbh);
  7261.            
  7262.             //client_print(0,print_chat,"%L",LANG_SERVER,"UQSTATS_PRINTTOP1",prefix,g_playername[id],(i+1),type,dd);               
  7263.            
  7264.             if((i+1)<11 && uq_screen==1)
  7265.             {
  7266.                 set_task(0.1,"ScreenShoot", id+15237);
  7267.             }
  7268.             break;
  7269.         }
  7270.         else if( equali(tmp_ip[i], rb)) break
  7271.     }
  7272. }
  7273.  
  7274. public checktops2(id,type[],type_num,Float:dd,Float:mm,Float:pp,sf,s,duk)
  7275. {  
  7276.     new d,m,p,rb[64];
  7277.    
  7278.     d=floatround(dd*1000000);// todo: zdelat poproshe)
  7279.     m=floatround(mm*1000000);
  7280.     p=floatround(pp*1000000);
  7281.    
  7282.     switch(rankby) {
  7283.         case 0: {
  7284.             formatex(rb, 63, "%s", g_playername[id]);
  7285.         }
  7286.         case 1: {
  7287.             formatex(rb, 63, "%s", g_playerip[id]);
  7288.         }
  7289.         case 2: {
  7290.             formatex(rb, 63, "%s", g_playersteam[id]);
  7291.         }
  7292.     }
  7293.    
  7294.     new tmp_names[NTOP+1][33],tmp_ip[NTOP+1][33],tmp_distance[NTOP+1],tmp_maxspeed[NTOP+1],tmp_prestrafe[NTOP+1],tmp_strafes[NTOP+1],tmp_sync[NTOP+1],tmp_ddbh[NTOP+1];
  7295.        
  7296.     for (new i = 0; i < NTOP; i++)
  7297.     {
  7298.         new Trie:JS;
  7299.         new tmp_type[33];
  7300.    
  7301.         format(tmp_type, 32, "%s_%d_250", type, i);
  7302.        
  7303.         if(TrieKeyExists(JData, tmp_type))
  7304.         {  
  7305.             TrieGetCell(JData, tmp_type, JS);
  7306.            
  7307.             TrieGetString(JS,"name",tmp_names[i],32);
  7308.             TrieGetString(JS,"authid",tmp_ip[i],32);
  7309.             TrieGetCell(JS, "distance", tmp_distance[i]);
  7310.             TrieGetCell(JS, "maxspeed", tmp_maxspeed[i]);
  7311.             TrieGetCell(JS, "prestrafe", tmp_prestrafe[i]);
  7312.             TrieGetCell(JS, "strafes", tmp_strafes[i]);
  7313.             TrieGetCell(JS, "sync", tmp_sync[i]);
  7314.             TrieGetCell(JS, "ddbh", tmp_ddbh[i]);
  7315.         }
  7316.     }
  7317.    
  7318.     for (new i = 0; i < NTOP; i++)
  7319.     {
  7320.         if( d > tmp_distance[i] )
  7321.         {
  7322.             new pos = i;   
  7323.             while( !equali(tmp_ip[pos], rb) && pos < NTOP )
  7324.             {
  7325.                 pos++;
  7326.             }
  7327.            
  7328.             for (new j = pos; j > i; j--)
  7329.             {
  7330.                 formatex(tmp_ip[j], 32, tmp_ip[j-1]);
  7331.                 formatex(tmp_names[j], 32, tmp_names[j-1]);
  7332.                 tmp_distance[j] = tmp_distance[j-1];
  7333.                 tmp_maxspeed[j] = tmp_maxspeed[j-1];
  7334.                 tmp_prestrafe[j] = tmp_prestrafe[j-1];
  7335.                 tmp_strafes[j] = tmp_strafes[j-1];
  7336.                 tmp_sync[j] = tmp_sync[j-1];
  7337.                 tmp_ddbh[j] = tmp_ddbh[j-1];
  7338.             }
  7339.            
  7340.             formatex(tmp_ip[i], 32, rb);
  7341.             formatex(tmp_names[i], 32, g_playername[id]);
  7342.             tmp_distance[i]=d;
  7343.             tmp_maxspeed[i] = m;
  7344.             tmp_prestrafe[i] = p;
  7345.             tmp_strafes[i] = sf;
  7346.             tmp_sync[i] = s;
  7347.             tmp_ddbh[i] = duk;
  7348.            
  7349.             save_tops(type,type_num,tmp_names,tmp_ip,tmp_distance,tmp_maxspeed,tmp_prestrafe,tmp_strafes,tmp_sync,tmp_ddbh);
  7350.            
  7351.             //client_print(0,print_chat,"%L",LANG_SERVER,"UQSTATS_PRINTTOP1",prefix,g_playername[id],(i+1),type,dd);               
  7352.            
  7353.             if((i+1)<11 && uq_screen==1)
  7354.             {
  7355.                 set_task(0.1,"ScreenShoot", id+15237);
  7356.             }
  7357.             break;
  7358.         }
  7359.         else if( equali(tmp_ip[i], rb)) break
  7360.     }
  7361. }
  7362. public checktops_block(id,type[],type_num,Float:dd,Float:jj,bb)
  7363. {  
  7364.     new d,rb[64];
  7365.    
  7366.     d=floatround(dd*1000000);// todo: zdelat poproshe)
  7367.    
  7368.     switch(rankby) {
  7369.         case 0: {
  7370.             formatex(rb, 63, "%s", g_playername[id]);
  7371.         }
  7372.         case 1: {
  7373.             formatex(rb, 63, "%s", g_playerip[id]);
  7374.         }
  7375.         case 2: {
  7376.             formatex(rb, 63, "%s", g_playersteam[id]);
  7377.         }
  7378.     }
  7379.    
  7380.     new tmp_names[NTOP+1][33],tmp_ip[NTOP+1][33],tmp_distance[NTOP+1],tmp_block[NTOP+1],Float:tmp_jumpoff[NTOP+1];
  7381.        
  7382.     for (new i = 0; i < NTOP; i++)
  7383.     {
  7384.         new Trie:JS;
  7385.         new tmp_type[33];
  7386.    
  7387.         format(tmp_type, 32, "block_%s_%d_250", type, i);
  7388.        
  7389.         if(TrieKeyExists(JData_Block, tmp_type))
  7390.         {  
  7391.             TrieGetCell(JData_Block, tmp_type, JS);
  7392.            
  7393.             TrieGetString(JS,"name",tmp_names[i],32);
  7394.             TrieGetString(JS,"authid",tmp_ip[i],32);
  7395.             TrieGetCell(JS, "distance", tmp_distance[i]);
  7396.             TrieGetCell(JS, "block", tmp_block[i]);
  7397.             TrieGetCell(JS, "jumpoff", tmp_jumpoff[i]);
  7398.         }
  7399.     }
  7400.    
  7401.    
  7402.     new tmp_dist;
  7403.     for (new j = 0; j < NTOP; j++)
  7404.     {  
  7405.         if(bb==tmp_block[j] && equali(tmp_ip[j],rb))
  7406.         {
  7407.             tmp_dist=tmp_distance[j];
  7408.             break;
  7409.         }
  7410.         else tmp_dist=0;
  7411.     }
  7412.    
  7413.     for (new i = 0; i < NTOP; i++)
  7414.     {
  7415.         if( bb >= tmp_block[i] && d>tmp_dist)
  7416.         {
  7417.             new pos = i;   
  7418.             while( !equali(tmp_ip[pos],rb) && pos < NTOP )
  7419.             {
  7420.                 pos++;
  7421.             }
  7422.            
  7423.             for (new j = pos; j > i; j--)
  7424.             {
  7425.                 formatex(tmp_ip[j], 32, tmp_ip[j-1]);
  7426.                 formatex(tmp_names[j], 32, tmp_names[j-1]);
  7427.                 tmp_distance[j] = tmp_distance[j-1];
  7428.                 tmp_block[j] = tmp_block[j-1];
  7429.                 tmp_jumpoff[j] = tmp_jumpoff[j-1];
  7430.             }
  7431.            
  7432.             formatex(tmp_ip[i], 32, rb);
  7433.             formatex(tmp_names[i], 32, g_playername[id]);
  7434.             tmp_distance[i]=d;
  7435.             tmp_block[i] = bb;
  7436.             tmp_jumpoff[i] = jj;
  7437.            
  7438.            
  7439.             new oldBlock,start_array;
  7440.             oldBlock=tmp_block[0];
  7441.             start_array=0;
  7442.            
  7443.             for (new ii = 0; ii < NTOP; ii++)
  7444.             {
  7445.                 if(tmp_block[ii]!=oldBlock)
  7446.                 {
  7447.                     new bool:check=true;
  7448.                     while(check)
  7449.                     {
  7450.                         check=false;
  7451.                         for(new jjj=start_array;jjj<ii-1;jjj++)
  7452.                         {
  7453.                             if(tmp_distance[jjj]<tmp_distance[jjj+1])
  7454.                             {
  7455.                                 new buf1;
  7456.                                 buf1=tmp_distance[jjj];
  7457.                                 tmp_distance[jjj]=tmp_distance[jjj+1];
  7458.                                 tmp_distance[jjj+1]=buf1;
  7459.                                
  7460.                                 new Float:buf2;
  7461.                                 buf2=tmp_jumpoff[jjj];
  7462.                                 tmp_jumpoff[jjj]=tmp_jumpoff[jjj+1];
  7463.                                 tmp_jumpoff[jjj+1]=buf2;
  7464.                                
  7465.                                 new buf3[33];
  7466.                                 formatex(buf3,32,tmp_names[jjj]);
  7467.                                 formatex(tmp_names[jjj],32,tmp_names[jjj+1]);
  7468.                                 formatex(tmp_names[jjj+1],32,buf3);
  7469.                                
  7470.                                 formatex(buf3,32,tmp_ip[jjj]);
  7471.                                 formatex(tmp_ip[jjj],32,tmp_ip[jjj+1]);
  7472.                                 formatex(tmp_ip[jjj+1],32,buf3);
  7473.                                
  7474.                                 check=true;
  7475.                             }
  7476.                         }
  7477.                     }
  7478.                     start_array=ii;
  7479.                 }
  7480.                 oldBlock=tmp_block[ii];
  7481.             }
  7482.            
  7483.             save_tops_block(type,type_num,tmp_names,tmp_ip,tmp_distance,tmp_block,tmp_jumpoff);
  7484.            
  7485.             for (new j = 0; j < NTOP; j++)
  7486.             {  
  7487.                 if(d==tmp_distance[j] && equali(tmp_ip[j],rb))
  7488.                 {
  7489.                 //  client_print(0,print_chat,"%L",LANG_SERVER,"UQSTATS_PRINTTOP2",prefix,g_playername[id],(j+1),type,bb);             
  7490.                 }
  7491.             }
  7492.             if((i+1)<11 && uq_screen==1)
  7493.             {
  7494.                 set_task(0.1,"ScreenShoot", id+15237);
  7495.             }
  7496.             break;
  7497.         }
  7498.         else if( equali(tmp_ip[i], rb)) break
  7499.     }
  7500. }
  7501. public checktops_block_weapon(id,pev_max_speed,wpn_rank,type[],type_num,Float:dd,Float:jj,bb,wpn_name[])
  7502. {  
  7503.     new d,rb[64];
  7504.    
  7505.     d=floatround(dd*1000000);// todo: zdelat poproshe)
  7506.    
  7507.     switch(rankby) {
  7508.         case 0: {
  7509.             formatex(rb, 63, "%s", g_playername[id]);
  7510.         }
  7511.         case 1: {
  7512.             formatex(rb, 63, "%s", g_playerip[id]);
  7513.         }
  7514.         case 2: {
  7515.             formatex(rb, 63, "%s", g_playersteam[id]);
  7516.         }
  7517.     }
  7518.    
  7519.     new tmp_weap_name[NTOP+1][33],tmp_names[NTOP+1][33],tmp_ip[NTOP+1][33],tmp_distance[NTOP+1],tmp_block[NTOP+1],Float:tmp_jumpoff[NTOP+1];
  7520.        
  7521.     for (new i = 0; i < NTOP; i++)
  7522.     {
  7523.         new Trie:JS;
  7524.         new tmp_type[33];
  7525.    
  7526.         format(tmp_type, 32, "block_%s_%d_%d", type, i,weapon_maxspeed(wpn_rank));
  7527.        
  7528.         if(TrieKeyExists(JData_Block, tmp_type))
  7529.         {  
  7530.             TrieGetCell(JData_Block, tmp_type, JS);
  7531.            
  7532.             TrieGetString(JS,"name",tmp_names[i],32);
  7533.             TrieGetString(JS,"authid",tmp_ip[i],32);
  7534.             TrieGetCell(JS, "distance", tmp_distance[i]);
  7535.             TrieGetCell(JS, "block", tmp_block[i]);
  7536.             TrieGetCell(JS, "jumpoff", tmp_jumpoff[i]);
  7537.             TrieGetString(JS, "wpn_name", tmp_weap_name[i],32);
  7538.         }
  7539.     }
  7540.    
  7541.     new tmp_dist;
  7542.     for (new j = 0; j < NTOP; j++)
  7543.     {  
  7544.         if(bb==tmp_block[j] && equali(tmp_ip[j],rb))
  7545.         {
  7546.             tmp_dist=tmp_distance[j];
  7547.             break;
  7548.         }
  7549.         else tmp_dist=0;
  7550.     }
  7551.    
  7552.     for (new i = 0; i < NTOP; i++)
  7553.     {
  7554.         if( bb >= tmp_block[i] && d>tmp_dist)
  7555.         {
  7556.             new pos = i;   
  7557.             while( !equali(tmp_ip[pos],rb) && pos < NTOP )
  7558.             {
  7559.                 pos++;
  7560.             }
  7561.            
  7562.             for (new j = pos; j > i; j--)
  7563.             {
  7564.                 formatex(tmp_ip[j], 32, tmp_ip[j-1]);
  7565.                 formatex(tmp_names[j], 32, tmp_names[j-1]);
  7566.                 formatex(tmp_weap_name[j], 32, tmp_weap_name[j-1]);
  7567.                 tmp_distance[j] = tmp_distance[j-1];
  7568.                 tmp_block[j] = tmp_block[j-1];
  7569.                 tmp_jumpoff[j] = tmp_jumpoff[j-1];
  7570.             }
  7571.            
  7572.             formatex(tmp_ip[i], 32, rb);
  7573.             formatex(tmp_names[i], 32, g_playername[id]);
  7574.             formatex(tmp_weap_name[i], 32, wpn_name);
  7575.             tmp_distance[i]=d;
  7576.             tmp_block[i] = bb;
  7577.             tmp_jumpoff[i] = jj;
  7578.            
  7579.            
  7580.             new oldBlock,start_array;
  7581.             oldBlock=tmp_block[0];
  7582.             start_array=0;
  7583.            
  7584.             for (new ii = 0; ii < NTOP; ii++)
  7585.             {
  7586.                 if(tmp_block[ii]!=oldBlock)
  7587.                 {
  7588.                     new bool:check=true;
  7589.                     while(check)
  7590.                     {
  7591.                         check=false;
  7592.                         for(new jjj=start_array;jjj<ii-1;jjj++)
  7593.                         {
  7594.                             if(tmp_distance[jjj]<tmp_distance[jjj+1])
  7595.                             {
  7596.                                 new buf1;
  7597.                                 buf1=tmp_distance[jjj];
  7598.                                 tmp_distance[jjj]=tmp_distance[jjj+1];
  7599.                                 tmp_distance[jjj+1]=buf1;
  7600.                                
  7601.                                 new Float:buf2;
  7602.                                 buf2=tmp_jumpoff[jjj];
  7603.                                 tmp_jumpoff[jjj]=tmp_jumpoff[jjj+1];
  7604.                                 tmp_jumpoff[jjj+1]=buf2;
  7605.                                
  7606.                                 new buf3[33];
  7607.                                 formatex(buf3,32,tmp_names[jjj]);
  7608.                                 formatex(tmp_names[jjj],32,tmp_names[jjj+1]);
  7609.                                 formatex(tmp_names[jjj+1],32,buf3);
  7610.                                
  7611.                                 formatex(buf3,32,tmp_ip[jjj]);
  7612.                                 formatex(tmp_ip[jjj],32,tmp_ip[jjj+1]);
  7613.                                 formatex(tmp_ip[jjj+1],32,buf3);
  7614.                                
  7615.                                 formatex(buf3,32,tmp_weap_name[jjj]);
  7616.                                 formatex(tmp_weap_name[jjj],32,tmp_weap_name[jjj+1]);
  7617.                                 formatex(tmp_weap_name[jjj+1],32,buf3);
  7618.                                
  7619.                                 check=true;
  7620.                             }
  7621.                         }
  7622.                     }
  7623.                     start_array=ii;
  7624.                 }
  7625.                 oldBlock=tmp_block[ii];
  7626.             }
  7627.            
  7628.             save_tops_block_weapon(type,type_num,wpn_rank,tmp_names,tmp_ip,tmp_distance,tmp_block,tmp_jumpoff,tmp_weap_name);
  7629.            
  7630.             for (new j = 0; j < NTOP; j++)
  7631.             {  
  7632.                 if(d==tmp_distance[j] && equali(tmp_ip[j],rb))
  7633.                 {
  7634.                 //  client_print(0,print_chat,"%L",LANG_SERVER,"UQSTATS_PRINTTOP3",prefix,g_playername[id],(j+1),type,pev_max_speed,bb);               
  7635.                 }
  7636.             }
  7637.             if((i+1)<11 && uq_screen==1)
  7638.             {
  7639.                 set_task(0.1,"ScreenShoot", id+15237);
  7640.             }
  7641.             break;
  7642.         }
  7643.         else if( equali(tmp_ip[i], rb)) break
  7644.     }
  7645. }
  7646. public checktops_weapon(id,pev_max_speed,wpn_rank,type[],type_num,Float:dd,Float:mm,Float:pp,sf,s,wpn_name[])
  7647. {  
  7648.     new d,m,p,rb[64];
  7649.    
  7650.     d=floatround(dd*1000000);
  7651.     m=floatround(mm*1000000);
  7652.     p=floatround(pp*1000000);
  7653.    
  7654.     switch(rankby) {
  7655.         case 0: {
  7656.             formatex(rb, 63, "%s", g_playername[id]);
  7657.         }
  7658.         case 1: {
  7659.             formatex(rb, 63, "%s", g_playerip[id]);
  7660.         }
  7661.         case 2: {
  7662.             formatex(rb, 63, "%s", g_playersteam[id]);
  7663.         }
  7664.     }
  7665.  
  7666.     new tmp_weap_name[NTOP+1][33],tmp_names[NTOP+1][33],tmp_ip[NTOP+1][33],tmp_distance[NTOP+1],tmp_maxspeed[NTOP+1],tmp_prestrafe[NTOP+1],tmp_strafes[NTOP+1],tmp_sync[NTOP+1],tmp_wpnrank[NTOP+1];
  7667.        
  7668.     for (new i = 0; i < NTOP; i++)
  7669.     {
  7670.         new Trie:JS;
  7671.         new tmp_type[33];
  7672.    
  7673.         format(tmp_type, 32, "%s_%d_%d", type, i,weapon_maxspeed(wpn_rank));
  7674.        
  7675.         if(TrieKeyExists(JData, tmp_type))
  7676.         {  
  7677.             TrieGetCell(JData, tmp_type, JS);
  7678.            
  7679.             TrieGetString(JS,"name",tmp_names[i],32);
  7680.             TrieGetString(JS,"authid",tmp_ip[i],32);
  7681.             TrieGetCell(JS, "distance", tmp_distance[i]);
  7682.             TrieGetCell(JS, "maxspeed", tmp_maxspeed[i]);
  7683.             TrieGetCell(JS, "prestrafe", tmp_prestrafe[i]);
  7684.             TrieGetCell(JS, "strafes", tmp_strafes[i]);
  7685.             TrieGetCell(JS, "sync", tmp_sync[i]);
  7686.             TrieGetCell(JS, "pspeed", tmp_wpnrank[i]);
  7687.             TrieGetString(JS, "wpn_name", tmp_weap_name[i],32);
  7688.         }
  7689.     }
  7690.    
  7691.     for (new i = 0; i < NTOP; i++)
  7692.     {
  7693.         if( d > tmp_distance[i] )
  7694.         {
  7695.             new pos = i;
  7696.  
  7697.             while( !equali(tmp_ip[pos],rb) && pos < NTOP )
  7698.             {
  7699.                 pos++;
  7700.             }
  7701.            
  7702.             for (new j = pos; j > i; j--)
  7703.             {
  7704.                 formatex(tmp_ip[j], 32, tmp_ip[j-1]);
  7705.                 formatex(tmp_names[j], 32, tmp_names[j-1]);
  7706.                 formatex(tmp_weap_name[j], 32, tmp_weap_name[j-1]);
  7707.                 tmp_distance[j] = tmp_distance[j-1];
  7708.                 tmp_maxspeed[j] = tmp_maxspeed[j-1];
  7709.                 tmp_prestrafe[j] = tmp_prestrafe[j-1];
  7710.                 tmp_strafes[j] = tmp_strafes[j-1];
  7711.                 tmp_sync[j] = tmp_sync[j-1];
  7712.             }
  7713.            
  7714.             formatex(tmp_ip[i], 32, rb);
  7715.             formatex(tmp_names[i], 32, g_playername[id]);
  7716.             formatex(tmp_weap_name[i], 32, wpn_name);
  7717.             tmp_distance[i]=d;
  7718.             tmp_maxspeed[i] = m;
  7719.             tmp_prestrafe[i] = p;
  7720.             tmp_strafes[i] = sf;
  7721.             tmp_sync[i] = s;
  7722.            
  7723.             save_tops_weapon(type,type_num,wpn_rank,tmp_names,tmp_ip,tmp_distance,tmp_maxspeed,tmp_prestrafe,tmp_strafes,tmp_sync,tmp_weap_name);
  7724.  
  7725.             //client_print(0,print_chat,"%L",LANG_SERVER,"UQSTATS_PRINTTOP4",prefix,g_playername[id],(i+1),type,pev_max_speed,dd);             
  7726.            
  7727.             break;
  7728.         }
  7729.         else if( equali(tmp_ip[i], rb)) break
  7730.     }
  7731. }
  7732. public checkmap(id,Float:dd,Float:mm,Float:pp,sf,s,typ[])
  7733. {   new d,m,p,rb[64];
  7734.    
  7735.     d=floatround(dd*1000000);// todo: zdelat poproshe)
  7736.     m=floatround(mm*1000000);
  7737.     p=floatround(pp*1000000);
  7738.    
  7739.     switch(rankby) {
  7740.         case 0: {
  7741.             formatex(rb, 63, "%s", g_playername[id]);
  7742.         }
  7743.         case 1: {
  7744.             formatex(rb, 63, "%s", g_playerip[id]);
  7745.         }
  7746.         case 2: {
  7747.             formatex(rb, 63, "%s", g_playersteam[id]);
  7748.         }
  7749.     }
  7750.  
  7751.     for (new i = 0; i < NTOP; i++)
  7752.     {
  7753.         if( d > map_dist[i] )
  7754.         {
  7755.             new pos = i;   
  7756.             while( !equali(map_ip[pos],rb) && pos < NTOP )
  7757.             {
  7758.                 pos++;
  7759.             }
  7760.            
  7761.             for (new j = pos; j > i; j--)
  7762.             {
  7763.                 formatex(map_ip[j], 32, map_ip[j-1]);
  7764.                 formatex(map_names[j], 32, map_names[j-1]);
  7765.                 map_dist[j] = map_dist[j-1];
  7766.                 map_maxsped[j] =map_maxsped[j-1];
  7767.                 map_prestr[j] = map_prestr[j-1];
  7768.                 map_streif[j] = map_streif[j-1];
  7769.                 map_syncc[j] = map_syncc[j-1];
  7770.                 formatex(map_type[j], 32, map_type[j-1]);
  7771.             }
  7772.            
  7773.             formatex(map_ip[i], 32, rb);
  7774.             formatex(map_names[i], 32, g_playername[id]);
  7775.             map_dist[i]=d;
  7776.             map_maxsped[i] = m;
  7777.             map_prestr[i] = p;
  7778.             map_streif[i] = sf;
  7779.             map_syncc[i] = s;
  7780.             formatex(map_type[i], 32, typ);
  7781.            
  7782.             save_maptop();
  7783.            
  7784.             new iPlayers[32],iNum;
  7785.             get_players( iPlayers, iNum,"ch") ;
  7786.             for(new p=0;p<iNum;p++)
  7787.             {
  7788.                 new ids=iPlayers[p];
  7789.                 if(gHasColorChat[ids] ==true)
  7790.                 {  
  7791.                 //  client_print(ids,print_chat,"%L",LANG_SERVER,"UQSTATS_PRINTTOP5",prefix,g_playername[id],(i+1),dd,typ);
  7792.                 }
  7793.             }
  7794.             break;
  7795.         }
  7796.         else if( equali(map_ip[i], rb)) break
  7797.     }
  7798. }
  7799. public fwdPostThink( id )
  7800. {
  7801.     if( g_alive[id] && g_userConnected[id] && g_pBot[id]==false)
  7802.     {
  7803.         if( g_Jumped[id] )
  7804.         {
  7805.            
  7806.             FullJumpFrames[id]++;
  7807.            
  7808.             static buttonsNew;
  7809.            
  7810.             static buttons;
  7811.             static Float:angle[3];
  7812.    
  7813.             buttonsNew = pev(id, pev_button);
  7814.             buttons = pev(id, pev_button);
  7815.             pev(id, pev_angles, angle);
  7816.            
  7817.             new Float:velocity[3];
  7818.             pev(id, pev_velocity, velocity);
  7819.             velocity[2] = 0.0;
  7820.            
  7821.             new Float:fSpeed = vector_length(velocity);
  7822.            
  7823.            
  7824.             if( old_angle1[id] > angle[1] ) {
  7825.                 turning_left[id] = false;
  7826.                 turning_right[id] = true;
  7827.             }
  7828.             else if( old_angle1[id] < angle[1] ) {
  7829.                 turning_left[id] = true;
  7830.                 turning_right[id] = false;
  7831.             } else {
  7832.                 turning_left[id] = false;
  7833.                 turning_right[id] = false;
  7834.             }
  7835.             //schetchik streifof
  7836.             if( !(strafecounter_oldbuttons[id]&IN_MOVELEFT) && buttonsNew&IN_MOVELEFT
  7837.             && !(buttonsNew&IN_MOVERIGHT) && !(buttonsNew&IN_BACK) && !(buttonsNew&IN_FORWARD)
  7838.             && (turning_left[id] || turning_right[id]) )
  7839.             {
  7840.                 preessbutton[id]=true;
  7841.                 button_what[id]=1;
  7842.                
  7843.                 if(strafe_num[id] < NSTRAFES)
  7844.                     strafe_stat_time[id][strafe_num[id]] = get_gametime();
  7845.                 strafe_num[id] += INFO_ONE;
  7846.                
  7847.                 if(strafe_num[id]>0 && strafe_num[id]<100) type_button_what[id][strafe_num[id]]=1;
  7848.             }
  7849.             else if( !(strafecounter_oldbuttons[id]&IN_MOVERIGHT) && buttonsNew&IN_MOVERIGHT
  7850.             && !(buttonsNew&IN_MOVELEFT) && !(buttonsNew&IN_BACK) && !(buttonsNew&IN_FORWARD)
  7851.             && (turning_left[id] || turning_right[id]) )
  7852.             {
  7853.                 preessbutton[id]=true;
  7854.                 button_what[id]=2;
  7855.                
  7856.                 if(strafe_num[id] < NSTRAFES)
  7857.                     strafe_stat_time[id][strafe_num[id]] = get_gametime();
  7858.                 strafe_num[id] += INFO_ONE;
  7859.                
  7860.                 if(strafe_num[id]>0 && strafe_num[id]<100) type_button_what[id][strafe_num[id]]=1;
  7861.             }
  7862.             else if( !(strafecounter_oldbuttons[id]&IN_BACK) && buttonsNew&IN_BACK
  7863.             && !(buttonsNew&IN_MOVELEFT) && !(buttonsNew&IN_MOVERIGHT) && !(buttonsNew&IN_FORWARD)
  7864.             && (turning_left[id] || turning_right[id]) )
  7865.             {
  7866.                 preessbutton[id]=true;
  7867.                 button_what[id]=1;
  7868.                
  7869.                 if(strafe_num[id] < NSTRAFES)
  7870.                     strafe_stat_time[id][strafe_num[id]] = get_gametime();
  7871.                 strafe_num[id] += INFO_ONE;
  7872.                
  7873.                 if(strafe_num[id]>0 && strafe_num[id]<100) type_button_what[id][strafe_num[id]]=2;
  7874.             }
  7875.             else if( !(strafecounter_oldbuttons[id]&IN_FORWARD) && buttonsNew&IN_FORWARD
  7876.             && !(buttonsNew&IN_MOVELEFT) && !(buttonsNew&IN_MOVERIGHT) && !(buttonsNew&IN_BACK)
  7877.             && (turning_left[id] || turning_right[id]) )
  7878.             {
  7879.                 preessbutton[id]=true;
  7880.                 button_what[id]=2;
  7881.        
  7882.                 if(strafe_num[id] < NSTRAFES)
  7883.                     strafe_stat_time[id][strafe_num[id]] = get_gametime();
  7884.                 strafe_num[id] += INFO_ONE;
  7885.                
  7886.                 if(strafe_num[id]>0 && strafe_num[id]<100) type_button_what[id][strafe_num[id]]=2;
  7887.             }
  7888.            
  7889.             if( buttonsNew&IN_MOVERIGHT
  7890.             || buttonsNew&IN_MOVELEFT
  7891.             || buttonsNew&IN_FORWARD
  7892.             || buttonsNew&IN_BACK )
  7893.             {  
  7894.                 //tskFps(id);
  7895.                 if(strafe_num[id] < NSTRAFES)
  7896.                 {
  7897.                     if( fSpeed > speed[id])
  7898.                     {
  7899.                         strafe_stat_sync[id][strafe_num[id]][0] += INFO_ONE;
  7900.                     }
  7901.                     else
  7902.                     {
  7903.                         strafe_stat_sync[id][strafe_num[id]][1] += INFO_ONE;
  7904.                         if(uq_istrafe && strafe_num[id]<NSTRAFES && lost_frame_count[id][strafe_num[id]]<NVAR)
  7905.                             line_lost[id][strafe_num[id]][lost_frame_count[id][strafe_num[id]]]=1;
  7906.                     }
  7907.                    
  7908.                     if(uq_istrafe)
  7909.                     {
  7910.                         line_erase[id][strafe_num[id]]=lost_frame_count[id][strafe_num[id]];
  7911.                         line_erase_strnum[id]=strafe_num[id];
  7912.                    
  7913.                         lost_frame_count[id][strafe_num[id]]++;
  7914.                     }
  7915.                 }
  7916.                
  7917.             }
  7918.             else if(uq_istrafe && strafe_num[id]<NSTRAFES)
  7919.                 strafe_lost_frame[id][strafe_num[id]] += INFO_ONE;
  7920.            
  7921.             if( buttons&IN_MOVERIGHT && (buttons&IN_MOVELEFT || buttons&IN_FORWARD || buttons&IN_BACK) )
  7922.                 strafecounter_oldbuttons[id] = INFO_ZERO;
  7923.             else if( buttons&IN_MOVELEFT && (buttons&IN_FORWARD || buttons&IN_BACK || buttons&IN_MOVERIGHT) )
  7924.                 strafecounter_oldbuttons[id] = INFO_ZERO;
  7925.             else if( buttons&IN_FORWARD && (buttons&IN_BACK || buttons&IN_MOVERIGHT || buttons&IN_MOVELEFT) )
  7926.                 strafecounter_oldbuttons[id] = INFO_ZERO;
  7927.             else if( buttons&IN_BACK && (buttons&IN_MOVERIGHT || buttons&IN_MOVELEFT || buttons&IN_FORWARD) )
  7928.                 strafecounter_oldbuttons[id] = INFO_ZERO;
  7929.             else if( turning_left[id] || turning_right[id] )
  7930.                 strafecounter_oldbuttons[id] = buttons;
  7931.         }
  7932.         else
  7933.         {  
  7934.             if(sync_doubleduck[id])
  7935.             {
  7936.                 new Float:velocity[3];
  7937.                 pev(id, pev_velocity, velocity);
  7938.                 velocity[2] = 0.0;
  7939.                
  7940.                 new Float:fSpeed = vector_length(velocity);
  7941.                
  7942.                 if( fSpeed > speed[id])
  7943.                 {
  7944.                     doubleduck_stat_sync[id][0]++;
  7945.                 }
  7946.                 else
  7947.                 {
  7948.                     doubleduck_stat_sync[id][1]++;
  7949.                 }
  7950.             }
  7951.         }
  7952.     }
  7953. }
  7954. public get_colorchat_by_distance(JumpType:type_jump,mSpeed,t_dist,bool:drop_a,multiscj_a,aircj)
  7955. {
  7956.     new dist_array[5];
  7957.    
  7958.     dist_array[2]=280;
  7959.        
  7960.     if(type_jump==Type_Double_CountJump || type_jump==Type_Multi_CountJump )
  7961.     {  
  7962.         dist_array[4]=dcj_god_dist;
  7963.         dist_array[3]=dcj_leet_dist;
  7964.         dist_array[2]=dcj_holy_dist;
  7965.         dist_array[1]=dcj_pro_dist;
  7966.         dist_array[0]=dcj_good_dist;
  7967.     }
  7968.     else if(type_jump==Type_LongJump || type_jump==Type_HighJump)
  7969.     {  
  7970.         dist_array[4]=lj_god_dist;
  7971.         dist_array[3]=lj_leet_dist;
  7972.         dist_array[2]=lj_holy_dist;
  7973.         dist_array[1]=lj_pro_dist;
  7974.         dist_array[0]=lj_good_dist;
  7975.     }
  7976.     else if(type_jump==Type_ladder)
  7977.     {  
  7978.         dist_array[4]=ladder_god_dist;
  7979.         dist_array[3]=ladder_leet_dist;
  7980.         dist_array[2]=ladder_holy_dist;
  7981.         dist_array[1]=ladder_pro_dist;
  7982.         dist_array[0]=ladder_good_dist;
  7983.     }
  7984.     else if(type_jump==Type_WeirdLongJump || type_jump==Type_Drop_CountJump || type_jump==Type_ladderBhop)
  7985.     {  
  7986.         dist_array[4]=wj_god_dist;
  7987.         dist_array[3]=wj_leet_dist;
  7988.         dist_array[2]=wj_holy_dist;
  7989.         dist_array[1]=wj_pro_dist;
  7990.         dist_array[0]=wj_good_dist;
  7991.     }
  7992.     else if(type_jump==Type_BhopLongJump || type_jump==Type_StandupBhopLongJump)
  7993.     {  
  7994.         dist_array[4]=bj_god_dist;
  7995.         dist_array[3]=bj_leet_dist;
  7996.         dist_array[2]=bj_holy_dist;
  7997.         dist_array[1]=bj_pro_dist;
  7998.         dist_array[0]=bj_good_dist;
  7999.     }
  8000.     else if(type_jump==Type_CountJump)
  8001.     {  
  8002.         dist_array[4]=cj_god_dist;
  8003.         dist_array[3]=cj_leet_dist;
  8004.         dist_array[2]=cj_holy_dist;
  8005.         dist_array[1]=cj_pro_dist;
  8006.         dist_array[0]=cj_good_dist;
  8007.     }
  8008.     else if(type_jump==Type_Drop_BhopLongJump)
  8009.     {  
  8010.         dist_array[4]=dbj_god_dist;
  8011.         dist_array[3]=dbj_leet_dist;
  8012.         dist_array[2]=dbj_holy_dist;
  8013.         dist_array[1]=dbj_pro_dist;
  8014.         dist_array[0]=dbj_good_dist;
  8015.     }
  8016.     else if(type_jump==Type_StandUp_CountJump && drop_a==false)
  8017.     {  
  8018.         if(multiscj_a==0)
  8019.         {
  8020.             dist_array[4]=scj_god_dist+aircj;
  8021.             dist_array[3]=scj_leet_dist+aircj;
  8022.             dist_array[2]=scj_holy_dist+aircj;
  8023.             dist_array[1]=scj_pro_dist+aircj;
  8024.             dist_array[0]=scj_good_dist+aircj;
  8025.         }
  8026.         else if(multiscj_a==1 || multiscj_a==2)
  8027.         {
  8028.             dist_array[4]=scj_god_dist+aircj+10;
  8029.             dist_array[3]=scj_leet_dist+aircj+10;
  8030.             dist_array[2]=scj_holy_dist+aircj+10;
  8031.             dist_array[1]=scj_pro_dist+aircj+10;
  8032.             dist_array[0]=scj_good_dist+aircj+10;
  8033.         }
  8034.     }
  8035.     else if(type_jump==Type_StandUp_CountJump && drop_a)
  8036.     {  
  8037.         dist_array[4]=dropscj_god_dist;
  8038.         dist_array[3]=dropscj_leet_dist;
  8039.         dist_array[2]=dropscj_holy_dist;
  8040.         dist_array[1]=dropscj_pro_dist;
  8041.         dist_array[0]=dropscj_good_dist;
  8042.     }
  8043.     else if(type_jump==Type_Bhop_In_Duck || type_jump==Type_Up_Bhop_In_Duck)
  8044.     {  
  8045.         dist_array[4]=bhopinduck_god_dist;
  8046.         dist_array[3]=bhopinduck_leet_dist;
  8047.         dist_array[2]=bhopinduck_holy_dist;
  8048.         dist_array[1]=bhopinduck_pro_dist;
  8049.         dist_array[0]=bhopinduck_good_dist;
  8050.     }
  8051.     else if(type_jump==Type_Up_Bhop)
  8052.     {  
  8053.         dist_array[4]=upbj_god_dist;
  8054.         dist_array[3]=upbj_leet_dist;
  8055.         dist_array[2]=upbj_holy_dist;
  8056.         dist_array[1]=upbj_pro_dist;
  8057.         dist_array[0]=upbj_good_dist;
  8058.     }
  8059.     else if(type_jump==Type_Up_Stand_Bhop)
  8060.     {  
  8061.         dist_array[4]=upsbj_god_dist;
  8062.         dist_array[3]=upsbj_leet_dist;
  8063.         dist_array[2]=upsbj_holy_dist;
  8064.         dist_array[1]=upsbj_pro_dist;
  8065.         dist_array[0]=upsbj_good_dist;
  8066.     }
  8067.     else if(type_jump==Type_Real_ladder_Bhop)
  8068.     {  
  8069.         dist_array[4]=real_god_dist;
  8070.         dist_array[3]=real_leet_dist;
  8071.         dist_array[2]=real_holy_dist;
  8072.         dist_array[1]=real_pro_dist;
  8073.         dist_array[0]=real_good_dist;
  8074.     }
  8075.     else if(type_jump==Type_DuckBhop)
  8076.     {  
  8077.         dist_array[4]=duckbhop_god_dist;
  8078.         dist_array[3]=duckbhop_leet_dist;
  8079.         dist_array[2]=duckbhop_holy_dist;
  8080.         dist_array[1]=duckbhop_pro_dist;
  8081.         dist_array[0]=duckbhop_good_dist;
  8082.     }
  8083.    
  8084.     if(mSpeed != 250.0 && type_jump!=Type_ladder)
  8085.     {
  8086.         dist_array[4]=dist_array[4]-t_dist;
  8087.         dist_array[3]=dist_array[3]-t_dist;
  8088.         dist_array[2]=dist_array[2]-t_dist;
  8089.         dist_array[1]=dist_array[1]-t_dist;
  8090.         dist_array[0]=dist_array[0]-t_dist;
  8091.     }
  8092.     return dist_array;
  8093. }
  8094. public fnSaveBeamPos( client ) {
  8095.     if( g_Jumped[client] ) {
  8096.         new Float:vOrigin[3];
  8097.         pev(client, pev_origin, vOrigin);
  8098.        
  8099.         if( gBeam_count[client] < 100 ) {
  8100.             gBeam_points[client][gBeam_count[client]][0] = vOrigin[0];
  8101.             gBeam_points[client][gBeam_count[client]][1] = vOrigin[1];
  8102.             gBeam_points[client][gBeam_count[client]][2] = vOrigin[2];
  8103.            
  8104.             if(preessbutton[client])
  8105.             {
  8106.                 gBeam_button[client][gBeam_count[client]]=true;
  8107.                
  8108.                 if(button_what[client]==1)
  8109.                 {
  8110.                     gBeam_button_what[client][gBeam_count[client]]=1;
  8111.                 }
  8112.                 else if(button_what[client]==2)
  8113.                 {
  8114.                     gBeam_button_what[client][gBeam_count[client]]=2;
  8115.                 }
  8116.             }
  8117.            
  8118.             if(is_user_ducking( client ))
  8119.                 gBeam_duck[client][gBeam_count[client]] = true;
  8120.            
  8121.             gBeam_count[client]++;
  8122.         }
  8123.     }
  8124. }
  8125. public JumpReset(id,num)
  8126. {
  8127.     g_reset[id] = true;
  8128.     //if(num!=26 && num!=1 && num!=29)
  8129.     //ColorChat(id,GREEN,"jump reset %d",num);
  8130. }
  8131.  
  8132. public JumpReset1(id)
  8133. {
  8134.     g_reset[id] = true;
  8135. }
  8136. public ddReset(id)
  8137. {
  8138.     id=id-2311;
  8139.     JumpReset(id,27);
  8140.     //ColorChat(id, GREEN, "reset dd");
  8141. }
  8142. public Color_Chat_Lang(id,Color:type, const msg[], {Float,Sql,Result,_}:...)
  8143. {
  8144.     new message[256];
  8145.  
  8146.     switch(type)
  8147.     {
  8148.         case NORMAL: // clients scr_concolor cvar color
  8149.         {
  8150.             message[0] = 0x01;
  8151.         }
  8152.         case GREEN: // Green
  8153.         {
  8154.             message[0] = 0x04;
  8155.         }
  8156.         default: // White, Red, Blue
  8157.         {
  8158.             message[0] = 0x03;
  8159.         }
  8160.     }
  8161.  
  8162.     vformat(message[1], 251, msg, 4);
  8163.    
  8164.     replace_colors(message,191);
  8165.    
  8166.     ColorChat(id, type, "%s",message);
  8167. }
  8168. public cmdColorChat(id)
  8169. {  
  8170.     if( !gHasColorChat[id] )
  8171.     {
  8172.         gHasColorChat[id] = true;
  8173.        
  8174.         Color_Chat_Lang(id,GREEN,"%L",LANG_SERVER,"UQSTATS_COLORCHAT_E", prefix);
  8175.     }
  8176.     else
  8177.     {
  8178.         gHasColorChat[id] = false;
  8179.        
  8180.         Color_Chat_Lang(id,GREEN,"%L",LANG_SERVER,"UQSTATS_COLORCHAT_D", prefix);
  8181.     }
  8182.    
  8183.     return PLUGIN_CONTINUE;
  8184. }
  8185. public cmdljStats( id ) {
  8186.    
  8187.     if(g_lj_stats[id]==true)
  8188.     {
  8189.         Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_LJSTATS_D", prefix);
  8190.         g_lj_stats[id]=false;
  8191.        
  8192.         if(showpre[id]==true)
  8193.         {
  8194.             showpre[id]=false;
  8195.             oldpre[id]=1;
  8196.         }
  8197.         if(failearly[id]==true)
  8198.         {
  8199.             failearly[id]=false;
  8200.             oldfail[id]=1;
  8201.         }
  8202.         if(ljpre[id]==true)
  8203.         {
  8204.             ljpre[id]=false;
  8205.             oldljpre[id]=1;
  8206.         }
  8207.     }
  8208.     else
  8209.     {
  8210.         if(oldpre[id]==1)
  8211.         {
  8212.             showpre[id]=true;
  8213.             oldpre[id]=0;
  8214.         }
  8215.         if(oldfail[id]==1)
  8216.         {
  8217.             failearly[id]=true;
  8218.             oldfail[id]=0;
  8219.         }
  8220.         if(oldljpre[id]==1)
  8221.         {
  8222.             ljpre[id]=true;
  8223.             oldljpre[id]=0;
  8224.         }
  8225.         g_lj_stats[id]=true;
  8226.         Color_Chat_Lang(id,BLUE,"%L",LANG_SERVER,"UQSTATS_LJSTATS_E", prefix);
  8227.     }
  8228.    
  8229. }
  8230.  
  8231.  
  8232. public cmdVersion( id )
  8233. {      
  8234.     Color_Chat_Lang(id,GREY,"%L",LANG_SERVER,"UQSTATS_VERSION_1", prefix,VERSION);
  8235.    
  8236.     if(kz_sql==1)
  8237.     {
  8238.         Color_Chat_Lang(id,GREY,"%L",LANG_SERVER,"UQSTATS_VERSION_SQL1", prefix);
  8239.         Color_Chat_Lang(id,BLUE,"%L",LANG_SERVER,"UQSTATS_VERSION_SQL2", prefix);
  8240.     }
  8241.     else Color_Chat_Lang(id,BLUE,"%L",LANG_SERVER,"UQSTATS_VERSION_2", prefix);
  8242. }
  8243. public pre_stats(id)
  8244. {  
  8245.     if(kz_stats_pre[id]==true)
  8246.     {
  8247.         Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_PRESTATS_D", prefix);
  8248.         kz_stats_pre[id]=false;
  8249.     }
  8250.     else
  8251.     {
  8252.         kz_stats_pre[id]=true;
  8253.         Color_Chat_Lang(id,BLUE,"%L",LANG_SERVER,"UQSTATS_PRESTATS_E", prefix);
  8254.     }
  8255. }
  8256. public streif_stats(id)
  8257. {  
  8258.     if(streifstat[id]==true)
  8259.     {
  8260.         Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_STRAFESTATS_D", prefix);
  8261.         streifstat[id]=false;
  8262.     }
  8263.     else
  8264.     {
  8265.         streifstat[id]=true;
  8266.         Color_Chat_Lang(id,BLUE,"%L",LANG_SERVER,"UQSTATS_STRAFESTATS_E", prefix);
  8267.     }
  8268. }
  8269. public cmdljbeam(id)
  8270. {
  8271.     if(ingame_strafe[id])
  8272.     {
  8273.         Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_BEAMDONTWORK", prefix);
  8274.     }
  8275.     else
  8276.     {
  8277.         if(kz_beam[id]==true)
  8278.         {
  8279.             Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_BEAMSTATS_D", prefix);
  8280.             kz_beam[id]=false;
  8281.         }
  8282.         else
  8283.         {
  8284.             kz_beam[id]=true;
  8285.             Color_Chat_Lang(id,BLUE,"%L",LANG_SERVER,"UQSTATS_BEAMSTATS_E", prefix);
  8286.         }
  8287.     }
  8288. }
  8289. public show_pre(id)
  8290. {
  8291.     if(showpre[id]==true)
  8292.     {
  8293.         Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_SHOWPRE_D", prefix);
  8294.         showpre[id]=false;
  8295.     }
  8296.     else
  8297.     {
  8298.         showpre[id]=true;
  8299.         Color_Chat_Lang(id,BLUE,"%L",LANG_SERVER,"UQSTATS_SHOWPRE_E", prefix);
  8300.     }
  8301. }
  8302. public show_speed(id)
  8303. {
  8304.     new tmpTeam[33],g_team;
  8305.     get_user_team(id,tmpTeam,32);
  8306.    
  8307.     if(uq_team==0)
  8308.     {
  8309.         g_team=0;
  8310.     }
  8311.     else if(equali(tmpTeam,"TERRORIST"))
  8312.     {
  8313.         g_team=1;
  8314.     }
  8315.     else if(equali(tmpTeam,"CT"))
  8316.     {
  8317.         g_team=2;
  8318.     }
  8319.     else
  8320.     {
  8321.         g_team=uq_team;
  8322.     }
  8323.    
  8324.     if(uq_admins==1 && !player_admin[id])
  8325.     {
  8326.         Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_SPEED_D1", prefix);
  8327.     }
  8328.     else if(g_team!=uq_team && !uq_speed_allteam)
  8329.     {
  8330.         Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_SPEED_D2", prefix);
  8331.     }
  8332.     else
  8333.     {
  8334.         if(jofon[id])
  8335.         {
  8336.             Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_SPEED_D3", prefix);
  8337.         }
  8338.         else
  8339.         {
  8340.             if(speedon[id]==false)
  8341.             {
  8342.                 Color_Chat_Lang(id,BLUE,"%L",LANG_SERVER,"UQSTATS_SPEED_E", prefix);
  8343.                 speedon[id]=true;
  8344.                
  8345.                 set_task(0.1, "DoSpeed", id+212299, "", 0, "b", 0);
  8346.             }
  8347.             else
  8348.             {
  8349.                 speedon[id]=false;
  8350.                
  8351.                 if( task_exists(id+212299, 0) )
  8352.                     remove_task(id+212299, 0);
  8353.                    
  8354.                 Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_SPEED_D", prefix);
  8355.             }
  8356.         }
  8357.     }
  8358. }
  8359. public trainer_jof(id)
  8360. {
  8361.     new tmpTeam[33],g_team;
  8362.     get_user_team(id,tmpTeam,32);
  8363.    
  8364.     if(uq_team==0)
  8365.     {
  8366.         g_team=0;
  8367.     }
  8368.     else if(equali(tmpTeam,"TERRORIST"))
  8369.     {
  8370.         g_team=1;
  8371.     }
  8372.     else if(equali(tmpTeam,"CT"))
  8373.     {
  8374.         g_team=2;
  8375.     }
  8376.     else
  8377.     {
  8378.         g_team=uq_team;
  8379.     }
  8380.    
  8381.     if(uq_admins==1 && !player_admin[id])
  8382.     {
  8383.         Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_JOFTR_D1", prefix);
  8384.     }
  8385.     else if(g_team!=uq_team)
  8386.     {
  8387.         Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_JOFTR_D2", prefix);
  8388.     }
  8389.     else
  8390.     {
  8391.         if(speedon[id])
  8392.         {
  8393.             Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_JOFTR_D3", prefix);
  8394.         }
  8395.         else
  8396.         {
  8397.             if(jofon[id]==false)
  8398.             {
  8399.                 Color_Chat_Lang(id,BLUE,"%L",LANG_SERVER,"UQSTATS_JOFTR_E", prefix);
  8400.                 jofon[id]=true;
  8401.                 jof[id]=0.0;
  8402.                 set_task(0.1, "Dojof", id+212398, "", 0, "b", 0);
  8403.             }
  8404.             else
  8405.             {
  8406.                 jofon[id]=false;
  8407.                
  8408.                 if( task_exists(id+212398, 0) )
  8409.                     remove_task(id+212398, 0);
  8410.                    
  8411.                 Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_JOFTR_D", prefix);
  8412.             }
  8413.         }
  8414.     }
  8415. }
  8416. public speed_type(id)
  8417. {
  8418.     if(speedtype[id]==false)
  8419.     {
  8420.         Color_Chat_Lang(id,BLUE,"%L",LANG_SERVER,"UQSTATS_SPEED_B", prefix);
  8421.         speedtype[id]=true;
  8422.     }
  8423.     else
  8424.     {
  8425.         speedtype[id]=false;
  8426.         Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_SPEED_S", prefix);
  8427.     }
  8428. }
  8429. public show_jheight(id)
  8430. {
  8431.     if(jheight_show[id]==false)
  8432.     {
  8433.         Color_Chat_Lang(id,BLUE,"%L",LANG_SERVER,"UQSTATS_JHEIGH_E", prefix);
  8434.         jheight_show[id]=true;
  8435.     }
  8436.     else
  8437.     {
  8438.         jheight_show[id]=false;
  8439.         Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_JHEIGH_D", prefix);
  8440.     }
  8441. }
  8442. public show_jof(id)
  8443. {
  8444.     if(showjofon[id]==false)
  8445.     {
  8446.         Color_Chat_Lang(id,BLUE,"%L",LANG_SERVER,"UQSTATS_JOF_E", prefix);
  8447.         showjofon[id]=true;
  8448.     }
  8449.     else
  8450.     {
  8451.         showjofon[id]=false;
  8452.         Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_JOF_D", prefix);
  8453.     }
  8454. }
  8455. public show_early(id)
  8456. {
  8457.     if(failearly[id]==false)
  8458.     {
  8459.         Color_Chat_Lang(id,BLUE,"%L",LANG_SERVER,"UQSTATS_BHOPWARN_E", prefix);
  8460.         failearly[id]=true;
  8461.     }
  8462.     else
  8463.     {
  8464.         failearly[id]=false;
  8465.         Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_BHOPWARN_D", prefix);
  8466.     }
  8467. }
  8468. public multi_bhop(id)
  8469. {
  8470.     if(multibhoppre[id]==false)
  8471.     {
  8472.         Color_Chat_Lang(id,BLUE,"%L",LANG_SERVER,"UQSTATS_MULTIBHOP_E", prefix);
  8473.         multibhoppre[id]=true;
  8474.     }
  8475.     else
  8476.     {
  8477.         multibhoppre[id]=false;
  8478.         Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_MULTIBHOP_D", prefix);
  8479.     }
  8480. }
  8481. public duck_show(id)
  8482. {
  8483.     if(showduck[id]==false)
  8484.     {
  8485.         Color_Chat_Lang(id,BLUE,"%L",LANG_SERVER,"UQSTATS_DUCKSPRE_E", prefix);
  8486.         showduck[id]=true;
  8487.     }
  8488.     else
  8489.     {
  8490.         showduck[id]=false;
  8491.         Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_DUCKSPRE_D", prefix);
  8492.     }
  8493. }
  8494. public lj_show(id)
  8495. {
  8496.     if(ljpre[id]==false)
  8497.     {
  8498.         Color_Chat_Lang(id,BLUE,"%L",LANG_SERVER,"UQSTATS_LJPRE_E", prefix);
  8499.         ljpre[id]=true;
  8500.     }
  8501.     else
  8502.     {
  8503.         ljpre[id]=false;
  8504.         Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_LJPRE_D", prefix);
  8505.     }
  8506. }
  8507. public enable_sounds(id)
  8508. {
  8509.     if(uq_sounds)
  8510.     {
  8511.         if(enable_sound[id]==false)
  8512.         {
  8513.             Color_Chat_Lang(id,BLUE,"%L",LANG_SERVER,"UQSTATS_SOUND_E", prefix);
  8514.             enable_sound[id]=true;
  8515.         }
  8516.         else
  8517.         {
  8518.             enable_sound[id]=false;
  8519.             Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_SOUND_D", prefix);
  8520.         }
  8521.     }
  8522.     else Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_SOUND_D1", prefix);
  8523. }
  8524. public ShowedgeFail(id)
  8525. {
  8526.     if(Show_edge_Fail[id]==false)
  8527.     {
  8528.         Color_Chat_Lang(id,BLUE,"%L",LANG_SERVER,"UQSTATS_EDGEF_E", prefix);
  8529.         Show_edge_Fail[id]=true;
  8530.     }
  8531.     else
  8532.     {
  8533.         Show_edge_Fail[id]=false;
  8534.         Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_EDGEF_D", prefix);
  8535.     }
  8536. }
  8537. public Showedge(id)
  8538. {
  8539.     if(Show_edge[id]==false)
  8540.     {
  8541.         Color_Chat_Lang(id,BLUE,"%L",LANG_SERVER,"UQSTATS_EDGE_E", prefix);
  8542.         Show_edge[id]=true;
  8543.     }
  8544.     else
  8545.     {
  8546.         Show_edge[id]=false;
  8547.         Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_EDGE_D", prefix);
  8548.     }
  8549. }
  8550. public heightshow(id)
  8551. {
  8552.     if(height_show[id]==false)
  8553.     {
  8554.         Color_Chat_Lang(id,BLUE,"%L",LANG_SERVER,"UQSTATS_FALLH_E", prefix);
  8555.         height_show[id]=true;
  8556.     }
  8557.     else
  8558.     {
  8559.         height_show[id]=false;
  8560.         Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_FALLH_D", prefix);
  8561.     }
  8562. }
  8563. public ingame_st_stats(id)
  8564. {
  8565.     if(uq_istrafe)
  8566.     {
  8567.         if(kz_beam[id])
  8568.         {
  8569.             Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_ISTRAFE_D1", prefix);
  8570.         }
  8571.         else
  8572.         {
  8573.             if(ingame_strafe[id]==false)
  8574.             {
  8575.                 Color_Chat_Lang(id,BLUE,"%L",LANG_SERVER,"UQSTATS_ISTRAFE_E", prefix);
  8576.                 ingame_strafe[id]=true;
  8577.             }
  8578.             else
  8579.             {
  8580.                 ingame_strafe[id]=false;
  8581.                 Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_ISTRAFE_D", prefix);
  8582.             }
  8583.         }
  8584.     }
  8585.     else Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_ISTRAFE_D2", prefix);
  8586.    
  8587. }
  8588.  
  8589. public client_connect( id )
  8590. {
  8591.     oldljpre[id]=0;
  8592.     oldpre[id]=0;
  8593.     oldfail[id]=0;
  8594.     g_userConnected[id]=true;
  8595.     g_pBot[id]=false;
  8596.    
  8597.     static connectt[30];
  8598.     get_pcvar_string(kz_uq_connect, connectt, 30);
  8599.    
  8600.     format(connectt, 30, "_%s", connectt);
  8601.  
  8602.     if( contain(connectt, "a") > 0 )
  8603.         gHasColorChat[id] =true;
  8604.     else
  8605.         gHasColorChat[id] = false;
  8606.     if( contain(connectt, "b") > 0 )
  8607.         g_lj_stats[id] = true;
  8608.     else
  8609.         g_lj_stats[id] = false;
  8610.     if( contain(connectt, "c") > 0 )
  8611.         speedon[id]=true;
  8612.     else
  8613.         speedon[id]=false;
  8614.     if( contain(connectt, "d") > 0 )
  8615.         showpre[id]=true;
  8616.     else
  8617.         showpre[id]=false;
  8618.     if( contain(connectt, "e") > 0 )
  8619.         streifstat[id]=true;
  8620.     else
  8621.         streifstat[id]=false;
  8622.     if( contain(connectt, "f") > 0 )
  8623.         kz_beam[id]=true;
  8624.     else
  8625.         kz_beam[id]=false;
  8626.     if( contain(connectt, "g") > 0 )
  8627.         kz_stats_pre[id]=true;
  8628.     else
  8629.         kz_stats_pre[id]=false;
  8630.     if( contain(connectt, "h") > 0 )
  8631.         failearly[id]=true;
  8632.     else
  8633.         failearly[id]=false;
  8634.     if( contain(connectt, "i") > 0 )
  8635.         multibhoppre[id]=true;
  8636.     else
  8637.         multibhoppre[id]=false;
  8638.     if( contain(connectt, "j") > 0 )
  8639.         showduck[id]=true;
  8640.     else
  8641.         showduck[id]=false;
  8642.     if( contain(connectt, "k") > 0 )
  8643.         ljpre[id]=true;
  8644.     else
  8645.         ljpre[id]=false;
  8646.     if( contain(connectt, "l") > 0 )
  8647.         Show_edge[id]=true;
  8648.     else
  8649.         Show_edge[id]=false;
  8650.     if( contain(connectt, "m") > 0 )
  8651.         Show_edge_Fail[id]=true;
  8652.     else
  8653.         Show_edge_Fail[id]=false;
  8654.     if( contain(connectt, "n") > 0 )
  8655.         enable_sound[id]=true;
  8656.     else
  8657.         enable_sound[id]=false;
  8658.     if( contain(connectt, "o") > 0 )
  8659.         ingame_strafe[id]=true;
  8660.     else
  8661.         ingame_strafe[id]=false;
  8662.    
  8663.     //for beta
  8664.     //ingame_strafe[id]=true;
  8665.    
  8666.     user_block[id][0]=uq_maxedge;
  8667.     user_block[id][1]=uq_minedge;
  8668.     min_prestrafe[id]=uq_min_pre;
  8669.     beam_type[id]=1;
  8670.     edgeshow[id]=true
  8671.     first_ground_bhopaem[id]=false;
  8672.     donehook[id]=false;
  8673.     OnGround[id]=false;
  8674.     serf_reset[id]=false;
  8675.     first_onground[id]=false;
  8676.     duckstring[id]=false;
  8677.     firstshow[id]=false;
  8678.     height_show[id]=false;
  8679.     Checkframes[id]=false;
  8680.     firstfall_ground[id]=false;
  8681.     h_jumped[id]=false;
  8682.     touch_ent[id]=false;
  8683.     ddafterJump[id]=false;
  8684.     ddstandcj[id]=false;
  8685.     UpcjFail[id]=false;
  8686.     slide_protec[id]=false;
  8687.     posibleScj[id]=false;
  8688.     x_jump[id]=false;
  8689.     ddforcj[id]=false;
  8690.     dropbhop[id]=false;
  8691.     ddnum[id]=0;
  8692.     hookcheck[id]=false;
  8693.     backwards[id]=false;
  8694.     ladderbug[id]=false;
  8695.     touch_somthing[id]=false;
  8696.     record_start[id]=0;
  8697.     duckbhop_bug_pre[id]=false;
  8698.     showtime_st_stats[id]=40;
  8699.     speedtype[id]=false;
  8700.     trigger_protection[id]=false;
  8701.    
  8702.     if(is_user_bot(id))
  8703.     {
  8704.         g_pBot[id]=true;
  8705.     }
  8706.    
  8707.     if( task_exists(id+434490, 0) )
  8708.         remove_task(id+434490, 0);
  8709.        
  8710.     if( task_exists(id, 0) )
  8711.         remove_task(id, 0);
  8712.    
  8713.     if( task_exists(id+89012, 0) )
  8714.         remove_task(id+89012, 0);
  8715.  
  8716.     if( task_exists(id+3313, 0) )
  8717.         remove_task(id+3313, 0);
  8718.    
  8719.     if( task_exists(id+3214, 0) )
  8720.         remove_task(id+3214, 0);
  8721.        
  8722.     if( task_exists(id+15237, 0) )
  8723.         remove_task(id+15237, 0);
  8724.        
  8725.     if( task_exists(id+212299, 0) )
  8726.         remove_task(id+212299, 0);
  8727.        
  8728.     if( task_exists(id+212398, 0) )
  8729.         remove_task(id+212398, 0);
  8730.        
  8731.     if( task_exists(id, 0) )
  8732.         remove_task(id, 0);
  8733.    
  8734. }
  8735.  
  8736.  
  8737. public client_infochanged(id) {
  8738.     new name[65];
  8739.    
  8740.     get_user_info(id, "name", name,64);
  8741.    
  8742.     if(!equali(name, g_playername[id]))
  8743.         copy(g_playername[id], 64, name);
  8744. }
  8745.  
  8746. public ResetHUD(id)
  8747. {
  8748.     if(is_user_alive(id) && !is_user_bot(id) && !is_user_hltv(id) )
  8749.     {
  8750.         if(firstshow[id]==false)
  8751.         {
  8752.             if( uq_airaccel==1 || uq_airaccel==100)
  8753.             {
  8754.                 Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_AIRACCEL100", prefix);
  8755.             }
  8756.             else if( uq_airaccel==0 || uq_airaccel==10)
  8757.             {
  8758.                 Color_Chat_Lang(id,BLUE,"%L",LANG_SERVER,"UQSTATS_AIRACCEL10", prefix);
  8759.             }
  8760.             else
  8761.                 Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_AIRACCEL", prefix,uq_airaccel);       
  8762.                
  8763.             firstshow[id]=true;
  8764.            
  8765.             if(equali(mapname,"slide_gs_longjumps") || equali(mapname,"b2j_slide_longjumps"))
  8766.             {
  8767.                 Color_Chat_Lang(id,RED,"%L",LANG_SERVER,"UQSTATS_SLIDE", prefix);
  8768.             }
  8769.         }
  8770.        
  8771.         firstfall_ground[id]=false;
  8772.         h_jumped[id]=false;
  8773.        
  8774.         ddafterJump[id]=false;
  8775.         UpcjFail[id]=false;
  8776.         slide_protec[id]=false;
  8777.         posibleScj[id]=false;
  8778.         x_jump[id]=false;
  8779.         ddforcj[id]=false;
  8780.         dropbhop[id]=false;
  8781.         ddnum[id]=0;
  8782.         donehook[id]=false;
  8783.         hookcheck[id]=false;
  8784.         backwards[id]=false;
  8785.         Checkframes[id]=false;
  8786.         first_ground_bhopaem[id]=false;
  8787.         touch_ent[id]=false;
  8788.         ladderbug[id]=false;
  8789.         touch_somthing[id]=false;
  8790.         ddstandcj[id]=false;
  8791.     }
  8792.    
  8793. }
  8794. public FwdPlayerSpawn(id)
  8795. {
  8796.     if( is_user_alive(id) && !is_user_bot(id) && !is_user_hltv(id))
  8797.     {
  8798.         if( !task_exists(id+434490, 0) )
  8799.             set_task(1.0, "tskFps", id+434490, "", 0, "b", 0);
  8800.            
  8801.         g_alive[id] = true;
  8802.         strafe_num[id]=0;
  8803.     }
  8804. }
  8805.  
  8806. public FwdPlayerDeath(id)
  8807. {
  8808.     if( task_exists(id, 0) )
  8809.         remove_task(id, 0);
  8810.        
  8811.     if( task_exists(id+434490, 0) )
  8812.         remove_task(id+434490, 0);
  8813.        
  8814.     if( task_exists(id, 0) )
  8815.         remove_task(id, 0);
  8816.    
  8817.     if( task_exists(id+89012, 0) )
  8818.         remove_task(id+89012, 0);
  8819.    
  8820.     if( task_exists(id+3313, 0) )
  8821.         remove_task(id+3313, 0);
  8822.    
  8823.     if( task_exists(id+3214, 0) )
  8824.         remove_task(id+3214, 0);
  8825.        
  8826.     if( task_exists(id+15237, 0) )
  8827.         remove_task(id+15237, 0);
  8828.    
  8829.     if( task_exists(id+212398, 0) )
  8830.         remove_task(id+212398, 0);
  8831.        
  8832.     g_alive[id] = false;
  8833. }
  8834.  
  8835. public client_disconnect(id)
  8836. {
  8837.     if(kz_sql == 1 || kz_sql == 2)
  8838.     {
  8839.         new tmp_str[12];
  8840.         num_to_str(g_sql_pid[id], tmp_str, 11);
  8841.         if(TrieKeyExists(JumpPlayers, tmp_str))
  8842.             TrieDeleteKey(JumpPlayers, tmp_str);
  8843.     }
  8844.    
  8845.     remove_beam_ent(id);
  8846.    
  8847.     player_admin[id]=false;
  8848.     g_pBot[id]=false;
  8849.     login[id]=false;
  8850.     g_userConnected[id]=false;
  8851.     OnGround[id]=false;
  8852.     g_alive[id]=false;
  8853.    
  8854.    
  8855.     if( task_exists(id, 0) )
  8856.         remove_task(id);
  8857.    
  8858.     firstshow[id]=false;
  8859.     if( task_exists(id+434490, 0) )
  8860.         remove_task(id+434490, 0);
  8861.        
  8862.     if( task_exists(id, 0) )
  8863.         remove_task(id, 0);
  8864.    
  8865.     if( task_exists(id+89012, 0) )
  8866.         remove_task(id+89012, 0);
  8867.  
  8868.     if( task_exists(id+3313, 0) )
  8869.         remove_task(id+3313, 0);
  8870.    
  8871.     if( task_exists(id+3214, 0) )
  8872.         remove_task(id+3214, 0);
  8873.        
  8874.     if( task_exists(id+15237, 0) )
  8875.         remove_task(id+15237, 0);
  8876.        
  8877.     if( task_exists(id+212299, 0) )
  8878.         remove_task(id+212299, 0);
  8879.        
  8880.     if( task_exists(id+212398, 0) )
  8881.         remove_task(id+212398, 0);
  8882.        
  8883.     if( task_exists(id, 0) )
  8884.         remove_task(id, 0);
  8885. }
  8886. public reset_tops(id, level, cid)
  8887. {  
  8888.     if( !cmd_access(id, level, cid, 1) ) return PLUGIN_HANDLED;
  8889.    
  8890.     if(kz_sql == 0)
  8891.     {
  8892.         client_print(id,print_console,"%L",LANG_SERVER,"UQSTATS_RESET");
  8893.         server_print("%L",LANG_SERVER,"UQSTATS_RESET");
  8894.        
  8895.         TrieClear(JData);
  8896.         TrieClear(JData_Block);
  8897.     }
  8898.     else if(kz_sql == 1)
  8899.     {
  8900.         client_print(id,print_console,"%L",LANG_SERVER,"UQSTATS_RESETF");
  8901.         server_print("%L",LANG_SERVER,"UQSTATS_RESETF");
  8902.     }
  8903.        
  8904.     return PLUGIN_CONTINUE;
  8905. }
  8906. public Option(id)
  8907. {  
  8908.     new MenuBody[512], len, keys;
  8909.     len = format(MenuBody, 511, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU1");
  8910.    
  8911.     if(g_lj_stats[id]==true)
  8912.     {
  8913.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU11a");
  8914.         keys |= (1<<0);
  8915.     }
  8916.     else
  8917.     {
  8918.         keys |= (1<<0);
  8919.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU11b");
  8920.     }
  8921.    
  8922.     if(gHasColorChat[id]==true)
  8923.     {
  8924.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU12a");
  8925.         keys |= (1<<1);
  8926.     }
  8927.     else
  8928.     {
  8929.         keys |= (1<<1);
  8930.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU12b");
  8931.     }
  8932.    
  8933.     if(speedon[id]==true)
  8934.     {
  8935.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU13a");
  8936.         keys |= (1<<2);
  8937.     }
  8938.     else
  8939.     {
  8940.         keys |= (1<<2);
  8941.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU13b");
  8942.     }
  8943.    
  8944.     if(showpre[id]==true)
  8945.     {
  8946.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU14a");
  8947.         keys |= (1<<3);
  8948.     }
  8949.     else
  8950.     {
  8951.         keys |= (1<<3);
  8952.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU14b");
  8953.     }
  8954.    
  8955.     if(streifstat[id]==true)
  8956.     {
  8957.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU15a");
  8958.         keys |= (1<<4);
  8959.     }
  8960.     else
  8961.     {
  8962.         keys |= (1<<4);
  8963.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU15b");
  8964.     }
  8965.    
  8966.     if(kz_beam[id]==true)
  8967.     {
  8968.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU16a");
  8969.         keys |= (1<<5);
  8970.     }
  8971.     else
  8972.     {
  8973.         keys |= (1<<5);
  8974.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU16b");
  8975.     }
  8976.    
  8977.     if(showduck[id]==true)
  8978.     {
  8979.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU17a");
  8980.         keys |= (1<<6);
  8981.     }
  8982.     else
  8983.     {
  8984.         keys |= (1<<6);
  8985.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU17b");
  8986.     }
  8987.     if(failearly[id]==true)
  8988.     {
  8989.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU18a");
  8990.         keys |= (1<<7);
  8991.     }
  8992.     else
  8993.     {
  8994.         keys |= (1<<7);
  8995.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU18b");
  8996.     }
  8997.  
  8998.     len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENUNEXT");
  8999.     keys |= (1<<8);
  9000.        
  9001.     len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENUEXIT");
  9002.     keys |= (1<<9);
  9003.    
  9004.     show_menu(id, keys, MenuBody, -1, "StatsOptionMenu1")
  9005. }
  9006.  
  9007. public OptionMenu1(id, key)
  9008. {
  9009.     switch((key+1))
  9010.     {
  9011.         case 1:
  9012.         {
  9013.             cmdljStats(id);
  9014.             Option(id);
  9015.            
  9016.         }
  9017.         case 2:
  9018.         {
  9019.             cmdColorChat(id);
  9020.             Option(id);
  9021.         }
  9022.         case 3:
  9023.         {
  9024.             show_speed(id);
  9025.             Option(id);
  9026.         }
  9027.         case 4:
  9028.         {
  9029.             show_pre(id);
  9030.             Option(id);
  9031.         }
  9032.         case 5:
  9033.         {
  9034.             streif_stats(id);
  9035.             Option(id);
  9036.         }
  9037.         case 6:
  9038.         {
  9039.             cmdljbeam(id);
  9040.             Option(id);
  9041.         }
  9042.         case 7:
  9043.         {
  9044.             duck_show(id);
  9045.             Option(id);
  9046.         }
  9047.         case 8:
  9048.         {
  9049.             show_early(id);
  9050.             Option(id);
  9051.         }
  9052.         case 9:
  9053.         {
  9054.             Option2(id);
  9055.         }
  9056.  
  9057.     }
  9058.     return PLUGIN_HANDLED;
  9059. }
  9060. public Option2(id)
  9061. {  
  9062.     new MenuBody[512], len, keys;
  9063.     len = format(MenuBody, 511, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU2");
  9064.    
  9065.     if(multibhoppre[id]==true)
  9066.     {
  9067.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU21a");
  9068.         keys |= (1<<0);
  9069.     }
  9070.     else
  9071.     {
  9072.         keys |= (1<<0);
  9073.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU21b");
  9074.     }
  9075.     if(Show_edge[id]==true)
  9076.     {
  9077.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU22a");
  9078.         keys |= (1<<1);
  9079.     }
  9080.     else
  9081.     {
  9082.         keys |= (1<<1);
  9083.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU22b");
  9084.     }
  9085.     if(Show_edge_Fail[id]==true)
  9086.     {
  9087.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU23a");
  9088.         keys |= (1<<2);
  9089.     }
  9090.     else
  9091.     {
  9092.         keys |= (1<<2);
  9093.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU23b");
  9094.     }
  9095.    
  9096.     len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU24",user_block[id][1]);
  9097.     keys |= (1<<3);
  9098.     len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU25",user_block[id][0]);
  9099.     keys |= (1<<4);
  9100.     len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU26",min_prestrafe[id]);
  9101.     keys |= (1<<5);
  9102.    
  9103.     if(beam_type[id]==1)
  9104.     {
  9105.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU27a");
  9106.         keys |= (1<<6);
  9107.     }
  9108.     else if(beam_type[id]==2)
  9109.     {
  9110.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU27b");
  9111.         keys |= (1<<6);
  9112.     }
  9113.    
  9114.    
  9115.     len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU2BACK");
  9116.     keys |= (1<<7);
  9117.     len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU2NEXT");
  9118.     keys |= (1<<8);
  9119.     len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENUEXIT");
  9120.     keys |= (1<<9);
  9121.    
  9122.     show_menu(id, keys, MenuBody, -1, "StatsOptionMenu2");
  9123.        
  9124. }
  9125.  
  9126. public OptionMenu2(id, key)
  9127. {
  9128.     switch((key+1))
  9129.     {
  9130.         case 1:
  9131.         {
  9132.             multi_bhop(id);
  9133.             Option2(id);   
  9134.         }
  9135.         case 2:
  9136.         {
  9137.             Showedge(id);
  9138.             Option2(id);   
  9139.         }
  9140.         case 3:
  9141.         {
  9142.             ShowedgeFail(id);
  9143.             Option2(id);   
  9144.         }
  9145.         case 4:
  9146.         {
  9147.             user_block[id][1]=user_block[id][1]+10;
  9148.             if(user_block[id][1]>=user_block[id][0])
  9149.             {
  9150.                 user_block[id][1]=uq_minedge;
  9151.             }
  9152.             Option2(id);   
  9153.         }
  9154.         case 5:
  9155.         {
  9156.             if(user_block[id][0]==uq_maxedge)
  9157.             {
  9158.                 user_block[id][0]=user_block[id][1];
  9159.                 client_print(id,print_center,"%L",LANG_SERVER,"UQSTATS_OPTIONMENU2MAXVALUE1",uq_maxedge);
  9160.             }
  9161.             user_block[id][0]=user_block[id][0]+10;
  9162.             Option2(id);   
  9163.         }
  9164.         case 6:
  9165.         {
  9166.             if(min_prestrafe[id]>=320)
  9167.             {
  9168.                 min_prestrafe[id]=0;
  9169.                 client_print(id,print_center,"%L",LANG_SERVER,"UQSTATS_OPTIONMENU2MAXVALUE2");
  9170.             }
  9171.             min_prestrafe[id]=min_prestrafe[id]+20;
  9172.             Option2(id);   
  9173.         }
  9174.         case 7:
  9175.         {
  9176.             if(beam_type[id]==1)
  9177.             {
  9178.                 beam_type[id]=2;
  9179.                 client_print(id,print_center,"%L",LANG_SERVER,"UQSTATS_OPTIONMENU2BEAMT1");
  9180.             }
  9181.             else
  9182.             {
  9183.                 beam_type[id]=1;
  9184.                 client_print(id,print_center,"%L",LANG_SERVER,"UQSTATS_OPTIONMENU2BEAMT2");
  9185.             }
  9186.             Option2(id);   
  9187.         }
  9188.         case 8:
  9189.         {
  9190.             Option(id);
  9191.         }
  9192.         case 9:
  9193.         {
  9194.             Option3(id);   
  9195.         }
  9196.     }
  9197.     return PLUGIN_HANDLED;
  9198. }
  9199. public Option3(id)
  9200. {  
  9201.     new MenuBody[512], len, keys;
  9202.     len = format(MenuBody, 511, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU3");
  9203.    
  9204.     if(enable_sound[id]==true)
  9205.     {
  9206.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU31a");
  9207.         keys |= (1<<0);
  9208.     }
  9209.     else
  9210.     {
  9211.         keys |= (1<<0);
  9212.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU31b");
  9213.     }
  9214.     if(showjofon[id]==true)
  9215.     {
  9216.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU32a");
  9217.         keys |= (1<<1);
  9218.     }
  9219.     else
  9220.     {
  9221.         keys |= (1<<1);
  9222.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU32b");
  9223.     }
  9224.     if(height_show[id])
  9225.     {
  9226.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU33a");
  9227.         keys |= (1<<2);
  9228.     }
  9229.     else
  9230.     {
  9231.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU33b");
  9232.         keys |= (1<<2);
  9233.     }
  9234.     if(jofon[id])
  9235.     {
  9236.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU34a");
  9237.         keys |= (1<<3);
  9238.     }
  9239.     else
  9240.     {
  9241.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU34b");
  9242.         keys |= (1<<3);
  9243.     }
  9244.     if(jheight_show[id])
  9245.     {
  9246.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU35a");
  9247.         keys |= (1<<4);
  9248.     }
  9249.     else
  9250.     {
  9251.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU35b");
  9252.         keys |= (1<<4);
  9253.     }
  9254.     if(uq_istrafe)
  9255.     {
  9256.         if(ingame_strafe[id])
  9257.         {
  9258.             len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU36a");
  9259.             keys |= (1<<5);
  9260.         }
  9261.         else
  9262.         {
  9263.             len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU36b");
  9264.             keys |= (1<<5);
  9265.         }
  9266.        
  9267.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU38",showtime_st_stats[id]/10);
  9268.    
  9269.         keys |= (1<<6);
  9270.     }
  9271.     else
  9272.     {
  9273.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU37");
  9274.         len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU38F",showtime_st_stats[id]/10);
  9275.     }
  9276.        
  9277.     len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENU3BACK");
  9278.     keys |= (1<<8);
  9279.        
  9280.     len += format(MenuBody[len], 511-len, "%L",LANG_SERVER,"UQSTATS_OPTIONMENUEXIT");
  9281.     keys |= (1<<9);
  9282.    
  9283.     show_menu(id, keys, MenuBody, -1, "StatsOptionMenu3");
  9284.        
  9285. }
  9286. public OptionMenu3(id, key)
  9287. {
  9288.     switch((key+1))
  9289.     {
  9290.         case 1:
  9291.         {
  9292.             enable_sounds(id);
  9293.             Option3(id);   
  9294.         }
  9295.         case 2:
  9296.         {
  9297.             show_jof(id);
  9298.             Option3(id);   
  9299.         }
  9300.         case 3:
  9301.         {
  9302.             heightshow(id);
  9303.             Option3(id);   
  9304.         }
  9305.         case 4:
  9306.         {
  9307.             trainer_jof(id);
  9308.             Option3(id);
  9309.         }
  9310.         case 5:
  9311.         {
  9312.             show_jheight(id);
  9313.             Option3(id);
  9314.         }
  9315.         case 6:
  9316.         {
  9317.             ingame_st_stats(id);
  9318.             Option3(id);
  9319.         }
  9320.         case 7:
  9321.         {
  9322.             if(showtime_st_stats[id]==200)
  9323.             {
  9324.                 client_print(id,print_center,"%L",LANG_SERVER,"UQSTATS_OPTIONMENU3MAXSEC");
  9325.                 showtime_st_stats[id]=0;
  9326.             }
  9327.             showtime_st_stats[id]=showtime_st_stats[id]+10;
  9328.  
  9329.             Option3(id);
  9330.         }
  9331.    
  9332.         case 9:
  9333.         {
  9334.             Option2(id);   
  9335.         }
  9336.     }
  9337.     return PLUGIN_HANDLED;
  9338. }
  9339. public native_kz_get_configsdir(name[], len)
  9340. {
  9341.     param_convert(1);
  9342.     new lalin[64];
  9343.     get_localinfo("amxx_configsdir", lalin,63);
  9344.     return formatex(name, len, "%s/%s", lalin, KZ_DIR);
  9345. }
  9346.  
  9347. public plugin_end()
  9348. {
  9349.     if(kz_sql == 1)
  9350.     {
  9351.         if(DB_TUPLE)
  9352.             SQL_FreeHandle(DB_TUPLE);
  9353.         if(SqlConnection)
  9354.             SQL_FreeHandle(SqlConnection);
  9355.        
  9356.         TrieDestroy(JumpPlayers);
  9357.     }
  9358.     else if(kz_sql == 0)
  9359.     {
  9360.         TrieDestroy(JData);
  9361.         TrieDestroy(JData_Block);
  9362.     }
  9363. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement