SetPlayerMaxMana: Difference between revisions

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search
Automatyczna aktualizacja dokumentacji funkcji
 
Complete Lua function catalog
 
Line 30: Line 30:
* This is a convenience wrapper around <code>setPlayerStat(playerId, "max_mana", value)</code>.
* This is a convenience wrapper around <code>setPlayerStat(playerId, "max_mana", value)</code>.


[[Category:Lua Functions]]
[[Category:Server Functions]]
[[Category:Server Functions]]
[[Category:Progression Functions]]
[[Category:Progression Functions]]
[[Category:Player Functions]]
[[Category:Player Functions]]

Latest revision as of 09:55, 15 August 2026

setPlayerMaxMana

Sets a player's authoritative maximum mana value.

Syntax

bool setPlayerMaxMana(int playerId, number value)

Parameters

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

Returns

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

Examples

Set a player's maximum mana:

setPlayerMaxMana(playerId, 50)

Notes

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