-
Notifications
You must be signed in to change notification settings - Fork 0
Server config and installation
- Create a directory for the server, for example, sa-mp
- Download the necessary software from sa-mp.com
- Unzip the archive into the previously created directory.
- Edit server.cfg as desired.
- Run samp-server.exe
- To connect to the server on localhost, add server 127.0.0.1:7777 in the client.
To quickly restart the server, use the script restartserver.cmd.
- Create the sa-mp directory in the user's home directory with the command:
mkdir sa-mp - Upload the software to the server with the following command:
wget http://files.sa-mp.com/samp037svr_R2-1.tar.gz - Unzip the archive:
tar -xzf samp03dsvr.tar.gz -C sa-mp - After the first launch, you will have a server.cfg file that looks something like this:
echo Executing Server Config...
lanmode 0
rcon_password changeme
maxplayers 50
port 7777
hostname SA-MP 0.3 Server
gamemode0 grandlarc 1
filterscripts gl_actions gl_realtime gl_property gl_mapicon ls_elevator attachments skinchanger vspawner
announce 0
chatlogging 0
weburl www.sa-mp.com
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M:%S]
language English
Edit it as you see fit. It's important to change the rcon password and verify all filterscripts and plugins.
- Change to the sa-mp directory and set execute permissions with the following commands.
cd ./sa-mp/
chmod +x samp03svr
- Start the server in the background:
./samp03svr &You can stop the server with the command killall samp03svr
- "scriptfiles" is the only directory accessible for read/write access directly from the mod.
- "plugins" is a directory for various plugins.
- "pawno" is a compiler (https://github.com/pawn-lang/compiler/), which compiles the .pwn source code to .amx format.
- "npcmodes" contains bot files and their movement paths.
- "include" contains source files (libraries).
- "gamemodes" is where game mods are stored. - "server.cfg" is the main server configuration file.
- "samp-server.exe/samp03svr" is the main application that launches the samp server.
If you encounter startup issues, first check the server_log.txt log; most errors are listed there in plain text. If the log doesn't contain any useful information, check server.cfg, paying particular attention to the plugins, gamemode0, and filterscripts lines. It might be a good idea to try disabling additional plugins and scripts one by one. Don't forget to check the plugin loading order; for example, the crashdetect plugin should always be loaded first.
Install the crashdetect plugin. It will help identify the source of the problem. The plugin will provide additional information, such as line numbers, function names, parameter values, etc. Important: The script must be compiled in debug mode (flag -d3) so that the compiler places additional information about all this in the output .amx file.
-
"No such file or directory" On a Linux server, you should download additional libraries:
sudo apt-get install ia32-libs - On Linux, ensure that the plugins are specified in server.cfg with the .so extension. For example: plugins streamer.so sscanf.so
- "Runtime Error File or function not found" The compiled AMX mod uses a function that is not present on your server. Check that the server and mod versions match, and that all necessary plugins are present.
- "Run time error 17: "Invalid/unsupported P-code file format" invalid encoding in the amx file.
- Players constantly receive the error "Unacceptable Nickname", but it's incorrect because the nickname is correct.
If you're sure you're using the correct nickname and the server is running on Windows, try changing the samp-server.exe compatibility setting to Windows 98, and this should be fixed after a server restart. Windows servers with high uptime can also experience this issue. This was observed after approximately 50 days of server operation. A reboot is required to resolve this issue. Source
- "MSVCR_xx.dll MSVCP_xx.dll not found." This issue regularly occurs on Windows servers when attempting to load a plug-in that was developed using a later version of the Visual C++ Runtime than is currently installed on your computer. To fix this, download the appropriate Microsoft Visual C++ Runtime libraries. Note that SA-MP Server is 32-bit, so you also need to download the 32-bit (x86) version of the runtime, regardless of architecture. The runtime version you need is indicated by the numbers in the file name (see table below), although installing all of them won't hurt. These libraries are not stackable, or in other words: you won't get runtimes for the 2013 version and earlier if you only install the 2015 version.
| Version Number | Runtime |
|---|---|
| 10.0 | Microsoft Visual C++ 2010 x86 Redistributable |
| 11.0 | Microsoft Visual C++ 2012 x86 Redistributable |
| 12.0 | Microsoft Visual C++ 2013 x86 Redistributable |
| 14.0 | Microsoft Visual C++ 2015 x86 Redistributable |
See also: