SetPlayerNameplateText

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 06:13, 24 August 2026 by QCherry (talk | contribs) (Document Protocol 23 voice and player presentation APIs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

setPlayerNameplateText

Changes a player's server-authoritative overhead nameplate text.

Syntax

bool setPlayerNameplateText(int playerId, string text)

Parameters

Name Type Required Description
playerId int yes The connected player identifier.
text string yes Validated UTF-8 text, or an empty string to restore the default player name.

Returns

Returns true when the text was accepted and replicated; otherwise returns false.

Examples

Show a roleplay label:

setPlayerNameplateText(playerId, "Militia Guard")

Notes

  • Available only in server-side resource scripts.
  • Text is limited to 48 Unicode code points and 96 UTF-8 bytes.
  • Control characters, HTML delimiters, ampersands, byte-order marks and bidirectional formatting characters are rejected.
  • The reliable state is replayed during relevance entry and late join.