GetPlayerHead: Difference between revisions

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search
Clarify player appearance API behavior
Document Protocol 23 voice and player presentation APIs
 
Line 1: Line 1:
<!-- This page is generated automatically from the function definition: getPlayerHead. -->
<!-- This page is generated automatically from the function definition: getPlayerHead. -->
= getPlayerHead =
= getPlayerHead =
Returns a player's authoritative independent head option.
Deprecated compatibility API that returns a player's authoritative legacy head layer.


== Syntax ==
== Syntax ==
Line 29: Line 29:
== Notes ==
== Notes ==
* Available only in server-side resource scripts.
* Available only in server-side resource scripts.
* Deprecated: use <code>getPlayerIdentity</code> for complete character identity state.
* The returned state is server-authoritative and late-join safe.
* 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.
* The selected layer is independent from the GTO face profile and equipped armor.


[[Category:Lua Functions]]
[[Category:Lua Functions]]
Line 36: Line 37:
[[Category:Player Functions]]
[[Category:Player Functions]]
[[Category:Appearance Functions]]
[[Category:Appearance Functions]]
[[Category:Deprecated Lua API]]

Latest revision as of 06:12, 24 August 2026

getPlayerHead

Deprecated compatibility API that returns a player's authoritative legacy head layer.

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.
  • Deprecated: use getPlayerIdentity for complete character identity state.
  • The returned state is server-authoritative and late-join safe.
  • The selected layer is independent from the GTO face profile and equipped armor.