Problem 1: Whenever i close my cheat the threads are still running, thus it still reads and writes to the memory.
Problem 2: I want to turn cheat features on and off when pressing a Key. It works, but i can only turn them on and not turn them off anymore.
Code:
main.cpp
Code:
void main()
{
Mem.Process("csgo.exe");
Client = Mem.Module("client.dll");
thread NoFlash_thread = thread(NoFlash);
NoFlash_thread.join();
}
void NoFlash()
{
while (true)
{
if (GetAsyncKeyState(VK_F1) & 0x8000){
flashshow = !flashshow;
}
if (flashshow)
{
// read and write
}
Sleep(1);
}
}