SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Tutorials (https://forum.sa-mp.com/forumdisplay.php?f=70)
-   -   [Tutorial] Making a custom launcher for your server(SUPER EASY) (https://forum.sa-mp.com/showthread.php?t=487356)

Excelize 13/01/2014 12:28 AM

Making a custom launcher for your server(SUPER EASY)
 
1 Attachment(s)
Hello Folks,

Today I will be showing you how to create your own custom launcher for your own server. This is super easy.
We will be using C# in Windows Forms.(I am using Visual Studio 2013)

(If you don't understand what a launcher is, I will attach my personal one)

Why should I make a custom launcher for my server?

Custom launchers are a nice addition to your server, and If you do it right, It will look professional.

Advantages

-Good way to advertise server, only your server will be seen
-Easy to make, yet still looks good

Disadvantages

-Players need to download your tool to launch your server
-Some people might stay away from it thinking it's a virus..


What you need:

-Any version of Visual Studio that supports C# and Forms together
-3 minutes
-A server IP and Port

Step 1.

Launch Visual Studio, and create a new project. Name it whatever you like, such as 'RolePlay Launcher' or 'rLaunch' Then select the C# language (Visual C#) and choose Windows Forms Application.

Step 2.

Make your window the custom size, color etc you want. The better you make it, the better it will look ;)
Make sure to add a button, and Rename it 'Play!' or 'Launch'

Step 3.

Double click the window(In the application you're making) and you will see the code. Find:
Code:

private void button1_Click(object sender, EventArgs e)
And change the whole Codeblock to this:

Code:

        private void button1_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("samp://[IP]:[PORT]");
        }

In my case, it would be:

Code:

        private void button1_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("samp://75.127.13.245:7780");
        }

This will tell the application to Open your specified IP, and launch the game.

Then pres F5 to compile your code, and it should come up without errors.

Step 4.(Optional)

If you have a website for your server make a 'Web Browser' Tool from the Toolbox window, and change the URL to your website link in 'Properties'.

Step 5.(Optional)

Upload to your website and let your users use it!

Once again, if you have a website, Upload your program to it, so your users can download it!



Hope I could help, thanks for reading!


~Excelize

Mattakil 13/01/2014 12:53 AM

Re: Making a custom launcher for your server(SUPER EASY)
 
OR create an internet shortcut with the URL samp://75.127.13.245:7780, good idea nonetheless

Dignity 13/01/2014 12:55 AM

Re: Making a custom launcher for your server(SUPER EASY)
 
Quote:

Originally Posted by Mattakil (Post 2863162)
OR create an internet shortcut with the URL samp://75.127.13.245:7780

That's abit rude, atleast thank him for his effort!

O.T. Lovely guide, was always wondering how a standalone SA:MP server would function!

Excelize 13/01/2014 01:11 AM

Re: Making a custom launcher for your server(SUPER EASY)
 
He has a point, but the point of this tutorial was to make something that will make your server slightly different..

Anyway thanks for the kind words! If I get permission from the SAMP team, I might make a standalone launcher for a server. But sadly I would need the source code of the original launcher, which they most likely will not give to me... I am pretty experienced in C# so I'll see if I can figure anything out.

UnknownOwner 13/01/2014 03:02 PM

Re: Making a custom launcher for your server(SUPER EASY)
 
Cool!

FreAkeD 13/01/2014 03:19 PM

Re: Making a custom launcher for your server(SUPER EASY)
 
This looks challenging, I'll give it a try

FreAkeD 13/01/2014 03:26 PM

Re: Making a custom launcher for your server(SUPER EASY)
 
-DELETED-

Excelize 13/01/2014 09:34 PM

Re: Making a custom launcher for your server(SUPER EASY)
 
Quote:

Originally Posted by UnknownOwner (Post 2863828)
Cool!

Thanks! :)

sammp 13/01/2014 09:41 PM

Re: Making a custom launcher for your server(SUPER EASY)
 
You actually don't need the sa-mp sourcecode to make a standalone launcher, I did it. You just edit the registry files and run samp.dll and gta-sa.exe.

As for the masterlist, probably :/

Excelize 13/01/2014 10:58 PM

Re: Making a custom launcher for your server(SUPER EASY)
 
Quote:

Originally Posted by sammp (Post 2864406)
You actually don't need the sa-mp sourcecode to make a standalone launcher, I did it. You just edit the registry files and run samp.dll and gta-sa.exe.

As for the masterlist, probably :/

Thanks a lot for the info!
I might get working on a custom launcher with the W8 GUI. Yeah, the problem is, I need permission to gather data from the masterlist :/ I'll have to contact the SA:MP team.


All times are GMT. The time now is 09:29 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.