OnPlayerDeath: 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 dies. e.g.: drowned or self-kill. == Syntax == <pre>function onPlayerDeath( player, reason )</pre> == Arguments == * '''player''' - player's p...")
 
No edit summary
Line 21: Line 21:
=== Notes ===
=== Notes ===


The functions [[Scripting/Squirrel/Functions/Message|Message]], [[Scripting/Squirrel/Functions/player.Name|player.Name]] were used in this example. More info about them in corresponding pages.
The functions [[Scripting/Squirrel/Functions/Message|Message]], [[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}}

Revision as of 23:31, 29 July 2014

This is called when a player dies. e.g.: drowned or self-kill.

Syntax

function onPlayerDeath( player, reason )

Arguments

  • player - player's pointer
  • reason - how the player dies

Example

function onPlayerDeath( player, reason )
{
    Message( "** " + player.Name + " died." );    
}

Notes

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

Related Functions