Advertisement
DiazSRB

Memory Anticheat

Jul 3rd, 2020
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.82 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. forward OnClientCheckResponse(playerid, actionid, memaddr, retndata);
  4.  
  5. static const __NORMAL_ADDRESS[] =
  6. {
  7. 0x00749B93,0x1C5040F0,0x00000000,0x1C2F50E0,
  8. 0x14CA8648,0x0177F800,0x00000000,0x0053408E,
  9. 0x1C2F50E0,0x00734B90,0x00000000,0x00000016,
  10. 0x14CA8648,0x04A9F01D,0x00000016,0x0515F9D0,
  11. 0x14CA8648,0x14CA8648,0x0177F81C,0x04AAFFB7,
  12. 0x00000016,0x000000BF,0x15F4F4C8,0x00000016,
  13. 0x14CA8648,0x0177FA4C,0x04A1929C,0x00000016,
  14. 0x05128190,0x00000001,0x0177F964,0x00000016,
  15. 0x000000BF,0x00000048,0x00000048,0x00000040,
  16. 0x0177F964,0x0080E700,0x0F9FDE80,0x00000004,
  17. 0x00000986,0x00000000,0x00000052,0x0000BAF6,
  18. 0x00000050,0x00000000,0x017A0970,0x00000002,
  19. 0x00000000,0x00000050,0x00000052,0x00C4D958,
  20. 0x00000010,0x0A29B5EC,0x00000004,0x00000000,
  21. 0x00805769,0x017A20F4,0x00C9BC50,0x00000052,
  22. 0x0178657C,0x007EF657,0x017A0970,0x0178657C,
  23. 0x00000000,0x00000052,0x3F78196A,0x006C6293,
  24. 0x006C62AD,0x00000052,0x00000052,0x006C62B5,
  25. 0x15618FC4,0x00A95094,0x0000021C,0x00C4E4F8,
  26. 0xC1F7AF37,0x3FF1A19A,0x00000000,0x3F25F734,
  27. 0x412A20CD,0x00000000,0x00000000,0x3DCCCCCD,
  28. 0x3F77A3AF,0xBD719680,0xBE7C6F8F,0x3F7FBE2A,
  29. 0x3E7BF804,0xBC740004,0x3F781984,0xC1A9166B,
  30. 0x3DB65369,0xBF64AA43,0x0177F97C,0x0177FA4C,
  31. 0x0177FA94,0x0177FA94,0x04A1FB11,0x05128190,
  32. 0x0177FA4C,0x00000001,0x0177FAA8,0x04AE0E7B,
  33. 0x00000000,0x04A3AEE0,0x0177FA90,0x000000BF,
  34. 0x00000016,0x04A3AE99,0x05164F42,0x05164F40,
  35. 0x00000000,0x00000060,0x00000060,0x0000005C,
  36. 0x05167F50,0x69953400,0x05DE6000,0x0177F9A4,
  37. 0x0F9F1080,0x6995344D,0x3E7BF7C6,0x0F9FB430,
  38. 0x00000000,0x00000000,0x00000000,0x00000780,
  39. 0x00000438,0x0FBDB750,0x00000000,0x00000000
  40. };
  41.  
  42. public OnPlayerConnect(playerid)
  43. {
  44. SendClientCheck(playerid, 5, 0, 0, 2);
  45. return 1;
  46. }
  47.  
  48. public OnClientCheckResponse(playerid, actionid, memaddr, retndata)
  49. {
  50. switch(actionid)
  51. {
  52. case 5:
  53. {
  54. if(memaddr < 0x400000 || memaddr > 0x856E00)
  55. {
  56. // lose adrese - kikuj
  57. synced_SendClientMessage(playerid, 0xFFFFFFFF, "Cit detektovan.");
  58. Kick(playerid);
  59. }
  60. addressCheck(playerid, retndata);
  61. }
  62. }
  63. return 1;
  64. }
  65.  
  66. synced_SendClientMessage(playerid, colorcode, const msg[])
  67. {
  68. return SendClientMessage(playerid, colorcode, msg);
  69. }
  70.  
  71. static addressCheck(playerid, response)
  72. {
  73. new moded_client;
  74. for(new i; i < sizeof __NORMAL_ADDRESS; i++)
  75. {
  76. if(response + __NORMAL_ADDRESS[i] > 0x856E00)
  77. {
  78. moded_client++;
  79. }
  80. }
  81. if(moded_client > 10)
  82. {
  83. synced_SendClientMessage(playerid, 0xFFFFFFFF, "Cit detektovan.");
  84. Kick(playerid);
  85. return 1;
  86. }
  87. return 0;
  88. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement