Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using System.Diagnostics;
- using System.Runtime.InteropServices;
- using Magic;
- namespace AntiAimbot
- {
- public partial class Form1 : Form
- {
- BlackMagic magic = new BlackMagic();
- public Form1()
- {
- InitializeComponent();
- Process[] Processes = Process.GetProcesses();
- Process[] pid = Process.GetProcessesByName("gta_sa");
- if (!Convert.ToBoolean(pid[0].Id))
- Environment.Exit(0);
- magic.OpenProcessAndThread(pid[0].Id);
- timer1.Enabled = true;
- timer2.Enabled = true;
- }
- string oldpos = System.Windows.Forms.Cursor.Position.ToString();
- bool MOVEU = false;
- float CURSOR_GTA_POS = 0;
- int AIM_COUNT = 0;
- // "gta_sa.exe"+0018FB08 + 618
- private void timer1_Tick(object sender, EventArgs e)
- {
- string newpos = System.Windows.Forms.Cursor.Position.ToString();
- if (newpos != oldpos)
- MOVEU = true;
- oldpos = newpos;
- }
- private void timer2_Tick(object sender, EventArgs e)
- {
- long addr = magic.ReadInt64((uint)magic.MainModule.BaseAddress + 0x0018FB08);
- float NEW_CURSOR_POS = magic.ReadFloat((uint)addr + 0x618);
- if (NEW_CURSOR_POS != CURSOR_GTA_POS && MOVEU == false)
- {
- AIM_COUNT++;
- label1.Text = "AIM_COUNT = " + AIM_COUNT.ToString();
- }
- CURSOR_GTA_POS = NEW_CURSOR_POS;
- MOVEU = false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement