How to toggle in console command in Left 4 Dead 2

left-4-dead-2

I have this command then how to toggle.

bind p "noclip"

when I press P, it activate noclip, then when I press P again it will off.

Best Answer

The bind command allows other console commands to be toggled on and off with one keypress.

To toggle noclip:

bind "p" "noclip"

The quotes are strongly recommended so the command will never fail even if a special character is used. Be sure to turn cheats on first by typing sv_cheats 1 in the console.