OnPlayerDamage

From RAGE Multiplayer Wiki
Revision as of 09:52, 28 November 2019 by Spotify (talk | contribs) (Created page with "{{Warning|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. {{CSharpContai...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 Client type
  • health: parameter input should be in float type
  • armor: parameter input should be in float type

Example

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