SetPlayerBody
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
setPlayerIdentityfor complete character identities orsetPlayerFacefor 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
onPlayerBodyChangeandonPlayerFaceChangewhen accepted.