Squirrel/Server/Functions/Misc/KickPlayer
From Liberty Unleashed Wiki
(Difference between revisions)
(New page: __NOTOC__ This function kicks a player from the server == Syntax == <code>bool KickPlayer( int id )</code> == Arguments == * '''id''' - ID of the player to kick == Example == This wi...) |
Revision as of 21:53, 16 December 2008
This function kicks a player from the server
Syntax
bool KickPlayer( int id )
Arguments
- id - ID of the player to kick
Example
This will kick a player on join if his name is not 'Bob'
function OnPlayerJoin( id, name ) { if ( name != "Bob" ) { MessagePlayer( "Your name isn't Bob! Only Bob is allowed on this server!.", id ); KickPlayer( id ); } }
Notes
The calls OnPlayerJoin and MessagePlayer were used in in this example. More info about there in the corresponding pages.