[Help] Fix not working
Okay well, you closed my last thread that said solved. You gave me the fix for my address's changing on me, because it was relative to engine.dll. Well I am using the GetModuleHandle("engine.dll")+<address> to get the addies now, but if I change them the game just crashes... Here's some of my code:
That's only a portion of the code, I'm not getting any compile errors so don't worry about syntax errors or things like that.
When I push insert it says "Hack turned on" then a second after I push okay, the game just closes.
~lilneo
Code:
DWORD* Cheats = (DWORD*)(GetModuleHandle("engine.dll")+0x544810);
bool Hack;
//other stuff
void HackFunction()
{
while(1)
{
if(GetAsyncKeyState(VK_INSERT)&1)
{
Hack=!Hack;
if(Hack)
{
MessageBoxA(NULL, "Hack turned on.", "Manipulator", NULL);
*Cheats = 1;
}
if(!Hack)
{
MessageBoxA(NULL, "Hack turned off.", "Manipulator", NULL);
*Cheats = 0;
}
}
// more stuff
BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved){
if( ul_reason_for_call == DLL_PROCESS_ATTACH)
{
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)&HackFunction, NULL, 0, NULL );
if(GetLastError()==0)
{
MessageBoxA(NULL, "DLL injected and thread created successfully.", "Manipulator", NULL);
}
}
return TRUE;
}
When I push insert it says "Hack turned on" then a second after I push okay, the game just closes.
~lilneo
