hack doesnt work unless alt tabbed

Posts 16–23 of 23 · Page 2 of 2
hehe, ..cout is buffered, and doesn't necessarily instantly go to screen.

change the 3rd call to cout << from "\n" to "endl" (no quotes)

cout << endl; // (or ofc you could just add that to the end of the 2nd call...no need to make a 3rd call).

endl causes the buffer to be flushed (emptied and put on screen).

edit: may have the same situation for your other calls to cout (when keys are pressed). Use endl at the end of an output statement instead of a "\n".
Quote Originally Posted by abuckau907 View Post
hehe, ..cout is buffered, and doesn't necessarily instantly go to screen.

change the 3rd call to cout << from "\n" to "endl" (no quotes)

cout << endl; // (or ofc you could just add that to the end of the 2nd call...no need to make a 3rd call).

endl causes the buffer to be flushed (emptied and put on screen).

edit: may have the same situation for your other calls to cout (when keys are pressed). Use endl at the end of an output statement instead of a "\n".
im getting the same result when i replace the \n with <<endl;
it works now but it keeps skipping but it works when the application isnt on top
the source code would be useful
Quote Originally Posted by _PuRe.LucK* View Post
the source code would be useful
i posted one lol, im having the issue that i posted right above your post now, but it works. heres the full code
Code:
#include <iostream>
#include <windows.h>
#include <conio.h>
#include <string>

using namespace std;


int main()
{	
	string response;

	cout << "		      gogogokitty's     GOD        MODE\n";
	cout << "\n";
	cout << "\n";

	LPCWSTR Waw = L"Call of Duty®";
	HWND hwnd = FindWindow(0, Waw);

	{
		DWORD process_ID;
		GetWindowThreadProcessId(hwnd, &process_ID);
		HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, process_ID);
		SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 3);
		
		cout << "GODMODE = F1=ON F2=OFF, jumpheight = F3=highest F4=default " <<endl;
		cout << "Points F5=5000 F6=10000 F7=30000, Unlimited ammo F8=ON F9=Off" <<endl;
		cout << endl;
		system("pause");

		while (true)
		{
			 {int God;
			if (GetAsyncKeyState(VK_F1)){
				God = 1050625;
				DWORD newdatasize = sizeof(God);
				(WriteProcessMemory(hProcess, (LPVOID)0x0176C8A4, &God, newdatasize, NULL));
				cout << "GOD MODE ON \n";
				cout << endl;
			}
			}

			{
			int God;
			if (GetAsyncKeyState(VK_F2)){
				God = 105624;
				DWORD newdatasize = sizeof(God);
				(WriteProcessMemory(hProcess, (LPVOID)0x0176C8A4, &God, newdatasize, NULL));
				cout << "GOD MODE OFF \n";
				cout << " \n";
			}
		}
		
			{
				int JumpHeight;
				if (GetAsyncKeyState(VK_F3)){
					JumpHeight = 1148846080;
					DWORD newdatasize = sizeof(JumpHeight);
					(WriteProcessMemory(hProcess, (LPVOID)0x021CD600, &JumpHeight, newdatasize, NULL));
					cout << "Jump height set to max \n";
					cout << " \n";
				}
			}

			{
				int JumpHeight;
				if (GetAsyncKeyState(VK_F4)){
					JumpHeight = 1109131264;
					DWORD newdatasize = sizeof(JumpHeight);
					(WriteProcessMemory(hProcess, (LPVOID)0x021CD600, &JumpHeight, newdatasize, NULL));
					cout << "Jump height set to default \n";
					cout << " \n";
				}
			}

			{
				int Points;
				if (GetAsyncKeyState(VK_F5)){
					Points = 5000;
					DWORD newdatasize = sizeof(Points);
					(WriteProcessMemory(hProcess, (LPVOID)0x018EF124, &Points, newdatasize, NULL));
					cout << "Points set to 5000 \n";
					cout << " \n";
				}
			}

			{
				int Points;
				if (GetAsyncKeyState(VK_F6)){
					Points = 10000;
					DWORD newdatasize = sizeof(Points);
					(WriteProcessMemory(hProcess, (LPVOID)0x018EF124, &Points, newdatasize, NULL));
					cout << "Points set to 10000 \n";
					cout << " \n";
				}
			}

			{
				int Points;
				if (GetAsyncKeyState(VK_F7)){
					Points = 30000;
					DWORD newdatasize = sizeof(Points);
					(WriteProcessMemory(hProcess, (LPVOID)0x018EF124, &Points, newdatasize, NULL));
					cout << "Points set to 30000 \n";
					cout << " \n";
				}
			}

			{
				int Ammo;
				if (GetAsyncKeyState(VK_F8)){
					Ammo = 1;
					DWORD newdatasize = sizeof(Ammo);
					(WriteProcessMemory(hProcess, (LPVOID)0x021CB718, &Ammo, newdatasize, NULL));
					cout << "Infinit Ammo ON \n";
					cout << " \n";
				}
			}

			{
				int Ammo;
				if (GetAsyncKeyState(VK_F9)){
					Ammo = 0;
					DWORD newdatasize = sizeof(Ammo);
					(WriteProcessMemory(hProcess, (LPVOID)0x021CB718, &Ammo, newdatasize, NULL));
					cout << "Infinit Ammo OFF \n";
					cout << " \n";
				}
			}

			 cout << " \n";
		}

		
	}


}
Quote Originally Posted by gogogokitty View Post
i posted one lol, im having the issue that i posted right above your post now, but it works. heres the full code

