Player/Kick

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m (Bug)
(The bug of the kick failing is fixed. The character limit is raised but is a technical restriction.)
Line 9: Line 9:
 
|desc=Reason to show for disconnection.
 
|desc=Reason to show for disconnection.
  
{{Bug|Issue=3559|This will be shortened to ~256 chars. If the string > ~512 chars, the kick will fail.}}
+
{{Warning|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.}}
 
|default="No reason given"
 
|default="No reason given"
 
}}
 
}}

Revision as of 19:51, 9 December 2018

 Player:Kick( )

Contents

Description

Kicks the player from the server.

Arguments

string reason="No reason given"

Reason to show for disconnection.

WARNING

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.

Examples

Example

Kick a player with reason "Goodbye"

ply:Kick( "Goodbye" )


Personal tools
Navigation