OnPlayerJoin: Difference between revisions

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with "This is called when a player joins the server. This is fired ''after'' data has been sent to the client. == Syntax == <pre>function onPlayerJoin( player )</pre> == Argument...")
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 20: Line 20:
=== Notes ===
=== Notes ===


The functions [[Scripting/Squirrel/Functions/MessagePlayer|MessagePlayer]] and [[Scripting/Squirrel/Functions/player.Name|player.Name]] were used in this example. More info about them in corresponding pages.
The functions [[Scripting/Squirrel/Functions/MessagePlayer|MessagePlayer]] and [[Scripting/Squirrel/Functions/Player.Name|Player.Name]] were used in this example. More info about them in corresponding pages.


== Related Functions ==
== Related Functions ==


{{Scripting/Squirrel/Events/Player_Events}}
{{Scripting/Squirrel/Events/Player_Events}}
[[Category:Scripting/Squirrel/Events/Player_Events]]

Latest revision as of 22:18, 30 January 2017

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

Syntax

function onPlayerJoin( player )

Arguments

  • player - The pointer of the new player

Example

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

Notes

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

Related Functions