SetPlayerMaxHealth

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search

setPlayerMaxHealth

Sets a player's authoritative maximum health value.

Syntax

bool setPlayerMaxHealth(int playerId, number value)

Parameters

Name Type Required Description
playerId int yes The connected player to update.
value number yes The new maximum health value.

Returns

Returns true when the value is accepted; otherwise returns false.

Examples

Set a player's maximum health:

setPlayerMaxHealth(playerId, 50)

Notes

  • Available only in server-side resource scripts.
  • This is a convenience wrapper around setPlayerStat(playerId, "max_health", value).