Squirrel/Server/Functions/Players/Name

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
m (Redirect issue fix)
 
Line 11: Line 11:
  
 
<code lang="squirrel">
 
<code lang="squirrel">
function OnPlayerJoin( player )
+
function onPlayerJoin( player )
 
{
 
{
 
     Message( "*** " + player.Name + " has joined the server." );
 
     Message( "*** " + player.Name + " has joined the server." );

Latest revision as of 11:02, 15 December 2015

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This function returns player's name.

[edit] Syntax

  1. string player.Name

[edit] Example

This example will send a join message when a player joins the server.

  1.  
  2. function onPlayerJoin( player )
  3. {
  4. Message( "*** " + player.Name + " has joined the server." );
  5. }
  6.  

[edit] Notes

The function Message and call OnPlayerJoin were used in in this example. More info about them in corresponding pages.

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox