onPlayerPart

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

This is called when a player disconnects from the server.

Syntax

  1. function onPlayerPart( Player player, int reason )

Arguments

  • player - The pointer of the new player
  • reason - The reason ID for the part

Returns

This event does not handle return values.

Example

This example will say <name> left the server when a player leaves the server.

  1.  
  2. function onPlayerPart( player, reason )
  3. {
  4. Message( "* " + player.Name + " left the server" );
  5. return 1;
  6. }
  7.  

Notes

The functions Message and Player.Name were used in this example. More info about them can be found in the corresponding pages.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox