Scripting/Squirrel/Events/Player/onPlayerJoin

From VC-MP Wiki

Jump to: navigation, search

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

Syntax

function onPlayerJoin( player )

Parameters

  • player - The pointer of the new player

Example

This will say Hello to the player when they join the server

function onPlayerJoin( player )
{
     MessagePlayer( "Welcome " + player.Name + " to the server!", player );
}

Notes

The functions MessagePlayer and player.Name were used in in this example. More info about them in corresponding pages.

Related Events

Personal tools
squirrel scripting