Дизайнер
-
Автор темы
- #1
в этом скрипте нет UI элементов, всё управляется через код
также здесь нет (надеюсь) говнокода и гигантских строк, чтобы новичкам было проще понять код
JavaScript:
if (settings & (1 << 0))
{
text += (" | " +get.string("Custom Nick Name"));
}
if (settings & (1 << 11))
{
text += (" | " +usernamea);
}
if (settings & (1 << 1))
{
text += ( " | "+fps+ " fps");
}
if (settings & (1 << 2))
{
text += (" | " +ping+"ms");
}
if (settings & (1 << 5))
{
text += (" | " +current_map+"");
}
if (settings & (1 << 6))
{
text += (" | delay: " +tickrate+" ");
}
if (settings & (1 << 7))
{
text += (" | speed: " +velstr+"");
}
if (settings & (1 << 10))
{
text += (" | server ip: " +server+"");
}
if (settings & (1 << 8))
{
text += (" | duck amount: " +duckAmountStr+"");
}
if (settings & (1 << 9))
{
text += (" | enemies: " +enemyCountStr+"");
}
if (settings & (1 << 3))
{
text += (" | "+get_kd+ " kdr ");
}
if (settings & (1 << 4))
{
text += ( "| "+hours + minutes);
}
if (settings & (1 << 12))
{
text += ( "| "+ hours + minutes + ":" + seconds);
}
JavaScript:
var TextArray = [
"onetap",
USERNAME,
"delay: " + Latency + "ms",
"fps: " + FPS,
"K/D: " + KDR.toFixed(2),
"V: " + (Speed <= 1 ? "(s)" : (Speed + " u/s"))
];
var Text = TextArray.join (" | ");
JavaScript:
// / enQ /////////////////////////////////////////////////////////////
const SCREEN = Render.GetScreenSize();
const COLOR = {
Main: [ 32, 32, 36, 255 ],
Dark: [ 6, 6, 10, 255 ],
Light: [ 54, 54, 60, 255 ],
Text: [ 232, 232, 232, 255 ],
Accent: [ 88, 66, 199 ], // ONLY 3 NUMBERS
}
// ///////////////////////////////////////////////////////////////////
const USERNAME = Cheat.GetUsername();
const MARGIN = {x: 8, y: 8} // You can change this
//
var LocalPlayer = Entity.GetLocalPlayer();
var Time; var Hours; var Minutes;
var Kills; var Deaths; var KDR;
var Velocity; var Speed;
var FPS; var Latency;
var TextArray = [];
// ///////////////////////////////////////////////////////////////////
function update () {
Time = new Date();
Hours = Time.getHours() <= 9 ? "0" + Time.getHours() + ":" : Time.getHours()+ ":";
Minutes = Time.getMinutes() <= 9 ? "0" + Time.getMinutes() + "" : Time.getMinutes();
Kills = Entity.GetProp (LocalPlayer, "CPlayerResource", "m_iKills");
Deaths = Entity.GetProp (LocalPlayer, "CPlayerResource", "m_iDeaths");
KDR = Kills / (Deaths == 0 ? 1 : Deaths);
Velocity = Entity.GetProp (LocalPlayer, "CBasePlayer", "m_vecVelocity[0]");
Speed = Math.round (Math.sqrt (Velocity[0] * Velocity[0] + Velocity[1] * Velocity[1]));
FPS = Math.round (1 / Globals.Frametime());
Latency = Math.round (Local.Latency());
// ---------------------------------------
// Comment something you don't want to see
TextArray = [
"onetap",
USERNAME,
"delay: " + Latency + "ms",
"fps: " + FPS,
"K/D: " + KDR.toFixed(2),
"V: " + (Speed <= 1 ? "(s)" : (Speed + " u/s"))
]
}
// ///////////////////////////////////////////////////////////////////
function draw () {
var Font = Render.AddFont ("Bahnschrift", 10, 500);
var Text = TextArray.join (" | ") // You can change this, but leave spaces from both sides
var Size = Render.TextSizeCustom (Text, Font)[0] + 16;
Render.FilledRect (SCREEN[0] - Size - MARGIN.x, MARGIN.y, Size, 24, COLOR.Main);
Render.Rect (SCREEN[0] - Size - MARGIN.x, MARGIN.y, Size, 24, COLOR.Light);
Render.Rect (SCREEN[0] - Size - MARGIN.x - 1, MARGIN.y - 1, Size + 2, 26, COLOR.Dark);
Render.GradientRect (SCREEN[0] - Size - MARGIN.x + 1, MARGIN.y + 22, Size - 2, 1, 1, COLOR.Accent.concat(120), COLOR.Accent.concat(255)); // The numbers in concat() stand for alpha
Render.StringCustom (SCREEN[0] - Size - MARGIN.x + 8, MARGIN.y + 3, 0, Text, COLOR.Text, Font);
}
// ///////////////////////////////////////////////////////////////////
if (UI.GetValue("Misc", "PERFORMANCE & INFORMATION", "Information", "Watermark")) {
UI.SetValue("Misc", "PERFORMANCE & INFORMATION", "Information", "Watermark", false)
}
// ///////////////////////////////////////////////////////////////////
Cheat.RegisterCallback ("Draw", "update");
Cheat.RegisterCallback ("Draw", "draw");