seroff

Check Strafe-Macros 1.0 By Seroff

Dec 27th, 2015
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <fakemeta>
  5. #include <colorchat>
  6.  
  7. #define PLUGIN "Check Strafe-Macros"
  8. #define VERSION "1.0"
  9. #define AUTHOR "Seroff"
  10.  
  11. new WarAngles[33]
  12. new Float:OldAngles[33][3],Float:WarOldAngles[33][3];
  13.  
  14. new g_ban_type,g_Check_Strafe;
  15.  
  16. public plugin_init() {
  17. register_plugin(PLUGIN, VERSION, AUTHOR)
  18. g_Check_Strafe=register_cvar("Check_Strafe", "1");
  19. g_ban_type=register_cvar("Ban_Type", "1");
  20. register_forward(FM_CmdStart, "Player_CmdStart");
  21. }
  22.  
  23. public Player_CmdStart(id, uc_handle)
  24. {
  25. if(get_pcvar_num(g_Check_Strafe) && is_user_alive(id))
  26. {
  27. static Float:Speed[3];
  28. pev(id,pev_velocity,Speed);
  29. if(!(pev(id,pev_movetype) == MOVETYPE_FLY)
  30. && !(pev(id,pev_flags) & (FL_ONGROUND | FL_FLY | FL_FROZEN))
  31. && !(floatround(vector_length(Speed), floatround_floor) > 555))
  32. {
  33. if(pev(id, pev_button) & IN_LEFT
  34. || pev(id, pev_button) & IN_RIGHT)
  35. {
  36. WarAngles[id] = 0;
  37. Speed[0] *= 0.3; Speed[1] *= 0.3;
  38. set_pev(id, pev_velocity, Speed);
  39. }
  40. if(get_pdata_int(id, 247, 5) & (IN_MOVELEFT | IN_MOVERIGHT | IN_FORWARD | IN_BACK))
  41. {
  42. static Float:Angles[3]; pev(id,pev_angles,Angles);
  43. if(Angles[0] == OldAngles[id][0] && Angles[1] != OldAngles[id][1])
  44. {
  45. if(get_pdata_int(id, 247, 5) & (IN_MOVELEFT | IN_MOVERIGHT | IN_FORWARD | IN_BACK))
  46. {
  47. static Float:Angles[3]; pev(id,pev_angles,Angles);
  48. if(Angles[0] == WarOldAngles[id][0] && Angles[1] != WarOldAngles[id][1])
  49. {
  50. console_cmd(id,"+mlook");
  51. if(++WarAngles[id] >= 5)
  52. {
  53. new szName[32],szIP[32];
  54. get_user_name(id, szName, charsmax(szName));
  55. get_user_ip(id, szIP, charsmax(szIP));
  56.  
  57. user_kill(id,1);
  58. WarAngles[id] = 0;
  59. switch(get_pcvar_num(g_ban_type))
  60. {
  61. case 0: server_cmd("kick #%d ^"Fake Strafe Detected^"",get_user_userid(id));
  62. case 1: server_cmd("amx_ban 0 %s ^"Fake Strafe Detected^"",szIP);
  63. }
  64. ColorChat(0,NORMAL,"[^3Анти-Чит^1]Игрок ^4%s ^1Использует [^4Fake Strafe^1]",szName);
  65. }
  66. }
  67. else WarAngles[id] = 0;
  68. WarOldAngles[id] = OldAngles[id];
  69. }
  70. else return FMRES_IGNORED;
  71. }
  72. else WarAngles[id] = 0;
  73. OldAngles[id] = Angles;
  74. }
  75. else return FMRES_IGNORED;
  76. }
  77. else WarAngles[id] = 0;
  78. }
  79. return FMRES_IGNORED;
  80. }
Advertisement
Add Comment
Please, Sign In to add comment