OnPlayerNameplateChange
Jump to navigation
Jump to search
onPlayerNameplateChange
Triggered after a player's authoritative overhead nameplate text or visibility changes.
Availability
This event is available in server-side scripts.
Callback signature
onPlayerNameplateChange(playerId, text, visible, sourceResource)
Parameters
| Name | Type | Description |
|---|---|---|
playerId |
int |
The affected connected player ID. |
text |
string |
The validated custom text, or an empty string when the default player name is used. |
visible |
bool |
Whether the overhead nameplate is visible. |
sourceResource |
string |
The resource that requested the change. |
Examples
Handle the event:
addEventHandler("onPlayerNameplateChange", root, function(playerId, text, visible, sourceResource)
outputDebugString("Nameplate updated for " .. getPlayerName(playerId) .. ": " .. text)
end)
Notes
- The player ID and native speaking indicator remain system-owned presentation elements.
- The corresponding reliable state is replayed during relevance entry and late join.