Garry's Mod Wiki

game.KickID

  game.KickID( string id, string reason = "No reason given" )

Description

Kicks a player from the server. This can be ran before the player has spawned.

Arguments

1 string id
UserID, SteamID or SteamID64 of the player to kick. Uses SteamID32 eg STEAM_0:0:00000000
SteamID64 support is only available for the dev branch (07/09/2025).
2 string reason = "No reason given"
Reason to display to the player. This can span across multiple lines.
This will be shortened to ~512 chars, though this includes the command itself and the player index so will realistically be more around ~483. It is recommended to avoid going near the limit to avoid truncation.