SetPlayerNameplateHidden
Hides the label over a player’s body on every other screen, or shows it again.
The whole plate goes: the name, the mode’s label (SetPlayerNameplate), each player’s own name for them
(SetPlayerNameplateFor) and the health bar under it - a sneaking player, a disguise, a hidden admin. The label’s text
and color are kept and come back with it. The name in the Tab list stays.
It is the mode’s to keep: a reload of the mode shows every label again. Players on an older client still see the label.
Syntax
Section titled “Syntax”SetPlayerNameplateHidden(pid, hidden)| Parameter | Type | |
|---|---|---|
pid |
number | the player |
hidden |
boolean | true hides the label, false shows it again |
Returns
Section titled “Returns”boolean - false when not connected
Example
Section titled “Example”-- a crouching player's name is not shownfunction OnPlayerStanceChange(pid, stance, previous) SetPlayerNameplateHidden(pid, stance == STANCE_CROUCHING)endSee also
Section titled “See also”IsPlayerNameplateHidden · OnPlayerStanceChange · SetPlayerNameplate · SetPlayerNameplateFor · the Players group of the index
