Assault Cube Nickname Hack
What is wrong with my code? I know that the username of your player is stored in 0x4E4DBC (player pointer) + 0x219 (username offset). So I tried to write a program that would get my player's username and it just returns either nothing or "c-". Here is my code:
Code:
#include <Windows.h>
#include <iostream>
DWORD base = (DWORD) GetModuleHandleA("ac_client.exe");
char baseaddie[10];
char *name = (char*) ((base + 0x4E4DBC) + 0x219);
BOOL APIENTRY DllMain (HINSTANCE hInst /* Library instance handle. */ ,
DWORD reason /* Reason this function is being called. */ ,
LPVOID reserved /* Not used. */ )
{
switch (reason)
{
case DLL_PROCESS_ATTACH:
sprintf(baseaddie, "%X", base);
MessageBoxA(NULL, baseaddie, "Base Address", MB_OK);
MessageBoxA(NULL, name, "Username", MB_OK);
break;
case DLL_PROCESS_DETACH:
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
}
/* Returns TRUE on success, FALSE on failure */
return TRUE;
}
It is just popping up blank in the messagebox when i used ur way schim. When i went to the address that the pointer is pointing to this is the command:
inc esi
It isn't a loop or anything so i don't understand how i am going to access it. I can change my name with cheat engine but other than that i can't do it with a program.