Salta ai contenuti

gdmp.nametags

Questi contenuti non sono ancora disponibili nella tua lingua.

Runs on: server.

The names drawn above other players, in GD’s own fonts (1..60, numbered as gdcolon.com/gdfont; 1 = Pusab, the default).

Call What it does
setFont(n) / getFont() the font for every name
setVisible(visible) every name on / off (clears the more specific rules)
setPlayerVisible(id, visible[, viewerId]) one player’s name, for everyone or for one viewer
isVisible(id[, viewerId]) the rule that applies (the most specific wins: viewer, player, everyone)
setColor(id, color) (level 90) that player’s name in "#RRGGBB" (or 0xRRGGBB) for everyone; null = the default. E.g. tag: the one who is IT in red

The declarations from the GDMP types (namespace GDMP), comments included:

interface Nametags {
/** GD's fonts 1..60 (1 = Pusab). */
setFont(n: number): void;
getFont(): number;
setVisible(visible: boolean): void;
setPlayerVisible(id: PlayerId, visible: boolean, viewerId?: PlayerId): void;
isVisible(id: PlayerId, viewerId?: PlayerId): boolean;
/** Level 90. `null` = the default. */
setColor(id: PlayerId, color: Color | null): void;
}