跳到主要內容

Frequently asked questions

Quick answers about playing on open.mp, running a server and scripting.

General​

What is open.mp?

open.mp (Open Multiplayer) is a multiplayer mod for Grand Theft Auto: San Andreas. It's a rewrite of the SA-MP (San Andreas Multiplayer) server that stays fully backwards compatible:

  • Players join open.mp servers with the client they already have.
  • Server owners keep their gamemodes, filterscripts and most plugins.
  • Scripters get hundreds of new functions and callbacks, and long-standing SA-MP bugs fixed.

Is open.mp free?

Yes. The server, the launcher and these docs cost nothing, and the code is open source on GitHub. If you'd like to support development, you can donate on Open Collective.

How is open.mp different from SA-MP?

SA-MP stopped being developed, so its bugs and limits stayed. open.mp is actively developed by the community. In short:

Playing​

How do I play on open.mp servers?

  1. Have the PC version of GTA: San Andreas v1.0 installed. Steam and Rockstar Games Launcher copies need to be downgraded first.
  2. Download and install the open.mp launcher.
  3. Pick a server from the launcher's list, or from the servers page, and join.

Which version of GTA: San Andreas do I need?

The PC version v1.0 (US or EU). Other versions, such as v2.0 and the copies sold on Steam or through the Rockstar Games Launcher, won't work until you downgrade them to v1.0 with a downgrader patch. Common client issues links one.

Can I still use my SA-MP client?

Yes. open.mp servers accept SA-MP clients, so you can join with the client you already have. The open.mp launcher is still worth installing for its server browser.

The game won't start, or crashes. What can I do?

Most problems are covered in Common client issues, including "San Andreas cannot be found", singleplayer loading instead, and crashes when a vehicle explodes. If the crash shows an address, look it up in Crash addresses.

Can I play on Linux?

Yes, through Wine. Playing on Linux walks through the setup.

Running a server​

How do I set up a server?

  1. Download the server for Windows or Linux from the server downloads.

  2. Extract it, put your gamemode in gamemodes and set it in config.json:

    "pawn": {
    "main_scripts": ["your_gamemode 1"]
    }
  3. Run omp-server.exe on Windows, or ./omp-server on Linux.

The installation guide has every step with screenshots. For a Linux machine, see the Linux server guide.

Will my SA-MP gamemode work?

Yes. Replace the SA-MP include with the open.mp one and recompile:

// #include <a_samp>
#include <open.mp>

The compiler may now warn about tag mismatches or deprecated spellings. They don't stop your script from working. You can fix them, or quiet them while you migrate:

#define NO_TAGS
#define MIXED_SPELLINGS
#include <open.mp>

See compiler errors and warnings for the common ones.

Do SA-MP plugins work?

Most do. Put them in the plugins folder and list them in config.json:

"pawn": {
"legacy_plugins": ["crashdetect", "mysql", "streamer"]
}

A few need extra care:

  • Pawn.CMD, Pawn.RakNet, sampvoice, sscanf and a few others have open.mp builds that go in the components folder instead.
  • YSF isn't needed: open.mp already has most of its natives.
  • FCNPC is replaced by the built-in NPC component.

The installation guide lists each plugin and where to get the right version.

Should I use server.cfg or config.json?

Both work, but config.json has many more settings. To convert an existing server.cfg, run this in your server folder:

omp-server --dump-config

Players can't connect to my server

Check these in order:

  1. The server is running and shows no errors in its console.
  2. The server's port (network.port in config.json, 7777 by default) is open in your firewall.
  3. If you host at home, the port is forwarded on your router. See Port forwarding.

Common server issues covers more, such as "Packet was modified" and missing MSVCR DLLs.

How do I get my server on the server list?

Servers announce themselves to the open.mp server list by default (announce in config.json). Make sure players can reach the server from the internet, then give it a name, language and website so it stands out in the list.

How many players can a server hold?

Up to 1000. Set max_players in config.json (50 by default). NPCs take player slots too, and are limited by max_bots.

Scripting​

What language are scripts written in?

Most servers use Pawn, a small C-like language. Gamemodes and filterscripts are compiled from .pwn files into .amx files that the server runs. Start with the Pawn language pages. To try code without setting up a server, use the Pawn Playground.

You're not limited to Pawn, though. Through open.mp's C API, community projects let you write a whole gamemode in other languages:

These are made by the community, not the open.mp team, so check each project's docs and how actively it's maintained. More projects exist: search Packages to find them, or see GDK/SDKs on the Awesome page.

What does open.mp add for scripters?

New functions and callbacks for players, vehicles, objects, textdraws, gang zones and more, such as getters for values SA-MP could only set. They're all listed in open.mp functions.

How do I add NPCs?

open.mp has NPCs built in: create one with NPC_Create and control it with the other NPC_ functions. Raise max_bots in config.json first, since it's 0 by default.

How do I add custom models?

Enable artwork.enable in config.json, put your .dff and .txd files in the models folder, and register them with AddSimpleModel for objects or AddCharModel for skins. Call these in OnGameModeInit, so every player gets the models.

Where do I find includes and plugins?

Search Packages, the Pawn package index, or browse the community list in Awesome.

Where are the IDs for vehicles, skins, weapons and objects?

In the scripting resources: vehicles, skins, weapons and many more lists. For object models, use the Model Viewer.