You can kick and ban players through the server console in the dashboard. Garry's Mod uses the standard Source Engine commands for this.
List the players
-
Open the server console
Open the console of your server via the dashboard. -
Show the player list
Enter the following command:statusThe output shows the userid, the SteamID in the format
STEAM_0:x:xxxxxxxand the IP address for every connected player. You need these values for the commands below.
Kick a player
A kicked player is removed from the server but can rejoin immediately.
kick <Name>
kickid <userid> Reason
Instead of the userid you can also use the SteamID:
kickid STEAM_0:1:12345678 Reason
Ban a player
banid <minutes> <userid> kick
Here too you can use the SteamID instead of the userid:
banid 0 STEAM_0:1:12345678 kick
Ban an IP address
banip <minutes> <IP address>
Save bans permanently
-
Save SteamID bans
Enter the following in the server console:writeidThe bans are written to the file
/garrysmod/cfg/banned_user.cfg. -
Save IP bans
Enter the following in the server console:writeipThe bans are written to the file
/garrysmod/cfg/banned_ip.cfg.
Unban a player
removeid STEAM_0:1:12345678
removeip <IP address>
Afterwards run writeid or writeip again so the change is saved permanently.
Command overview
| Command | Description |
|---|---|
status |
Show all connected players with userid, SteamID and IP |
kick <Name> |
Kick a player by player name |
kickid <userid|SteamID> [reason] |
Kick a player by ID |
banid <minutes> <userid|SteamID> [kick] |
Ban a player (0 = permanent) |
banip <minutes> <IP> |
Ban an IP address |
addip <minutes> <IP> |
Identical to banip |
removeid <SteamID> |
Remove a ban for a SteamID |
removeip <IP> |
Remove a ban for an IP address |
writeid |
Save SteamID bans permanently |
writeip |
Save IP bans permanently |
