From 9f986fc53ffb2a02c980aa248882cb04d1d17db2 Mon Sep 17 00:00:00 2001 From: hydrant Date: Sun, 4 Apr 2021 22:54:15 +0200 Subject: [PATCH] nametags debug --- ReallifeGamemode.Client/Gui/nametags.ts | 3 +-- ReallifeGamemode.Client/core/rage-mp/entities.ts | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ReallifeGamemode.Client/Gui/nametags.ts b/ReallifeGamemode.Client/Gui/nametags.ts index 4648d30b..30ab2b05 100644 --- a/ReallifeGamemode.Client/Gui/nametags.ts +++ b/ReallifeGamemode.Client/Gui/nametags.ts @@ -31,8 +31,6 @@ const colors = [ export default function customNametags() { mp.nametags.enabled = false; - - mp.events.add('render', (nametags) => { const graphics = mp.game.graphics; @@ -53,6 +51,7 @@ export default function customNametags() { y -= scale * (0.005 * (screenRes.y / 1080)); let colorId = game.players.at(player.remoteId).nametagColor; + let color = colors.find(c => c.id === colorId).color; mp.game.graphics.drawText(player.name + " (" + player.remoteId + ")", [x, y], diff --git a/ReallifeGamemode.Client/core/rage-mp/entities.ts b/ReallifeGamemode.Client/core/rage-mp/entities.ts index 389c2b9b..61e522d8 100644 --- a/ReallifeGamemode.Client/core/rage-mp/entities.ts +++ b/ReallifeGamemode.Client/core/rage-mp/entities.ts @@ -72,7 +72,8 @@ class RagePlayer extends RageEntity implements IPlayer { } get nametagColor(): number { - var color = this.player.getVariable("nametagColor"); + var color = this.player.getVariable("nameTagColor"); + game.ui.sendChatMessage(`player = ${this.player.name} - color = ${color}`); if (!color) return 0; return color;