var screen_size = Global.GetScreenSize();
var isInverted;
function drawString()
{
arrows_color = UI.GetColor( "Misc", "JAVASCRIPT", "Script items", "Arrows color" );
s_arrow_color = UI.GetColor( "Misc", "JAVASCRIPT", "Script items", "Selected arrow color" );
col = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Indicator color");
isInverted = UI.IsHotkeyActive("Anti-Aim", "Fake angles", "Inverter");
}
if(UI.GetValue('Misc', 'JAVASCRIPT', 'Script items', 'Display indicators' ))
{
Render.String(screen_size[0] /2 -50, screen_size[1] /2 -20, 1, "<", isInverted ? s_arrow_color : arrows_color, 4 );
Render.String(screen_size[0] /2 +50, screen_size[1] /2 -20, 1, ">", isInverted ? arrows_color : s_arrow_color, 4 );
}
function Main()
{
UI.AddColorPicker( "Arrows color" )
UI.AddColorPicker( "Selected arrow color" )
UI.AddColorPicker( "Indicator color" )
UI.AddCheckbox( "Display indicators" );
// callbacks
Global.RegisterCallback("Draw", "drawString")
}
Main();
function draw() {
local = Entity.GetLocalPlayer();
if (!UI.GetValue('Misc', 'JAVASCRIPT', 'Script items', 'Display indicators') || !Entity.IsValid(local) || !Entity.IsAlive(local)) return;
font = Render.AddFont("Verdana", 8, 400);
x = screen_size[0];
y = screen_size[1];
real_yaw = Local.GetRealYaw();
fake_yaw = Local.GetFakeYaw();
delta = Math.min(Math.abs(real_yaw - fake_yaw) / 2, 60).toFixed(0);
delta_size = Render.TextSizeCustom(delta, font);
Render.StringCustom(x / 2, y / 2 + 20, 1, delta, [255, 255, 255, 255], font);
Render.GradientRect(x / 2, y / 2 + 40, (65 / 60) * delta, 5, 1, col, [0, 0, 0, 0]);
Render.GradientRect(x / 2 - (65 / 60) * delta + 1, y / 2 + 40, (65 / 60) * delta, 5, 1, [0, 0, 0, 0], col);
}
Cheat.RegisterCallback("Draw", "draw");