> ## Documentation Index
> Fetch the complete documentation index at: https://help.freakhosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Install a Gamemode on Your SA-MP Server

> How to install a SA-MP gamemode: upload the compiled .amx file to the gamemodes folder, set gamemode0 in server.cfg to its name and restart your server.

To install a gamemode on a FREAKHOSTING SA-MP server, upload the compiled `.amx` file to the `gamemodes` folder in **Files**, then change the `gamemode0` line in `server.cfg` to the file name without `.amx`, for example `gamemode0 mygamemode 1`, and restart. The server runs only compiled `.amx` files, so compile the `.pwn` source on your own PC first.

| Difficulty | Time | Works on | Panel page |
| - | - | - | - |
| Beginner | 10 minutes | Every FREAKHOSTING SA-MP server | **Files** |

## Before you start

* Have the compiled gamemode (`.amx`). If you only have the `.pwn` source, compile it first with the Pawn compiler.
* Note which plugins and filterscripts the gamemode needs. See [plugins and filterscripts](https://help.freakhosting.com/games/samp/how-to-install-samp-plugins-and-filterscripts.md).
* Make a [backup](https://help.freakhosting.com/portals/game-panel/how-to-create-and-restore-backups.md).

## Which folder does each file go in?

| Folder or file | What goes there |
| - | - |
| `gamemodes/` | Gamemode `.amx` files |
| `filterscripts/` | Filterscript `.amx` files |
| `plugins/` | Linux plugin `.so` files (create the folder) |
| `scriptfiles/` | Data files your scripts read and write, such as INI files |
| `npcmodes/` | NPC scripts |
| `server.cfg` | Which gamemode, filterscripts and plugins load |

![SA-MP server main folder in the Game Panel Files page with gamemodes, filterscripts, scriptfiles and server.cfg](https://mintcdn.com/freakhostingltd/m3ZOEtGPuZd9DW2_/images/games/samp/samp-files.png?fit=max\&auto=format\&n=m3ZOEtGPuZd9DW2_\&q=85\&s=40c5165dcbbf018ca7715a1aa43c1298)

The main folder of a SA-MP server in Files

## How to install your gamemode

**1. Stop the server**

[Stop the server](https://help.freakhosting.com/portals/game-panel/how-to-start-stop-and-restart-your-game-server.md).

**2. Upload the .amx file**

In **Files**, open `gamemodes` and click **Upload**. Upload your file, for example `mygamemode.amx`. For many files, an archive or [SFTP](https://help.freakhosting.com/portals/game-panel/how-to-connect-via-sftp.md) is quicker.

**3. Upload the gamemode's other files**

If the gamemode comes with data files, put them in `scriptfiles`. Install any plugins and filterscripts it needs.

**4. Edit server.cfg**

Open `server.cfg` and change `gamemode0 grandlarc 1` to your gamemode's name without `.amx`:

```text theme={null}
gamemode0 mygamemode 1
```

**5. Remove the Grand Larceny filterscripts if needed**

The `gl_actions`, `gl_property` and `gl_realtime` filterscripts belong to Grand Larceny. Remove them from the `filterscripts` line if your gamemode doesn't use them.

**6. Save and start**

Save the file, start the server and watch the [console](https://help.freakhosting.com/portals/game-panel/how-to-use-the-server-console.md) or `server_log.txt` for errors.

## How does a gamemode rotation work?

In `gamemode0 mygamemode 1`, the `0` is the gamemode's position in the rotation, `mygamemode` is the file name without `.amx`, and the last number is how many times it plays before the server moves to the next gamemode. Add more lines to rotate:

```text theme={null}
gamemode0 mygamemode 1
gamemode1 mysecondmode 2
```

The path is relative to the `gamemodes` folder, so a file in a subfolder works too, for example `gamemode0 rp/main 1`.

## How to switch gamemode without a restart

Log in to RCON in game (`/rcon login <password>`) and use:

| Command | What it does |
| - | - |
| `/rcon changemode <name>` | Switches to that gamemode now, for example `/rcon changemode mysecondmode` |
| `/rcon gmx` | Loads the next gamemode in the rotation in `server.cfg` |

These don't change `server.cfg`. After a restart, the server starts with `gamemode0` again. See [RCON commands](https://help.freakhosting.com/games/samp/samp-rcon-commands.md).

## Frequently asked questions

### Can I upload a .pwn file instead of .amx?

No. The server runs compiled `.amx` files only. Compile the `.pwn` on your PC with the Pawn compiler and upload the `.amx`.

### Why does my gamemode fail to load?

Usually the name in `gamemode0` doesn't match the file, or a plugin the gamemode needs isn't loaded. See [common errors](https://help.freakhosting.com/games/samp/samp-server-common-errors.md).

### Can I run a gamemode made for open.mp?

A gamemode compiled with open.mp's includes is made for the open.mp server. Run it on an [open.mp server](https://help.freakhosting.com/games/open-mp/open-mp-server-hosting-guide.md) instead. See [SA-MP or open.mp?](https://help.freakhosting.com/games/samp/samp-vs-open-mp.md).

### How do I go back to Grand Larceny?

Set `gamemode0 grandlarc 1` again, put back the `gl_` filterscripts and restart.

## Related guides

> [card] [SA-MP server guide](https://help.freakhosting.com/games/samp/samp-server-hosting-guide.md)
>
> Every SA-MP page in one place.

> [card] [Plugins and filterscripts](https://help.freakhosting.com/games/samp/how-to-install-samp-plugins-and-filterscripts.md)
>
> What your gamemode needs.

> [card] [server.cfg explained](https://help.freakhosting.com/games/samp/samp-server-cfg-explained.md)
>
> Every setting and its default.

> [card] [Common errors](https://help.freakhosting.com/games/samp/samp-server-common-errors.md)
>
> Fix a gamemode that won't load.

> [card] [File Manager](https://help.freakhosting.com/portals/game-panel/how-to-use-the-file-manager.md)
>
> Upload and edit files.

***

> [!NOTE]
>
> **Tested by the FREAKHOSTING team** on our Game Panel on 3 November 2026 (SA-MP 0.3.7-R2 Linux server). `server.cfg` and RCON details checked against the official [open.mp server.cfg documentation](https://open.mp/docs/server/server.cfg) on 3 November 2026. Steps may differ slightly if the game changes.

> [!NOTE]
>
> ### Need Extra Help?
>
> If you encounter any issues, our support team is ready to assist:
>
> * **Live Chat:** Quick assistance via our website.
> * **Support Ticket:** [Open a Ticket](https://freakhosting.com/clientarea/submitticket.php)
> * **Discord:** [Join our Community](https://discord.gg/freakhosting)
> * **Email:** [support@freakhosting.com](mailto:support@freakhosting.com)

> [!TIP]
>
> ### Save on Your Hosting
>
> Ready to upgrade your hosting? Use code **KB20** at checkout for **20% off** your first order!

***

**Last Updated:** November 2026


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.