IsPlayerNameplateVisible: 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: isPlayerNameplateVisible. -->
= isPlayerNameplateVisible =
= isPlayerNameplateVisible =
Checks whether a player's overhead nameplate is visible.
Reads the global overhead nameplate visibility policy, before per-observer overrides.


== Syntax ==
== Syntax ==
Line 16: Line 15:


== Returns ==
== Returns ==
Returns <code>true</code> when visible; otherwise returns <code>false</code>.
Returns the global visibility boolean, or <code>false</code> for an invalid player. This does not report rendered pixels, distance or per-observer overrides.


== Examples ==
== Examples ==
Line 28: Line 27:
== Notes ==
== Notes ==
* Available only in server-side resource scripts.
* Available only in server-side resource scripts.
* Use [[isPlayerNameplateVisibleFor]] for a particular observer/target pair.


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

Latest revision as of 03:08, 9 September 2026

isPlayerNameplateVisible

Reads the global overhead nameplate visibility policy, before per-observer overrides.

Syntax

bool isPlayerNameplateVisible(int playerId)

Parameters

Name Type Required Description
playerId int yes The connected player identifier.

Returns

Returns the global visibility boolean, or false for an invalid player. This does not report rendered pixels, distance or per-observer overrides.

Examples

Check label visibility:

if not isPlayerNameplateVisible(playerId) then
    outputDebugString("Nameplate hidden")
end

Notes