Advertisement
Guest User

asdadad

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