[HELP] About sa-mp custom launcher C#
#1

I need someone who understand visual studio c#, i make custom launcher design and all thath, but i can't fix the play button, i have this code, and i have no errors while compile, and when i test the launcher i type nickname and hit play a get error on line: Process.Start("samp.exe", ip+password); it says that can't be found location, Note: I want to launch to server with server password. (Sorry for bad english gramar.....) Also if someone have code for detecting cleo and ****** i will be thankfulll <3

Код:
private void play_Click(object sender, EventArgs e)
        {
            string ip = "192.168.1.2:7777";
            string password = "pass";
            if (username.Text.Length == 0)
            {
                MessageBox.Show("You didin't entered a name", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if (username.Text.Length < 3)
            {
                MessageBox.Show("Your name is too short", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                using (RegistryKey key = Registry.ClassesRoot.OpenSubKey(@"samp\shell\open\command\"))
                {
                    if (key == null)
                    {
                        MessageBox.Show("Install 0.3.7 client to play", "Error");
                    }
                    else
                    {
                        key.Close();
                        Registry.CurrentUser.OpenSubKey(@"Software\SAMP", true).SetValue("PlayerName", username.Text);
                        Process.Start("samp.exe", ip+password);
                    }
                }
            }
        }
Reply


Messages In This Thread
[HELP] About sa-mp custom launcher C# - by chikov - 14.07.2017, 19:06
Re: [HELP] About sa-mp custom launcher C# - by Vince - 14.07.2017, 19:13
Re: [HELP] About sa-mp custom launcher C# - by RowdyrideR - 14.07.2017, 20:42
Re: [HELP] About sa-mp custom launcher C# - by orcununal - 13.12.2018, 09:49
Re: [HELP] About sa-mp custom launcher C# - by G4M30V3R - 13.12.2018, 10:14

Forum Jump:


Users browsing this thread: 1 Guest(s)