GetPlayerHead: 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 |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
<!-- This page is generated automatically from the function definition: getPlayerHead. --> | <!-- This page is generated automatically from the function definition: getPlayerHead. --> | ||
= getPlayerHead = | = getPlayerHead = | ||
Deprecated compatibility API that returns a player's authoritative legacy head layer. | |||
== Syntax == | == Syntax == | ||
| 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. | |||
* The returned state is server-authoritative and late-join safe. | * The returned state is server-authoritative and late-join safe. | ||
* The selected layer is independent from the GTO face profile and equipped armor. | |||
[[Category:Lua Functions]] | [[Category:Lua Functions]] | ||
| 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
getPlayerHead
Deprecated compatibility API that returns a player's authoritative legacy head layer.
Syntax
string|false getPlayerHead(int playerId)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
playerId |
int |
yes | The connected player identifier. |
Returns
Returns the stable head key, or false when the player is invalid or appearance state is unavailable.
Examples
Read a player's head option:
local headKey = getPlayerHead(playerId)
if headKey then
outputDebugString("Head: " .. headKey)
end
Notes
- Available only in server-side resource scripts.
- Deprecated: use
getPlayerIdentityfor complete character identity state. - The returned state is server-authoritative and late-join safe.
- The selected layer is independent from the GTO face profile and equipped armor.