OnPlayerDamage

From GTA Network Wiki
Jump to: navigation, search

OnPlayerDamage
Server-Side Function

utilities-terminal.png Server-Side csharp.png C#

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

Attribute

[ServerEvent(Event.PlayerDamage)]

Required Parameters

  • Client: the player.
  • float: Health loss.
  • float: Armor loss.

Usage example(s)

[ServerEvent(Event.PlayerDamage)]
public void OnPlayerDamage(Client player, float healthLoss, float armorLoss)
{
    // Some code
}

Changelog

Version Description
1.0 Release.

References