Testserver push
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { IGame, IEntity } from "../game";
|
||||
import game from "..";
|
||||
|
||||
|
||||
const maxDistance = 40 * 40;
|
||||
const width = 0.03;
|
||||
const height = 0.0065;
|
||||
@@ -27,9 +26,7 @@ const colors = [
|
||||
{ id: 9, color: [0, 166, 133, alpha] }, //news
|
||||
];
|
||||
|
||||
|
||||
export default function customNametags() {
|
||||
|
||||
mp.nametags.enabled = false;
|
||||
|
||||
mp.events.add('render', (nametags) => {
|
||||
@@ -67,19 +64,19 @@ export default function customNametags() {
|
||||
let y2 = y + 0.042;
|
||||
|
||||
if (armour > 0) {
|
||||
graphics.drawRect(x, y2, width + border * 2, height + border * 2, 0 , 0, 0, 200);
|
||||
graphics.drawRect(x, y2, width, height, 150, 150, 150, 255);
|
||||
graphics.drawRect(x, y2, width + border * 2, height + border * 2, 0, 0, 0, 200);
|
||||
graphics.drawRect(x, y2, width, height, 50, 0, 0, 255);
|
||||
graphics.drawRect(x - width / 2 * (1 - health), y2, width * health, height, 200, 0, 0, 200);
|
||||
|
||||
var x2 = x + width / 2 + border / 2;
|
||||
|
||||
graphics.drawRect(x, y2 + height, width + border * 2, height + border * 2, 0, 0, 0, 200);
|
||||
graphics.drawRect(x, y2 + height, width, height, 200, 200, 200, 255);
|
||||
graphics.drawRect(x, y2 + height, width, height, 80, 80, 80, 255);
|
||||
graphics.drawRect(x - width / 2 * (1 - armour), y2 + height, width * armour, height, 255, 255, 255, 200);
|
||||
}
|
||||
else {
|
||||
graphics.drawRect(x, y2, width + border * 2, height + border * 2, 0, 0, 0, 200);
|
||||
graphics.drawRect(x, y2, width, height, 150, 150, 150, 255);
|
||||
graphics.drawRect(x, y2, width, height, 50, 0, 0, 255);
|
||||
graphics.drawRect(x - width / 2 * (1 - health), y2, width * health, height, 200, 0, 0, 200);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user