Player.setHealth

From Runsafe
Revision as of 04:58, 4 June 2013 by Kruithne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.