pseudo code:
void toggle()
{
for(;;Sleep(1)) {
if (getasynckeystate(vk_f4)) { bBhop = !bBhop; Sleep(300);}
}
}
I was wondering what is the best way (or just a way that works well) with toggling functions using threads and GetAsyncKeyState? Is there a better method and if so help me out. I looked at others source, but most of them don't use threads and carry a heavy load on one thread (for why tho?).
Thanks in advance
Buttars
If I helped you or enjoyed something I did, I would love it if you
pseudo code:
void toggle()
{
for(;;Sleep(1)) {
if (getasynckeystate(vk_f4)) { bBhop = !bBhop; Sleep(300);}
}
}
Yup, through trial and error, I use that method. The difference between what I am doing now and what I was doing is that I didn't have 1 main loop. I had a while for all my functions than ran them through a keybind function.(Which was really bad because it used a lot of resources)
If I helped you or enjoyed something I did, I would love it if you
1 week has passed and no further replies have been made by the OP. Assuming solved.
/Closed.