
Originally Posted by
WasserEsser
~Snips~
So I've done what you said (Or atleast I think I did) and created a char array of [32] which I then read from memory.
My Reading Function:
Code:
bool Reads(DWORD_PTR dwAddress, LPVOID lpBuffer, DWORD_PTR dwSize) {
return (ReadProcessMemory(hProcess, (LPCVOID)dwAddress, lpBuffer, dwSize, NULL) == TRUE);
}
My Radar Reading:
Code:
RadarEntity = Mem.Read<DWORD>(dwClient + 0x04EFCD2C);
RadarEntityPointer = Mem.Read<DWORD>(RadarEntity + 0x50);
// PlayerName = Mem.Read<wchar_t>(RadarEntityPointer + (0x1E8 * (Player + 1)) + 0x24);
Mem.Reads(RadarEntityPointer + (0x1E8 * (Player + 1)) + 0x24, PlayerName, 32);
Draw Name:
Code:
DrawString(&pEntity->PlayerName[32], Head3[0], Head3[1], 255, 255, 255, mFont);
Draw String:
Code:
int DrawString(char* String, int x, int y, int r, int g, int b, ID3DXFont* ifont)
{
RECT ShadowPos;
ShadowPos.left = x + 1;
ShadowPos.top = y + 1;
RECT FontPos;
FontPos.left = x;
FontPos.top = y;
ifont->DrawTextA(0, String, strlen(String), &ShadowPos, DT_NOCLIP, D3DCOLOR_ARGB(255, r / 3, g / 3, b / 3));
ifont->DrawTextA(0, String, strlen(String), &FontPos, DT_NOCLIP, D3DCOLOR_ARGB(255, r, g, b));
return 0;
}
Yet I get this.
So I'm not quite sure if it's my offsets (I've tried changing the 0xIE8 to 0xIE0) or if it could be something else.
Also, is the Char array automatically iterated through in order to create a string (kinda like a char*) or do I have to do this manually in some way to convert it to a string? I see that VS sees it as a char* so I'd assume yes but I just wanted to ask because you did say it would iterate through until it reached a null terminator... annd I answered that question for myself.