Developer console is a tool available on video games, which is usually accessed by pressing the tilde (~) or grave key (`) key (the key may be different for keyboards with different language set-up; it is usually the key to the left of 1). They may only be accessed on PC and Mac. The console can be used to significantly alter the game, including but not limited to making the player invincible, obtaining a weapon that would normally be impossible to get, free-flying, changing game rules and more. The console can be used for testing and to give information useful to the developers of the game, generally for debugging, hence the term "developer console".
Since Call of Duty uses the same base for most of its game engines, many commands remain the same throughout the series.
Note: While activating the console in games until Call of Duty: World at War is rather simply done completely in-game, starting with Call of Duty: Modern Warfare 2, the game files have to be altered. Editing the configuration files ("config.cfg" and "config_mp.cfg") in Call of Duty: Modern Warfare 2, Call of Duty: Black Ops and Call of Duty: Modern Warfare 3 is safe and cannot lead to a VAC ban, although in the later games the corresponding files are encrypted and are not considered safe to edit. Console enabler mods in any games are also very likely to result in a ban. Generally, if the player is not aware of what they are doing, they should not do it.
- 1 Enabling the console
- 2 Codes and Effects
- 3 Usage in Multiplayer
- 4 Gallery
- 5 Trivia
Enabling the console
- Right click on the Call of Duty Single Player shortcut and select "Properties"
- In the "Target" field enter +set sv_cheats 1 (e.g. "C:\Program Files\Call of Duty\CoDSP.exe +set sv_cheats 1)
- Start up the game, press the tilde key (~) or grave key (`) to enter console.
- Some computers, like Macintosh using bootcamp does not have this capability.
- From the in-game options, the player should enable the console.
- The player should then press the tilde key (~) or grave key (`) to open the console.
- The player can now type seta thereisacow 1337 and press Enter.
- The player may now type spdevmap [mapname] (or devmap [mapname] in Nazi Zombies) and press Enter.
- This will start whichever map was typed in with console commands enabled. While playing, the player can press the tilde or grave key to bring up the console and type in commands. The player can press Enter to activate them, type them in again, and press Enter to deactivate them.
Note that the player has to devmap or spdevmap as opposed to selecting a map from the mission select screen in order for the commands to be available. In addition, the mission names are not always their in-game names. For example, Death From Above would start with spdevmap ac130, and Nacht der Untoten would start with devmap nazi_zombie_prototype. The names can be seen in their individual articles on the wiki or by browsing the game files. To find out the codename of the map you are currently playing on simply type mapname in the console, the first option in the dropdown shows the codename of the current map.
- The player should go to multiplayer and open the console
- The player can then enter devmap [mapname]. This will load a new server on with whichever map was entered with commands enabled.
- The player may now enter commands with a / in front of them. Not doing so will merely send what was typed as a message.
Note that not all commands will work.
To enable console cheats for Call of Duty: Modern Warfare 2 or Call of Duty: Black Ops the player must do the following:
- Open the file location where the game is located (in most cases it is "C:\Program Files (x86)\Steam\SteamApps\common\game title") and go to "players" folder
- Open "config" (for singleplayer) or "config_mp" (for multiplayer) with a text-editing program such as Notepad
seta monkeytoy "1"(can be found easily by searching monkey with Ctrl+F) and change it to
seta monkeytoy "0"
- Go to the bottom of the text and type in
- Press enter twice
bind key "command"(where
keyis replaced with the desired key used for the command and
commandis replaced with the desired command)
- Click back to "players" and right click on "config"
- Click "Properties" and turn off "Read Only"
- Save the "config file"
- Right click on "config", click "Properties", and enable "Read Only"
The player should note that the tilde or grave key will not work in singleplayer. The only way to use the command console now is to simply enter bind commands into the config.cfg file.
To use the cheats, the
bind command must be used:
bind X "Y" - on the place of X the player must put a key, which is not in use (they should check the other "bind" lines, and ensure that the key they want is not already in use). On the place of Y, between the two tildes, the player must put the cheat code. Before someone attempts to enable the cheats bound, they need to bind the
seta thereisacow 1337 command and enable it every time they start the game. The bind should look like this:
bind X "seta thereisacow 1337", where X is the bound key.
Examples of bound console commands:
bind U "god"
bind V "notarget"
bind P "give ammo"
bind J "cg_fov 110"
When ingame, the player simply has to press one of these keys, and the cheat code will be activated.
Codes and Effects
Commands can be enabled and disabled, depending on how they must be activated. The most basic will require the player to simply enter the command to activate, and enter it again to deactivate (ex.
god). There are also commands that are activated and deactivated by entering the number 1 after it to activate, and 0 to deactivate (ex.
There are also commands that alter game elements. These cannot be activated, but changed. When entering in one of these commands, the console will say "Domain is any number between X and Y (X and Y being the minimum and maximum values)." As such, the player can enter any number between X and Y to change the domain, and as a result, the effect. The default is also given, so players can return to the normal value if they wish. An example is "timescale 1", which dictates the game's speed. The default is 1, but players can enter any value between 0.001 (X) and 1000 (Y).
Below is a list of some of the most useful console commands. Note that the underscore ( _ ) cannot be used in place of a space, and vice versa.
|These commands toggle settings on and off.|
|god||Cannot take damage and cannot die.||Dogs can down the player as they normally could, although the player has not technically died, forcing the player to use the command kill to resume play. Flogger can also kill players with god mode, and Punji Stakes can damage the player as well.|
|demigod||Take damage, but cannot die from most things.||Zombies can still kill the player normally.|
|noclip||Puts the player into noclip state to move freely in any direction through anything.||Weapons cannot be used in this state.|
|ufo||A flight mode similar to but much faster than noclip.||Only allows movement forward and backward. The player can move vertically with the leaning keys (default Q and E).|
|notarget||The player will not be noticed by any AI.||The Zombies will move toward the position where the player entered the command then stop.|
|kill||Kills the player.|
|dropweapon||Drops the current weapon.|
|take all||Removes all of the player's weapons and health.|
|take ammo||Removes all of the player's ammunition.||This will also remove the player's grenades, both lethal and tactical.|
|take weapons||Removes all of the player's weapons.|
|give all||Gives the player one of every weapon with maximum ammunition.||
Gives player all weapons present on the Map (including Pack a Punched Variants on Der Riese/Some Custom Maps) and some extra 'Console Only' guns (See Below)
A Spare Kar98k, Walther P38, Modded M1911, BRAAAINS..., Default Weapon A Spare M1911 and 4 Glitched Molotov Cocktails (Shows 12 counted on HUD, but 3 are used at a time, which don't work and there are 3 glitched Monkey Bombs stuck behind them.
|give ammo||Refills ammunition for every weapon currently in the player's possession;|
|map_restart||Restarts the map or mission without being taken to the loading screen.|
|These commands require arguments.|
|friendlyfire_dev_disabled <>||Depending on the value, allows the player to shoot friendly NPCs without restarting the level.||Allowed arguments are 0 and 1. 0 is the default; 1 allows the player to shoot friendlies.|
|sf_use_chaplin 1<>||Enables or disables the Ragtime Warfare cheat.||Available only in singleplayer. Removes the player's HUD and ability to sprint, the environment gets a yellow tint, dust and scratches fill the screen, gameplay speed is increased to double the regular, all sounds in the game are muted, and a single piano theme plays repeatedly. 0 disables, 1 enables. Only usable on Call of Duty 4 and World at War.|
|sf_use_bw <>||Enables or disables the CoD Noir cheat.||Available only in singleplayer. Turns all colors in the game to greyscale. 0 disables, 1 enables. Only usable on Call of Duty 4 and World at War.|
|sf_use_contrast <>||Enables or disables the Super Contrast cheat.||Available only in singleplayer. Drastically increases the color contrast in the game. 0 disables, 1 enables. Only usable on Call of Duty 4 and World at War.|
|sf_use_clustergrenade <>||Enables or disables the Cluster Bombs cheat.||Available only in singleplayer. After a frag grenade explodes, four more spawn and explode in a row. Only usable on Call of Duty 4 and World at War.|
|sf_use_invert <>||Enables or disables the Photo Negative cheat.||Available only in singleplayer. Inverts all colors in the game. 0 disables, 1 enables. Only usable on Call of Duty 4 and World at War.|
|sf_use_slowmo <>||Enables or disables the Slow-Mo Ability cheat.||Available only in singleplayer. Allows the player to toggle slow motion by knifing. Only usable on Call of Duty 4 and World at War.|
|sf_use_tire_explosion <>||Enables or disables the A Bad Year cheat.||Available only in singleplayer. Enemies explode into tires when killed. Only usable on Call of Duty 4 and World at War.|
|cg_thirdperson <>||Enables or disables third person mode.||Changes the player's camera from default first person to third person (MP and Zombies only, except for WaW).|
|player_burstFireCooldown <>||Adjust (Or remove) the delay between bursts on the M16A4.|
|cg_draw2D <>||Removes all HUD elements.||Essential for taking screenshots without the HUD in the way. Use in conjunction with cg_drawgun and noclip for best results.|
|cg_drawGun <0/1>||Stops the weapon and player model being drawn if set to 0.|
|g_gravity||Adjust player gravity.||This can be used with the jump_height command.|
|g_speed||Adjust player speed.||Keep it under 1000, or movement will become too erratic and may crash the game.|
|cg_laserlight||Toggles whether the laser light is visible or not.|
|data-sort-value=bg_forcedualwield "1"|bg_forcedualwield "1"||Forces weapons to go Akimbo||Only in MW2, not all weapons are working|
|data-sort-value=bg_forceExplosiveBullets "1"|bg_forceExplosiveBullets "1"||Forces weapons to shoot explosive bullets||MW2 only|
|cg_LaserForceOn||Adds a visible laser pointer to all weapons.||The lasers originate from the barrel (with the Default Weapon, it points outside the player's cross-hairs). Laser will appear on all NPC, vehicles, emplacements and player-controlled weapons in Call of Duty 4: Modern Warfare, but is limited to only the player's weapons in newer installments.|
|cg_LaserRange||Sets NPC's laser range.||Sets the range of NPC's weapon's lasers.|
|cg_LaserRangePlayer||Sets the player's laser range.|
|player_meleeRange||Sets the player's melee range.||Up to '1000', knife will not 'Lunge', but the attacked AI will take damage.|
|player_sprintSpeedScale||Sets the player's sprint speed.|
|timescale <>||Sets game speed.||Default is "1.00": 1 second in reality is 1 second in game.|
|sf_use_ignoreammo <>||Enables or disables the cheat "Infinite Ammo".||
Available only in singleplayer. The player's ammunition doesn't decrease when firing, making his weapons have practically infinite magazine capacity. Makes the RPG-7, AT4, M203, Rifle Grenade, Panzerschreck, and GP-25 slowly automatic, with the M203 on the M16A4 Grenadier having the significantly highest fire rate. Only usable on Call of Duty 4 and World at War.
|player_sustainammo <>||Unlimited ammunition for all weapons; unlimited magazines.||Almost the same as "sf_use_ignoreammo 1", but only affects the player who uses it. Works in mutiplayer.|
|cg_fov <>||Adjusts depth perception.||Values must range between 60 and 160 in singleplayer, and 60 and 80 in multiplayer.|
|jump_height <>||Adjusts jump height.||The default value is "39". Works well in conjunction with g_gravity.|
|r_fullbright <>||Disables shading and game effects. As such, the level will appear brighter, making vision easier. It also greatly increases your performance if you are on a lower end PC.|
|take <item name>||Takes the item the player entered.||The item name is the console name, not the in-game name. This only works with weapons that are present in the level. For example; it is possible to remove an M1911 in any mission. See the item's page for their console command name.|
|give <item name>||Gives the player the item entered.||The item name is the console name, not the in-game name. This only works with weapons that are present in the level. For example; it is not possible to spawn an R700 in any mission except "The Sins of the Father" in Call of Duty 4: Modern Warfare, because it is not present in any other mission. See the item's page for their code.|
|map <name>||Changes the map.||The name for the mission/map is the console name, not the in-game name, for example to load up "Death From Above" the command would be spdevmap ac130, not spdevmap Death From Above.|
|spmap <name>||Same as map, but works only in singleplayer.|
|mpmap <name>||Same as map, but works only in multiplayer.|
|devmap <name>||Same as map, but runs the map in developer mode, allowing console commands.|
|spdevmap <name>||Same as "spmap <name>", but runs the map in developer mode, allowing console commands.|
|mpdevmap <name>||Same as "mpmap <name>", but runs the map in developer mode, allowing console commands.|
|cg_gun_z <>||Moves the player's gun from left or right.||Positive values move it right, negative values move it left. Default value is "0."|
|cg_gun_y <>||Moves the player's gun up or down.||Positive values move it up, negative values move it down. Default value is "0."|
|cg_gun_x <>||Moves player's gun forward or backward.||Positive values move it forward, negative values move it backwards. Default value is "0."|
|Modifies 'Double Tap' (Zombies and Multiplayer)||
When Double Tap is Equipped (Multiplayer) or Bought (Zombies) the effect is modified to whatever you wish, the lower the number under '1' (1x Fire Rate, Normal), the faster the gun will shoot.
Especially Useful when combined with either of the ignore ammo commands.
When setting to high numbers, lower performance PC's may suffer lag
|perk_weapReloadMultiplier||Modifies 'Sleight of Hand' and 'Speed Cola'||
When Sleight of Hand is Equipped (Multiplayer) or Speed Cola is Bought (Zombies), The Effect of the perk is Amplified to whatever you wish, the lower the number under '1' (1x Reload Speed, Normal), The faster the weapon will reload, 0.01 for instance is almost instant (even with LMG's).
|player_ClipSizeMultiplier||Multiplies Clip Size by (Entered Value)||Example being with the Double Barreled Shotgun, If you entered 2 as the multiplier, the Shotgun will then have 4 Shells loaded.|
|ragdoll_bullet_force||Ragdoll effect from bullets||Can be set up to 18000, dead bodies will be launched if hit by a bullet at that level, the higher the number, the more powerful the effect is.|
|ragdoll_explosive_force||Ragdoll effect from Explosives||The same as above, but it works for explosives, however, this command can go up to 60000, bodies can be sent even further.|
|player_sprintTime||Increases the player's sprint duration.||Up to 12.8. This command allows the player sprint longer. Works on Campaign, Multiplayer and Zombies. This can also be used with the Extreme Conditioning and Marathon perks.|
Usage in Multiplayer
Console commands that can potentially give the player an unfair advantage cannot be used in online multiplayer. Certain visual and harmless tweaks can be used, such as those to toggle HUD elements such as crosshair, or edit graphical settings such as removing fog. On LAN servers however, commands can still be used as normal.
Call of Duty 4: Modern Warfare
Call of Duty: World at War
Call of Duty: Modern Warfare 2
The following images (save the last two and the pickup icons) use a field of vision of 120.
Call of Duty: Black Ops
Call of Duty: Modern Warfare 3
- In Call of Duty 4, if the player uses
cg_LaserForceOn 1all of the lasers on the weapons will originate from the barrel. However, if the player has an M4A1 without attachments it will originate from the AN/PEQ-2A and curve towards the barrel.
- Only Call of Duty: World at War can have third person mode activated in the singleplayer campaign, unlike other Call of Duty installments which can only be activated in multiplayer.
- In Treyarch games, the player will be notified in the top left corner if the console command is activated or deactivated.
give allconsole command does not work properly in Call of Duty: Black Ops when used in a Zombies map. If the player tries to perform this command, these actions will repeat:
- A random weapon is given to the player (usually in a specific order), however all other weapons are either removed or swapped, leaving the player with just the random weapon.
- Samantha's laugh (likely from the Mystery Box) can be heard, and the player loses some points.
- Repeat every few seconds until the player loses all points (or after a specific amount of weapon swaps). The player's inventory will then be replaced with four weapons; a normal M1911; a glitched Mustang and Sally with less damage and glitched animations; An AK47 with glitched sounds and incredibly low damage; and a Default Weapon.