SetPlayerHead: 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: setPlayerHead. --> | <!-- This page is generated automatically from the function definition: setPlayerHead. --> | ||
= setPlayerHead = | = setPlayerHead = | ||
Deprecated compatibility API that changes a player's legacy head layer. | |||
== Syntax == | == Syntax == | ||
| Line 21: | Line 21: | ||
== Examples == | == Examples == | ||
Use Milten's head and hair without replacing equipped armor: | |||
<syntaxhighlight lang="lua" line> | <syntaxhighlight lang="lua" line> | ||
if not setPlayerHead(playerId, "milten") then | |||
if not setPlayerHead(playerId, " | |||
outputChatBox("The head option could not be applied.", playerId) | outputChatBox("The head option could not be applied.", playerId) | ||
end | end | ||
| Line 31: | Line 30: | ||
== Notes == | == Notes == | ||
* Available only in server-side resource scripts. | * Available only in server-side resource scripts. | ||
* | * Deprecated: use <code>setPlayerIdentity</code> to apply a complete supported identity atomically. | ||
* | * This API accepts only catalog keys and never accepts raw Unreal paths. | ||
* Named entries are composed with the current GTO face geometry and authoritative armor. | |||
* 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>onPlayerHeadChange</code> when accepted. | * This emits <code>onPlayerHeadChange</code> when accepted. | ||
| Line 40: | Line 40: | ||
[[Category:Player Functions]] | [[Category:Player Functions]] | ||
[[Category:Appearance Functions]] | [[Category:Appearance Functions]] | ||
[[Category:Deprecated Lua API]] | |||
Latest revision as of 06:13, 24 August 2026
setPlayerHead
Deprecated compatibility API that changes a player's legacy head layer.
Syntax
bool setPlayerHead(int playerId, string headKey)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
playerId |
int |
yes | The connected player identifier. |
headKey |
string |
yes | A stable key returned by getPlayerHeadNames.
|
Returns
Returns true when the compatible head is accepted and replicated; otherwise returns false.
Examples
Use Milten's head and hair without replacing equipped armor:
if not setPlayerHead(playerId, "milten") then
outputChatBox("The head option could not be applied.", playerId)
end
Notes
- Available only in server-side resource scripts.
- Deprecated: use
setPlayerIdentityto apply a complete supported identity atomically. - This API accepts only catalog keys and never accepts raw Unreal paths.
- Named entries are composed with the current GTO face geometry and authoritative armor.
- The reliable state is replayed during relevance entry and late join.
- This emits
onPlayerHeadChangewhen accepted.