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
No edit summary
 
(5 intermediate revisions by one other user 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