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 Memory;
- namespace GTAV_WeaponDataScanner
- {
- public partial class Main : Form
- {
- Mem m = new Mem();
- private const string PROCESSNAME = "GTA5.exe";
- bool gta5Running;
- public const string WeaponID = "GTA5.exe+25333D8,0x8,0x10D8,0x20";
- public const string ImpactType = "GTA5.exe+25333D8,0x8,0x10D8,0x20,0x20"; //NEW
- public const string ImpactExplode = "GTA5.exe+25333D8,0x8,0x10D8,0x20,0x24"; //NEW
- public const string Spread = "GTA5.exe+25333D8,0x8,0x10D8,0x20,0x7C"; //NEW
- public const string Spread2 = "GTA5.exe+25333D8,0x8,0x10D8,0x20,0x74"; //CORRECT ADDRESS , NEED TO COLLECT DATA WITH NEW ADDRESS
- public const string Damage = "GTA5.exe+25333D8,0x8,0x10D8,0x20,0xB0";
- public const string Penetration = "GTA5.exe+25333D8,0x8,0x10D8,0x20,0x110";
- public const string Velocity = "GTA5.exe+25333D8,0x8,0x10D8,0x20,0x11C";
- public const string ReloadSpeed = "GTA5.exe+25333D8,0x8,0x10D8,0x20,0x134"; //NEW
- public const string Range = "GTA5.exe+25333D8,0x8,0x10D8,0x20,0x28C";
- public const string Recoil = "GTA5.exe+25333D8,0x8,0x10D8,0x200,0x2f4"; //NEW
- public Main()
- {
- InitializeComponent();
- }
- private void ProcessTimer_Tick(object sender, EventArgs e)
- {
- int PID = m.GetProcIdFromName(PROCESSNAME);
- if (PID > 0)
- {
- m.OpenProcess(PID);
- ProcDetected_label.ForeColor = Color.FromArgb(0, 169, 0);
- ProcDetected_label.Text = "GTAV CONNECTED";
- gta5Running = true;
- //lets grab data here
- string baseAddr = m.ReadLong(WeaponID).ToString("X");
- var vImpactType = m.Read2Byte(ImpactType);
- var vImpactExplode = m.ReadInt(ImpactExplode);
- var vSpread = m.ReadFloat(Spread);
- var vSpread2 = m.ReadFloat(Spread2);
- var vDamage = m.ReadFloat(Damage);
- var vPenetration = m.ReadFloat(Penetration);
- var vVelocity = m.ReadFloat(Velocity);
- var vReloadSpeed = m.ReadFloat(ReloadSpeed);
- var vRange = m.ReadFloat(Range);
- var vRecoil = m.ReadFloat(Recoil);
- WeaponID_label.Text = baseAddr.ToString();
- ImpactType_label.Text = "Impact Type";
- ImpactExplosion_label.Text = "Impact Explosion";
- Spread_label.Text = "Spread";
- Spread2_label.Text = "Spread2";
- Damage_label.Text = "Damage";
- Penetration_label.Text = "Penetration";
- Velocity_label.Text = "Velocity";
- ReloadSpeed_label.Text = "ReloadSpeed";
- Range_label.Text = "Range";
- Recoil_label.Text = "Recoil";
- textBox2.Text = vImpactType.ToString();
- textBox3.Text = vImpactExplode.ToString();
- textBox4.Text = vSpread.ToString();
- textBox5.Text = vSpread2.ToString();
- textBox6.Text = vDamage.ToString();
- textBox7.Text = vPenetration.ToString();
- textBox8.Text = vVelocity.ToString();
- textBox9.Text = vReloadSpeed.ToString();
- textBox10.Text = vRange.ToString();
- textBox11.Text = vRecoil.ToString();
- return;
- }
- ProcDetected_label.ForeColor = Color.FromArgb(169, 0, 0);
- ProcDetected_label.Text = "GTAV NOT DETECTED";
- gta5Running = false;
- }
- }
- }
Add Comment
Please, Sign In to add comment