#include <iostream>
#include <windows.h>
#include <conio.h>
#include <string>

using namespace std;


int main()
{
string response;

cout << " gogogokitty's GOD MODE\n";
cout << "\n";
cout << "\n";

LPCWSTR Waw = L"Call of Duty®";
HWND hwnd = FindWindow(0, Waw);

{
DWORD process_ID;
GetWindowThreadProcessId(hwnd, &process_ID);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, process_ID);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HA NDLE), 3);

cout << "GODMODE = F1=ON F2=OFF, jumpheight = F3=highest F4=default " <<endl;
cout << "Points F5=5000 F6=10000 F7=30000, Unlimited ammo F8=ON F9=Off" <<endl;
cout << endl;
system("pause");

while (true)
{
{int God;
if (GetAsyncKeyState(VK_F1)){
God = 1050625;
DWORD newdatasize = sizeof(God);
(WriteProcessMemory(hProcess, (LPVOID)0x0176C8A4, &God, newdatasize, NULL));
cout << "GOD MODE ON \n";
cout << endl;
}
}

{
int God;
if (GetAsyncKeyState(VK_F2)){
God = 105624;
DWORD newdatasize = sizeof(God);
(WriteProcessMemory(hProcess, (LPVOID)0x0176C8A4, &God, newdatasize, NULL));
cout << "GOD MODE OFF \n";
cout << " \n";
}
}

{
int JumpHeight;
if (GetAsyncKeyState(VK_F3)){
JumpHeight = 1148846080;
DWORD newdatasize = sizeof(JumpHeight);
(WriteProcessMemory(hProcess, (LPVOID)0x021CD600, &JumpHeight, newdatasize, NULL));
cout << "Jump height set to max \n";
cout << " \n";
}
}

{
int JumpHeight;
if (GetAsyncKeyState(VK_F4)){
JumpHeight = 1109131264;
DWORD newdatasize = sizeof(JumpHeight);
(WriteProcessMemory(hProcess, (LPVOID)0x021CD600, &JumpHeight, newdatasize, NULL));
cout << "Jump height set to default \n";
cout << " \n";
}
}

{
int Points;
if (GetAsyncKeyState(VK_F5)){
Points = 5000;
DWORD newdatasize = sizeof(Points);
(WriteProcessMemory(hProcess, (LPVOID)0x018EF124, &Points, newdatasize, NULL));
cout << "Points set to 5000 \n";
cout << " \n";
}
}

{
int Points;
if (GetAsyncKeyState(VK_F6)){
Points = 10000;
DWORD newdatasize = sizeof(Points);
(WriteProcessMemory(hProcess, (LPVOID)0x018EF124, &Points, newdatasize, NULL));
cout << "Points set to 10000 \n";
cout << " \n";
}
}

{
int Points;
if (GetAsyncKeyState(VK_F7)){
Points = 30000;
DWORD newdatasize = sizeof(Points);
(WriteProcessMemory(hProcess, (LPVOID)0x018EF124, &Points, newdatasize, NULL));
cout << "Points set to 30000 \n";
cout << " \n";
}
}

{
int Ammo;
if (GetAsyncKeyState(VK_F8)){
Ammo = 1;
DWORD newdatasize = sizeof(Ammo);
(WriteProcessMemory(hProcess, (LPVOID)0x021CB718, &Ammo, newdatasize, NULL));
cout << "Infinit Ammo ON \n";
cout << " \n";
}
}

{
int Ammo;
if (GetAsyncKeyState(VK_F9)){
Ammo = 0;
DWORD newdatasize = sizeof(Ammo);
(WriteProcessMemory(hProcess, (LPVOID)0x021CB718, &Ammo, newdatasize, NULL));
cout << "Infinit Ammo OFF \n";
cout << " \n";
}
}

cout << " \n"; // skip skip
}


}


}
. .
facepalm -_-. i forgot to delete that, but yea now it works pretty good, spams whatever key i press a few times but its alot better. thanks guys
well when you "press" a key..it's down for, what, maybe .1 or .2 seconds?

But, your loop could run 10x in that amount of time.

Problem is clear?

add a sleep() after the code for each key...so once the program knows "key is pressed" it'll do it's thing and sleep for a moment, instead of immediately checking again if the key is down.
yes ive got everything fixed and working to my preferance now thanks guys
Posts 16–23 of 23 · Page 2 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us