nametags debug

This commit is contained in:
hydrant
2021-04-04 22:54:15 +02:00
parent d2920f5c87
commit 9f986fc53f
2 changed files with 3 additions and 3 deletions

View File

@@ -32,8 +32,6 @@ export default function customNametags() {
mp.nametags.enabled = false;
mp.events.add('render', (nametags) => {
const graphics = mp.game.graphics;
const screenRes = graphics.getScreenResolution(0, 0);
@@ -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],

View File

@@ -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;