SetPlayerNameplateIdVisible
Jump to navigation
Jump to search
setPlayerNameplateIdVisible
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.
Sets the global numeric session-ID visibility fallback for a human player's overhead label.
Syntax
bool setPlayerNameplateIdVisible(int playerId, bool visible)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
playerId |
int |
yes | The connected player identifier. |
visible |
bool |
yes | Strict boolean; true restores the normal ID suffix, false hides only that suffix. |
Returns
Returns true when the server accepts the global policy; otherwise false. This is not a client-render acknowledgement.
Examples
Keep a roleplay label while removing its numeric session ID:
setPlayerNameplateText(playerId, "Stranger")
setPlayerNameplateIdVisible(playerId, false)
Notes
- Available only in server-side resource scripts.
- Defaults to true. A per-observer ID override takes precedence. Text, whole-label visibility and speaking state are preserved; custom text never automatically hides IDs.
- Uses existing global-state semantics: not resource-owned and not automatically reverted when the calling resource stops. The runtime state ends on player disconnect; persistent policy must be reapplied by the gamemode.
- Not a permission boundary or anonymous networking mode; canonical identity remains available in other packets/UI. See Observer nameplates.
- PascalCase alias:
SetPlayerNameplateIdVisible.