Squirrel/Server/Events/Player/onPlayerConnect

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with '__NOTOC__ This is called when a player joins the server. This is fired ''after'' files and data has been sent to the client. == Syntax == <code>function onPlayerConnect( Player…')
 
(Someone copied n pasted onPlayerJoin and left in a duff description)
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 connects to the server. This is fired ''before'' files and data has been sent to the client.
  
 
== Syntax ==
 
== Syntax ==

Revision as of 09:49, 20 October 2010

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

Syntax

  1. function onPlayerConnect( Player player )

Parameters

  • player - The pointer of the new player

Example

This will PM Welcome to the server when a player joins the server

  1.  
  2. function onPlayerConnect( player )
  3. {
  4. MessagePlayer( "Welcome to the server", player, 255, 0, 0 );
  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