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 custom UTF-8 text, an empty string when the default player name is used, or false for an invalid player.
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.
- The player ID and native speaking marker are system-owned and are not part of this custom text.