Squirrel/Server/Functions/Misc/KickPlayer

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
m

Revision as of 04:14, 14 November 2009

This function kicks a player from the server

Syntax

  1. bool KickPlayer( player plr )

Arguments

  • plr - pointer of the player to kick

Example

This will kick a player on join if his name is not 'Bob'

  1.  
  2. function OnPlayerJoin( player )
  3. {
  4. if ( player.Name != "Bob" )
  5. {
  6. MessagePlayer( "Your name isn't Bob! Only Bob is allowed on this server!.", player );
  7. KickPlayer( player );
  8. }
  9. }
  10.  

Notes

The calls OnPlayerJoin and MessagePlayer were used in in this example. More info about there in the corresponding pages.

Related Functions

Template:Squirrel/Functions/Misc

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox