You can only use sv_cheats on a single-player listen server. Open the console and type "map <Map Name>" (for example, c1m1_mall starts you at the Mall on Dead Center, and c2m5_concert starts at the Dark Carnival finale). Then type sv_cheats 1 to enable cheats for that campaign.
Note 1: The developer console must be enabled first. Load the game and go to Options > Keyboard > Advanced to turn it on; it's then toggled with the key above Tab. If that doesn't work, add -console to the launch options and bind a key with "toggleconsole."
Note 2: You can try inviting others using the "connect" command.
Note 3: Do not include the angle brackets in the "map" and "connect" commands.