Try fix
This commit is contained in:
@@ -30,13 +30,15 @@ export default function customNametags() {
|
||||
mp.nametags.enabled = false;
|
||||
var color = [255, 255, 255, alpha];
|
||||
|
||||
|
||||
mp.events.addDataHandler("nameTagColor", (entity, value) => {
|
||||
|
||||
mp.events.addDataHandler("nameTagColor", (entity: EntityMp, value) => {
|
||||
if (entity.type === "player") {
|
||||
let temp = colors.find(c => c.id === value);
|
||||
if (!temp)
|
||||
if (!temp) {
|
||||
entity.setVariable("nametagColor", [255, 255, 255, alpha]);
|
||||
return;
|
||||
color = temp.color;
|
||||
}
|
||||
entity.setVariable("nametagColor", temp.color);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -62,6 +64,7 @@ export default function customNametags() {
|
||||
var armour = player.getArmour() / 100;
|
||||
|
||||
y -= scale * (0.005 * (screenRes.y / 1080));
|
||||
let color = player.data.nametagColor;
|
||||
mp.game.graphics.drawText(player.name + " (" + player.remoteId + ")", [x, y],
|
||||
{
|
||||
font: 4,
|
||||
|
||||
Reference in New Issue
Block a user