Talk:Console commands

Excellent job on this page, it made me laugh a few times and it was far more informative than the wall of text that is the PDF (although the PDF is ultimately more useful).

Hah, kind of hard to compete with a reference manual for breadth. But I figure I'll eventually extract every setting that's actually useful out of there. On the other hand, I turn a blind-spot to "stupid" commands like noclip, god, buddha, and sv_infinite_ammo, so it will never be complete if I'm left to my own nefarious devices. I cheat to make games harder! Denkkar 00:09, 18 November 2008 (UTC)

Is possible to spawn enemies with something like a Gameshark on the 360 version?--76.208.58.137 23:47, 29 November 2008 (UTC)

okay, I know that i'm not supposed to "necropost," but there are no Gamesharks for the 360, due to copyright or something.. Waterga74 02:16, 31 March 2009 (UTC)

Special boss infected
z_special_spawn_interval 45 z_exploding_limit 1 z_gas_limit 1 z_hunter_limit 1 z_minion_limit 3 It seems that these commands only control the boss infected during Versus mode, as they do nothing in single player, or do the opposite of what you think they would. I set the spawn interval to 6,000 and all the rest to 0, and I seemed to get MORE boss infected than you would expect. For example, two tanks on the apartment map instead of the usual 0 or 1. That could have been the AI Director being extra devious, though, so I don't know if it was the result of tampering with the numbers or not.

What I was trying to do was remove the boss infected and increase the amount of common infected and panic events to make it more like your typical zombie movie, but I couldn't prevent the boss infected from showing up on single player. All I managed was getting mauled by 500 zombies and then squished by a tank, or three out of four survivors being incapped by smokers and hunters. If anyone knows of any commands to disable boss infected, it would be most appreciated. Thanks! --MadDawg2552 16:44, 22 February 2009 (UTC)

um.. I think It was..

director_no_bosses 1

Waterga74 20:03, 22 March 2009 (UTC)


 * Nope. I tested it and it only removes Tanks and Witches (Tanks still appear during the Finale). Boomers, Hunters, and Smokers still appear. It's not a big deal because they add some variety to the endless horde. I just toned down the number of regular zombies and it works out fine. It's amazing how different people play when they know there is no end to the zombies and they don't have to worry about Tanks or Witches. --MadDawg2552 14:32, 27 March 2009 (UTC)

I think I saw something like

director_no_specials

once... try setting that to 1

Waterga74 18:02, 4 April 2009 (UTC)

Cheats on 360??!?!
Is it possible to use these cheats on the 360 version using a computor keyboard that has a USB attachement? And if so a very clear explanation on how would be much appreciated. Now, GO KILL ZOMBIES!!!!!!!!!!!!!

No... I don't think there ever has been for the 360 for any games... Try buying the PC version Akkryls 12:12, 7 March 2009 (UTC)

Pitch Black version
Did anyone find that this cheat doesnt work for them? Cause it didn't work for me.... Waterga74 19:58, 22 March 2009 (UTC)

It doesn't make the game pitch black. it only turns off the fog. XSuperGamer 15:55, November 25, 2009 (UTC)

Mah dick - Sniper

z_spawn_commands
hello, i tried the z_spawn commands on 05/31/09 and they don't work

console: sv_cheats 1 z_spawn boomer

no boomer spawned. maybe you should check this.

put sv_cheats 1 then put in z_spawn boomer not all in one


 * Try this. "sv_cheats 1;z_spawn boomer" The Star 03:58, February 28, 2010 (UTC)

Console is non-existent in European version
I've tried forever on my European copy of L4D. I can't bring the console up. - Cid SilverWing

Make sure the console itself is enabled. You'll find it on one of the Option menu's.

