while/for
Hello i am trying to make the hotkey's and i need a lopp si i tryed while(true) / for( ; ; ) booth are working fine for 30s after injetion and after 30's it's just stop the looping IDK what is the problem some help



void hack()
{ if(GetAsyncKeyState(VK_hotkey)) { hack = !hack; }
if(!hack)
{...}}

void hack()
{ while(true) //this loop stop's after 15-30s
if(GetAsyncKeyState(VK_hotkey)) { hack = !hack; }
if(!hack)
{...}
Sleep(200);}