Scripting/Server/Functions/KickPlayer
Disconnects the player (reported as PARTREASON_KICKED). (v0.4.9+) reason is shown to the player on a banner that stays until he presses ENTER.
Syntax
KickPlayer(player [, reason])Arguments
- Player player
- string reason (optional) – Disconnects the player (reported as
PARTREASON_KICKED). (v0.4.9+)reasonis shown to the player on a banner that stays until he presses ENTER.
Example
function onPlayerCommand( player, cmd, params )
{
if ( cmd == "kickplayer" )
{
KickPlayer( player );
}
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
- FindPlayer
- FindVehicle
- FindObject
- FindPickup
- FindSphere
- FindBlip
- FindNPC
- GetPlayers
- GetMaxPlayers
- GetClosestPlayer
- GetVehicleCount
- GetObjectCount
Section: Finding and counting entities
Categories: Server functions | Finding and counting entities