Installing a San Andreas Multiplayer Server
San Andreas Multiplayer (SA:MP) is a free multiplayer game modification for the PC version of Rockstar Games Grand Theft Auto: San Andreas (tm).
Installing
First of all, we're going to download the linux server from sa-mp.com and extract it. The latest server version as of the current state of this guide is 0.3a R7
wget http://files.sa-mp.com/samp03asvr_R7.tar.gz tar -xvfz samp03asvr_R7.tar.gz cd samp03
Right now, you're in the server's root directory. Files like the server configuration, log, etc. are stored here. Let's have a look at the server config file, server.cfg:
echo Executing Server Config... lanmode 0 rcon_password changeme maxplayers 50 port 7777 hostname SA-MP 0.3 Server gamemode0 grandlarc 1 filterscripts base gl_actions gl_property gl_realtime announce 0 query 1 weburl www.sa-mp.com maxnpc 0 onfoot_rate 40 incar_rate 40 weapon_rate 40 stream_distance 300.0 stream_rate 1000
The first line defines the text that should be displayed when the config is being read. "Lanmode" improves the synchronization quality for the cost of more bandwidth. Change the "rcon_password" to some password you'd like to use for logging in as Administrator. "maxplayers" defines the maximum amount of players on the server. Currently, the limit for this is 500 players. The "hostname" is the server's name which will be displayed in the server browser. The "gamemode" is the server's core script whereas "filterscripts" are designed to be utility scripts, such as administration scripts etc. Setting "announce" to 1 will make your server visible in the browser's internet list. You can change "weburl" to your server's website URL if you want so. The other variables are rather designed for professionals, it's not suggested for beginners to change them.
Running
To start the server, you can simply run it like this
./samp03svr
If you want the server to stay online when you disconnect from your shell, or close the terminal, you should use this:
nohup ./samp03svr &
Scripting
The SA:MP server implements Compuphase's embedded scripting language called "Pawn" which has a C-like syntax. The windows server package contains the required compiler and a simple IDE. Refer to http://wiki.sa-mp.com for scripting references.