Advertisement
Hunter_Force

Anti Cheats Full Pack V1.0

Sep 3rd, 2012
978
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.59 KB | None | 0 0
  1. /*  CROSS_Hunter's Anti Cheat Pack
  2.  *
  3.  *  © Copyright 2012, CROSS_HUNTER , sa-mp team and Wiki-SAMP
  4.  *
  5.  */
  6.  
  7. #if defined _AMH_included
  8.     #endinput
  9. #endif
  10. #include <a_samp>
  11. #define _AMH_included
  12. #define CheckHacks 1 // checks the players hack in seconds its currently on '1'
  13. #pragma tabsize 0
  14.  
  15. //--------------Forwards-----------
  16. /*forward HealthHack(playerid);
  17. forward MoneyHack(playerid);
  18. forward ArmourHack(playerid);
  19. forward VHH(playerid);
  20. forward AntiCheat(playerid);
  21. forward IlegalWeapons(playerid);
  22. forward JetPack(playerid);*/
  23. //---------------Anti Cheat-----------
  24. new Float:health;
  25. new Float:armour;
  26. new Float:vehhealth; //changed it to vehhealth duel to confilcts with other GMs
  27. //---------------------------------
  28. new vehicle;
  29. new Reason =0; // never change this
  30. new Action_Taken =1; //you have to change this in order for Anti Cheat to Work
  31. // 1 = Ban
  32. // 2 = Kick
  33. //----------Functions---------------
  34. /*
  35. Usage: //Thanks to ikkentim for the Notice it had to be added to ur GM instead of repeating OnPlayerUpdate it may make a Conflict
  36. MoneyHack(playerid);
  37. JetPack(playerid);
  38. IlegalWeapons(playerid);
  39. */
  40. stock HealthHack(playerid)
  41. {
  42.    
  43.     if(GetPlayerHealth(playerid,health) > 100)
  44.     {
  45.     Reason =1;
  46.     return 1;
  47.     }
  48.     return 0;
  49. }
  50. stock ArmourHack(playerid)
  51. {
  52.  
  53.     if(GetPlayerArmour(playerid, armour) > 100)
  54.     {
  55.     Reason =2;
  56.     return 1;
  57.     }
  58.     return 0;
  59. }
  60. stock MoneyHack(playerid)
  61. {
  62.     if(GetPlayerMoney(playerid) >= 5000000) //change it as you want this is the amount that if the player exceeded he gets banned its currently on '5 million'
  63.     {
  64.     Reason =3;
  65.     return 1;
  66.     }
  67.     return 0;
  68. }
  69. stock VHH(playerid)
  70. {
  71.     if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  72.     {
  73.     vehicle = GetPlayerVehicleID(playerid);
  74.     if(GetVehicleHealth(vehicle, vehhealth) > 1000)
  75.     {
  76.     Reason =4;
  77.     return 1;
  78.         }
  79.     }
  80.     return 0;
  81. }
  82. stock AntiCheat(playerid)
  83. {
  84. if(Action_Taken == 1 && Reason >= 1)
  85. {
  86. Ban(playerid);
  87. return 1;
  88. }
  89. if(Action_Taken == 2 && Reason >= 1)
  90. {
  91. Kick(playerid);
  92. return 1;
  93. }
  94.  return 0;
  95. }
  96. stock IlegalWeapons(playerid)
  97. {
  98.  
  99. if(GetPlayerWeapon(playerid) == 16 || GetPlayerWeapon(playerid) == 17 || GetPlayerWeapon(playerid) == 35 ||
  100.     GetPlayerWeapon(playerid) == 36 || GetPlayerWeapon(playerid) == 37 || GetPlayerWeapon(playerid) == 38 ||
  101.     GetPlayerWeapon(playerid) == 39 || GetPlayerWeapon(playerid) == 40 || GetPlayerWeapon(playerid) == 18)
  102.     {
  103.     Reason =5;
  104.  
  105.         return 1;
  106.     }
  107.     return 1;
  108.     }
  109. stock JetPack(playerid)
  110. {
  111. if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
  112. {
  113.               Reason =6;
  114.                return 1;
  115. }
  116.     return 1;
  117. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement