How to Add Mods to Your GTA San Andreas Server ​
A SA-MP or open.mp server has no classic mod system. It is extended in four ways:
| Way | What it is | Target folder |
|---|---|---|
| Gamemode | The main script that defines what happens on the server (roleplay, racing, freeroam …) | /gamemodes/ |
| Filterscript | A small additional script that runs alongside the gamemode | /filterscripts/ |
| Plugin | A native extension of the server, e.g. for MySQL or the streamer | /plugins/ |
| Custom models / artwork | Your own 3D models and textures as .dff and .txd files | /models/ |
Note
There are two server variants with different configuration files: SA-MP uses server.cfg, open.mp uses config.json. open.mp still reads server.cfg, but recommends config.json because it offers more settings. You can see which file you have via SFTP in the main directory of your server.
Caution
Stop your server via the dashboard before uploading files or changing the configuration.
Install a gamemode ​
Stop the server
Stop your server via the dashboard.Connect via SFTP
Connect to your server via SFTP.Upload the gamemode
Upload the.amxfile of your gamemode to the following directory:/gamemodes/Note
Only the compiled
.amxfile belongs on the server. The matching.pwnfile is just the source code and is not executed by the server.Register the gamemode
Enter the file name without the.amxextension in your configuration.open.mp —
config.json:json{ "pawn": { "main_scripts": ["my-gamemode 1"] } }SA-MP —
server.cfg:gamemode0 my-gamemode 1The number behind it defines how many rounds the gamemode runs before the server switches to the next entry.
Start the server
Save the change and start your server.
Tip
If you want to rotate through several gamemodes, add them as further entries in main_scripts, or use consecutive gamemode0, gamemode1, gamemode2 and so on in server.cfg.
Install a filterscript ​
Filterscripts run in addition to the gamemode and can be combined freely.
Upload the filterscript
Upload the.amxfile via SFTP to the following directory:/filterscripts/Register the filterscript
open.mp —
config.json:json{ "pawn": { "side_scripts": ["filterscripts/Race_System"] } }SA-MP —
server.cfg:filterscripts Race_System Anticheat AdminspecIn
server.cfgyou separate several filterscripts with spaces.Start the server
Save the change and start your server.
Install a plugin ​
Important
Your server runs on Linux and therefore requires plugins as .so files. Windows plugins in .dll format do not work. Many plugins are offered for both systems — make sure you download the Linux version.
Upload the plugin
Upload the.sofile via SFTP to the following directory:/plugins/Place the include
If the plugin ships an include file (e.g.streamer.incorsscanf2.inc), it belongs in the following directory so you can compile your gamemode against it:/qawno/include/Register the plugin
open.mp —
config.json:json{ "pawn": { "legacy_plugins": ["mysql", "streamer"] } }SA-MP —
server.cfg:plugins mysql.so streamer.soStart the server
Save the change and start your server.
Note
open.mp additionally ships its own components, which live in the /components/ folder. These are not the same as classic SA-MP plugins and are not listed in legacy_plugins.
Add custom models ​
Custom models let you bring your own vehicles, objects or skins onto the server. Players download these files automatically when they connect — they do not have to install anything.
Upload the models
Upload your.dffand.txdfiles via SFTP to the following directory:/models/Enable artwork
open.mp —
config.json:json{ "artwork": { "enable": true, "models_path": "models" } }SA-MP —
server.cfg:useartwork 1 artpath modelsRegister the models in the script
The files alone are not enough. Your gamemode has to register the models inOnGameModeInitusingAddSimpleModelorAddCharModel. Only then are they delivered to the players.Start the server
Save the changes and start your server.
Caution
Custom models were introduced with SA-MP 0.3.DL R1 and do not work in earlier versions. In addition, useartwork or artwork.enable has to be turned on, otherwise the models are ignored.
Note
On the players' side the downloaded models end up in the cache under Documents\GTA San Andreas User Files\SAMP\cache, in a subfolder per server IP and port. If models are displayed incorrectly after an update, clearing that folder usually helps.
Tip
If the models do not reach your players, open.mp can serve them from an external web server instead. Enter its HTTP address in artwork.cdn — the files are then downloaded from there instead of from the server itself.
Where do scripts store their data? ​
Everything a gamemode stores permanently — accounts, houses, vehicles, statistics — is created by the script itself. The only folder Pawn scripts are allowed to write to is:
/scriptfiles/Note
Scripts cannot access files outside of scriptfiles. Many larger gamemodes store their data in a MySQL or SQLite database instead. How to back that data up is described under Create Backup.
Important
Single-player mods for GTA San Andreas (.asi plugins, CLEO scripts, replaced models) are not server mods. They do not belong on the server and even prevent the multiplayer client from starting on your players' PCs.