Normally a php type of person I am a noob / bodge when it comes to c#.
Using Visual Studio 2010 I have had help in creating a memory / process reader. This looks like a cheat program which it could be if used in the wrong hands, but this is to be run on the game server it's self.
Anyway onto my question.
I have code which reads each players name from an old online game we play. I can get all of the currentl players names no problem using the code below, but anyone who does not use normal A-Z 1-0 = etc letters show in my list as a black diamond with a ? in it. Not knowing c# I have tried a couple of things and can get those black diamonds to sow as a ?. My problem is that for what I need to acheive it MUST be the exact name the player is using with the same characters as I need to cross check a MySql UTF8 database for the same name.
Here is my code below which currently shows ech player name:
pnmemory = preader.ReadProcessMemory((IntPtr)0x715900, 4, out pnbytesread); pnpointerbase = BitConverter.ToInt32(pnmemory, 0); //make an int with the value of the address read pnpointerbase += 200 + (668 * i); //add the offset pnmemory = preader.ReadProcessMemory((IntPtr)pnpointerbase, 15, out pnbytesread); //read the pointer! pnvalue = BitConverter.ToInt32(pnmemory, 0); //convert the pointer's value back to int string name = System.Text.UTF8Encoding.UTF8.GetString(pnmemory); playername[i] = name;
My output result is this:
They shoud read: P†ÇL=RŠ= and JØKÉR=R§= (Which is what is in the database.) The game also shows what is in the database.
Would someone please tell / spoon feed me what I need to solve this problem.
Many thanks in advance.