//#region draw
function draw()
{
    var local = Entity.GetLocalPlayer();

    if (!Entity.IsAlive(local) || !World.GetServerString()) {
        Convar.SetFloat("r_drawvgui", 1);
        Convar.SetInt("fov_cs_debug", 0);
        return;
    }
    local = Entity.GetLocalPlayer();
    thirdperson = UI.GetValue("Visual", "WORLD", "View", "Thirdperson");
    scoped = Entity.GetProp(local, "CCSPlayer", "m_bIsScoped");
    screen_size = Render.GetScreenSize();
	
    if (scoped) {
        Convar.SetFloat("r_drawvgui", 0);
        if (!UI.IsHotkeyActive("Visual", "WORLD", "View", "Thirdperson")) {
            Cheat.ExecuteCommand("fov_cs_debug 90");
            UI.SetValue("Visual", "WORLD", "View", "FOV while scoped", 0);
        }
    } else {
        Convar.SetFloat("r_drawvgui", 1);
        Convar.SetInt("fov_cs_debug", 0);
    }
}

function unload() {
	Cheat.ExecuteCommand("fov_cs_debug 0");
}
Cheat.RegisterCallback("Unload", "unload")
Cheat.RegisterCallback("Draw", "draw");