.
C#
Process process = new Process();
process.StartInfo.FileName = "SAMP.exe Yolu";
process.StartInfo.Arguments = "-c -h" + "SunucuIP" + "-p" + "sunucuPort" + "-n" + "İsim";
process.Start();
Şifre, rcon gibi argümentlere buradan ulaşabilirsiniz:
samp.exe parameters (https://forum.sa-mp.com/showthread.php?t=70282)
string ip = "server ip girilicek "; // Server ip //
string GTAPath = Registry.CurrentUser.OpenSubKey(@"Software\\SAMP").GetValue("gta_sa_exe").ToString();
GTAPath = GTAPath.Substring(0, GTAPath.LastIndexOf(@"\") + 1);
string[] ImaCheat1 = Directory.GetDirectories(GTAPath, "d3d9.dll");
string[] ImaCheat2 = Directory.GetFiles(GTAPath, "mod_sa");
string[] ImaCheat3 = Directory.GetFiles(GTAPath, "d3d9.dll");
string[] ImaCheat4 = Directory.GetFiles(GTAPath, "AntTweakerBar.dll");
string[] ImaCheat5 = Directory.GetDirectories(GTAPath, "RapidFire_Project_Attack");
string[] ImaCheat6 = Directory.GetDirectories(GTAPath, "OverLight.dll");
string[] ImaCheat7 = Directory.GetFiles(GTAPath, "newopcodes.cleo");
string[] ImaCheat8 = Directory.GetDirectories(GTAPath, "newopcodes.cleo");
string[] ImaCheat9 = Directory.GetDirectories(GTAPath, "head.cs");
string[] ImaCheat10 = Directory.GetFiles(GTAPath, "CLEO.asi");
if (((ImaCheat1.Length > 0) || (ImaCheat2.Length > 0)) || ((ImaCheat3.Length > 0) || (ImaCheat4.Length > 0)))
{
this.Durum.Text = "Hile bulunduğu için oyun başlatılamadı, Silerseniz sorun olmaz.";
}
else if ((ImaCheat5.Length > 0) || (ImaCheat6.Length > 0 || (ImaCheat7.Length > 0) || (ImaCheat8.Length > 0) || (ImaCheat9.Length > 0 || (ImaCheat10.Length > 0))))
{
this.Durum.Text = "Hile bulunduğu için oyun başlatılamadı, Silerseniz sorun olmaz.";
}
else
{
Registry.CurrentUser.OpenSubKey(@"Software\SAMP", true).SetValue("PlayerName", txtUsername.Text);
Process.Start(GTAPath + "samp", ip);
}
}
}
Buyur dostum, İçine anticheat'de yaptım kullanırsın. (Button ve Textbox ekle butonun içine yapıştır)