- Статус
- Оффлайн
- Регистрация
- 16 Фев 2022
- Сообщения
- 51
- Реакции
- 27
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Код:
local font =
{
verdana = Render.InitFont("Verdana", 12),
pixel = Render.InitFont("Smallest Pixel-7", 10),
}
switch = Menu.Switch("Skeet Bar", "Enable",false)
local pflFrameTime, pflFrameTimeStdDeviation, pflFrameStartTimeStdDeviation = ffi.new('float[1]'), ffi.new('float[1]'), ffi.new('float[1]')
local interface_ptr = ffi.typeof('void***')
local rawivengineclient = Utils.CreateInterface('engine.dll', 'VEngineClient014')
local ivengineclient = ffi.cast(interface_ptr, rawivengineclient)
local get_net_channel_info, net_channel = ffi.cast('void*(__thiscall*)(void*)', ivengineclient[0][78]), nil
local net_bool = ffi.typeof('bool(__thiscall*)(void*)')
local net_fr_to = ffi.typeof('void(__thiscall*)(void*, float*, float*, float*)')
local INetChannelInfo = ffi.cast('void***', get_net_channel_info(ivengineclient))
local GetNetFramerate = function(INetChannelInfo)
if INetChannelInfo == nil then
return 0, 0 end
local server_var, server_framerate = 0, 0
ffi.cast(net_fr_to, INetChannelInfo[0][25])(INetChannelInfo, pflFrameTime, pflFrameTimeStdDeviation, pflFrameStartTimeStdDeviation)
if pflFrameTime ~= nil and pflFrameTimeStdDeviation ~= nil and pflFrameStartTimeStdDeviation ~= nil then
if pflFrameTime[0] > 0 then
server_var = pflFrameStartTimeStdDeviation[0] * 1000
server_framerate = pflFrameTime[0] * 1000
end
end
return server_framerate, server_var
end
local velocity = function(ent)
local speed_x = ent:GetProp("DT_BasePlayer","m_vecVelocity[0]")
local speed_y = ent:GetProp("DT_BasePlayer","m_vecVelocity[1]")
local speed = math.sqrt(speed_x * speed_x + speed_y * speed_y)
return math.floor(speed)
end
local ct = GlobalVars.curtime
local fps = math.floor(1/GlobalVars.frametime)
Cheat.RegisterCallback("draw", function()
local lpgraph = EntityList.GetClientEntity(EngineClient.GetLocalPlayer())
if lpgraph == nil then return end
local x, y = EngineClient.GetScreenSize().x, EngineClient.GetScreenSize().y
INetChannelInfoB = ffi.cast('void***', get_net_channel_info(ivengineclient))
server_var = GetNetFramerate(INetChannelInfoB)
local ping = math.floor(EngineClient.GetNetChannelInfo():GetLatency(0)*1000)
if ct + 0.1 < GlobalVars.curtime then
ct = GlobalVars.curtime
fps = math.floor(1 / GlobalVars.frametime)
end
local var_color = function()
if server_var > 16 then
clr = Color.RGBA(255, 60, 80)
elseif server_var > 8 then
clr = Color.RGBA(255, 222, 0)
else
clr = Color.RGBA(159, 202, 43)
end
return clr
end
local ping_color = function()
if ping < 40 then
clr = Color.RGBA(159, 202, 43)
elseif ping < 100 then
clr = Color.RGBA(255, 222, 0)
else
clr = Color.RGBA(255, 60, 80)
end
return clr
end
local fps_color = function()
if fps < 100 then
clr = Color.RGBA(255, 60, 80)
else
clr = Color.RGBA(159, 202, 43)
end
return clr
end
local Render_Block = function(text, text2, color, color2, xane)
ts = Render.CalcTextSize("66", 12, font.verdana)
ts1 = Render.CalcTextSize(text, 12, font.pixel)
ts2 = Render.CalcTextSize(text2, 10, font.pixel)
Render.Text(text, Vector2.new(x/2-ts1.x+27-xane*16, y-(ts.y+7)+1), Color.RGBA(0, 0, 0, 255), 12, font.verdana)
Render.Text(text, Vector2.new(x/2-ts1.x+26-xane*16, y-(ts.y+7)), color, 12, font.verdana)
Render.Text(text2, Vector2.new(x/2+26-xane*16, y-(ts2.y+7)), color2, 10, font.pixel, true)
end
if switch:GetBool() then
--background
Render.GradientBoxFilled(Vector2.new(x/2-275, y), Vector2.new(x/2, y-25), Color.RGBA(0, 0, 0, 10), Color.RGBA(0, 0, 0, 130), Color.RGBA(0, 0, 0, 10), Color.RGBA(0, 0, 0, 130))
Render.GradientBoxFilled(Vector2.new(x/2, y), Vector2.new(x/2+275, y-25), Color.RGBA(0, 0, 0, 130), Color.RGBA(0, 0, 0, 10), Color.RGBA(0, 0, 0, 130), Color.RGBA(0, 0, 0, 10))
--render
Render_Block(string.format('%.f', server_var/2), " VAR", var_color(), Color.RGBA(255, 255, 255, 255), 0)
Render_Block(tostring(velocity(lpgraph)), " SPEED", Color.RGBA(255, 255, 255, 255), Color.RGBA(255, 255, 255, 255), -5)
Render_Block(tostring(fps), " FPS", fps_color(), Color.RGBA(255, 255, 255, 255), 5)
Render_Block(tostring(ping), " PING", ping_color(), Color.RGBA(255, 255, 255, 255), 10)
end
end)