IsPlayerNameplateVisibleFor

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 03:08, 9 September 2026 by QCherry (talk | contribs) (Document universal per-observer nameplates and test resource available from update 0.1.3)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

isPlayerNameplateVisibleFor

AVAILABLE FROM UPDATE 0.1.3
This function is available in G1R:MP 0.1.3 and later. The contract below includes the compatibility guarantees introduced in that update.

Reads the effective whole-label visibility policy for one observer/target pair.

Syntax

bool isPlayerNameplateVisibleFor(int observerId, int targetId)

Parameters

Name Type Required Description
observerId int yes The connected human player who will see the label.
targetId int yes The different connected human player whose overhead label is controlled.

Returns

Returns the effective boolean after pair/global inheritance, or false for an invalid pair/service. Use getPlayerNameplateStateFor to distinguish an explicit false from an unset override.

Examples

Read the selected pair without changing state:

local value = isPlayerNameplateVisibleFor(observerId, targetId)
outputDebugString(tostring(value))

Notes

  • Available only in server-side resource scripts.
  • The ordered pair is observer -> target; the reverse pair is independent. Both IDs must be distinct, connected session IDs, not persistent character IDs or NPC IDs.
  • Each field resolves independently: explicit pair override, then the target's current global field, then the native default. Getters expose server policy, not whether pixels are currently rendered.
  • No built-in acquaintance database or gamemode permission policy is assumed. See Observer nameplates for resource ownership, limits, persistence and privacy boundaries.
  • The read-only view is resource-global; it is not limited to fields owned by the calling resource.
  • PascalCase alias: IsPlayerNameplateVisibleFor.