OnPlayerDamage

From RAGE Multiplayer Wiki
This feature is currently doesn't work in the current branch of RAGE:Multiplayer.

This event is triggered when a player's health or armor changes.


C# Syntax

[ServerEvent(Event.PlayerDamage)]

Parameters

  • player: parameter input should be in Player type
  • health: parameter input should be in float type
  • armor: parameter input should be in float type

Example

[ServerEvent(Event.PlayerDamage)]
public void OnPlayerDamage(Player player, float healthLoss, float armorLoss)
{
	player.SendChatMessage($"You have lost {healthLoss} health and {armorLoss} armor.");
}