Garry's Mod Wiki

Player:Kick

Player:Kick( string reason = "No reason given" )

Description

Kicks the player from the server.

This can not be run before the player has fully joined in. Use game.KickID for that.

Arguments

1 string reason = "No reason given"
Reason to show for disconnection.

This will be shortened to ~512 chars, though this includes the command itself and the player index so will realistically be more around ~498. It is recommended to avoid going near the limit to avoid truncation.

Example

Kick a player with reason "Goodbye"

ply:Kick( "Goodbye" )

Page Links


Special Pages


Wikis

?

Render Time: 39ms

DB GetPage 4
Generate Html 4
SaveChanges 16
Render Body 0
Render Sidebar 12