nametags debug
This commit is contained in:
@@ -31,8 +31,6 @@ const colors = [
|
|||||||
export default function customNametags() {
|
export default function customNametags() {
|
||||||
|
|
||||||
mp.nametags.enabled = false;
|
mp.nametags.enabled = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mp.events.add('render', (nametags) => {
|
mp.events.add('render', (nametags) => {
|
||||||
const graphics = mp.game.graphics;
|
const graphics = mp.game.graphics;
|
||||||
@@ -53,6 +51,7 @@ export default function customNametags() {
|
|||||||
y -= scale * (0.005 * (screenRes.y / 1080));
|
y -= scale * (0.005 * (screenRes.y / 1080));
|
||||||
|
|
||||||
let colorId = game.players.at(player.remoteId).nametagColor;
|
let colorId = game.players.at(player.remoteId).nametagColor;
|
||||||
|
|
||||||
let color = colors.find(c => c.id === colorId).color;
|
let color = colors.find(c => c.id === colorId).color;
|
||||||
|
|
||||||
mp.game.graphics.drawText(player.name + " (" + player.remoteId + ")", [x, y],
|
mp.game.graphics.drawText(player.name + " (" + player.remoteId + ")", [x, y],
|
||||||
|
|||||||
@@ -72,7 +72,8 @@ class RagePlayer extends RageEntity implements IPlayer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get nametagColor(): number {
|
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)
|
if (!color)
|
||||||
return 0;
|
return 0;
|
||||||
return color;
|
return color;
|
||||||
|
|||||||
Reference in New Issue
Block a user