Начинающий
-
Автор темы
- #1
JavaScript:
var time_to_ticks = function(a)
{
return Math.floor(0.5 + a / Globals.TickInterval())
}
fakelag = time_to_ticks(Globals.Curtime() - Entity.GetProp(Entity.GetLocalPlayer(), "DT_CSPlayer", "m_flSimulationTime")) + 1
if(fakelag < 0)
fakelag = 0
if(fakelag > 16)
fakelag = 16
Render.Arc = function (x, y, radius, radius_inner, start_angle, end_angle, segments, color)
{
segments = 360 / segments;
for (var i = start_angle; i < start_angle + end_angle; i = i + segments)
{
var rad = i * Math.PI / 180;
var rad2 = (i + segments) * Math.PI / 180;
var rad_cos = Math.cos(rad);
var rad_sin = Math.sin(rad);
var rad2_cos = Math.cos(rad2);
var rad2_sin = Math.sin(rad2);
var x1_inner = x + rad_cos * radius_inner;
var y1_inner = y + rad_sin * radius_inner;
var x1_outer = x + rad_cos * radius;
var y1_outer = y + rad_sin * radius;
var x2_inner = x + rad2_cos * radius_inner;
var y2_inner = y + rad2_sin * radius_inner;
var x2_outer = x + rad2_cos * radius;
var y2_outer = y + rad2_sin * radius;
Render.Polygon( [
[ x1_outer, y1_outer ],
[ x2_outer, y2_outer ],
[ x1_inner, y1_inner ] ],
color
);
Render.Polygon( [
[ x1_inner, y1_inner ],
[ x2_outer, y2_outer ],
[ x2_inner, y2_inner ] ],
color
);
}
}
Render.Back = function (x,y)
{
Render.GradientRect(x,y,25,26,1,[0,0,0,0],[17, 17, 17,85])
Render.GradientRect(x+25,y,25,26,1,[17, 17, 17,85],[0,0,0,0])
}
function skeet()
{
font = Render.AddFont('Calibri', 18, 900)
var screensize = Render.GetScreenSize()
var y = screensize[1]/4
var fakelag = time_to_ticks(Globals.Curtime() - Entity.GetProp(Entity.GetLocalPlayer(), "DT_CSPlayer", "m_flSimulationTime")) + 1
Render.Back(13,y*3+-162, [17, 17, 17, 100])
Render.StringCustom(22,y*3+-163,0,'FL',[17, 17, 17,255],font)
Render.StringCustom(22,y*3+-164,0,'FL',[129, 133, 252,255],font)
Render.Arc(60,y*3+-150,10,5,0,360,120,[17, 17, 17,255])
Render.Arc(60,y*3+-150,9,6,0,fakelag * 20,120,[129, 133, 252,255])
}
Cheat.RegisterCallback('Draw','skeet')
author: nah