Эксперт
-
Автор темы
- #1
Код:
UI.AddColorPicker("main color"), UI.AddCheckbox("Show ping"), UI.AddCheckbox("Show name"), UI.AddCheckbox("Show time"), UI.AddCheckbox("Show ip")
function settings_menu() {
var username = Cheat.GetUsername()
var today = new Date();
var ping = Math.floor(Global.Latency() * 1000 / 1.5);
var ip = World.GetServerString()
color = UI.GetColor("Misc", "Javascript", "Script items", "main color");
var hours1 = today.getHours();
var minutes1 = today.getMinutes();
var seconds1 = today.getSeconds();
var hours = hours1 <= 9 ? "0" + today.getHours() + ":" : today.getHours() + ":";
var minutes = minutes1 <= 9 ? "0" + today.getMinutes() + ":" : today.getMinutes() + ":";
var seconds = seconds1 <= 9 ? "0" + today.getSeconds() : today.getSeconds();
var font = Render.AddFont("Verdana", 7, 400)
var text = "pasteware"
if (UI.GetValue("Script items", "Show name")) {
text += ("| " + username)
}
if (UI.GetValue("Script items", "Show ping")) {
text += (" | " + ping + " mc")
}
if (UI.GetValue("Script items", "Show time")) {
text += (" | " + hours + minutes + seconds)
}
if (UI.GetValue("Script items", "Show ip")) {
text += (" | " + ip)
}
var h = 15;
var w = Render.TextSizeCustom(text, font)[0] + 20;
var x = Global.GetScreenSize()[0] - 2;
var y = 15;
x = x - w - 10;
Render.FilledRect(x, 14, w+0, 1, [ color[0], color[1], color[2], 255 ]);
Render.FilledRect(x - 1, y, w, h - 2, [35, 35, 35, color[3]]);
Render.StringCustom(x + 10, y + 0, 0, text, [255, 255, 255, 255], font)
}
Cheat.RegisterCallback("Draw", "settings_menu")