M MY Multiplayer: Wiki
Side
Kind

kickPlayer

Server

Disconnects a player from the server with a reason.

bool kickPlayer(player player [, string reason = kicked])

Parameters

NameTypeDescription
playerplayerThe player.
reasonstringThe 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)

See also