kickPlayer
Server
Disconnects a player from the server with a reason.
bool kickPlayer(player player [, string reason = kicked])
Parameters
| Name | Type | Description |
|---|---|---|
| player | player | The player. |
| reason | string | The reason, which the launcher shows the player when the session ends.default kicked |
Returns
true if the player is being disconnected, false if the element is not a connected player.
Example
addCommandHandler("afk", function(player)
kickPlayer(player, "Away from keyboard")
end)