PlayerDeath

From RAGE Multiplayer Wiki
Revision as of 20:28, 15 October 2017 by CocaColaBear (talk | contribs)

This event is triggered when a player dies.

Parameters

  • player - player, which died.
  • reason - cause of death player:
  • killer - who killed the player.

Example

This example outputs chat message, when player dies.

Server-Side
function playerDeathHandler(player, reason, killer) {
   const deathName = player.name;
   const killerName = killer.name;

   mp.players.broadcast(`${killerName} killed ${deathName}. Reason: ${reason}`);
}

mp.events.add("playerDeath", playerDeathHandler);

See also

Checkpoint

Colshape

Entity

Player

Streaming

Vehicle

Waypoint