Advertisement
Guest User

Anti ProAim and Anti Silent aim By Scriptery

a guest
Mar 8th, 2017
1,969
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. // ANTI AIMBOT by Scriptery v0.1
  2. // if you find a bug, contact me in PM.
  3. // Next update: Detect renko, and stabilization anticheat for kick player
  4. #include <a_samp>
  5.  
  6. new SilentAimCount[MAX_PLAYERS],ProAimCount[MAX_PLAYERS];
  7.  
  8. public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
  9. {
  10. new string[200];
  11. if(weaponid != 38 && weaponid > 18 && weaponid < 34 && hittype == 1)
  12. {
  13. new Float:cood[6],Float:DistantaAim,armaaim[128];
  14. GetPlayerPos(hitid,cood[0],cood[1],cood[2]);
  15. DistantaAim = GetPlayerDistanceFromPoint(playerid,cood[0],cood[1],cood[2]);
  16. GetWeaponName(weaponid,armaaim,sizeof(armaaim));
  17.  
  18. if(GetPlayerTargetPlayer(playerid) == INVALID_PLAYER_ID && DistantaAim > 1 && DistantaAim < 31)
  19. {
  20. SilentAimCount[playerid]++;
  21. if(SilentAimCount[playerid] >= 10)
  22. {
  23. SilentAimCount[playerid] = 0;
  24. format(string, sizeof(string), "Warning: %s(%d) possible use Silent Aim cheat with %s (Distance: %f meters)", GetName(playerid),playerid, armaaim, DistantaAim);
  25. SendToAdmins(string);
  26. }
  27. return 1;
  28. }
  29. GetPlayerLastShotVectors(playerid, cood[0],cood[1],cood[2], cood[3],cood[4],cood[5]);
  30. if(!IsPlayerInRangeOfPoint(hitid, 3.0, cood[3],cood[4],cood[5]))
  31. {
  32. ProAimCount[playerid]++;
  33. if(ProAimCount[playerid] >= 5)
  34. {
  35. ProAimCount[playerid] = 0;
  36. format(string, sizeof(string), "Warning: %s(%d) possible use ProAim cheat with: %s (Distance: %f meters)", GetName(playerid),playerid,armaaim, DistantaAim);
  37. SendToAdmins(string);
  38. }
  39. }
  40. }
  41. return 1;
  42. }
  43. public OnFilterScriptInit()
  44. {
  45. print("Anti aimbot by Scriptery loaded !");
  46. return 1;
  47. }
  48. stock SendToAdmins(string2[])
  49. {
  50. for(new i; i < MAX_PLAYERS; i++)
  51. {
  52. if(IsPlayerConnected(i) && IsPlayerAdmin(i))
  53. {
  54. SendClientMessage(i,0xE60000FF,string2);
  55. }
  56. }
  57. }
  58. stock GetName(playerid)
  59. {
  60. new Name[MAX_PLAYER_NAME];
  61. GetPlayerName(playerid, Name, sizeof(Name));
  62. return Name;
  63. }
  64. /*
  65. public OnPlayerSpawn(playerid)
  66. {
  67. SetPlayerPos(playerid,0,0,3);
  68. GivePlayerWeapon(playerid,24,999);
  69. GivePlayerWeapon(playerid,30,999);
  70. return 1;
  71. }
  72. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement