How to set a password on a GMod server
Type sv_password "letmein" in the server console and players must enter it to join; sv_password "" opens the server again.
sv_password
Sets a password players must enter to join the server; leave empty for a public server.
sv_password <password> Examples
sv_password "letmein" Private server.
sv_password "" Remove the password.
Arguments
passwordRequired- Join password, or "" for none.
On SLASHPLAY
SLASHPLAY manages this one: set the join password with Join password on the server's General tab. A value set in the console or a cfg overrides the dashboard and the copied connect line stops working.
What it does
Players are asked for the password when they connect from the browser, or can set it beforehand with password in their console. Clear it to open the server again.
The game's own description: Server password for entry into multiplayer games
Run it on your server
On a SLASHPLAY server, type it in the Console tab of the server page; the reply shows right under it. A value set there lasts until the server restarts. To keep it, add the line to garrysmod/cfg/server.cfg. New to this? Start a GMod server first.
Your own
GMod server.
From $0.03 an hour, only while it runs. New accounts get 6 free tokens.