I need a code example of being able to put something in a loop and then being able to disable and enable it by pressing a key.
I know how to enable and disable stuff
But how do i make it so that when they press F11 it constantly does this codeCode:if (GetAsyncKeyState(VK_F11)) { if(!keyWasPressed) { keyWasPressed = true; cout << "\n Enabled" << endl; Skip(); Sleep(400); } else { keyWasPressed = false; cout << "\n Disabled" << endl; Sleep(400); } }
but as soon as they hit F11 again is disables the loopCode:cout << "\n Enabled" << endl; Skip();


Reply With Quote
Victor Nijegorodov 