GetPlayerNameplateText
getPlayerNameplateText
Returns a player's custom overhead nameplate text.
Syntax
string|false getPlayerNameplateText(int playerId)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
playerId |
int |
yes | The connected player identifier. |
Returns
Returns the global custom UTF-8 text, or false when no global custom text is set or the player is invalid.
Examples
Read a roleplay label:
local text = getPlayerNameplateText(playerId)
if text and text ~= "" then
outputDebugString(text)
end
Notes
- Available only in server-side resource scripts.
- Reads the global field, not a per-observer override. Use getPlayerNameplateStateFor for the resolved observer/target view.
- The numeric ID and speaking marker are not part of the returned text. Numeric ID visibility has separate global and per-observer controls from 0.1.3.