Advertisement
Guest User

xviperx

a guest
Jun 27th, 2008
5,584
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. //anti-cheat by viper
  2. //so far only 1 hack is covered but more is being developed
  3. //please dont remove credits
  4.  
  5.  
  6. #include <a_samp>
  7.  
  8.  
  9. #define FILTERSCRIPT
  10.  
  11. #if defined FILTERSCRIPT
  12.  
  13. #define COLOR_RED 0xFF0000AA
  14.  
  15. new banning[MAX_PLAYERS];
  16.  
  17. forward banningtimer();//timer for when getting banned
  18. forward weaponanti();//checks if a player has an illegal weapon
  19.  
  20. public OnFilterScriptInit()
  21. {
  22. print("\n--------------------------------------");
  23. print(" Anti-cheat by viper");
  24. print("--------------------------------------\n");
  25.  
  26. SetTimer("weaponanti",5000,1);
  27. return 1;
  28. }
  29.  
  30. public OnFilterScriptExit()
  31. {
  32. return 1;
  33. }
  34.  
  35. #endif
  36.  
  37. public OnPlayerConnect(playerid)
  38. {
  39. SendClientMessage(playerid,COLOR_RED,"this server is protected by viper's anti-cheat");
  40. return 1;
  41. }
  42.  
  43. public banningtimer()
  44. {
  45. for (new i = 0; i < MAX_PLAYERS; i++)
  46. {
  47. if(banning[i] == 1)
  48. {
  49. Ban(i);
  50. }
  51. }
  52. }
  53.  
  54. public weaponanti()
  55. {
  56. for (new i = 0; i < MAX_PLAYERS; i++)
  57. {
  58. if (GetPlayerWeapon(i) == 38 || GetPlayerWeapon(i) == 35 || GetPlayerWeapon(i) == 36)
  59. {
  60. new pname[200];
  61. new string[200];
  62. GetPlayerName(i, pname, sizeof(pname));
  63. format(string, sizeof(string), "(ANTI-CHEAT BAN) %s has been banned by the anti-cheat system for weapon hacking", pname);
  64. SendClientMessageToAll(COLOR_RED,string);
  65. SetTimer("banningtimer",2000,0);
  66. banning[i] =1;
  67. }
  68. }
  69. }
  70.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement