GetPlayerMaxMana

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 20:13, 5 August 2026 by QCherry (talk | contribs) (Automatyczna aktualizacja dokumentacji funkcji)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

getPlayerMaxMana

Returns a player's authoritative maximum mana value.

Syntax

number|false getPlayerMaxMana(int playerId)

Parameters

Name Type Required Description
playerId int yes The connected player identifier.

Returns

Returns the current numeric value, or false if the player is invalid or the value has not been initialized.

Examples

Read a player's maximum mana:

local value = getPlayerMaxMana(playerId)
if value ~= false then
    outputDebugString("max_mana: " .. tostring(value))
end

Notes

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