[Tutorial] Creating a sa-mp server + getting it online.
#1

I've made this tutorial for the many people who want to make a (working) SA-MP server, and may need some help..

This tutorial includes:

» Downloading, installing + playing sa-mp
» Creating your own server
» Getting your server online
» Advertising your server


Downloading, installing + playing SA-MP:

First make sure that you have version 1.0 of GTA: San Andreas. If you don't have version 1.0, download this first:

To download SA-MP, go to http://sa-mp.com/download.php and download the newest version (0.2X) of SA-MP


(make sure that you download the Client, and not the Server.)

When the download is completed, open the file that you've just downloaded. (duh..)

If everything went right, you should see this:



Than click I Agree and than you must search the folder where GTA: San Andreas is installed. (standard C:\Program Files\Rockstar Games\GTA San Andreas)
When the folder is selected, click Install.
And than Finish.

You can easely find SA-MP in the start menu.
Start » All programs » San Andreas Multiplayer » San Andreas Multiplayer.

When opening SA-MP, you will see a window like this:

To add a server to your favorites, use the button and enter the IP:Port of the server.
To see a list of all the SA-MP servers, klick the Internet button. (it may need some time to load all the servers)

Press the button to connect to the selected server.




Creating your own server

Before you can modify your server, you first have to download some files here.
(in this tutorial I'm showing you how to create a server on a Windows server only)

When it's downloaded you'll need to unpack the .zip file to where ever you want.



After extracting the .zip, you will see these files/folders:
» server.cfg (file)
» server-readme.txt (file)
» samp-server.exe (file)
» samp-licence.txt (file)
» announce.exe (file)
» scriptfiles (folder)
» spawno (folder)
» gamemodes (folder)
» filterscripts (folder)

For example, we will use the lvdm.pwn gamemode (you can also create your own mode but i don't want to type that much)
you can find lvdm.pwn in the gamemodes folder.


Configuring your server.cfg:



When you open it you will see this:



» rcon_password change the line rcon_password changeme to an other password that you like.
this password will be needed to log in to the server with /rcon login <mypassword>

» announde 1 means if the server will be announced in the SA-MP server list (1) or not (0).

» filterscripts here you will enter the filterscripts that your server must load.

» weburl will be displayed in the server browser of SA-MP (right left corner).

» anticheat must be set to 0 becouse (if set to 1) it may crash your server.

The rest explain themselves..


Adding vehicles:

If you want to add vehicles, you will first need to find the positions of where the vehicle will be spawned.
You can find them by going on a SA-MP server, taking a vehicle and than typing /save <nameyouchoose>
or by starting debug mode:



press "Launch Debug"



Use /v <modelid> to spawn your vehicle, and /save <nameyouchoose> to save the position.

Than go to your GTA: San Andreas folder and find the savedpositions.txt file.
There you will see a line like this:

Code:
 AddStaticVehicle(429, -2704.3149, 224.6218, 3.8592, 191.0172, 1, 1); // nameyouchoose
 ( AddStaticVehicle(modelid, x, y, z, angle, color1, color2); )
Copy that line (select it and CTRL + C)
and than paste (CTRL + V) it in the lvdm.pwn file under the OnGameModeInit callback.
(you will see some other vehicles placed there from the lvdm mode, so just place your line under, above or between them).

You can change the type of car by changing the modelid parameter:

Code:
AddStaticVehicle(»»modelid««, x, y, z, angle, color1, color2);
Modelid's can be found here.


Adding player classes: (= the player you choose when connecting to a server)


You first need to save the position again like in "adding vehicles" (see above)

Code:
AddPlayerClass(skin-id, x, y, z, rotation, weapon 1, ammo 1, weapon12, ammo 2, weapon13, ammo 3);
And place the code from savedpositions.txt under the OnGameModeInit callback.
(you will see some other player classes placed there from the lvdm mode, so just place your line under, above or between them).

It may look like this:

Code:
AddPlayerClass(265, 1958.3783, 1343.1572, 15.3746, 270.1425, 0, 0, 24, 300, 0, 0);
Skin id's can be found here.


Adding pickups:

Adding pickups works the same as adding vehicles and adding player classes (see above).

The defference is that you use this function:

Code:
AddStaticPickup(pickupid ,pickuptype, x, y, z);
Example:
Code:
AddStaticPickup(1273,2,-2146.688964,98.546432,35.320312);
Pickup id's can be found here and here.

Pickup types:

Code:
0 Item does not display
2 Pickupable and respawns after a few minutes
3 Pickupable, no respawn
4 Disappears shortly after creation (used for drops?)
5 Disappears shortly after creation (used for drops?)
8 pickupable (no effect) - disappears shortly after creation (used for ?)
11 Blows Up few seconds after creation*
12 Blows Up few seconds after creation (car explosion? timer is the burning flame?)
13 X - Slowly descends in Z and eventually goes through the floor (parachute?)
15 Pickupable, no respawn
19 Pickupable with no effect (Information icon?)
22 Pickupable, no respawn
Making simple commands:

(= teleport command)

This uses function SetPlayerPos:

Code:
SetPlayerPos(playerid, X, Y, Z);
Example:

Code:
	if(!strcmp(cmdtext,"/myteleport",true))
	{
		SetPlayerPos(playerid, -2099.7470, 245.2656, 35.8833);
		SendClientMessage(playerid,0xFF3399AA,"You have been teleported to -myteleport-");
		return 1;
	}
This Must be placed under callback: OnPlayerCommandText


When you're done with scripting:

You must compile your script before you close the window.




Getting your server online:

If you want to connect to your server, click the button from samp.exe and enter this ip: 127.0.0.1:7777

The 7777 from 127.0.0.1:7777 is the port of your server. this must be the same as the port in your server.cfg

If other people want to connect to your server, you must first forward your port (the 7777 from in the server.cfg)
for this, i direct you to this topic. (can't be explained better)
And to check if your server is online, use this.


Advertising your server:

If you made your server, you can advertise your server here
but please Read the rules before you post!







When you've done all the steps, you have.. a server :P
So that's it, i hope this tutorial helps a lot of people

If you have any questions or did i forget something, feel free to reply


Fallout.
Reply


Messages In This Thread
[Tutorial] Creating a sa-mp server + getting it online. - by ғαιιοцт - 01.09.2008, 17:08
Re: [Tutorial] Creating a sa-mp server + getting it online. - by pspleo - 01.09.2008, 17:15
Re: [Tutorial] Creating a sa-mp server + getting it online. - by ғαιιοцт - 01.09.2008, 17:16
Re: [Tutorial] Creating a sa-mp server + getting it online. - by JaTochNietDan - 01.09.2008, 17:16
Re: [Tutorial] Creating a sa-mp server + getting it online. - by Gabe713 - 01.09.2008, 17:16
Re: [Tutorial] Creating a sa-mp server + getting it online. - by ғαιιοцт - 01.09.2008, 17:17
Re: [Tutorial] Creating a sa-mp server + getting it online. - by Yeatric - 01.09.2008, 18:42
Re: [Tutorial] Creating a sa-mp server + getting it online. - by ғαιιοцт - 01.09.2008, 20:44
Re: [Tutorial] Creating a sa-mp server + getting it online. - by Tez2k7 - 01.09.2008, 20:58
Re: [Tutorial] Creating a sa-mp server + getting it online. - by Antironix - 01.09.2008, 21:04
Re: [Tutorial] Creating a sa-mp server + getting it online. - by polopolo - 01.09.2008, 21:23
Re: [Tutorial] Creating a sa-mp server + getting it online. - by KB - 06.09.2008, 17:47
Re: [Tutorial] Creating a sa-mp server + getting it online. - by ғαιιοцт - 06.09.2008, 18:03
Re: [Tutorial] Creating a sa-mp server + getting it online. - by Gijper - 07.09.2008, 06:05
Re: [Tutorial] Creating a sa-mp server + getting it online. - by ғαιιοцт - 07.09.2008, 09:35
Re: [Tutorial] Creating a sa-mp server + getting it online. - by hunterman007 - 10.09.2008, 08:55
Re: [Tutorial] Creating a sa-mp server + getting it online. - by ғαιιοцт - 13.09.2008, 11:55
Re: [Tutorial] Creating a sa-mp server + getting it online. - by aleksa - 13.09.2008, 16:24
Re: [Tutorial] Creating a sa-mp server + getting it online. - by revenger48 - 14.09.2008, 03:24
Re: [Tutorial] Creating a sa-mp server + getting it online. - by ғαιιοцт - 16.09.2008, 14:48
Re: [Tutorial] Creating a sa-mp server + getting it online. - by Adil - 16.09.2008, 20:44
Re: [Tutorial] Creating a sa-mp server + getting it online. - by ғαιιοцт - 16.09.2008, 20:59
Re: [Tutorial] Creating a sa-mp server + getting it online. - by Adil - 17.09.2008, 09:41
Re: [Tutorial] Creating a sa-mp server + getting it online. - by ғαιιοцт - 17.09.2008, 10:28
Re: [Tutorial] Creating a sa-mp server + getting it online. - by Adil - 17.09.2008, 16:23
Re: [Tutorial] Creating a sa-mp server + getting it online. - by revenger48 - 17.09.2008, 22:38
Re: [Tutorial] Creating a sa-mp server + getting it online. - by ғαιιοцт - 18.09.2008, 14:49
Re: [Tutorial] Creating a sa-mp server + getting it online. - by revenger48 - 19.09.2008, 00:02
Re: [Tutorial] Creating a sa-mp server + getting it online. - by gtaxume^ - 19.09.2008, 13:22
Re: [Tutorial] Creating a sa-mp server + getting it online. - by [uXc]JOE - 25.01.2009, 19:57
Re: [Tutorial] Creating a sa-mp server + getting it online. - by nikofin - 04.02.2009, 19:38
Re: [Tutorial] Creating a sa-mp server + getting it online. - by ғαιιοцт - 10.02.2009, 05:35
Re: [Tutorial] Creating a sa-mp server + getting it online. - by Vichuzz - 14.02.2009, 02:21
Re: [Tutorial] Creating a sa-mp server + getting it online. - by ғαιιοцт - 14.02.2009, 07:58
Re: [Tutorial] Creating a sa-mp server + getting it online. - by BP13 - 16.02.2009, 20:04
Re: [Tutorial] Creating a sa-mp server + getting it online. - by Synkro93 - 22.02.2009, 19:49
Re: [Tutorial] Creating a sa-mp server + getting it online. - by Glass - 24.02.2009, 05:25
Re: [Tutorial] Creating a sa-mp server + getting it online. - by RyDeR` - 05.03.2009, 20:24
Re: [Tutorial] Creating a sa-mp server + getting it online. - by Blacktuhi - 20.03.2009, 18:59
Re: [Tutorial] Creating a sa-mp server + getting it online. - by BP13 - 24.05.2009, 02:22
Re: [Tutorial] Creating a sa-mp server + getting it online. - by dadh - 06.06.2009, 20:21
Re: [Tutorial] Creating a sa-mp server + getting it online. - by BP13 - 09.06.2009, 15:27
Help - by Ersin1 - 16.06.2009, 09:53
Re: [Tutorial] Creating a sa-mp server + getting it online. - by BP13 - 16.06.2009, 21:23
Re: [Tutorial] Creating a sa-mp server + getting it online. - by ғαιιοцт - 18.06.2009, 04:53
Re: [Tutorial] Creating a sa-mp server + getting it online. - by nemsi - 19.06.2009, 07:34
Re: [Tutorial] Creating a sa-mp server + getting it online. - by BP13 - 19.06.2009, 20:55
Re: [Tutorial] Creating a sa-mp server + getting it online. - by Efe_Onay - 27.06.2009, 12:59
Re: [Tutorial] Creating a sa-mp server + getting it online. - by BP13 - 27.06.2009, 15:34
Re: [Tutorial] Creating a sa-mp server + getting it online. - by LegitMapper - 03.02.2011, 23:40
Re: [Tutorial] Creating a sa-mp server + getting it online. - by Ruffles. - 04.02.2011, 00:32
Re: [Tutorial] Creating a sa-mp server + getting it online. - by Marty_Alex - 04.02.2011, 21:27
Re: [Tutorial] Creating a sa-mp server + getting it online. - by MuhdNurHidayat - 05.04.2011, 10:07
Re: [Tutorial] Creating a sa-mp server + getting it online. - by JonnyDeadly - 05.04.2011, 11:14
Respuesta: [Tutorial] Creating a sa-mp server + getting it online. - by michael_dark_1 - 31.07.2011, 05:15
Re: Respuesta: [Tutorial] Creating a sa-mp server + getting it online. - by Venice - 31.07.2011, 05:49
Re: Respuesta: [Tutorial] Creating a sa-mp server + getting it online. - by Shockey HD - 31.07.2011, 06:04
Re: [Tutorial] Creating a sa-mp server + getting it online. - by Kostas' - 15.09.2011, 19:52
Re: [Tutorial] Creating a sa-mp server + getting it online. - by [GTA]AmericanGangster - 15.09.2011, 21:17
Re: [Tutorial] Creating a sa-mp server + getting it online. - by BetaLaxx - 15.09.2011, 21:58
Re: [Tutorial] Creating a sa-mp server + getting it online. - by grand.Theft.Otto - 15.09.2011, 23:16
Re: [Tutorial] Creating a sa-mp server + getting it online. - by punklord - 11.05.2013, 16:17
Re: [Tutorial] Creating a sa-mp server + getting it online. - by oziboy - 23.08.2013, 10:32
Re: [Tutorial] Creating a sa-mp server + getting it online. - by Bordux - 23.08.2013, 14:47
Re: [Tutorial] Creating a sa-mp server + getting it online. - by HyDrAtIc - 23.08.2013, 16:07
Re: [Tutorial] Creating a sa-mp server + getting it online. - by Ling96 - 30.10.2013, 11:28
Heeeeeeelp - by danialvisi - 20.11.2013, 13:34
Re: [Tutorial] Creating a sa-mp server + getting it online. - by Foufou74 - 27.12.2013, 07:41
Re: [Tutorial] Creating a sa-mp server + getting it online. - by YourGTA - 29.12.2013, 01:07
Re: [Tutorial] Creating a sa-mp server + getting it online. - by DarkillGamer - 15.04.2015, 15:44
Re: [Tutorial] Creating a sa-mp server + getting it online. - by MasterReturnz - 15.04.2015, 18:32
Re: [Tutorial] Creating a sa-mp server + getting it online. - by DwayneMichael - 08.05.2016, 20:20
Re: [Tutorial] Creating a sa-mp server + getting it online. - by GTLS - 09.05.2016, 04:23
Re: [Tutorial] Creating a sa-mp server + getting it online. - by GhostHacker - 09.05.2016, 04:30
Re: [Tutorial] Creating a sa-mp server + getting it online. - by DwayneMichael - 12.05.2016, 14:17
Re: [Tutorial] Creating a sa-mp server + getting it online. - by BanSilog - 17.11.2017, 09:06
Re: [Tutorial] Creating a sa-mp server + getting it online. - by aoky - 17.11.2017, 13:09

Forum Jump:


Users browsing this thread: 1 Guest(s)