SetPlayerHead

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

setPlayerHead

Changes a player's independent Nameless Hero head option.

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

Select the second editable head:

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

Notes

  • Available only in server-side resource scripts.
  • This API writes the validated Mutable Head option and never accepts raw Unreal paths.
  • To display an independent head, set the body to default. Named body presets retain their original head.
  • The reliable state is replayed during relevance entry and late join.
  • This emits onPlayerHeadChange when accepted.