SL:MP vs SA:MP vs MTA: what's the difference
Three multiplayers for the same game, built very differently: Pawn on the server in SA:MP, Lua on both sides in MTA, and Lua for absolutely everything in SL:MP.
GTA: San Andreas has no built-in online mode, so every multiplayer for it is a community project. The best known are SA:MP and MTA:SA. The third one here is SL:MP, which SEVEN and I wrote in 2020–2021. It's far smaller than the other two, and comparing them by scale makes no sense. Their architecture, though, differs in a very instructive way.
Comparison table
| SA:MP | MTA:SA | SL:MP | |
|---|---|---|---|
| Client | C/C++ mod | C/C++ mod | MoonLoader Lua scripts |
| Server scripting | Pawn | Lua | Lua (LuaJIT) |
| Client scripting | None built in, only third-party mods | Lua, sent by the server | Lua, part of the client |
| Code organization | Gamemode and filterscripts | Resources | Gamemode |
| Source code | Client is closed | Open | Open |
| Networking | UDP | UDP | UDP, SL:NET protocol |
| Status | Mature, widely used 0.3.7 client | Mature, community-developed | Alpha from 2020–2021, discontinued |
| Slots | Set in config | Set in config | maxSlots, up to 10 recommended in alpha |
SA:MP
San Andreas Multiplayer is a C/C++ client mod plus a standalone server for Windows and Linux. Server logic is written in Pawn, a compact C-like language: scripts compile to bytecode that the server's virtual machine executes. The main script is the gamemode; extra ones are filterscripts. Whatever Pawn lacks gets added through C/C++ plugins.
The client requires GTA: San Andreas 1.0 US. The most widespread client version is 0.3.7, and most servers target it. SA:MP has no client-side scripting engine: everything the player sees is driven by the server through a fixed set of functions. That's why a huge ecosystem of client mods grew around it: CLEO, SAMPFUNCS, MoonLoader.
Its strength is a simple model and an enormous library of ready-made gamemodes. Its weakness is Pawn itself: no proper strings or dynamic data structures, so a large project holds together on discipline and macros.
MTA:SA
Multi Theft Auto: San Andreas works differently. Lua scripts run on both the server and the client, and code is organized into resources: a folder with scripts, maps and files plus a meta.xml descriptor. The server sends client scripts and files to players when they connect, so nothing has to be installed by hand.
The main advantage follows from that: the client can draw its own UI, handle input, create objects and effects, and all of it ships with the server. MTA is open source.
The price of that flexibility is a more complex model. You have to keep track of which code runs on the server, which on the client, and how events travel between them.
SL:MP
SL:MP started as an experiment: could we sync players with nothing but LuaSocket on top of SA:MP? Later we dropped the SA:MP dependency, and the client became a set of MoonLoader scripts for a clean GTA: SA 1.0 US. The server is Lua as well, under LuaJIT on Windows or Linux. Networking is our own binary SL:NET protocol over UDP, later split out into the SNET library.
The 1.0.0-alpha.1 build has on-foot and in-vehicle sync, dialogs, pickups and virtual worlds. The recommended limit is about 10 players. The last build came out on January 18, 2021.
There's nothing native in SL:MP. The entire stack, from a network packet to a dialog on screen, is Lua code you can open and change. For a production server that's a weak spot: LuaJIT is fast, yet it won't replace a C/C++ multiplayer with years of debugging behind it. For learning, it's the main selling point. Setting up your own server is covered in How to run an SL:MP server.
Which one fits whom
- SA:MP, if you want a classic server with plenty of ready gamemodes and an audience that already knows how to play it.
- MTA:SA, if client-side logic, a custom UI and one language on both sides matter to you.
- SL:MP, if you're curious how a multiplayer works inside, or want to experiment with networking code in Lua without touching C/C++.
None of them are compatible with each other: each has its own client, protocol and script format. Gamemode code has to be rewritten when moving between them, even between MTA and SL:MP, although both use Lua.
Frequently asked questions
Can I join an SA:MP server with the MTA client, or the other way round?
No. Each multiplayer has its own client and its own network protocol. SL:MP isn't compatible with either: its servers can only be joined through the SL:MP launcher and client.
How is Lua in MTA different from MoonLoader scripts?
MTA runs Lua inside its own client and server and distributes client scripts to players automatically. MoonLoader is a separate loader for single player and SA:MP with its own API. Same language, different functions and environment, so code doesn't carry over directly.
Which one should I pick for my own server?
For a roleplay project aimed at an existing audience, people usually look at SA:MP. If you need client-side logic and UI without separate mods, MTA is more convenient. SL:MP is for experiments and for learning how a multiplayer works under the hood.