SetPlayerNameplateVisible: Difference between revisions

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search
Document Protocol 23 voice and player presentation APIs
 
Document universal per-observer nameplates and test resource available from update 0.1.3
 
Line 1: Line 1:
<!-- This page is generated automatically from the function definition: setPlayerNameplateVisible. -->
= setPlayerNameplateVisible =
= setPlayerNameplateVisible =
Shows or hides a player's overhead nameplate for all observers.
Sets a player's global overhead visibility fallback for observers without an explicit visibility override.


== Syntax ==
== Syntax ==
Line 28: Line 27:
== Notes ==
== Notes ==
* Available only in server-side resource scripts.
* Available only in server-side resource scripts.
* Visibility is reliable, server-authoritative and late-join safe.
* Visibility is reliable, server-authoritative and replayed on relevance entry. A per-observer visibility override takes precedence.
* False hides the complete overhead label, including its numeric ID and speaking suffix; it does not mute voice audio. Text and ID policy are preserved.


[[Category:Lua Functions]]
[[Category:Lua Functions]]

Latest revision as of 03:08, 9 September 2026

setPlayerNameplateVisible

Sets a player's global overhead visibility fallback for observers without an explicit visibility override.

Syntax

bool setPlayerNameplateVisible(int playerId, bool visible)

Parameters

Name Type Required Description
playerId int yes The connected player identifier.
visible bool yes Whether the overhead label should be rendered.

Returns

Returns true when the state was accepted; otherwise returns false.

Examples

Hide a label while disguised:

setPlayerNameplateVisible(playerId, false)

Notes

  • Available only in server-side resource scripts.
  • Visibility is reliable, server-authoritative and replayed on relevance entry. A per-observer visibility override takes precedence.
  • False hides the complete overhead label, including its numeric ID and speaking suffix; it does not mute voice audio. Text and ID policy are preserved.