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...")
 
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This is called when a player dies. e.g.: drowned or self-kill.
#REDIRECT [[Scripting/Squirrel/Events/OnPlayerDeath]]
 
== Syntax ==
 
<pre>function onPlayerDeath( player, reason )</pre>
 
== Arguments ==
 
* '''player''' - player's pointer
* '''reason''' - how the player dies
 
== Example ==
 
<source lang="squirrel">
function onPlayerDeath( player, reason )
{
    Message( "** " + player.Name + " died." );   
}
</source>
 
=== 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.
 
== Related Functions ==
 
{{Scripting/Squirrel/Events/Player_Events}}

Latest revision as of 19:24, 18 April 2016