SetPlayerHead

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 06:13, 24 August 2026 by QCherry (talk | contribs) (Document Protocol 23 voice and player presentation APIs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

setPlayerHead

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

Syntax

bool setPlayerHead(int playerId, string headKey)

Parameters

Name Type Required Description
playerId int yes The connected player identifier.
headKey string yes A stable key returned by getPlayerHeadNames.

Returns

Returns true when the compatible head is accepted and replicated; otherwise returns false.

Examples

Use Milten's head and hair without replacing equipped armor:

if not setPlayerHead(playerId, "milten") then
    outputChatBox("The head option could not be applied.", playerId)
end

Notes

  • Available only in server-side resource scripts.
  • Deprecated: use setPlayerIdentity to apply a complete supported identity atomically.
  • This API accepts only catalog keys and never accepts raw Unreal paths.
  • Named entries are composed with the current GTO face geometry and authoritative armor.
  • The reliable state is replayed during relevance entry and late join.
  • This emits onPlayerHeadChange when accepted.