SetPlayerFace

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

setPlayerFace

Changes a player's authoritative GTO face profile without replacing head/hair or armor.

Syntax

bool setPlayerFace(int playerId, string faceKey)

Parameters

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

Returns

Returns true when the validated profile is accepted and replicated; otherwise returns false.

Examples

Change only the GTO face shape and mimic profile:

if not setPlayerFace(playerId, "milten") then
    outputChatBox("The face profile could not be applied.", playerId)
end

Notes

  • Available only in server-side resource scripts.
  • The reliable state is replayed during relevance entry and late join.
  • This emits both onPlayerFaceChange and the legacy onPlayerBodyChange event.