ok, so i'm trying to make a hack for a game, just some simple point cheat. so here's the code i have written following a tutorial.
Code:
#include <windows.h>
using namespace std;
DWORD WINAPI LoopFunction( LPVOID lpParam )
{
BYTE pointsON[] = {0x83, 0x05, 0xE8, 0x26, 0x4C, 0x00, 0x80};
BYTE pointsOFF[] = {0x83, 0x05, 0xE8, 0x26, 0x4C, 0x00, 0x19};
bool pointCheat = false;
HANDLE Game = GetCurrentProcess();
while(1) {
if (GetAsyncKeyState(VK_F1)&0x80000) {
if (pointCheat == true) {
WriteProcessMemory(Game, (LPVOID*)0x44B62D, &pointsOFF, 7, 0);
pointCheat = false;
}
else if( pointCheat == false) {
WriteProcessMemory(Game, (LPVOID*)0x44B62D, &pointsON, 7, 0);
pointCheat = true;
}
}
}
//some CPU relief
Sleep(200);
return 0;
}
BOOL WINAPI DllMain (HINSTANCE hModule, DWORD dwAttached, LPVOID lpvReserved)
{
if (dwAttached == DLL_PROCESS_ATTACH) {
CreateThread(NULL,0,&LoopFunction,NULL,0,NULL);
}
return 1;
}
whenever i compile and inject this dll, it does nothing in the game, i press f1 but the points i get stay the same...any help?