seroff

Anti cl_filterstuffcmd 1.5 By Seroff

Dec 27th, 2015
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.82 KB | None | 0 0
  1. #include <amxmodx>
  2.  
  3. #define CONFIG_FILE "addons/amxmodx/configs/anti_filtercmd.cfg"
  4. #define LOG_FILE "addons/amxmodx/logs/Detect_FilterCMD.log"
  5.  
  6. new szName[32],ip[33][26],g_Logs,g_Time,g_iSayText,szFileComment[33];
  7. new g_print[][] = { "[Anti-Cheat] *********************","[Anti-Cheat] Требуеться прописать cl_filterstuffcmd 0 в консоле" };
  8.  
  9. static PLUGIN[][]={ "Anti cl_filterstuffcmd", "1.5", "Seroff" };
  10.  
  11. public plugin_init(){
  12. register_plugin(PLUGIN[0], PLUGIN[1], PLUGIN[2]);
  13. g_Logs = register_cvar("filtercmd_logs","1");
  14. g_Time = register_cvar("filtercmd_task","5.0");
  15. }
  16.  
  17. public plugin_cfg(){
  18. if(!file_exists(CONFIG_FILE)){
  19. formatex(szFileComment,sizeof(szFileComment)-1,"// %s v%s By %s^n",PLUGIN[0],PLUGIN[1],PLUGIN[2]);
  20. write_file(CONFIG_FILE,szFileComment,-1);
  21. write_file(CONFIG_FILE,"filtercmd_logs ^"1^" // Логи^nfiltercmd_task ^"5.0^" // Таймаут проверки^n",-1);
  22. write_file(CONFIG_FILE,"echo ^"^"^necho ^"Anti cl_filterstuffcmd Config Executed^"^necho ^"^"^n",-1);
  23. write_file(CONFIG_FILE,"// Контактные данные: skype: cheats-2013; vk: vk.com/sachoc_pro",-1);
  24. write_file(CONFIG_FILE,"",-1);
  25. }
  26. server_cmd("exec %s",CONFIG_FILE);
  27. server_exec();
  28. }
  29.  
  30. public client_putinserver(id){
  31. new Float:iTime=get_pcvar_float(g_Time);
  32. set_task(iTime, "query_client", id, _, _, "b");
  33. g_iSayText = get_user_msgid("SayText");
  34. }
  35.  
  36. public client_connect(id){
  37. set_task(0.1, "query_client", id);
  38. }
  39.  
  40. public client_disconnect(id){
  41. remove_task(id);
  42. }
  43.  
  44. public query_client(id){
  45. query_client_cvar(id, "cl_filterstuffcmd", "cvar_result_pitch");
  46. }
  47.  
  48. public cvar_result_pitch(id, const cvar[], const value[]){
  49. if(!is_user_bot(id)&&!is_user_hltv(id)) {
  50. if( value[0] != 'B' ) {
  51. if ((!strcmp(cvar, "cl_filterstuffcmd", 1)) && (str_to_num(value) != 0)) {
  52. get_user_name(id, szName, sizeof(szName)-1);
  53. get_user_ip(id,ip[id],25, 1);
  54. ColorChat(0, "^4[^3Anti-Cheat^4]^3Игрок ^4%s ^3Использует ^4[^3cl_filterstuffcmd %s^4]",szName, value);
  55. client_print(id,print_console,"%s",g_print[0]);
  56. client_print(id,print_console,"[Anti-Cheat] Ник: %s | IP: %s",szName,ip[id]);
  57. client_print(id,print_console,"%s",g_print[1]);
  58. client_print(id,print_console,"%s",g_print[0]);
  59. new iLogsEnable=get_pcvar_num(g_Logs);
  60. if(iLogsEnable){
  61. log_to_file(LOG_FILE,"[Steam Filter CMD] DETECT «%s» | Reason : [cl_filterstuffcmd %s]",szName,value);
  62. }
  63. server_cmd("kick #%d ^"cl_filterstuffcmd %s Detected^"", get_user_userid(id), value);
  64. }
  65. }
  66. }
  67. }
  68.  
  69. ColorChat(id, fmt[], any:...){
  70. new szMsg[192];
  71. szMsg[0] = 0x04;
  72. vformat(szMsg[1], charsmax(szMsg)-1, fmt, 3);
  73. message_begin(id ? MSG_ONE : MSG_ALL, g_iSayText, _, id)
  74. {
  75. write_byte(id ? id : 1);
  76. write_string(szMsg);
  77. }
  78. message_end();
  79. }
Add Comment
Please, Sign In to add comment