Squirrel/Server/Events/Player/onPlayerDeath
From Liberty Unleashed Wiki
This is called whenever a player dies, for any reason.
Syntax
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
function onPlayerDeath( player, reason ) { Message( "StatServ:" + player.Name + " died" ); }
Notes
The functions player.Name was used in in this example. More info about them can be found in the corresponding pages.
Related Events
- onPlayerAction
- onPlayerArmourChange
- onPlayerCashChange
- onPlayerChat
- onPlayerCommand
- onPlayerConnect
- onPlayerDeath
- onPlayerFall
- onPlayerHealthChange
- onPlayerIslandChange
- onPlayerJoin
- onPlayerKeyStateChange
- onPlayerKill
- onPlayerPart
- onPlayerScoreChange
- onPlayerSkinChange
- onPlayerSpawn
- onPlayerUpdate
- onPlayerTeamChange
- onPlayerUseDetonator
- onPlayerVirtualWorldChange
- onPlayerWeaponChange