check the buttons, I thought it was f4 for l4d 2 but its actually ` (the key to the left of "1"), and i have also read some people have it as ~ (no need to press shift)

play solo with no bosses

 * make a custom.cfg in cfg/ folder
 * then put this in it:


 * sv_cheats 1
 * director_no_bosses 1
 * director_no_specials 1
 * director_no_survivor_bots 1
 * director_no_mobs 1


 * then "exec custom" in the console at the main menu
 * i succesfully remove all kind of bosses including the mobs with it


 * it's suitable 4 someone who wants to take an easy walk & sightseeing the zombie town alone
 * i guess :D

Versus mode 4 people with no friends
Is anybody having trouble with trying the versus mode cheats. My console always says that it does not recognize the commands vs_max_team_switches or mp_gamemode... Any ideas?--Donuthead7310 01:34, September 28, 2009 (UTC)

All single player versus console codes have been patched by Valve. Why? I don't know. They don't want people training and getting good at the Infected? :P Seemed silly to me. Jo the Marten ♠  ( Shriek )  ಠ_ಠ  03:18, September 28, 2009 (UTC)

Oh well. Thanks anyways!--Donuthead7310 19:16, September 28, 2009 (UTC)

Funny. I can still use the VS mode single play console codes. I have been doing so for a while now. XSuperGamer 15:56, November 25, 2009 (UTC) EDIT: I see what you mean now. This doesn't work on L4D2. But it still works on L4D1. Tell me the ****in cheats to have in l4d2

Disabling Infected AI
Yeah, so... is there any way to disable the Common Infected AI? You know, kind of like in Developer Commentary, where the CI are just there idling? DeathBlade182 20:27, November 21, 2009 (UTC)

You cant use the nb_blind 1 command.....

Spawning Ammo Piles
What if, for some reason, I want to spawn an ammo pile instead of using the "give ammo" command? Is there any way to use an ent_create command to do this. I mean I can spawn guns for myself or use "give ammo", but the AI survivors are too stupid to grab the fully loaded guns when they run out of ammo. So I want an ammo pile so they can reload during the massive battle where I spawned like 50 hordes and about 10 tanks. XSuperGamer 16:00, November 25, 2009 (UTC) I found out this can be done by using ent_create weapon_ammo_spawn. I just decided to put this here in case anyone else wants to know. XSuperGamer 20:35, December 25, 2009 (UTC)

i believe that you can, instead of spawning ammo pile and constantly returning to it retrieve ammo, you can use the     sv_infinte ammo 1    command. it will completely fill all weapons you currently have and will ever pick up, including specials. also, it allows to to fire continuosly without ever stopping, if you so choose.

Soul Harvester 97 03:26, September 14, 2011 (UTC)

Spawn an box of laser sights?
Does anyone know how to spawn an box of laser sights? I know how to get an laser sight to my weapon by write: upgrade_add. But i want all the bots to have a laser sight, because then they will become better to shot.

alright, here's what i did. i opened my console and typed

bind "ALT" "upgrade_add laser_sight ; ent_create upgrade_laser_spawn"

if that doesn't work, try it like this

bind "ALT" "upgrade_add laser_sight ; ent_create upgrade_lasers_spawn"

i'm PRETTY SURE the top one is the correct one. but whichever one works is the correct one. you'll just have to figure out yourself.

(see edit)

this bind will allow you to add a laser to your current weapon as well as spawn a box of lasers wherever the crosshairs are pointing. your bots will grab the laser the first chance they get, although its best that you give them whatever weapon you want them to use before they pick up one incase they decide to be stubborn. i will re-edit this and remove the incorrect bind from above next chance i get a chance to check.

btw, this was done on L4D2. I have no idea if this could possibly work on number one.

Soul Harvester 97 07:18, September 13, 2011 (UTC)

Edit: the console command is

bind "ALT" "upgrade_add laser_sight ; ent_create upgrade_laser_sight"

Soul Harvester 97 22:23, September 14, 2011 (UTC)

repeting the command
hi guys. tell me please how can I make it to auto repeat my command so i dont have to press binded key never again??

You mean for it to endlessly process your command? When would you ever need it to do that? I don't see how binding a key is that much of a hassle. Jo the Marten ( Shriek )  ಠ_ಠ  22:13, January 16, 2010 (UTC)

Toggle Console wont work
Toggle console command wont work anymore. I used: toggleconsole "F9", it worked long time, but now it wont work. When i press F9, nothing happens, and when i write: toggleconsole "F9" to console, console disappear and still nothing happens when i press F9. Developer console wont work either, nothing happens when i press ~ or ´. Does someone know what is wrong? Answer, please. ŊυĐε 08:12, February 7, 2010 (UTC)

Well well well....... I magically got it working.... 11 minutes after I sent that previous post..... ŊυĐε 08:24, February 7, 2010 (UTC)

I have this problem too, I can have the console open right away when the game start menu is open but not in game. In the config.cfg file I can see toggle console is set to ` but the button doesn't work, and whenever I edit it to another key that works better (because in finnish keyboard you have to press shift + ´ and then space to get ` ) it's automatically changed back to ` when I start the game. Does anyone know how I could fix this? It happens in both L4D and L4D2 (happens in TF2 aswell)

Playing alone in versus mode
I have beign trying to play versus mode alone in Left 4 Dead 2. But there are 2 problems, 1 problem is that the bots wont move, they stay in safehouse, so I join survivors and open the door and walks out of the safehouse. But when I go back to the infected, they wont move. And the second problem is that when I'm infected, there are other infected. Which the bot is controlling, and they never stop spawning. So I have to wait 30 sec for spawning. So does anyone know how to make the bots move and how to make the Al infected stop spawning. Thanks for help! DeikO 18:31, February 13, 2010 (UTC)

And how do I make the bots start the panic events? They wont press on elevator buttons and staffs. DeikO 20:38, February 15, 2010 (UTC)

I can´t make my Finnish keyboard and console work
I put on the ''"Allow Developer Console" as I should, but it wont work, i have tryied every button on my keyboard and console wont come up. Does eny one know why?(btw i have finnish keyboard so button next to my 1 is §)''

B00myboy 16:30, April 7, 2010 (UTC)

Does you're keyboard have this ` ? (Don't know what it is called. It is right next to the 1 key) LoneWolfHBS5 17:50, April 7, 2010 (UTC)

Just use the `/~ key. It won't come up in the lobby though. Jo the Marten ( Shriek )  ಠ_ಠ  19:32, April 7, 2010 (UTC)

The US version on the other hand will have the console appear in the lobby. There is an odd glitch to it though... If the leader (or group now) starts the game when you have the console up, after you return to the lobby, the console will appear again. Gone2play 12:21, September 3, 2010 (PST)

I don't know much about the Finnish Keyboard but try pressing the button to the right of the ? button. If that didn't work, sorry I can't really help. LoneWolfHBS5 19:49, April 9, 2010 (UTC)

Ignoring the gaggle of idiots who think this is a good place for sheer guessing - switch to United States keyboard layout before starting L4D2. Get into a singleplayer game, and hit §. Type bind "-" "toggleconsole" - you'll find " at shift-ä and - at shift-+ - then exit the game, switch back to finnish, and the console's under -.

If you would like to find dout what key opens up your console, just go into controls and simply find where it says "Open Developer Console" or whatever it may say, and look at it.If it is a key you have already tried and still won't work, simply change it and try again.

Way to change character?
When I'm playing Left 4 Dead 2 with cheats I find it annoying that there's no way I can be Ellis. Console command for something like this?Spy C. Rab 19:07, June 6, 2010 (UTC)

Ehehehehehehee, alright then. I think it requires sv_cheats though. But "sb_takecontrol Ellis" (Minus the Quotes) should put you in the Shoes of the Young Mechanic. 94.195.236.134 19:33, June 6, 2010 (UTC)

Danke.Spy C. Rab 19:39, June 6, 2010 (UTC)

Bitte. sb_takecontrol  Where  can be Nick, Rochelle, Coach, or Ellis. For Future reference for other Readers. 94.195.236.134 19:41, June 6, 2010 (UTC)

How do I spawn the Uncommon Common Infected?
I want to get a closer look at them (using the magic of nb_blind 1) And I want to spawn a bunch of them... If you know Any, or all 7, that would be great.

(Hazmat Infected, Jimmy Gibbs, Fallen Survivor, Clown, Mudmen, Construction Worker, Or Riot Infected)

Cheers, Dalekdude101 20:18, June 26, 2010 (UTC)Dalekdude101

You type z_forcezombiemodel_male_INSERTUNCOMMONHERE (jimmy,fallensurvivor,ceda/hazmat(not sure), mudmen, roadcrew, riot, clown) then z_forcezombiemodel 1, the z_spawn

Mind this only works on the level they spawn on and you have to wait AGES to spawn Fallen Survivors. Hope this helps Patzilla777 20:31, June 26, 2010 (UTC)

You might need to mess around with the underscores, I haven't used this command in a LONG time. Patzilla777 20:33, June 26, 2010 (UTC)

Need Help
In Left 4 Dead 2, how do I spawn Zoey wherever/whenever I want her?

Um, I dont think that you can Spawn Survivors... Idk if you can, But you probably cant. [[User:Dalekdude101|Dalekdude101 21:54, July 16, 2010 (UTC)Dalekdude101]]

try z_spawn_zoey, see if that workWCLL HK 05:49, July 24, 2010 (UTC)

z_spawn only works for infected.Dalekdude101 14:40, July 24, 2010 (UTC)

You need another player to occupy zoey's position, but do this:

go idle

jointeam 2 zoey

respawn

this should make two zoey npcs. you can do this as many times as you want as long as the original zoey posistion is filled. 00:15 November 25, 2010.

How to return the script to normal?
Yesterday, I think I messed up since I tried using the Buddha consule commands, but ever since then all that happened was that I couldn't really move- I can turn my direction in my game, but I can't move, I can't turn off the flashlight, I can't even fire or change my weapon or pick up anything. I uninstalled the game, then re-installed it- same error. Anyone know how I can fix this? 173.9.230.150 03:48, September 12, 2010 (UTC)

Did you type the command "unbind_all" into the console?

This command unbinds all of your keys so you would not be able to do anything at all.

Dont panic, you can fix it! :D

Press ESC to bring up the menu then go Options->Keyboard/Mouse->Edit Keys/Buttons and the Reset the Defaults.

Hope this helps :)

ent_create
could someone give me some things to type in after "ent_create"?

What is that command where you are in front of a infected and every time you swing your baseball bat, the infected attacks? PLZ Answer!Hunter332 02:05, December 3, 2010 (UTC)

Last Man on Earth issue
I am attempting to try a Last Man on Earth game, but Left 4 Dead 2 keeps giving me issues

The first time I tried it out the game crapped out on me midway saying the server couldnt be authenticated via steam. So I tried running it through a dedicated server but I could never connect to it. It would always crash back to the main menu

So I tried going on Moddb and I found a mod called "Mutation mod" but it screwed up Left 4 Dead 2 and I had to redownload it. How can I run it properly with hope that the game wont crash on me? Is there any way to run the game via Singleplayer?

I THINK I&apos;ll manage to mess this up and add it on the the last topic,but whatever.I was wondering if it&apos;s possible to set the third person camera to look over the right shoulder instead of over the left shoulder,as I prefer to play with the camera over the right shoulder and figured it was worth asking here.Thanks.109.149.40.250 08:24, November 1, 2012 (UTC)