Squirrel/Server/Events/Player/onPlayerPart

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
m

Revision as of 06:11, 9 June 2009

This is called when a player joins the server. This is fired after files and data has been sent to the client

Syntax

  1. function OnPlayerPart( player, 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

Template:Squirrel/Events/Player

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox