Making a Toggle
I was making a toggle for a rapid fire hack. I don't know how to make an ON and OFF (Single Key Toggle Of/Off) for it though. I tried googling and some were quite confusing. I'm just a beginner at C++.
I want to have a cmd that has the text saying ON and OFF also d:^)
Code:
#include <iostream>
#include <Windows.h>
using namespace std;
int main()
{
//Variables
static bool x = false;
while (true){
//Button Pressed (Home Key)
if (GetAsyncKeyState(0x24) & 1){
x = !x;
cout << '\a' << endl;
cout << "ON" << endl;
}
}
cin.get();
return 0;
}