SetPlayerBody: Difference between revisions
Jump to navigation
Jump to search
Clarify player appearance API behavior |
Document Protocol 23 voice and player presentation APIs |
||
| Line 1: | Line 1: | ||
<!-- This page is generated automatically from the function definition: setPlayerBody. --> | <!-- This page is generated automatically from the function definition: setPlayerBody. --> | ||
= setPlayerBody = | = setPlayerBody = | ||
Deprecated compatibility API that changes a player's authoritative legacy face profile. | |||
== Syntax == | == Syntax == | ||
| Line 18: | Line 18: | ||
== Returns == | == Returns == | ||
Returns <code>true</code> when the | Returns <code>true</code> when the validated profile is accepted and replicated; otherwise returns <code>false</code>. | ||
== Examples == | == Examples == | ||
Apply Milten's GTO face profile through the compatibility API: | |||
<syntaxhighlight lang="lua" line> | <syntaxhighlight lang="lua" line> | ||
if not setPlayerBody(playerId, "milten") then | if not setPlayerBody(playerId, "milten") then | ||
outputChatBox("The | outputChatBox("The face profile could not be applied.", playerId) | ||
end | end | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 30: | Line 30: | ||
== Notes == | == Notes == | ||
* Available only in server-side resource scripts. | * Available only in server-side resource scripts. | ||
* | * Deprecated: use <code>setPlayerIdentity</code> for complete character identities or <code>setPlayerFace</code> for face-only changes. | ||
* | * This is a compatibility alias for <code>setPlayerFace</code>. | ||
* 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. | * The reliable state is replayed during relevance entry and late join. | ||
* This emits <code>onPlayerBodyChange</code> when accepted. | * This emits both <code>onPlayerBodyChange</code> and <code>onPlayerFaceChange</code> when accepted. | ||
[[Category:Lua Functions]] | [[Category:Lua Functions]] | ||
| Line 39: | Line 40: | ||
[[Category:Player Functions]] | [[Category:Player Functions]] | ||
[[Category:Appearance Functions]] | [[Category:Appearance Functions]] | ||
[[Category:Deprecated Lua API]] | |||
Revision as of 06:13, 24 August 2026
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.