Squirrel/Server/Functions/Misc/KickPlayer
From Liberty Unleashed Wiki
(Difference between revisions)
(updated) |
|||
Line 1: | Line 1: | ||
− | + | {{Squirrel/Title|KickPlayer}} | |
This function kicks a player from the server | This function kicks a player from the server | ||
Latest revision as of 10:34, 11 October 2010
This function kicks a player from the server
[edit] Syntax
bool KickPlayer( Player plr )
[edit] Arguments
- plr - pointer of the player to kick
[edit] Example
This will kick a player on join if his name is not 'Bob'
function onPlayerJoin( player ) { if ( player.Name != "Bob" ) { MessagePlayer( "Your name isn't Bob! Only Bob is allowed on this server!.", player ); KickPlayer( player ); } }
[edit] Notes
The functions Player.Name, MessagePlayer and call onPlayerJoin were used in in this example. More info about there in the corresponding pages.