Running your own Left 4 Dead 2 server puts every gameplay variable in your hands. Admin commands let you enable god mode, spawn infected on demand, give your team better weapons, change maps mid-game, and control nearly every aspect of the session. This guide covers how to become an admin, how to enable the console, and a complete reference of L4D2 admin commands with valid IDs for items, weapons, upgrades, and NPCs.

Before admin commands work on a dedicated server, you need to set up admin access using SourceMod. The process involves stopping your server, editing the SourceMod admin configuration file, and adding your Steam ID with superadmin flags. For the full step-by-step process, follow Nitrado’s guide to becoming an admin in Left 4 Dead 2.
To use L4D2 admin commands, you need to open the console in the game. To do that:
Most commands in the list below require cheat mode to be active on the server. Type sv_cheats 1 into the console before using them. Note that enabling cheats disables Steam achievements for that session. Commands that do not require sv_cheats (kick, connect, map, changelevel, quit) work at any time.
| Command | Description |
|---|---|
| sv_cheats [0/1] | Enables (1) or disables (0) cheat mode on the server. Required before most commands on this list will work. Enabling cheats disables Steam achievements for the session. |
| god [0/1] | Enables (1) or disables (0) god mode for your entire team. In god mode, you and your team take no damage from any source. Requires sv_cheats 1. |
| noclip | Toggles noclip mode on and off. When active, you pass through walls, floors, and objects and can fly to any part of the map. Requires sv_cheats 1. |
| buddha [0/1] | Enables buddha mode. You still take and react to damage, but your health will not drop below 1. The value sets the minimum number of survivors who must be alive before protection activates. For example, buddha 1 protects only the last surviving player, while buddha 3 protects the last three. Requires sv_cheats 1. |
| burn | Ignites your character visually. You take no self-damage, but you can set nearby flammable objects and entities on fire by colliding with them. |
| explode | Creates an explosion at your character’s position. |
| kill | Instantly kills your character. |
| upgrade_add [upgrade id] | Adds the specified weapon upgrade to your character. Valid upgrade IDs: LASER_SIGHT, incendiary_ammo, explosive_ammo. Requires sv_cheats 1. |
| sv_infinite_ammo [0/1] | Enables (1) or disables (0) infinite ammo for all weapons. Requires sv_cheats 1. |
| sv_infinite_primary_ammo [0/1] | Enables (1) or disables (0) infinite ammo for your primary weapon only. Secondary weapons are unaffected. Default is 0. Requires sv_cheats 1. |
| give [item id] | Gives you the specified item or weapon. Common item IDs: first_aid_kit, pain_pills, adrenaline, defibrillator, pipe_bomb, molotov, vomitjar, rifle_ak47, autoshotgun, hunting_rifle, chainsaw, ammo. Requires sv_cheats 1. |
| impulse [number] | Executes an engine-level function based on the number supplied. In L4D2, impulse 101 refills your primary weapon ammo. Requires sv_cheats 1. |
| z_spawn [npc id] | Spawns an infected NPC at your position. Common NPC IDs: zombie, mob, boomer, hunter, smoker, witch, tank, charger, spitter, jockey. Using mob spawns a full horde. Requires sv_cheats 1. |
| z_speed [speed] | Sets the maximum speed at which common infected move. Default is 250. Requires sv_cheats 1. |
| z_common_limit [number] | Sets the maximum number of common infected that can be active on the map at once. Requires sv_cheats 1. |
| director_stop | Stops all director-controlled zombie spawning. Useful for exploring maps or testing without combat pressure. Requires sv_cheats 1. |
| director_panic_forever [0/1] | Enables (1) a continuous non-stop horde panic event. Set to 0 to stop it. Requires sv_cheats 1. |
| director_force_panic | Triggers a single immediate horde panic event. Requires sv_cheats 1. |
| map [map id] | Loads the specified map from the start menu, restarting from the beginning of that campaign. |
| changelevel [map id] | Changes the active map without returning to the main menu. To load a map fresh from the start, use the map command instead. |
| hidehud [setting] | Controls HUD visibility using bitwise flag values. Set to 4 to hide the entire HUD, or 256 to hide only the crosshair. Values can be combined. Requires sv_cheats 1. |
| sb_friendlyfire [0/1] | Allows (1) or prevents (0) bots from dealing friendly fire damage to other players. Default is 0. Requires sv_cheats 1. |
| sb_takecontrol [character name] | Takes control of the survivor under your crosshairs. Specify a survivor name to target them directly: nick, rochelle, coach, ellis, bill, louis, francis, zoey. Requires sv_cheats 1. |
| nb_stop [0/1] | Freezes (1) or unfreezes (0) all AI bots in place. Requires sv_cheats 1. |
| ent_setname [entity name] | Sets the name of the entity under your crosshairs. |
| ent_remove [entity name/class] | Removes all existing entities of the specified type or class from the map. |
| kick [player] | Kicks the specified player from the server. |
| chooseteam or jointeam [team number/name] | Switches you to the specified team if the current map supports team selection. |
| spectate | Non-functional in Left 4 Dead 2 due to the game’s character and team structure. Listed here for reference only. |
| connect [ip address] | Connects to the L4D2 server at the specified IP address. |
| quit | Closes the game. |
With access to L4D2 admin commands on your own server, you control every aspect of the session: give your team better gear, spawn custom hordes, load specific maps, and adjust infected behavior on the fly. Get your own Left 4 Dead 2 dedicated server to start using these commands today.