CityRP Documentation Repository

cityrp.healaudit

Audit log for healing under fire. The baseline the combat healing initiative (#1705) is measured against: how long after another player's hit each heal or steroid is used, and how much a hit leaves pending when it stops a heal over time. Both land in cityrp.logs, and the saved query in docs/design/combat-healing/heal-under-fire-baseline.md reads them back per day.

Functions

Servercityrp.healaudit.Clear(ply)Source ☍

Forgets the player's last hit, so the next heal reads as having none this life.

Parameters

  • plyPlayerThe player to clear.
Servercityrp.healaudit.LogCancelled(ply, attacker)Source ☍

Logs a heal over time that damage is about to stop as healcancel, if one is running with HP still to give: the HP pending, the attacker type (player, self or other) and its class. Call it before removing the playerhealing timer, since the timer is how it knows.

Parameters

  • plyPlayerThe player taking the damage.
  • attackerEntity?Whatever dealt it.
Servercityrp.healaudit.LogUse(ply, item, amount)Source ☍

Logs a heal or steroid use as healuse: the item, the seconds since the last hit (blank if none this life), the HP the item adds (0 for steroids) and the player's health when they used it.

Parameters

  • plyPlayerThe player who used it.
  • itemstringThe item's unique ID.
  • amountnumberThe HP the item adds.
Servercityrp.healaudit.RecordHit(victim, attacker)Source ☍

Records that attacker just damaged victim, if the attacker is another player.

Parameters

  • victimPlayerThe player who took the damage.
  • attackerEntity?Whatever dealt it.
Servercityrp.healaudit.SinceLastHit(ply) → number?Source ☍

The seconds since another player last damaged ply this life.

Parameters

  • plyPlayerThe player to check.

Returns

  1. number?The seconds since the hit, or nil if there has been none.

Tables

Servercityrp.healauditSource ☍