SetPlayerFace
setPlayerFace
Changes a player's authoritative GTO face profile without replacing head/hair or armor.
Syntax
bool setPlayerFace(int playerId, string faceKey)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
playerId |
int |
yes | The connected player identifier. |
faceKey |
string |
yes | A stable key returned by getPlayerFaceNames.
|
Returns
Returns true when the validated profile is accepted and replicated; otherwise returns false.
Examples
Change only the GTO face shape and mimic profile:
if not setPlayerFace(playerId, "milten") then
outputChatBox("The face profile could not be applied.", playerId)
end
Notes
- Available only in server-side resource scripts.
- The reliable state is replayed during relevance entry and late join.
- This emits both
onPlayerFaceChangeand the legacyonPlayerBodyChangeevent.