xCENTx

WeaponDataScanner SOURCE xCENTx

Aug 6th, 2021 (edited)
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.87 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 Memory;
  11. namespace GTAV_WeaponDataScanner
  12. {
  13. public partial class Main : Form
  14. {
  15. Mem m = new Mem();
  16. private const string PROCESSNAME = "GTA5.exe";
  17. bool gta5Running;
  18. public const string WeaponID = "GTA5.exe+25333D8,0x8,0x10D8,0x20";
  19. public const string ImpactType = "GTA5.exe+25333D8,0x8,0x10D8,0x20,0x20"; //NEW
  20. public const string ImpactExplode = "GTA5.exe+25333D8,0x8,0x10D8,0x20,0x24"; //NEW
  21. public const string Spread = "GTA5.exe+25333D8,0x8,0x10D8,0x20,0x7C"; //NEW
  22. public const string Spread2 = "GTA5.exe+25333D8,0x8,0x10D8,0x20,0x74"; //CORRECT ADDRESS , NEED TO COLLECT DATA WITH NEW ADDRESS
  23. public const string Damage = "GTA5.exe+25333D8,0x8,0x10D8,0x20,0xB0";
  24. public const string Penetration = "GTA5.exe+25333D8,0x8,0x10D8,0x20,0x110";
  25. public const string Velocity = "GTA5.exe+25333D8,0x8,0x10D8,0x20,0x11C";
  26. public const string ReloadSpeed = "GTA5.exe+25333D8,0x8,0x10D8,0x20,0x134"; //NEW
  27. public const string Range = "GTA5.exe+25333D8,0x8,0x10D8,0x20,0x28C";
  28. public const string Recoil = "GTA5.exe+25333D8,0x8,0x10D8,0x200,0x2f4"; //NEW
  29.  
  30.  
  31.  
  32.  
  33. public Main()
  34. {
  35. InitializeComponent();
  36. }
  37.  
  38. private void ProcessTimer_Tick(object sender, EventArgs e)
  39. {
  40. int PID = m.GetProcIdFromName(PROCESSNAME);
  41. if (PID > 0)
  42. {
  43. m.OpenProcess(PID);
  44. ProcDetected_label.ForeColor = Color.FromArgb(0, 169, 0);
  45. ProcDetected_label.Text = "GTAV CONNECTED";
  46. gta5Running = true;
  47.  
  48. //lets grab data here
  49. string baseAddr = m.ReadLong(WeaponID).ToString("X");
  50. var vImpactType = m.Read2Byte(ImpactType);
  51. var vImpactExplode = m.ReadInt(ImpactExplode);
  52. var vSpread = m.ReadFloat(Spread);
  53. var vSpread2 = m.ReadFloat(Spread2);
  54. var vDamage = m.ReadFloat(Damage);
  55. var vPenetration = m.ReadFloat(Penetration);
  56. var vVelocity = m.ReadFloat(Velocity);
  57. var vReloadSpeed = m.ReadFloat(ReloadSpeed);
  58. var vRange = m.ReadFloat(Range);
  59. var vRecoil = m.ReadFloat(Recoil);
  60. WeaponID_label.Text = baseAddr.ToString();
  61. ImpactType_label.Text = "Impact Type";
  62. ImpactExplosion_label.Text = "Impact Explosion";
  63. Spread_label.Text = "Spread";
  64. Spread2_label.Text = "Spread2";
  65. Damage_label.Text = "Damage";
  66. Penetration_label.Text = "Penetration";
  67. Velocity_label.Text = "Velocity";
  68. ReloadSpeed_label.Text = "ReloadSpeed";
  69. Range_label.Text = "Range";
  70. Recoil_label.Text = "Recoil";
  71. textBox2.Text = vImpactType.ToString();
  72. textBox3.Text = vImpactExplode.ToString();
  73. textBox4.Text = vSpread.ToString();
  74. textBox5.Text = vSpread2.ToString();
  75. textBox6.Text = vDamage.ToString();
  76. textBox7.Text = vPenetration.ToString();
  77. textBox8.Text = vVelocity.ToString();
  78. textBox9.Text = vReloadSpeed.ToString();
  79. textBox10.Text = vRange.ToString();
  80. textBox11.Text = vRecoil.ToString();
  81. return;
  82. }
  83. ProcDetected_label.ForeColor = Color.FromArgb(169, 0, 0);
  84. ProcDetected_label.Text = "GTAV NOT DETECTED";
  85. gta5Running = false;
  86. }
  87. }
  88. }
  89.  
Add Comment
Please, Sign In to add comment