GetPlayerHead

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 21:43, 15 August 2026 by QCherry (talk | contribs) (Clarify player appearance API behavior)
Jump to navigation Jump to search

getPlayerHead

Returns a player's authoritative independent head option.

Syntax

string|false getPlayerHead(int playerId)

Parameters

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

Returns

Returns the stable head key, or false when the player is invalid or appearance state is unavailable.

Examples

Read a player's head option:

local headKey = getPlayerHead(playerId)
if headKey then
    outputDebugString("Head: " .. headKey)
end

Notes

  • Available only in server-side resource scripts.
  • The returned state is server-authoritative and late-join safe.
  • A named body preset retains its original rendered head even when a separate head state is stored.