Advertisement
rdsedmundo

AntiAimbot.cs

Jun 23rd, 2014
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.84 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using System.Diagnostics;
  11. using System.Runtime.InteropServices;
  12. using Magic;
  13.  
  14. namespace AntiAimbot
  15. {
  16.     public partial class Form1 : Form
  17.     {
  18.         BlackMagic magic = new BlackMagic();
  19.  
  20.         public Form1()
  21.         {
  22.             InitializeComponent();
  23.  
  24.             Process[] Processes = Process.GetProcesses();
  25.  
  26.             Process[] pid = Process.GetProcessesByName("gta_sa");
  27.  
  28.             if (!Convert.ToBoolean(pid[0].Id))
  29.                 Environment.Exit(0);
  30.  
  31.             magic.OpenProcessAndThread(pid[0].Id);
  32.  
  33.             timer1.Enabled = true;
  34.             timer2.Enabled = true;
  35.         }
  36.  
  37.         string oldpos = System.Windows.Forms.Cursor.Position.ToString();
  38.  
  39.         bool MOVEU = false;
  40.  
  41.         float CURSOR_GTA_POS = 0;
  42.         int AIM_COUNT = 0;
  43.  
  44.         // "gta_sa.exe"+0018FB08 + 618
  45.  
  46.         private void timer1_Tick(object sender, EventArgs e)
  47.         {
  48.             string newpos = System.Windows.Forms.Cursor.Position.ToString();
  49.  
  50.             if (newpos != oldpos)
  51.                 MOVEU = true;
  52.  
  53.             oldpos = newpos;
  54.         }
  55.  
  56.         private void timer2_Tick(object sender, EventArgs e)
  57.         {
  58.             long addr = magic.ReadInt64((uint)magic.MainModule.BaseAddress + 0x0018FB08);
  59.  
  60.             float NEW_CURSOR_POS = magic.ReadFloat((uint)addr + 0x618);
  61.  
  62.             if (NEW_CURSOR_POS != CURSOR_GTA_POS && MOVEU == false)
  63.             {
  64.                 AIM_COUNT++;
  65.                 label1.Text = "AIM_COUNT = " + AIM_COUNT.ToString();
  66.             }
  67.  
  68.             CURSOR_GTA_POS = NEW_CURSOR_POS;
  69.  
  70.             MOVEU = false;
  71.         }
  72.     }
  73. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement