IsPlayerNameplateIdVisibleFor

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search

isPlayerNameplateIdVisibleFor

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 numeric session-ID visibility policy for one observer/target pair.

Syntax

bool isPlayerNameplateIdVisibleFor(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 = isPlayerNameplateIdVisibleFor(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: IsPlayerNameplateIdVisibleFor.