# Setting up your server.cfg file

NOTE: The server.cfg / listenserver.cfg file is the configuration link between Half-life and Admin Mod . Without a proper setup, Admin Mod will cause more problems than it will solve. Each portion of the setup is critical, so read through this section carefully. Many configuration variables (or cvars for short - we uses the term cvars in this document extensively, so now you know what we mean) have been removed or changed with Admin Mod 2.50, so everyone should read this section, confirmed user or not.

All of the Admin Mod configuration variables (cvars) are listed here. You must place all of these inside your server.cfg or listenserver.cfg file AMONG all the other Half-life cvars. A complete list of Admin Mod cvars is available in the reference chapter, under Admin Mod Configuration Variables (CVARs).

Please note that a 'dedicated' server will, unless told otherwise, read it's initial settings from 'server.cfg'. A 'listen' server, on the other hand, reads them from 'listenserver.cfg'. You need to be sure you are editing the correct file before your start. You will only use one or the other of these files, depending on your setup. Since it's so important, here is the simple explanation for all the visual people out there:

Type of Server | File to Configure
Dedicated Server (runs in a text window on the computer - you don't play the game on this machine, you just connect to it) | server.cfg
Listen Server (you start the server in your Half-Life game, and you can play on the same machine while it is acting as a server for other players) | listenserver.cfg

Setting variables in server.cfg when you're running a listen server, and vice versa, does nothing. A listen server is one that you start from within Half-Life itself: it starts when you join, it ends when you quit, and you have 0 ping. A dedicated server is started from the HLDS program, and appears on the server machine as just lots of text information. If you have no idea what type of server you are running, even after this explanation, simply configure your server.cfg file to you liking with all the necessary cvars and copy the contents of the server.cfg file to the listenserver.cfg file. This way, no matter what you do, you are covered.

#### Creating/Configuring Your server.cfg file:

Below is the contents of the default server.cfg file for Admin Mod 2.50 (Again, if you run a listen server, this applies equally to you, only your config file is called listenserver.cfg). Each entry is described in more detail here than you will find in the config file itself. Each cvar has been made to appear here in bold print, so you will be able to more easily find each one, and so you can differentiate the cvars from the comments.

// This is a comment

In the server.cfg file, any line beginning with " // " (comment characters) is ignored by the server when it loads this file. In addition, if the " // " characters appear anywhere on a line, anything after those characters is ignored by the server Any line not beginning with the comment characters is assumed to contain server instructions, and is parsed by the server for execution.

Here are the contents of the default server.cfg that comes with Admin Mod:

// Used by the TFC plugin only. If enabled, an attempt to switch

// teams will be rejected if it would unbalance the teams

// (0=disabled, 1=enabled)

admin_balance_teams 0

// If you are using bots with admin mod you can set this to 1

// It will protect bots from receiving client commands which

// would crash your server.

// (0=disabled, 1=enabled)

admin_bot_protection 0

// This is the message displayed to everyone after connecting.

admin_connect_msg "Welcome to the Real World..."

// This controls the availability of weapon restriction in CS.

// (0=disabled, 1=enabled)

admin_cs_restrict 0

// This will produce debugging messages in your logs which can

// be used to troubleshoot problems. Not recommended for general use.

// (0=disabled, 1=enabled)

admin_debug 0

// Determines whether or not the fun commands are allowed by default.

// If not on by default, the admin can still turn it on when wanted.

// (0=disabled, 1=enabled)

admin_fun_mode 0

// Enable to get special effects with certain commands

// like teleport or slap.

// (0=disabled, 1=enabled)

admin_fx 0

// If enabled, people who are gagged (not allowed to "say") will be

// unable to change their name while gagged

// (0=disabled, 1=enabled)

admin_gag_name 0

// If enabled, people who are gagged will not be able to use

// the say_team command.

// (0=disabled, 1=enabled)

admin_gag_sayteam 0

// Makes the admin with the highest access level the only admin in power.

// Example: if multiple admins are present, only the one with the highest

// access level will have admin access.

// (0=disabled, 1=enabled)

admin_highlander 0

// If admin_ignore_immunity is enabled, ACCESS_IMMUNITY is

// ignored and does nothing.

// (0=disabled, 1=enabled)

admin_ignore_immunity 0

// This file specifies which script plugins get loaded.

// It should be relative from the <mod> directory

admin_plugin_file "plugin.ini"

// The time (in seconds) during which an admin can reconnect after

// disconnecting without resetting his password in the setinfo line.

admin_reconnect_timeout 300

// Message displayed to users who try to execute commands that

// they don't have the appropriate access rights for.

admin_reject_msg "You do not have access to this command."

// How often, in seconds, the repeat_message should be shown on

// the screen suring the game. Minimum value is 15 seconds.

// So, a value of 600 = 10 minutes between messages.

admin_repeat_freq 600

// Message that is show to everyone on the server every

// ten minutes by the message plugin.

admin_repeat_msg "This server is using Admin Mod"

// The old verbosity. Defines what commands are repeated to

// clients in the form: "[ADMIN] <user> used command <command>"

// 0=all commands labeled with the admin name

// 1=all commands labeled but without the admin name

// 2=most commands not labeled (except "cheat" commands)

admin_quiet 0

// This file is used to store configuration data across maps

// and even across server restarts.

admin_vault_file "vault.ini"

// If enabled, a hlds_ld-style map vote will automatically

// start five minutes before the end of a map.

// (0=disabled, 1=enabled)

admin_vote_autostart 0

// If set to on status (1), when a vote is in progress all

// players will see the votes of other players as they vote.

// (0=disable, 1=enabled)

admin_vote_echo 0

// Number of seconds that must elapse after start of the map,

// or the end of another vote, before another hlds_ld-style

// map vote can be called.

admin_vote_freq 600

// Controls how many times the current map can be

// extended for thirty minutes

admin_vote_maxextend 0

// Percent of players who have to vote for a map to get it

// to win a hlds_ld-style map vote.

admin_vote_ratio 60

// Ability to make clients execute commands

// (0=disabled, 1=enabled)

allow_client_exec 0

// If set to 1, players who try to crash the server by using

// non-printable characters in mid-game will be banned from

// the server for 24 hours. Regardless of this variable's

//setting, offenders will be kicked if they do this.

// (0=disabled, 1=enabled)

amv_autoban 0

// Default access rights for players not in the users.ini file.

// (See documentation for access levels and information)

default_access 1

// encrypt_password, for LINUX ONLY, whether to use

// encrypted passwords or not

// (0=disabled, 1=enabled)

encrypt_password 0

// If enabled, the scripting file functions have read

// access to files

// (0=disabled, 1=enabled)

file_access_read 0

// If enabled, the scripting file functions have write

// access to files

// (0=disabled, 1=enabled)

file_access_write 0

// This is only used with the old script system and is not

// needed with the new plugin system

help_file "admin_help.cfg"

// Declares priority IPs that are allowed to take a

// reserved spot (if any are set up) without a password.

ips_file "ips.ini"

// Ratio of players who must vote 'yes' to a kick for

// it to be successful.

kick_ratio 60

// Ratio of players who must vote 'yes' to a map change

// for it to be successful.

map_ratio 80

// List of maps people are allowed to vote for. 0 to disable.

// Disable to enable all maps and use list from mapcycle.txt.

maps_file maps.ini

// The file (relative to the <mod> dir) that

// reserved models are loaded from. 0 to disable.

models_file models.ini

// The message shown to someone who gets kicked for

// trying to use a reserved model.

models_kick_msg "[ADMIN] That model is reserved on this server."

// The message shown to someone who gets kicked for

// trying to use a reserved nickname.

nicks_kick_msg "[ADMIN] That name is reserved on this server.

// Password_field...first password of the setinfo line

// If password_field is "pw-AdminMod", the setinfo will be

// setinfo "pw-AdminMod" "password-in-users.ini"

password_field pw-home

// If pretty_say is enabled, centersay() fades in

// and out and does some other tricks.

// (0=disabled, 1=enabled)

pretty_say 1

// Controls how many (number) of the server's slots are reserved.

// This is useful only if reserve_type, below, is either 0 or 2.

reserve_slots 0

// Custom message given to clients trying to connect who do not have

// a reserved slots, when no public slots are free

reserve_slots_msg "There are no reserved slots available on the server."

// This controls how reserve slots work on the server. See documentation.

reserve_type 0

// NOTE: If you have "admin_plugin_file" set above, this CVAR is ignored.

// Define the path to the script file here, if you don't want

// to use the plugin system.

script_file "cstrike/dlls/admin.amx"

// If enabled, names are compared to those who have privileges

// with regular expressions.

// (0=disabled, 1=enabled)

use_regex 0

// The file in which you define your admins, their passwords

// and the access levels that they are assigned to.

users_file "users.ini"

// The minimum number of seconds allowed between votes

// called with the vote() (admin_vote functions) scripting function.

// If 0 or disabled, the vote() scripting function is disabled.

vote_freq 180

// Location of word filter file. 0 to disable, or something

// like "wordlist.txt" if enabled

words_file wordlist.txt