Squirrel/Server/Functions/Misc/BanPlayer

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

Revision as of 04:14, 14 November 2009

This function bans a player from the server

Syntax

  1. bool BanPlayer( player plr )

Arguments

  • plr - Pointer of the player to kick

Example

This will ban anybody called 'Bob'

  1.  
  2. function OnPlayerJoin( player )
  3. {
  4. if ( player.Name == "Bob" )
  5. {
  6. MessagePlayer( "NO BOBS ALLOWED!", player );
  7. BanPlayer( 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