Squirrel/Server/Events/Player/onPlayerPart

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
m (Fixed it saying joins)
m
Line 19: Line 19:
 
{
 
{
 
     Message( player.Name + " left the server" );
 
     Message( player.Name + " left the server" );
 +
   
 +
    return 1;
 
}
 
}
 
</code>
 
</code>

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. return 1;
  6. }
  7.  

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