Console commands Here are a few basic commands. There are many more commands available to you of course, but this is a list of the common commands I use on my server.
Depending on how you connect to your server you may or may not need to use the Remote Console (rcon )command. Some of my servers are right next to me, so I just type the command as you see them below. For remote servers, I use the rcon password, and to execute these commands below, it is necessary to put "rcon" in front of each command. See the Remote console guide for more information on Rcon.
Basic Commands
Status The status command will display the players currently entering your server or playing. The display will give you the client number on the left column, starting with 0 and this can be used to kick the player later if needed. With the status command, you will also see the player's score, their ping (connection speed), their name, IP address, qport and rate. Just type in status in the console
Clientkick This command is best for kicking those problem players. To kick, use the status command to view the players, and get the number of the player you wish to kick (column on the far left side). If the player you need to kick is number 5, you enter the following in the command line. clientkick 5 The player will "leave the game".
Kick You can also kick a player with the kick command, but if you just use kick, you use the players name typed out after the command. Since some player names are long, and typos can be made in attempting to kick, the clientkick command is easier and faster.
Say From the dedicated server console, you can send messages to all players by using the command SAY and they typing your message within quotes. say "hi all" will display in the game as console: hi all
Restart To restart the existing game / map that is playing on the server just enter restart in the console. This does not shut down the server, it just resets the existing game and game statistics as if just starting.
Friendly Fire (FF) or Team Damage Normally, this is set within the server config file, but you can also change these settings from the console. In this case, the command is entered followed by a 1 or 0. 1 Enables the setting and 0 disables the setting. To turn on Friendly Fire or Team Damage, meaning the teammates can kill each other if not careful, you enter the command as follows g_teamdamage 1 and to disable, g_teamdamage 0. If you want to know what the current setting is in your server, just type the command without entering the number and the current setting will be displayed.
Time Limit As with most commands in the server config, you can also change the game time limit, even while in the game. For example, if the current time limit is 20 minutes, and there are 5 minutes remaining, you can change the time limit to 30 which will add 10 more minutes to the current game. To set the time to 30 minutes, type in timelimit 30
If the current game running is set for 20 minutes and there are 5 minutes remaining, but you set the game time limit so 10, the round will end immediately because 10 minutes had already passed for the game.
Run Speed Other commands allow you to override the default game settings. For example, in MOHAA, the default run speed is 250. For a faster action game, you can set the run speed higher, such as to 300. In the console, enter sv_runspeed 300 If you just type in sv_runspeed without the number, the console will display the current setting.
Changing the Map To change the map, you just need to know the map name. For example, if you are in death match and want to launch the map called Remagen (mohdm3), you enter map dm/mohdm3 in the console. The map will change immediately.
The prefix in front of the file name is important for the game type, where dm/ is required for death match and team death match games. obj/ would be place in front of objective map games. At the end of this map, the set rotation of maps will continue.
If you wish to run custom maps, such as on my MOHAA server, you need to know the correct file name for launching the game. One easy way is to find the name is to go into the game and use the setup screen for hosting your own game. Click on the button to select a map and locate the file you wish. The maps file names as shown in this screen display just as you need to use them when changing a map from the console or in the server config. (See the guide for In-Game Server launch for images of what I am talking about).
For custom maps available on this website, in the download section, you will see that I put the proper map file name in the description, within parenthesis. As an example, for map Honor Brigade, in the description field you will see (honor_brigade). To launch this map from the console for a death match or team death match game, you would type map dm/honor_brigade and the map will change to it, if the map is on your server.
Changing the Game Type Just like with changing maps, you can also change the game type. You will enter the command g_gametype followed by the appropriate game type number.
1 = Deathmatch (DM) or Free For All (FFA) 2 = Team Deathmatch (TDM) 3 = Round Based (RB) 4 = Objective Games (OBJ) 5 = Tug of War (TOW) This is only available in Spearhead or Breakthrough 6 = Liberation (LIB) this is only available in Breakthrough Capture the Flag or CTF is available in MOHAA, but only through adding a custom Mod to your server.
To change the game type on a server to Team Death Match, you would would enter g_gametype 2 into the console (2 for Team Deathmatch)
Reset or change your server Configuration during the game! If you have made many changes to your server with console commands like the above, you can also reset your server to all of your standard settings by executing the server config file again.
I have many server config files setup in my servers, each with a completely different setup, map rotation and so forth. From the console, you can execute any server config file you have on your server, completely changing the game.
For example, one of my server config files may be named server02.cfg (you can name them anything you like). To execute this config, in the console I just type exec server02.cfg The server will then restart with all of the settings under server02.cfg.
If you have players currently on the server, the players will NOT be booted when you execute a config file. To other players, it will just look as if a map is getting ready to change. Having different server config files on your server makes it very easy to change the server without having to enter commands one by one in the console.
Other There are many more commands available for controlling or changing the game. The above is really just a starter list, but I think it it at least covers the basics.
|