Advertisement
SkazzY

Untitled

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