BanPlayer

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This function bans a player from the server.

Syntax

  1. bool BanPlayer( Player plr, [BanType type] )

Arguments

  • plr - Pointer of the player to ban
  • type - The type of ban to add. This can be any of the BANTYPE_ constants. Defaults to BANTYPE_IP

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 functions Player.Name, MessagePlayer and call onPlayerJoin were used in in this example. More info about there in the corresponding pages.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox