[Tutorial] Making a custom launcher for your server(SUPER EASY)
#1

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
Reply
#2

OR create an internet shortcut with the URL samp://75.127.13.245:7780, good idea nonetheless
Reply
#3

Quote:
Originally Posted by Mattakil
View Post
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!
Reply
#4

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.
Reply
#5

Cool!
Reply
#6

This looks challenging, I'll give it a try
Reply
#7

-DELETED-
Reply
#8

Quote:
Originally Posted by UnknownOwner
View Post
Cool!
Thanks!
Reply
#9

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 :/
Reply
#10

Quote:
Originally Posted by sammp
View Post
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.
Reply
#11

but, how to make something like this http://i.imgur.com/vZuJVSv.png ?
and put server info and other
Reply
#12

Very cool!
Reply
#13

but, how to make something like this http://i.imgur.com/vZuJVSv.png ?
and put server info and other
Reply
#14

Nice & Easy.

But you can give more affort in it.
Adding special backgrounds.

If you know how to Connect it with MYSQL it would be even better.
Reply
#15

Thanks for this.

And for those who are giving rude comments, think again, can you create custom launcher with autologin and anticheat from browser? Answer is no, with custom launcher you can easy prevent players from using CLEO mods or s0beit mod

Thanks again.
Reply
#16

Cods of this launcher ?
Reply
#17

If you do

Process.Start(@"samp:\\<ip>:<port>");

instead of

Process.Start("samp://<ip>:<port>");

it will skip the "Add to Favorites" / "Play" dialog and start the client immediately.

It's what I do for SampSharp - OnInitialize
Reply
#18

How to make to download some specific file like models etc..
Reply
#19

Quote:
Originally Posted by Vojin
View Post
How to make to download some specific file like models etc..
Probably shouldn't do it if you don't know how to. Read up some .NET tutorials.
Reply
#20

Nice (y) I've never had this idea. By the way notice that this can be similarly done also in WPF as System.Diagnostics is also available there
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)