SetPlayerBody

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)
Jump to navigation Jump to search

setPlayerBody

Deprecated compatibility API that changes a player's authoritative legacy face profile.

Syntax

bool setPlayerBody(int playerId, string bodyKey)

Parameters

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

Returns

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

Examples

Apply Milten's GTO face profile through the compatibility API:

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

Notes

  • Available only in server-side resource scripts.
  • Deprecated: use setPlayerIdentity for complete character identities or setPlayerFace for face-only changes.
  • This is a compatibility alias for setPlayerFace.
  • The profile controls GTO skin traits, proportions and mimic data. Head/hair and armor remain independent.
  • The reliable state is replayed during relevance entry and late join.
  • This emits both onPlayerBodyChange and onPlayerFaceChange when accepted.