Yo guys... im new to game hacking, so i need help with a norecoil code....
Code:
#include <string>
#include <ctime>
using namespace std;
int main()
{
HWND hWnd = FindWindow(0, "Call of Duty 4");
if(hWnd == 0)
{
cout << "Could Not Find CoD4";
system("CLS");
}
else
{
cout << "CoD4 Found!";
cin.get();
DWORD proccess_ID;
GetWindowThreadProcessId(hWnd, &proccess_ID);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, proccess_ID);
if(!hProcess)
{
cout << "Could not open the process!";
}
else
{
BYTE newdata[] = {0x90};
DWORD newdatasize = sizeof(newdata);
if(WriteProcessMemory(hProcess, (LPVOID)0x00457C79, &newdata, newdatasize, NULL))
{
MessageBox(NULL, "Worked", "Success", MB_OK);
}
else
{
MessageBox(NULL, "Error cannot WriteProcessMemory!", "Error", MB_OK);
}
CloseHandle(hProcess);
}
}
return 0;
}
Okay, so im pretty much sure D that the code works... but when i open the hack, IW3MP NOT RESPONDING... it worked perfect in ollydbg.. so whats the problem? can someone more experienced coder help me? I know that this way is 100% PB Detected... but just wanted to test it in bots.
-Thank you