Squirrel/Server/Functions/Misc/BanPlayer
From Liberty Unleashed Wiki
(Difference between revisions)
(New page: __NOTOC__ This function bans a player from the server == Syntax == <code>bool BanPlayer( int id )</code> == Arguments == * '''id''' - ID of the player to kick == Example == This will...) |
Revision as of 20:22, 22 January 2009
This function bans a player from the server
Syntax
bool BanPlayer( int id )
Arguments
- id - ID of the player to kick
Example
This will ban anybody called 'Bob'
function OnPlayerJoin( id, name ) { if ( name == "Bob" ) { MessagePlayer( "NO BOBS ALLOWED!", id ); BanPlayer( id ); } }
Notes
The calls OnPlayerJoin and MessagePlayer were used in in this example. More info about there in the corresponding pages.