--offsets
--https://github.com/frk1/hazedumper/blob/master/csgo.hpp
--is scoped?
local m_bIsScoped = 0x3914
--is current fov?
local m_iFOV = 0x31E4
--is starting fov?
local m_iFOVStart = 0x31E8
ui.SliderInt("Thirdperson Fov", "m_iFOV", 0, 120, 90)
local LocalPlayer = entitylist.GetLocalPlayer()
local isScoped = LocalPlayer:GetPropInt(m_bIsScoped)
local m_iHealth = client.GetNetvar("DT_BasePlayer", "m_iHealth")
local iValue = false
local x, y = engine.GetScreenSize()
local centerX = x / 2
local centerY = y / 2
--Block default calls
local function onFrameStage(Stage)
if Stage == 5 then
if isScoped then
--for zoom crosshair in Paint
if LocalPlayer:IsScoped() then
--m_bIsScoped
LocalPlayer:SetPropInt(m_bIsScoped, 0)
iValue = true
else
iValue = false
end
--m_iFOV
LocalPlayer:SetPropInt(m_iFOV, ui.GetInt("m_iFOV"))
--m_iFOVStart
LocalPlayer:SetPropInt(m_iFOVStart, ui.GetInt("m_iFOV"))
end
end
end
local function onPaint()
local CurSpeed = LocalPlayer:GetVelocity()
local Velocity2D = CurSpeed:Length2D()
local SpeedVar = Velocity2D
--our velocity, but only 4
if SpeedVar > 4 then
SpeedVar = 4
elseif SpeedVar < 2 then
SpeedVar = 2
end
--Draw our custom crosshair from geminisoftware hehe
local connected = engine.IsConnected()
if iValue == true and LocalPlayer:GetPropInt(m_iHealth) > 0 and connected then
surface.DrawSetColor(10, 10, 10, 150)
surface.DrawFilledRectFade(centerX-SpeedVar, 0, centerX+SpeedVar, y, 150, 150, false)
surface.DrawFilledRectFade(0, centerY-SpeedVar, x, centerY+SpeedVar, 150, 150, false)
end
end
client.RegisterCallback("FrameStageNotify", onFrameStage)
client.RegisterCallback("Paint", onPaint)