onPlayerSpawn

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This event is called when a player spawns.

Syntax

  1. function onPlayerSpawn( Player plr, SpawnClass spawn )

Arguments

  • player - A pointer to the player who spawned
  • spawn - A pointer to the spawn class which the player chose

Returns

This event does not handle return values.

Example

This example will print a message to the chat when a player spawns.

  1.  
  2. function onPlayerSpawn( player, spawn )
  3. {
  4. Message( ">>> " + player.Name + " spawned." );
  5. return 1;
  6. }
  7.  

Notes

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

Related Events

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox