SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Tutorials

Reply
 
Thread Tools Display Modes
Old 13/01/2014, 01:28 AM   #1
Excelize
Huge Clucker
 
Join Date: May 2013
Location: wowe plz giev me rep i wil get 50 scoer end rep u 2 : - )(It's sarcasm FFS)
Posts: 361
Reputation: 25
Default Making a custom launcher for your server(SUPER EASY)

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
Attached Files
File Type: zip LauncherDemo.zip (4.6 KB, 1218 views)
__________________
I left SA:MP, not active on forums anymore either. Might be on the forums once in a while. If you want to contact me, email me, or use my Skype name provided on my profile. And no, I'm not going to join your project, so please only contact me if you have something reasonably important to say.
----------------------------------------------------------
Enjoy:
All my Works
Excelize is offline   Reply With Quote
Old 13/01/2014, 01:53 AM   #2
Mattakil
Gangsta
 
Mattakil's Avatar
 
Join Date: Jan 2012
Location: Canada
Posts: 702
Reputation: 15
Default 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
Mattakil is offline   Reply With Quote
Old 13/01/2014, 01:55 AM   #3
Dignity
High-roller
 
Dignity's Avatar
 
Join Date: May 2013
Location: Belgium
Posts: 1,771
Reputation: 1037
Default Re: Making a custom launcher for your server(SUPER EASY)

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!
__________________


Shoot me or Reyo a PM for more information.
Dignity is online now   Reply With Quote
Old 13/01/2014, 02:11 AM   #4
Excelize
Huge Clucker
 
Join Date: May 2013
Location: wowe plz giev me rep i wil get 50 scoer end rep u 2 : - )(It's sarcasm FFS)
Posts: 361
Reputation: 25
Default 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.
__________________
I left SA:MP, not active on forums anymore either. Might be on the forums once in a while. If you want to contact me, email me, or use my Skype name provided on my profile. And no, I'm not going to join your project, so please only contact me if you have something reasonably important to say.
----------------------------------------------------------
Enjoy:
All my Works
Excelize is offline   Reply With Quote
Old 13/01/2014, 04:02 PM   #5
UnknownOwner
Banned
 
Join Date: Jan 2014
Posts: 407
Reputation: 38
Default Re: Making a custom launcher for your server(SUPER EASY)

Cool!
UnknownOwner is offline   Reply With Quote
Old 13/01/2014, 04:19 PM   #6
FreAkeD
Gangsta
 
FreAkeD's Avatar
 
Join Date: May 2012
Location: Australia
Posts: 648
Reputation: 73
Default Re: Making a custom launcher for your server(SUPER EASY)

This looks challenging, I'll give it a try
FreAkeD is offline   Reply With Quote
Old 13/01/2014, 04:26 PM   #7
FreAkeD
Gangsta
 
FreAkeD's Avatar
 
Join Date: May 2012
Location: Australia
Posts: 648
Reputation: 73
Default Re: Making a custom launcher for your server(SUPER EASY)

-DELETED-
FreAkeD is offline   Reply With Quote
Old 13/01/2014, 10:34 PM   #8
Excelize
Huge Clucker
 
Join Date: May 2013
Location: wowe plz giev me rep i wil get 50 scoer end rep u 2 : - )(It's sarcasm FFS)
Posts: 361
Reputation: 25
Default Re: Making a custom launcher for your server(SUPER EASY)

Quote:
Originally Posted by UnknownOwner View Post
Cool!
Thanks!
__________________
I left SA:MP, not active on forums anymore either. Might be on the forums once in a while. If you want to contact me, email me, or use my Skype name provided on my profile. And no, I'm not going to join your project, so please only contact me if you have something reasonably important to say.
----------------------------------------------------------
Enjoy:
All my Works
Excelize is offline   Reply With Quote
Old 13/01/2014, 10:41 PM   #9
sammp
Gangsta
 
sammp's Avatar
 
Join Date: Jan 2014
Posts: 610
Reputation: 48
Default 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 :/
__________________
SA-MP must become open-source to maximise longetivity of the project.
sammp is offline   Reply With Quote
Old 13/01/2014, 11:58 PM   #10
Excelize
Huge Clucker
 
Join Date: May 2013
Location: wowe plz giev me rep i wil get 50 scoer end rep u 2 : - )(It's sarcasm FFS)
Posts: 361
Reputation: 25
Default Re: Making a custom launcher for your server(SUPER EASY)

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.
__________________
I left SA:MP, not active on forums anymore either. Might be on the forums once in a while. If you want to contact me, email me, or use my Skype name provided on my profile. And no, I'm not going to join your project, so please only contact me if you have something reasonably important to say.
----------------------------------------------------------
Enjoy:
All my Works
Excelize is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Super easy Countdown command JEkvall95 Scripting Help 11 13/07/2013 10:42 PM
Server.cfg Launcher Shoulen Server Support 0 19/01/2012 02:00 PM
Easy way making PEN houses? DaRoderick Help Archive 1 06/08/2011 06:34 PM
Super Easy Port Forward Vi3t102 Server Support 5 03/01/2011 10:48 PM
Need someone who can help me making an easy script dendudes123 Help Archive 1 18/06/2010 08:22 PM


All times are GMT. The time now is 11:57 AM.


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