Player.setHealth

From Runsafe
Jump to: navigation, search

Details

Arguments

  • playerName (String) - The name of the player whose health is to be modified [Required]
  • health (Integer) - The value of health to set. [Required]

Returns

  • Nothing.

Usage

engine.player.setHealth('Kruithne', 20);

Notes

  • Will kill the player if their health is set to 0.
  • Setting their health above the maximum has no effect other than healing them to full.
  • Nothing happens if the player is offline.