OnPlayerFaceChange
onPlayerFaceChange
Triggered after a validated authoritative GTO face profile has changed.
Availability
This event is available in server-side scripts.
Callback signature
onPlayerFaceChange(playerId, previousFace, newFace, sourceResource)
Parameters
| Name | Type | Description |
|---|---|---|
playerId |
int |
The affected connected player ID. |
previousFace |
string |
The previous stable face-profile key. |
newFace |
string |
The new stable face-profile key. |
sourceResource |
string |
The resource that requested the change. |
Examples
Handle the event:
addEventHandler("onPlayerFaceChange", root, function(playerId, previousFace, newFace, sourceResource)
outputDebugString(getPlayerName(playerId) .. " face: " .. previousFace .. " -> " .. newFace)
end)
Notes
- Head/hair and armor are independent from this state.
- The corresponding reliable visual state is replayed during relevance entry and late join.