-
Автор темы
- #1
Код:
const velocity = Entity.GetProp(index, "CBasePlayer", "m_vecVelocity[0]");
return Math.sqrt(velocity[0] * velocity[0] + velocity[1] * velocity[1]);
}
const onDraw = function() {
const screen = Global.GetScreenSize(),
x = screen[0] / 2, y = screen[1] - 19;
const font = Render.AddFont("Calibri", 11, 800);
const font1 = Render.AddFont("Verdana", 12, 800);
const fps = Math.floor(1 / Global.Frametime());
const ping = Math.round(Local.Latency( ) * 1000 - 16);
const velocity = get_velocity(Entity.GetLocalPlayer());
const speed = Math.round(velocity);
if(ping < 1) ping = 0; if(!speed) speed = 0;
Render.GradientRect(x - 250, y, 250, 19, 1, [40, 40, 40, 0], [0, 0, 0, 90]);
Render.GradientRect(x, y, 250, 19, 1, [0, 0, 0, 90], [40, 40, 40, 0]);
Render.String(x - 117, y + 1, 1, "" + ping, [149, 255, 0, 255], font1);
draw_outline_text(x - 95, y + 2, 1, "ping", [185, 185, 185, 255], font);
Render.String(x - 13, y + 1, 1, "" + fps, [149, 255, 0, 255], font1);
draw_outline_text(x + 10, y + 2, 1, "fps", [185, 185, 185, 255], font);
Render.String(x + 75, y + 1, 1, "" + speed, [185, 185, 185, 255], font1);
draw_outline_text(x + 105, y + 2, 1, "speed", [185, 185, 185, 255], font);
}
function Main()
{
Global.RegisterCallback("Draw", "onDraw");
}
{
Main();
}
ошибка - [onetap] [info bar.js:22] script error: undefined not callable (property 'AddFont' of [object Object])