[C++] CA NA Hotkey?
this is my main code:
Does this look right?
Because when I first press insert the glass walls activate then when I press again it deactivates.
On the third attempt, it deactivates again and fourth attempt it deactivates again. After it activates... So screwed...
How can I make it more consistent in activation?
Am i placing my bool walls = false; in the wrong place?
Code:
void main()
{
bool walls = false;
while(true)
{
if(GetAsyncKeyState(VK_INSERT)<0){
if(walls){
memcpy((LPVOID)0x57207A, "\x6A\x01", 2);
walls = false;
} else {
memcpy((LPVOID)0x57207A, "\x6A\x00", 2);
walls = true;
}
}
}
}
Because when I first press insert the glass walls activate then when I press again it deactivates.
On the third attempt, it deactivates again and fourth attempt it deactivates again. After it activates... So screwed...
How can I make it more consistent in activation?
Am i placing my bool walls = false; in the wrong place?

