Schwimmbad Newbie cheater
Reputation: 0
Joined: 04 Aug 2012 Posts: 17 Location: E.T.A.-Hoffmann-Str. 54, 82418 Seehausen am Staffelsee
|
Posted: Mon Aug 06, 2012 3:27 am Post subject: What is the very basic c# code I need to use this pointer? |
|
|
Having found pitch in Amnesia, I want to change it using c#.
What is the very basic code I need to use the pointer being shown in the image to change the value the pointer in the image points to?
So I was using
| Code: |
Process[] aProcesses = Process.GetProcessesByName("Amnesia");
if (aProcesses.Length != 0) //If the process exists
{
memoryaddress = 0x00341C18;
Process p = aProcesses[0];
Int32 baseAddress = 0x00341C18;
byte[] btBuffer = new byte[4];
IntPtr lpOutStorage = IntPtr.Zero;
Int32[] offsetList = new Int32[] { 0x28, 0x50, 0x1c, 0x4, 0x39c };
ReadProcessMemory(p.Handle, new IntPtr(baseAddress), btBuffer, (uint)btBuffer.Length, ref lpOutStorage);
for (UInt32 x = 0; x < (offsetList.Length - 1); x++)
{
baseAddress = BitConverter.ToInt32(btBuffer, 0) + offsetList[x];
ReadProcessMemory(p.Handle, new IntPtr(baseAddress), btBuffer, (uint)btBuffer.Length, ref lpOutStorage);
}
baseAddress = BitConverter.ToInt32(btBuffer, 0) + offsetList[offsetList.Length - 1];
float result = 0.0f;
byte[] btResult = new byte[Marshal.SizeOf(result)];
ReadProcessMemory(p.Handle, new IntPtr(baseAddress), btResult, (uint)btResult.Length, ref lpOutStorage);
label1.Text = "Neigung: " + BitConverter.ToSingle(btResult, 0);
}
|
to read, but I always get 0. |
|