OnPlayerHeadChange: Difference between revisions
Jump to navigation
Jump to search
Document player appearance change events |
Document Protocol 23 voice and player presentation APIs |
||
| Line 33: | Line 33: | ||
== Notes == | == Notes == | ||
* | * The selected head is composed with any validated body identity and authoritative armor. | ||
* The corresponding reliable visual state is replayed during relevance entry and late join. | * The corresponding reliable visual state is replayed during relevance entry and late join. | ||
Latest revision as of 06:15, 24 August 2026
onPlayerHeadChange
Triggered after a validated independent Nameless Hero head option has changed.
Availability
This event is available in server-side scripts.
Callback signature
onPlayerHeadChange(playerId, previousHead, newHead, sourceResource)
Parameters
| Name | Type | Description |
|---|---|---|
playerId |
int |
The affected connected player ID. |
previousHead |
string |
The previous stable head key. |
newHead |
string |
The new stable head key. |
sourceResource |
string |
The resource that requested the change. |
Examples
Handle the event:
addEventHandler("onPlayerHeadChange", root, function(playerId, previousHead, newHead, sourceResource)
outputDebugString(getPlayerName(playerId) .. " head: " .. previousHead .. " -> " .. newHead)
end)
Notes
- The selected head is composed with any validated body identity and authoritative armor.
- The corresponding reliable visual state is replayed during relevance entry and late join.