GetPlayerBody: Difference between revisions
Jump to navigation
Jump to search
Document player skin, body and head appearance API |
Document Protocol 23 voice and player presentation APIs |
||
| Line 1: | Line 1: | ||
<!-- This page is generated automatically from the function definition: getPlayerBody. --> | <!-- This page is generated automatically from the function definition: getPlayerBody. --> | ||
= getPlayerBody = | = getPlayerBody = | ||
Deprecated compatibility API that returns a player's authoritative legacy face profile. | |||
== Syntax == | == Syntax == | ||
| Line 19: | Line 19: | ||
== Examples == | == Examples == | ||
Read a player's body | Read a player's legacy body/face profile: | ||
<syntaxhighlight lang="lua" line> | <syntaxhighlight lang="lua" line> | ||
local bodyKey = getPlayerBody(playerId) | local bodyKey = getPlayerBody(playerId) | ||
| Line 29: | Line 29: | ||
== Notes == | == Notes == | ||
* Available only in server-side resource scripts. | * Available only in server-side resource scripts. | ||
* Deprecated: use <code>getPlayerIdentity</code> for complete character identity state or <code>getPlayerFace</code> for the face-only layer. | |||
* This is a compatibility alias for <code>getPlayerFace</code>. | |||
* The returned state is server-authoritative and late-join safe. | * The returned state is server-authoritative and late-join safe. | ||
| Line 35: | Line 37: | ||
[[Category:Player Functions]] | [[Category:Player Functions]] | ||
[[Category:Appearance Functions]] | [[Category:Appearance Functions]] | ||
[[Category:Deprecated Lua API]] | |||
Latest revision as of 06:12, 24 August 2026
getPlayerBody
Deprecated compatibility API that returns a player's authoritative legacy face profile.
Syntax
string|false getPlayerBody(int playerId)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
playerId |
int |
yes | The connected player identifier. |
Returns
Returns the stable body key, or false when the player is invalid or appearance state is unavailable.
Examples
Read a player's legacy body/face profile:
local bodyKey = getPlayerBody(playerId)
if bodyKey then
outputDebugString("Body: " .. bodyKey)
end
Notes
- Available only in server-side resource scripts.
- Deprecated: use
getPlayerIdentityfor complete character identity state orgetPlayerFacefor the face-only layer. - This is a compatibility alias for
getPlayerFace. - The returned state is server-authoritative and late-join safe.