Hi.
I'm trying to use some offsets from Cheat Engine, with the C# memory manipulation DLL, Black Magic.
My goal is to read the player name from memory and output it to the console. When I read from 0x16558B98, I get what I want. However, that address won't be the same when I restart the game, so I need to use pointers.
Here are the offsets:
If someone could explain how I would use the offsets in my code, I would be happy.
Here's my code:
PHP Code:
BlackMagic game = new BlackMagic();
if(game.OpenProcessAndThread(SProcess.GetProcessFromProcessName("game.exe")))
{
Console.WriteLine("Found Process");
Console.WriteLine("Player Name: " + game.ReadASCIIString(game.ReadUInt(0x08006050) + 0x20 + 0x1dc, 128));
}
Console.WriteLine("Press any key to continue...");
Console.ReadKey();
I feel like I've tried everything. I can never get the desired output. The player name is always empty, not what I want, or gibberish.