Перейти к содержанию

Player::applyDamageTo

Материал из RAGE MP Wiki Archive
Версия от 11:23, 9 января 2023; imported>KirillZver (Syntax)
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)

Syntax

<syntaxhighlight lang="javascript">player.applyDamageTo(damageAmount, includingArmor);</syntaxhighlight>

Required Arguments

  • damageAmount: int
  • includingArmor: Boolean

Return value

  • Undefined

Example

<syntaxhighlight lang="javascript"> // player health: 100, armor: 100

player.applyDamageTo(25, false); // player health: 75, armor: 100

player.applyDamageTo(25, true); // player health: 75, armor: 75 </syntaxhighlight>

See also