From SA-MP Wiki
(Redirected from
MapName)
Description:
server.cfg is a server configuration file which allows you to change all kinds of settings of your sa-mp server.
This file is necessary for every server and has to be located in the server directory next to the server application (samp-server.exe).
Console
Setting
| Type
| Default value
| Read-only
| Rule
| Effect
|
echo
| string
| Executing Server Config...
| Yes
| No
| What samp-server.exe prints in the server console when executing server.cfg. There is no need to change this at all as you'll be the only one who sees the console.
|
rcon_password
| string
| changeme
| No
| No
| The password used to administrate the server and use the remote console (rcon). You must make sure to change this to something hard to crack so that others cannot take control of your server. Your server will NOT start if changeme is the RCON password!
|
rcon
| bool
| 1
| No
| No
| Toggles if the Remote Console feature should be used. Set to 1 to enable or 0 to disable.
|
Scripts
Setting
| Type
| Default value
| Read-only
| Rule
| Effect
|
gamemode(n) (N) (t)
| string
| gamemode0 grandlarc 1
| No
| No
| The .amx file in the gamemodes folder, the server should use to run as a gamemode. (n) is the gamemode number, (N) is the gamemode name without the .amx extension, and (t) is the amount of times the gamemode should be played before switching to the next gamemode.
|
filterscripts (N)
| string
|
| Yes
| No
| The .amx file in the filterscripts folder, the server should use to run as a filterscript. (N) is the filterscript name without the .amx extension. Filterscripts are scripts that run in the background of your gamemode. They are there to add extras to the server without editing the gamemode. It is very useful if you want to carry a specific property to more than one gamemode. If you have multiple filterscripts you want to load, put them all in a row separated by "space", e.g. filterscripts script1 script2.
|
plugins (N)
| string
|
| Yes
| No
| The .dll or .so file in the plugins folder, the server should use to run as a plugin. On Windows (N) is the plugin name without the .dll extension. However, on Linux the .so extension is needed! Plugins are scripts which are designed to enhance gamemodes and filterscripts. If you have multiple plugins you want to load, put them all in a row separated by "space", e.g. plugins plugin1 plugin2.
- For more information on plugin development, see this topic.
|
Server browser
Setting
| Type
| Default value
| Read-only
| Rule
| Effect
|
announce
| bool
| 1
| No
| No
| Toggles if the server should be announced to SA-MP masterlist. Set to 1 to enable or 0 to disable.
|
query
| bool
| 1
| No
| No
| Toggles if the server information should be displayed in the server browser. Set to 1 to enable or 0 to disable. Players can still join a server that has disabled querying, but the server browser will not display any information.
|
hostname
| string
| SA-MP Server
| No
| No
| The name that will be shown in the server browser and when the player connects to the server.
|
language
| string
|
| No
| No
| The language that appears in the server browser. Players can use this to filter servers by language in the server browser.
- NOTE: This server var was added in 0.3.7 and will have no effect in previous versions.
|
mapname
| string
| San Andreas
| No
| Yes
| The mapname that appears in the server browser. This can be anything, e.g. My Stunt Map.
|
gamemodetext
| string
| Unknown
| No
| No
| The mode that will be shown in the server browser. Using SetGameModeText has the same effect and overrides the value used in server.cfg. If you have multiple gamemodes that require different gamemode texts, use that function.
|
weather
| string*
| 10
| No
| Yes
| The global weather that the server uses and will be shown in the server browser. Using this setting in the server.cfg file will crash the server application on startup. Use SetWeather instead to change this setting.
|
worldtime
| string*
| 12:00
| No
| Yes
| The global time that the server uses and will be shown in the server browser. Using this setting in the server.cfg file has no effect. Use SetWorldTime instead to change this setting.
|
gravity
| string*
| 0.008
| No
| No
| The global gravity that the server uses. Using this setting in the server.cfg file will crash the server application on startup. Use SetGravity instead to change this setting.
|
weburl
| string
| www.sa-mp.com
| No
| Yes
| The website people can visit to gain more information about the server.
|
version
| string
|
| Yes
| Yes
| The SA-MP version that the server uses and will be shown in the server browser. Using this setting in the server.cfg file has no effect.
|
maxplayers
| int
| 50
| Yes
| No
| The maximum amount of players your server can hold. By changing this number you can alter how many players can enter the server. The maximum is 1000 and the minimum is 1.
|
password
| string
|
| No
| No
| The password used to lock the server. When using this, only players that know this password will be able to join the server.
|
[*] Some settings are a different type than you might think.
Networking
Setting
| Type
| Default value
| Read-only
| Rule
| Effect
|
sleep
| int
| 5
| No
| No
| The time in milliseconds the main sa-mp and raknet networking thread will "sleep" idly during each sync cycle. Higher values decreases server processing, but reduces sync quality. Lower values increases server processing, but improves sync quality. It is not advisable to change this value unless your player count is very high and you have server fps stability issues.
|
lanmode
| bool
| 0
| No
| No
| Deprecated variable, has no effect.
|
bind
| string
|
| Yes
| No
| The IP address the server should use. The server will be forced to use this IP address instead of automatically choosing a free IP address. This IP address must match one assigned to a network card on the server. This is useful for running multiple servers on the same port on the same box.
|
port
| int
| 8192 (7777 is also commonly used)
| Yes
| No
| The port the server should use. You will need to Port Forward in order for players to join your server from outside your LAN.
|
conncookies
| int*
| 1
| No
| No
| Toggles the 0.3.7 connection cookie system. Set to 1 to enable or 0 to disable.
- NOTE: This server var was added in 0.3.7 R2 and will have no effect in previous versions.
|
cookielogging
| int*
| 0
| No
| No
| Toggles logging of connection cookies requested by newly connecting players. Set to 1 to enable or 0 to disable.
- NOTE: This server var was added in 0.3.7 R2 and will have no effect in previous versions.
|
connseedtime
| int
| 300000
| No
| No
| The time in milliseconds the connection cookie seed value updates.
- NOTE: This server var was added in 0.3.7 and will have no effect in previous versions.
|
minconnectiontime
| int
| 0
| No
| No
| The time in milliseconds the server will wait before accepting another incoming connection. It is not recommended that you use this variable unless your server is under a connection flood attack.
- NOTE: This server var was added in 0.3z and will have no effect in previous versions.
|
messageslimit
| int
| 500
| No
| No
| The maximum number of messages a user can send per second.
|
messageholelimit
| int
| 3000
| No
| No
| See here.
|
ackslimit
| int
| 3000
| No
| No
| See here.
|
playertimeout
| int
| 10000
| No
| No
| The time in miliseconds after which a player will timeout when not sending any data to the server.
|
mtu
| int
| 576
| Yes
| No
| See here.
- NOTE: This server var was added in 0.3.8 and will have no effect in previous versions.
|
[*] Some settings are a different type than you might think.
Logging
Setting
| Type
| Default value
| Read-only
| Rule
| Effect
|
output
| bool
| 0
| No
| No
| Toggles if log messages (e.g. print/printf from scripts or logprintf from plugins) should be duplicated in the server console. Set to 1 to enable or 0 to disable. This option has effect only on Linux servers.
|
timestamp
| bool
| 1
| No
| No
| Toggles if a timestamp should be printed with every console message. Set to 1 to enable or 0 to disable.
|
logtimeformat
| string
| [%H:%M:%S]
| Yes
| No
| The timestamp format that should be used. The format is based on the strftime format from C/C++. Here are some examples:
- [%H:%M:%S] This displays only the time, and is the default format for all previous SA-MP server versions.
- [%d/%m/%Y %H:%M:%S] This would display the date in dd/mm/yyyy format followed by the time in hour:minute:second format.
|
logqueries
| bool
| 0
| No
| No
| Toggles if all queries sent to the server by players should be logged. Set to 1 to enable or 0 to disable. It is considerably useful during a DDoS attack.
|
chatlogging
| int*
| 1
| No
| No
| Toggles if player chat should be shown in the server console. Useful to stop the log from becoming bloated, or if you have another scripted chat logging solution. Set to 1 to enable or 0 to disable.
- NOTE: This server var was added in 0.3e R2 and will have no effect in previous versions.
|
db_logging
| int*
| 0
| No
| No
| Logs sqlite db_* function errors in the server console.
- NOTE: This server var was added in 0.3.7 R2 and will have no effect in previous versions.
|
db_log_queries
| int*
| 0
| No
| No
| Logs all sqlite db_query calls, including the query string.
- NOTE: This server var was added in 0.3.7 R2 and will have no effect in previous versions.
|
[*] Some settings are a different type than you might think.
Client
Setting
| Type
| Default value
| Read-only
| Rule
| Effect
|
onfoot_rate*
| int
| 30
| Yes
| No
| The time in milliseconds a client should update the server with new data while on foot.
|
incar_rate
| int
| 30
| Yes
| No
| The time in milliseconds a client should update the server with new data while in a vehicle.
|
weapon_rate
| int
| 30
| Yes
| No
| The time in milliseconds a client should update the server with new data while firing a weapon.
|
stream_distance*
| float
| 200.0
| No
| No
| The distance on the X,Y plane players will stream in server entities. The maximum is 400.0 and the minimum is 50.0. Higher values makes players see server entities at a greater distance, but requires more client processing and potentially more bandwidth.
|
stream_rate*
| int
| 1000
| No
| No
| The time in milliseconds before the streaming in of server entities is retested for each player. The maximum is 5000 and the minimum is 500. Lower values increases server processing as it has to recheck streaming conditions more frequently for each player.
|
[*] Lower values of onfoot_rate, incar_rate and weapon_rate increases sync performance, but uses more bandwidth.
NPCs
Setting
| Type
| Default value
| Read-only
| Rule
| Effect
|
maxnpc
| int
| 0
| No
| No
| The maximum amount of NPCs your server can hold. By changing this number you can alter how many of the player slots can be used by NPCs.
|
Lag compensation
Setting
| Type
| Default value
| Read-only
| Rule
| Effect
|
lagcompmode
| int
| 1
| Yes
| No
|
- 0: Fully disable lag compensation.
- 1: Fully enable lag compensation.
- 2: Enable position-only lag compensation. This means player rotation won't be lag compensated for.
- NOTE: This server var was added in 0.3z and will have no effect in previous versions.
|
lagcomp
| string
| On
| Yes
| Yes
| Probably set automatically to On or Off depending on the lagcompmode setting.
|
Custom models
Setting
| Type
| Default value
| Read-only
| Rule
| Effect
|
useartwork
| bool
| 0
| Yes
| No
| Toggles if the server uses custom models from the models folder. Set to 1 to enable or 0 to disable.
- NOTE: This server var was added in 0.3.8 and will have no effect in previous versions.
|
artwork
| string
| No
| Yes
| Yes
| Probably set automatically to No or Yes depending on the useartwork setting.
- NOTE: This server var was added in 0.3.8 and will have no effect in previous versions.
|
artpath
| string
| models
| Yes
| No
| The path where the custom models are located.
- NOTE: This server var was added in 0.3.8 and will have no effect in previous versions.
|
Others
Setting
| Type
| Default value
| Read-only
| Rule
| Effect
|
myriad
| bool
| 0
| No
| No
| Unused. It probably enabled some compatibility with an old GTA San Andreas mod called "Myriad Islands" years ago, probably earlier than year 2008.
|
nosign
| string
|
| Yes
| No
| Unused.
|
Notes
- Values marked as "Read-only" (as shown by /rcon varlist) can not be changed during runtime. All other values can be (temporarily) changed by passing them to SendRconCommand.
- Values marked as "Rule" (as shown by /rcon varlist) are displayed in the server browser in the Rules section.
- Scripts do not have to be in the gamemodes or filterscripts folders. The information in server.cfg is a path, and can therefore use "..". Quote by Y_Less.
filterscripts ../scriptfiles/first ../minimodes/second