Tuesday, August 23, 2011

Console Commands

Console commands
The Call of Duty 4 console commands are very similair to the previous CoD editions.
You can use the commands by pressing '~' while you are in-game. A small bar will appear on the top of your screen. Now you can enter one of the following commands.
If the console does not display when you press '~', you need to enable it. Do this by going to the game's main menu -> Options -> Game Options... -> Enable Console should say 'Yes'.
PS: For a larger console window (needed for /status for example) you need to press 'Shift + ~'. In this window the command output will appear, you can scroll up and down with the scroll button on your mouse.
Commands
/serverinfo - This command shows the server settings and configurations.
/map [map name] - This will load the given map.
/map_rotate - This will load the next map of the rotation. This is set in the 'sv_maprotation' file on your server.
/map_restart - This will restart the current map.
/fast_restart - This will restart the current map just like /map_restart but is much faster as it will not load the map again. It will just restart the map.
/status - This shows information about the connected players. This includes the client ID, score, ping, GUID, name and IP address. The ID and name can be used for the following commands.
/tell [player id] - This will display a message to a specific player. The ID is given with the /status command.
/clientkick [player id] - This will kick a player according to its ID (given with the /status command).
/kick [player name] - This will do the same as the /clientkick command, but this command requires the player's name. However, some names are very difficult to enter (with colour codes etc.), thats why the /clientkick commands is easier in use. You can use 'all' as player name, this will kick all players from the server.
/onlykick [player name] - Does the same as /kick as far as I know.
/banClient [player id] - This command will ban a player according to its ID. The player's GUID will be added to ban.txt.
/banUser [player name] - This command does the same as the /banclient command. However, this requires you to fill in the player's name, it is therefore advised to use the /banclient command (names can be long or contain colour codes).
/tempBanClient [player id] - This will temporary ban a player using the player's ID. The length of a temporary ban can be changed in the server configuration file.
/tempBanUser [player name] - This will temporary ban a player using the player's name.
/unbanUser [player name] - This will unban a user according to the player's name. If the player's name appears more than once in ban.txt, you can edit the file and remove the banned player manually.
/dumpuser [player name] - This will give information about the player.
/killserver - As the name says, it will shut your server down.

RCON usage
It is very likely that you are not playing at the same location (IP address) as your server is. Thats where we use RCON (= remote control) commands for. Using RCON is very easy, just add '/rcon ' in front of the commands above (removing the '/' of those commands). But before you can use RCON, you will have to login:
/rcon login [password] - Fill in the password of the server and you can use RCON commands.

Examples of RCON commands:
/rcon map mp_pipeline
/rcon status
/rcon banclient 5

More (useless) commands
/serverstatus - This will give you information about the server settings and a quick list of online players.
/serverinfo - This will give you some diversified about IW settings on your server and some useless information.
/systeminfo - This will give you a list of the settings your server has.
/clientinfo - This will give you information about the yourself as client.
/showip - This will provide your IP address.
/cmdlist - This will show a complete list of commands available.
Good luck with keeping your server clean and as you wish ;)

FPS Tweaks

If you want to tweak some graphics to increase your FPS in the game, use the console by pressing "~" button then type this commands.

cg_drawfps 1
diplays fps in top right corner

cg_drawlagometer 1
draw your Lagometer on screen

com_maxfps 125
(One of the most important commands in cod4 is the FPS command, and Ill tell you why. You probably already know that more fps makes the game feel much smoother. What you might not know is that COD4 is based on the q3 engine and is designed to work at 125 FPS.What this means for you is that your going to have problems interacting with the game under 125 FPS. This can mean any thing from not being able to climb objects, or even bad hit detection during fire fights. The problem is your fps is set to 85 by default, lets fix it. Bring down you console and type com_maxfps 125. If you want to remove the limit, type com_maxfps 0.

cg_fov 80
Next up is the field of view command. FOV(field of view) is basically how much you can see on your monitor at one time. The higher the number the more you can see, which will give you a huge advantage over those who don't use this command. Default is 65 max is 80, to change it bring down your console and type "cg_fov 80".

r_drawdecals 1
Another helpful command is "r_drawdecals", set it to 1 for on and 0 for off. Its off by default, and don't be surprised if you turn it on then have to turn it off to get into certain servers. It basically cleans up some of the random paper and trash on the ground, and gives you an fps boost. But some servers want you to have bad fps and wont let you in unless its set to 0(note that the other commands will work fine on any server).

maxpackets 100
Maxpackets next, this command command usually helps people who have good fps but bad hit registration. Default is 30 if your fps is set to 125 you should set maxpackets to this "/maxpackets 100".

snaps 30
This command tells your cod4 server how many times to update positions of players, bullets ect per second. Default its 20 setting it to "/snaps 30" should make movement look smother and hits register better.

r_drawsun 0
Disables the sun and a bunch of effects that is causes saving you a few fps.

cg_brass 0
Turns off shell ejection. Not having to render them should send a few more fps your way, a good addition to your CoD4 config.

cl_packetdup 1
Duplicates packets send between player and server - players with a good connection and no packet loss should use 0, players with packet loss should use a higher number (0-5) most players use 1-2

sm_enable 0
Turns off unique Shadows ingame, it boosts FPS more than most commands

r_multigpu 1
can add more FPS

r_cachemodellighting 1
can add more FPS

r_cacheSmodellighting 1
can add more FPS

r_aaAlpha 0
remove the anti-aliasing / smudge effects, this can free up more FPS also

r_texfiltermipmode 2
Turns it to bilinear filtering, which should give you the best fps

r_rendererPreference 0
to use Shader Model 2.0 instead of 3.0 which will increase fps for those people using old videocards

Now Type...
/vid_restart

You're done... enjoy! ;)