Squirrel/Server/Events/Player/onPlayerDeath

From Liberty Unleashed Wiki
Revision as of 09:03, 9 January 2010 by Sephiroth (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is called whenever a player dies, for any reason.

Syntax

  1. function onPlayerDeath( player, reason )

Parameters

  • player - The player pointer
  • reason - What caused the player to die

Example

This will send a message to the main chat when a player is killed

  1.  
  2. function onPlayerDeath( player, reason )
  3. {
  4. Message( "StatServ:" + player.Name + " died" );
  5. }
  6.  

Notes

The functions player.Name was used in in this example. More info about them can be found in the corresponding pages.

Related Events

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox