onPlayerSpawn

From Liberty Unleashed Wiki
Revision as of 20:06, 14 October 2012 by Juppi (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This event is called when a remote player spawns

Syntax

  1. function onPlayerSpawn( player, spawn )

Arguments

  • player - The pointer to the player that left
  • spawn - The pointer to the class they spawned as

Returns

This event does not handle return values.

Example

This example outputs your skin ID when you spawn.

  1.  
  2. function onPlayerSpawn( player, spawn )
  3. {
  4. // Get the classes skin ID and save it as 'skin'
  5. local skin = spawn.Skin;
  6. // Output their new skin
  7. Message( "* You have just spawned as skin " + skin + ".", 0, 255, 0 );
  8. return 1;
  9. }
  10.  

Notes

-- List of used functions and other notes here.

Related Events

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox