Solved C# Running "Two" Hacks at the Same Time wont work

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

fx705HUJX0

Jr.Coder
Dank Tier Donator
Nobleman
Mar 24, 2016
65
838
0
Hello,

So i have a Bunny Hop and a Triggerbot. I start them with Buttons:

C#:
        private void button1_Click(object sender, EventArgs e)
        {
            backgroundWorker1.RunWorkerAsync();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            backgroundWorker2.RunWorkerAsync(); 
        }

The Problem is when I start the Bunnyhop (Or the Triggerbot) I cant start the Triggerbot (Or the Bunnyhop) at the same time. So i only can use Triggerbot or Bunnyhop.

How could i fix that or what should i use to run 2 "Hacks" at the same time in C#?
 

eduardoroeder

Newbie
Dank Tier Donator
May 2, 2015
30
583
1
Well, because you need to do a Loop inside the thread main function. If you just start the thread, it wont repeat it self. It will just execute once and exit.

C#:
bool BunnyHopON = false;
bool TriggerBotON = false;
System.Threading.Thread BHThread = new System.Threading.Thread(BHThreadVoid);       
  System.Threading.Thread TBThread = new System.Threading.Thread(TBThreadVoid);

private void button3_Click(object sender, EventArgs e)
{
    if(BunnyHopON){
        BunnyHopON = false;
        button3.Text = "Enable BunnyHop";
    }else{
        button3.Text = "Disable BunnyHop";
        BunnyHopON = true;
        newThread2.Start();
    }
}
 
private void button1_Click(object sender, EventArgs e)
{
  
    if(TriggetBotON){
        TriggetBotON= false;
        button1.Text = "Enable Trigger";
    }else{
        button1.Text = "Disable Trigger";
        BunnyHopON = true;
        newThread.Start();
    }
 
}

private void BHThreadVoid()
 {
    while (BunnyHopON){
        //DO THINGS
        sleep(10);
    }
}
 }
 
private void TBThreadVoid()
{
    while (TriggetBotON){
        //DO THINGS
        sleep(10);
    }
}
 

fx705HUJX0

Jr.Coder
Dank Tier Donator
Nobleman
Mar 24, 2016
65
838
0
Well hello,

So i did this:

C#:
        private void button3_Click(object sender, EventArgs e)
        {
            System.Threading.Thread newThread2 = new System.Threading.Thread(AMethod2);           
            newThread2.Start();

        }

        private void button1_Click(object sender, EventArgs e)
        {
            System.Threading.Thread newThread = new System.Threading.Thread(AMethod);
            newThread.Start();

        }
C#:
private void AMethod()
 {
    // Bunnyhop Stuff
 }

private void AMethod2()
{
   //Triggerbot Stuff
}
Still the same Problem. When i press Trigger it works. Then i press Bunnyhop it works but Trigger doesnt. After that it stays like that and the buttons do nothing.
 
Last edited:

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,294
37,938
269
Not sure what else to tell you, like i said i dont code in C#. But multithreading is how you do it
 

fx705HUJX0

Jr.Coder
Dank Tier Donator
Nobleman
Mar 24, 2016
65
838
0
Yes that worked thank you very much *:D

Well, because you need to do a Loop inside the thread main function. If you just start the thread, it wont repeat it self. It will just execute once and exit.
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Similar threads

Community Mods