onPlayerConnect

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 connects to the server. This is fired before files and data has been sent to the client.

Syntax

  1. function onPlayerConnect( Player player )

Arguments

  • player - The pointer of the new player

Returns

This event does not handle return values.

Example

This will PM Welcome to the server when a player connects the server.

  1.  
  2. function onPlayerConnect( player )
  3. {
  4. MessagePlayer( "Welcome to the server!", player, 255, 0, 0 );
  5. return 1;
  6. }
  7.  

Notes

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

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox