Squirrel/Server/Events/Player/onPlayerPart

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
m (Fixed it saying joins)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
This is called when a player joins the server. This is fired ''after'' files and data has been sent to the client.
+
This is called when a player leaves the server.
  
 
== Syntax ==
 
== Syntax ==

Revision as of 17:01, 26 October 2010

This is called when a player leaves the server.

Syntax

  1. function onPlayerPart( Player player, int reason )

Parameters

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

Example

This 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. }
  6.  

Notes

The function MessagePlayer was used in in this example. More info about it in the corresponding page.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox