SetPlayerFace

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 11:36, 27 August 2026 by QCherry (talk | contribs) (Document 0.1a Lua API, identities, moderation and synchronized spells)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

setPlayerFace

Deprecated compatibility API retained for legacy resources. It is unsupported for player appearance selection in G1R:MP 0.1.

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 server accepts the legacy state; this does not guarantee a supported visual result in G1R:MP 0.1. Returns false when validation fails.

Examples

Migrate a legacy face call to the supported identity setter:

-- Deprecated: setPlayerFace(playerId, "milten")
setPlayerIdentity(playerId, "milten")

Notes

  • Available only in server-side resource scripts.
  • Deprecated and unsupported for appearance selection in G1R:MP 0.1. Use setPlayerIdentity; it is the only supported complete identity setter.
  • The server may retain and replay the legacy state for protocol compatibility, but resources must not rely on a visible face-only change.
  • This emits both onPlayerFaceChange and the legacy onPlayerBodyChange event.