function render()
{
var local = Entity.GetLocalPlayer();
var is_scope = Entity.GetProp(local, "DT_CSPlayer", "m_bIsScoped");
if( is_scope ) {
var screen_size = Render.GetScreenSize();
x = screen_size[0];
y = screen_size[1];
Convar.SetString("cl_drawhud", "0");
Render.GradientRect( x/2, y/2 - 165, 1, 150, 0, [ 66, 134, 244, 255 ], [ 55, 59, 68, 150 ]);
Render.GradientRect( x/2 - 170, y/2, 150, 1, 1, [ 66, 134, 244, 255 ], [ 55, 59, 68, 100 ]);
Render.GradientRect( x/2 + 19, y/2, 150, 1, 1, [ 55, 59, 68, 100 ], [ 66, 134, 244, 255 ]);
Render.GradientRect( x/2, y/2 + 15, 1, 150, 0, [ 55, 59, 68, 100 ], [ 66, 134, 244, 255 ]);
}
else {
Convar.SetString("cl_drawhud", "1");
}
}
Cheat.RegisterCallback("Draw", "render")