Preventing Players from Joining a Map
From Valve Developer Community
(Redirected from When I run my multiplayer map in the game, people join my server!)
When running the game, add
+sv_lan 1 to the options when running the game. See What is the "Additional game parameters" field for?