Hi guys, this is my first thread. I know Java and Python pretty well, so I decided to jump right into C# and do a fun project.
I need some help with my code. I am not sure why my C# BHOP code doesn't work. My while loop isn't initiating and sending through my Jump, it just loops "Standing". So I thought my offsets were wrong, but I tripled checked them. Maybe I am understanding how my Flags works... But I am not even sure at this point. Thank you to anyone who can help me out here.
Just FYI I was following this tutorial. Pretty common one:
Code:
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading;
namespace vamemoryTest
{
class Memory
{
static string process = "csgo";
public static int aLocalPlayer = 0x2FBC;
public static int oFlags = 0x104;
public static int aJump = 0x51A812C;
public static int bClient;
[DllImport("user32", CharSet = CharSet.Ansi, SetLastError = true)]
public static extern int GetAsyncKeyState(int vKey);
[STAThread]
static void Main(string[] args)
{
VAMemory vam = new VAMemory(process);
if (GetModuleAddy())
{
int fJump = bClient + aJump;
aLocalPlayer = bClient + aLocalPlayer;
int LocalPlayer = vam.ReadInt32((IntPtr)aLocalPlayer);
int aFlags = aLocalPlayer + oFlags;
while (true)
{
while (System.Windows.Input.Keyboard.IsKeyDown(System.Wi ndows.Input.Key.Space) == true)
{
int Flags = vam.ReadInt32((IntPtr)aFlags);
if (Flags == 256)
{
vam.WriteInt32((IntPtr)fJump, 5);
Thread.Sleep(10);
vam.WriteInt32((IntPtr)fJump, 4);
Console.Clear();
Console.WriteLine("Jumping", Console.ForegroundColor = ConsoleColor.Green);
}
}
Console.Clear();
Console.WriteLine("Standing", Console.ForegroundColor = ConsoleColor.Yellow);
Thread.Sleep(10);
}
}
}
static bool GetModuleAddy()
{
try
{
Process[] p = Process.GetProcessesByName(process);
if (p.Length > 0)
{
foreach (ProcessModule m in p[0].Modules)
{
if (m.ModuleName == "client.dll")
{
bClient = (int)m.BaseAddress;
return true;
}
}
return true;
}
else
{
return false;
}
}
catch (Exception ex)
{
return false;
}
}
}
}
The modules I am using is VAMemory, PresentationCore and WindowsBase
I also know that VAMemory isn't safe and will get me VAC, this cheat is just for fun.
Again, thanks!