Running a custom/downloaded gamemode
- Open the directory you installed the server to (eg: /Rockstar Games/GTA San Andreas/server)
- Take the downloaded/compiled .amx file and place it in the gamemodes folder where you installed the server
- Use RCON to change the mode as described above (2.1)
- Alternatively you can add the new mode to a rotation, also described above (2.3)
The same as running a custom gamemode, except:
- Place the .amx in a folder called
- Add the following to server.cfg:
Passwording your server
- If you want to add a password so only your friends can join, add this to server.cfg:
- This will make your server password-protected with the password set as 'whatever' - change it to whatever you want.
- You can also change the password while ingame by using
/rcon password newpasswordhere
- You can remove the password by using
/rcon password 0, or by restarting the server.
You can log in either while ingame by typing
/rcon login password or out of game by using the RCON mode in the Remote Console.
The password is the same as what you set it as in server.cfg
samp.ban is the file used for storing bans, including the following information about the ban:
- Name (Name of person or a reason, see BanEx)
- Type of ban
To add a ban, simply add a line like so:
IP_HERE is, is where you put the IP you would like to ban.
RCON ban command
The RCON ban command, executed by typing /rcon ban in-game or typing "ban" in the console, is used to ban a specific player that is on your server, to ban an IP see the next section.
The RCON banip command, executed by typing /rcon banip in-game or typing "banip" in the console, is used to ban a specific IP address, to ban a player on your server by ID, see the previous section. Will accept wildcards for rangebans.
Once somebody is banned, there are two ways to unban them.
- Remove from samp.ban
- The RCON
samp.ban can be found in your sa-mp server directory, it contains lines with the following information about each ban:
- Name (Name of person or a reason (see BanEx))
- Type of ban (INGAME, IP BAN etc,)
To unban them, simply remove the line, then execute the RCON reloadbans command to make the server re-read samp.ban.
The RCON unbanip command can be used in-game or from the server console (black box). To unban an ip, simply type
/rcon unbanip IP_HERE in-game or
unbanip IP_HERE in the console.
To unban them, simply use the
unbanip command, then execute the RCON
reloadbans command to make the server re-read samp.ban.
samp.ban is a file that holds the information for the IP's that are currently banned from the server. This file is read when the server is started, so if you unban an IP/person you MUST type the RCON
reloadbans command to make the server read
samp.ban again and allow them to join the server.
Type cmdlist for commands (or, varlist for variables) making use of the RCON in-game (
These are the functions that you as admin can use:
|Shows a list with commands.|
|Shows a list with the current variables.|
|Closes the server.|
|Shows the |
|change the hostname text (example: /rcon hostname my server).|
|change the gamemode text (example: /rcon gamemodetext my gamemode).|
|change the map name text (example: /rcon mapname San Andreas).|
|Executes the file which contains server cfg (example: /rcon exec blah.cfg).|
|Kick the player with the given ID (example: /rcon kick 2).|
|Ban the player with the given ID (example: /rcon ban 2).|
|This command will change the current gamemode to the given one (example: if you want to play sftdm: /rcon changemode sftdm).|
|Will load the next gamemode in server.cfg.|
|reloads the samp.ban where the banned IP addresses are stored. Should be used after unbanning and IP address.|
|reloads the server_log.txt. Has no noticeable effect on anything.|
|shows a message to the players in the client-console (example: |
|Shows the players that are in the server (with their name, IP & ping).|
|Ban the given IP (example: /rcon banip 127.0.0.1).|
|Unban the given IP (example: /rcon unbanip 127.0.0.1).|
|Changes the gravity (example: /rcon gravity 0.008).|
|Changes the weather (example: /rcon weather 1).|
|Loads the given filterscript (example: /rcon loadfs adminfs).|
|Changes the server URL in the masterlists/SA-MP client|
|Unload the given filterscript (example: /rcon unloadfs adminfs).|
|Reloads the given filterscript (example: /rcon reloadfs adminfs).|
|Change the rcon's password|
|Sets/resets the server password|
The following commands are only available in 0.3z R2 and above:
|Change the number of messages per second a client sends to the server. (default 500)|
|Change the limit of acks (default 1000) (Since 0.3z R2-2, default limit is 3000)|
|Change the limit of message holes (Also available in 0.3z R1) (default 3000)|
|Change the time in milliseconds until a player timeouts when not sending any packets. (default 1000)|
|Change the server language (example: /rcon language English). Shown in server browser.|
The above four limits/counts are just made to avoid several tools which can attack any SA-MP server by freezing it or crashing. So, simply, just set them according to your server. The default values are default, if you see any wrong kicks, just increase the values as soon as possible so that the innocent players won't get kicked by it. Read more here/
Related Callbacks and Functions
The following callbacks and functions might be useful, as they're related to this article in one way or another.
- OnRconLoginAttempt: Called when an attempt to login to RCON is made.