Skip to main content

Overview

The Zyrix API provides complete health management functions for controlling player health, armor, and revival states. All functions include permission validation and support various health restoration options.

HealPlayer

Restore a player’s health and optionally their armor.

Syntax

Parameters

  • staffId (number) - Server ID of the staff member performing the action
  • targetId (number) - Server ID of the player to heal
  • includeArmor (boolean, optional) - Whether to restore armor (default: true)

Returns

  • success (boolean) - Whether the heal action succeeded
  • status (string) - Status code: 'success', 'no_permission', 'player_not_found', 'invalid_target'

Example

KillPlayer

Instantly kill a target player.

Syntax

Parameters

  • staffId (number) - Server ID of the staff member
  • targetId (number) - Server ID of the player to kill

Returns

  • success (boolean) - Whether the kill action succeeded
  • status (string) - Status code

Example

RevivePlayer

Revive a dead player and restore their health.

Syntax

Parameters

  • staffId (number) - Server ID of the staff member
  • targetId (number) - Server ID of the player to revive

Returns

  • success (boolean) - Whether the revive action succeeded
  • status (string) - Status code

Example

Advanced Examples

Mass Healing for Events

Health Monitoring System

Smart Healing with Damage History

Medical RP Integration

Emergency Response System

Error Handling

Handle common scenarios when using health functions:
Use the KillPlayer function responsibly. It should only be used for administrative purposes and with proper justification.
Consider implementing logging for all health-related administrative actions to maintain accountability and track usage patterns.