//Created by Misnik

UI.AddCheckbox("Anti-aim indication");
UI.AddDropdown("DT indication type",["Arc","Battery"])


//Get weapon damage 

//get screen size
screen_size = Global.GetScreenSize();

alpha_main = 0
alpha_anim = 0
add_anim   = 0

value_duck      = 0
alpha_duck_anim = 0
alpha_duck      = 0
add_duck        = 0

value_damage = 0
alpha_damage = 0
add_damage   = 0

value_legit = 0
alpha_legit = 0
add_legit   = 0

value_onshot = 0
alpha_onshot = 0
add_onshot   = 0

value_autopeek = 0
alpha_autopeek = 0
add_autopeek   = 0

value_dt = 0
alpha_dt = 0
add_dt   = 0
red_dt   = 0
green_dt = 0

value_hs = 0
alpha_hs = 0
add_hs   = 0

value_arc        = 0
alpha_anim_state = false
alpha_duck_state = false

//animation function

clamp = function (val, min, max) {
   if (val > max)
      return max
   if (min > val)
      return min
   return val
}
function indication() {
   if (World.GetServerString() == "")
      return;

   player = Entity.GetLocalPlayer()
   
   isDoubletap      = UI.IsHotkeyActive("Rage", "Exploits", "Doubletap") && !(Entity.GetProp(Entity.GetGameRulesProxy(), "CCSGameRulesProxy", "m_bIsValveDS" ))
   isInverter       = UI.IsHotkeyActive("Anti-Aim", "Fake angles", "Inverter")
   isHideShot       = UI.IsHotkeyActive("Rage", "Exploits", "Hide shots") && !(Entity.GetProp(Entity.GetGameRulesProxy(), "CCSGameRulesProxy", "m_bIsValveDS" ))
   isDamageOverride = UI.IsHotkeyActive("Script items", "Minimum damage override")
   isForceHead      = UI.IsHotkeyActive("Script items", "force head")
   isForceBody      = UI.IsHotkeyActive("Rage", "General", "Force body aim")
   isFakeDuck       = UI.IsHotkeyActive("Anti-Aim", "Extra", "Fake duck") && !(Entity.GetProp(Entity.GetGameRulesProxy(), "CCSGameRulesProxy", "m_bIsValveDS" ))
   isLegsAddition   = UI.IsHotkeyActive("Script items", "addition legs")
   isOnShot         = UI.IsHotkeyActive("Misc","Wait for on shot key")
   isScoreboard     = UI.IsHotkeyActive("Script items", "Show")
   isAutoPick       = UI.IsHotkeyActive("Misc", "GENERAL", "Movement","Auto peek")
   isLegitAA        = (UI.GetValue("Anti-aim", "Extra", "Pitch") == 3 ? true : false )
   //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   add_y = 80
   //animation
   add_factor  = 10
   fade_factor = ((1 / .15) * Globals.Frametime() * 200) / 200
   
   
   fade_factor_anim = ((1 / .9) * Globals.Frametime()) * 200
   fade_factor_duck = ((1 / .1) * Globals.Frametime()) * 200
   
   //main
   //Dead animation
   if ((!Entity.IsAlive(player) && alpha_main != 0 || Input.IsKeyPressed(0x09)) )
      alpha_main = clamp(alpha_main - fade_factor * 100, 0, 255)
   if (Entity.IsAlive(player) && alpha_main != 255 && !Input.IsKeyPressed(0x09) )
      alpha_main = clamp(alpha_main + fade_factor * 100, 0, 255)
   //buttons
   //Damage animation
   if (isDamageOverride && alpha_damage != 1 && alpha_main == 255){
      value_damage = clamp(value_damage + fade_factor, 0, 1.0)
      alpha_damage = clamp(alpha_damage + fade_factor * value_damage, 0, 1.0)
      add_damage   = clamp(add_damage + fade_factor * value_damage, 0, 1.0)
   }
   if (!isDamageOverride && alpha_damage != 0 || alpha_main != 255){
      value_damage = clamp(value_damage - fade_factor, 0, 1)
      alpha_damage = clamp(alpha_damage - fade_factor * alpha_damage, 0, 1)
      add_damage   = clamp(add_damage - fade_factor * add_damage, 0, 1)
   }
   if(alpha_damage < 0.01) alpha_damage = 0
   if(add_damage < 0.01)   add_damage   = 0
   //Legit AA animation
   if (isLegitAA && alpha_legit != 1 && alpha_main == 255){
      value_legit = clamp(value_legit + fade_factor, 0, 1)
      alpha_legit = clamp(alpha_legit+ fade_factor * value_legit, 0, 1)
      add_legit   = clamp(add_legit + fade_factor * value_legit, 0, 1)
   }
   if (!isLegitAA && alpha_legit != 0 || alpha_main != 255){
      value_legit = clamp(value_legit - fade_factor, 0, 1)
      alpha_legit = clamp(alpha_legit - fade_factor * alpha_legit, 0, 1)
      add_legit   = clamp(add_legit - fade_factor * add_legit , 0, 1)
   }
   if(alpha_legit < 0.01) alpha_legit = 0
   if(add_legit < 0.01)   add_legit   = 0
   //On Shot animation
   if (isOnShot && alpha_onshot != 1 && alpha_main == 255){
      value_onshot = clamp(value_onshot + fade_factor, 0, 1)
      alpha_onshot = clamp(alpha_onshot + fade_factor * value_onshot, 0, 1)
      add_onshot   = clamp(add_onshot + fade_factor * value_onshot, 0, 1)
   }
   if (!isOnShot && alpha_onshot != 0 || alpha_main != 255){
      value_onshot = clamp(value_onshot - fade_factor, 0, 1)
      alpha_onshot = clamp(alpha_onshot - fade_factor * alpha_onshot , 0, 1)
      add_onshot   = clamp(add_onshot   - fade_factor * add_onshot, 0, 1)
   }
   if(alpha_onshot < 0.01) alpha_onshot = 0
   if(add_onshot < 0.01)   add_onshot   = 0
   //Auto Peek animation
   if (isAutoPick && alpha_autopeek != 1 && alpha_main == 255){
      value_autopeek = clamp(value_autopeek + fade_factor, 0, 1)
      alpha_autopeek = clamp(alpha_autopeek + fade_factor * value_autopeek, 0, 1)
      add_autopeek   = clamp(add_autopeek   + fade_factor * value_autopeek, 0, 1)
   }
   if (!isAutoPick && alpha_autopeek != 0 || alpha_main != 255){
      value_autopeek = clamp(value_autopeek - fade_factor, 0, 1)
      alpha_autopeek = clamp(alpha_autopeek - fade_factor * alpha_autopeek, 0, 1)
      add_autopeek   = clamp(add_autopeek   - fade_factor * add_autopeek, 0, 1)
   }
      if(alpha_autopeek < 0.01) alpha_autopeek = 0
      if(add_autopeek < 0.01)   add_autopeek   = 0
   //ANIM animation
    if (!isDoubletap && !isHideShot && alpha_main == 255) {
       add_anim = clamp(add_anim + fade_factor, 0, 1)
       if (alpha_anim_state == false) {
          alpha_anim = clamp(alpha_anim + fade_factor_anim, 0, 255)
          if (alpha_anim == 255)
             alpha_anim_state = true
       } else {
          alpha_anim = clamp(alpha_anim - fade_factor_anim, 0, 255)
         if (alpha_anim == 0)
             alpha_anim_state = false
      }
    } else {
      alpha_anim = clamp(alpha_anim - fade_factor * 100, 0, 255)
      add_anim   = clamp(add_anim - fade_factor * add_anim, 0, 1)
    }

   //Fake Duck animation
   if (isFakeDuck) {
      if (alpha_duck_state == false) {
         alpha_duck_anim = clamp(alpha_duck_anim + fade_factor_duck, 0, 255)
         if (alpha_duck_anim == 255)
            alpha_duck_state = true
      } else {
         alpha_duck_anim = clamp(alpha_duck_anim - fade_factor_duck, 0, 255)
         if (alpha_duck_anim == 0)
            alpha_duck_state = false
      }
   }
   if(!isFakeDuck)
      alpha_duck_anim = alpha_duck * 255
   
   if (isFakeDuck && add_duck != 1 && alpha_main == 255){
      value_duck = clamp(value_duck + fade_factor, 0, 1)
      add_duck   = clamp(add_duck   + fade_factor * value_duck, 0, 1)
      alpha_duck = clamp(alpha_duck + fade_factor * value_duck, 0, 1)
   }
   if (!isFakeDuck && add_duck != 0 || alpha_main != 255){
      value_duck = clamp(value_duck - fade_factor, 0, 1)
      add_duck   = clamp(add_duck   - fade_factor * add_duck, 0, 1)
      alpha_duck = clamp(alpha_duck - fade_factor * add_duck, 0, 1)
   }
   if(add_duck < 0.01) add_duck = 0

   //Double tap animation
if(!isFakeDuck && isDoubletap && green_dt != 1 && Exploit.GetCharge() >= 0.3 && alpha_main == 255){
   value_dt = clamp(value_dt + fade_factor , 0, 1)
   alpha_dt = clamp(alpha_dt + fade_factor  * value_dt, 0, 1)
   green_dt = clamp(green_dt + fade_factor  * value_dt, 0, 1)
}

if(!isFakeDuck && isDoubletap) add_dt                        = clamp(add_dt   + fade_factor  * value_dt, 0, 1)
if(!isDoubletap || alpha_main != 255 || isFakeDuck) alpha_dt = clamp(alpha_dt - fade_factor  * alpha_dt, 0, 1)
if(!isDoubletap || alpha_main != 255 || isFakeDuck) add_dt   = clamp(add_dt   - fade_factor  * add_dt, 0, 1)

if(!isDoubletap && alpha_dt != 0 || Exploit.GetCharge() <= 0.3  || alpha_main != 255){
   value_dt = clamp(value_dt - fade_factor , 0, 1)
   green_dt = clamp(green_dt - fade_factor * green_dt, 0, 1)
   
}
if(isDoubletap && red_dt != 150 && Exploit.GetCharge() >= 0.3 && alpha_main == 255)
red_dt = clamp(red_dt   - fade_factor * 75, 150, 255)

if(!isDoubletap && red_dt != 255 || Exploit.GetCharge() <= 0.3 || alpha_main != 255)
   red_dt                    = clamp(red_dt   + fade_factor * 75 , 150, 255)
if(alpha_dt < 0.01) alpha_dt = 0
if(add_dt < 0.01) add_dt     = 0
   dt_color                  = [red_dt ,255 * green_dt,0,255 * alpha_dt]
   //Hide Shots Animation
   if(!isFakeDuck && isHideShot && !isDoubletap && alpha_hs != 1 && Exploit.GetCharge() >= 0.3 && alpha_main == 255){
      value_hs = clamp(value_hs + fade_factor , 0, 1)
      alpha_hs = clamp(alpha_hs + fade_factor  * value_hs, 0, 1)
      add_hs   = clamp(alpha_hs + fade_factor  * value_hs, 0, 1)
   }

   if(!isHideShot || isDoubletap && alpha_hs != 0 || alpha_main != 255 || isFakeDuck){
      value_hs = clamp(value_hs - fade_factor , 0, 1)
      alpha_hs = clamp(alpha_hs - fade_factor  * alpha_hs, 0, 1)
      add_hs   = clamp(alpha_hs - fade_factor  * add_hs, 0, 1)
   }
   
   hs_color = [250,200,0,alpha_hs * 255]

   //Damage indicator

   heavy_cur   = UI.GetValue ("Rage", "HEAVY PISTOL", "Targeting", "Minimum damage")
   scout_cur   = UI.GetValue ("Rage", "SCOUT", "Targeting", "Minimum damage")
   awp_cur     = UI.GetValue   ("Rage", "AWP", "Targeting", "Minimum damage")
   auto_cur    = UI.GetValue  ("Rage", "AUTOSNIPER", "Targeting", "Minimum damage")
   weapon_name = Entity.GetName(Entity.GetWeapon(Entity.GetLocalPlayer()));
   
      if(weapon_name == "r8 revolver" || weapon_name == "desert eagle" || weapon_name == " 52>;L25@ r8" || weapon_name == "ssg 08" || weapon_name == "awp" || weapon_name == "scar 20" || weapon_name == "g3sg1")
      {
      if (weapon_name == "r8 revolver" || weapon_name == "desert eagle" || weapon_name == " 52>;L25@ r8" /* revolver on russian lang */) {
         dmg_render = heavy_cur
      }
      if (weapon_name == "ssg 08") {
         dmg_render = scout_cur
      }
      if (weapon_name == "awp") {
         dmg_render = awp_cur
      }
      if (weapon_name == "scar 20" || weapon_name == "g3sg1") {
         dmg_render = auto_cur
      }
      } else {
         dmg_render = "-"
      }
   //render
   if (isForceBody && !isForceHead && !isLegsAddition) {
      Render.String(screen_size[0] / 2 - 11, screen_size[1] / 2 + 81, 0, "BODY", [0, 0, 0, alpha_main], 3);
      Render.String(screen_size[0] / 2 - 12, screen_size[1] / 2 + 80, 0, "BODY", [250, 187, 27, alpha_main], 3);
   } else if (!isForceBody && !isForceHead && !isLegsAddition) {
      Render.String(screen_size[0] / 2 - 13, screen_size[1] / 2 + 81, 0, "NORM", [0, 0, 0, alpha_main], 3);
      Render.String(screen_size[0] / 2 - 14, screen_size[1] / 2 + 80, 0, "NORM", [0, 208, 255, alpha_main], 3);
   } else if (isForceHead && !isLegsAddition && !isForceBody) {
      Render.String(screen_size[0] / 2 - 11, screen_size[1] / 2 + 81, 0, "HEAD", [0, 0, 0, alpha_main], 3);
      Render.String(screen_size[0] / 2 - 12, screen_size[1] / 2 + 80, 0, "HEAD", [255, 0, 0, alpha_main], 3);
   } else if (isLegsAddition && !isForceBody && !isForceHead){
      Render.String(screen_size[0] / 2 - 8, screen_size[1] / 2 + 81, 0, "FEET", [0, 0, 0, alpha_main], 3);
      Render.String(screen_size[0] / 2 - 9, screen_size[1] / 2 + 80, 0, "FEET", [0, 255, 0, alpha_main], 3);

   }
   if(alpha_dt != 0){
      add_y = add_y + add_dt * add_factor
   Render.String(screen_size[0] / 2 - 9, screen_size[1] / 2  + add_y + 1 , 0, "DT", [0, 0, 0, dt_color[3]], 3);
   Render.String(screen_size[0] / 2 - 10, screen_size[1] / 2  + add_y, 0, "DT", dt_color, 3);
   }

   if(alpha_hs != 0){
      add_y = add_y + add_hs * add_factor
   Render.String(screen_size[0] / 2 - 13 , screen_size[1] / 2  + add_y + 1 , 0, "SILENT", [0, 0, 0, hs_color[3]], 3);
   Render.String(screen_size[0] / 2 - 14, screen_size[1] / 2  + add_y, 0, "SILENT", hs_color, 3);
   }

    if (isInverter) {
       add_y = add_y + add_factor
       Render.String(screen_size[0] / 2 - 9, screen_size[1] / 2 + add_y + 1, 0, "LEFT", [0, 0, 0, alpha_main], 3);
       Render.String(screen_size[0] / 2 - 10, screen_size[1] / 2 + add_y, 0, "LEFT", [255, 255, 255, alpha_main], 3);
    } else {
       add_y = add_y + add_factor
       Render.String(screen_size[0] / 2 - 12, screen_size[1] / 2 + add_y + 1, 0, "RIGHT", [0, 0, 0, alpha_main], 3);
       Render.String(screen_size[0] / 2 - 13, screen_size[1] / 2 + add_y, 0, "RIGHT", [255, 255, 255, alpha_main], 3);
    }
   
   
   // if (Exploit.GetCharge() == 1 && alpha_main != 0) {
   //    add_y = add_y + add_factor
   //    Render.String(screen_size[0] / 2 - 10, screen_size[1] / 2 + add_y + 1, 0, "HIDE", [0, 0, 0, alpha_main], 3);
   //    Render.String(screen_size[0] / 2 - 11, screen_size[1] / 2 + add_y, 0, "HIDE", [0, 208, 255, alpha_main], 3);

   // } else {
     if (!isHideShot && !isDoubletap || alpha_anim != 0) {
         add_y = add_y  + add_anim * add_factor
          Render.String(screen_size[0] / 2 - 12, screen_size[1] / 2 + add_y + 1, 0, "ANIM", [0, 0, 0,alpha_anim], 3);
        Render.String(screen_size[0] / 2 - 13, screen_size[1] / 2 + add_y, 0, "ANIM", [250, 187, 27, alpha_anim], 3);
      }
   

   
   

   if (isFakeDuck || alpha_duck_anim > 0 && alpha_main > 50) {
      add_y = add_y + add_duck * add_factor;
      Render.String(screen_size[0] / 2 - 11, screen_size[1] / 2 + 1 + add_y, 0, "DUCK", [0, 0, 0, alpha_duck_anim], 3);
      Render.String(screen_size[0] / 2 - 12, screen_size[1] / 2 + add_y, 0, "DUCK", [255, 255, 255, alpha_duck_anim], 3);
   }

   if (alpha_autopeek > 0) {
      add_y = add_y + add_autopeek * add_factor ;
   
      Render.String(screen_size[0] / 2 - 10, screen_size[1] / 2 + 1 + add_y, 0, "PEEK", [0, 0, 0, alpha_autopeek * 255], 3);
      Render.String(screen_size[0] / 2 - 11, screen_size[1] / 2 + add_y, 0, "PEEK", [63, 61, 166, alpha_autopeek * 255], 3);
   }
   if (alpha_damage > 0) {
      add_y = add_y + add_damage * add_factor;
   
      Render.String(screen_size[0] / 2 - 10, screen_size[1] / 2 + 1 + add_y, 0, "DMG", [0, 0, 0, alpha_damage * 255], 3);
      Render.String(screen_size[0] / 2 - 11, screen_size[1] / 2 + add_y, 0, "DMG", [255, 0, 0, alpha_damage * 255], 3);
      Render.String(screen_size[0] / 2 + 14, screen_size[1] / 2 + 1 + add_y, 0, dmg_render.toString(), [0, 0, 0, alpha_damage * 255], 3);
      Render.String(screen_size[0] / 2 + 13, screen_size[1] / 2 + add_y, 0, dmg_render.toString(), [255, 255, 255, alpha_damage * 255], 3);
   }

   if (alpha_legit > 0) {
      add_y = add_y + add_legit * add_factor;
   
      Render.String(screen_size[0] / 2 - 11, screen_size[1] / 2 + 1 + add_y, 0, "LEGIT", [0, 0, 0, alpha_legit * 255], 3);
      Render.String(screen_size[0] / 2 - 12, screen_size[1] / 2 + add_y, 0, "LEGIT", [20, 255, 0, alpha_legit* 255], 3);
   }
   if (alpha_onshot > 0) {
      add_y = add_y + add_onshot  * add_factor;
   
      Render.String(screen_size[0] / 2 - 18, screen_size[1] / 2 + 1 + add_y, 0, "ONSHOT", [0, 0, 0, alpha_onshot * 255], 3);
      Render.String(screen_size[0] / 2 - 19, screen_size[1] / 2 + add_y, 0, "ONSHOT", [240, 153, 24, alpha_onshot * 255], 3);
   }
   //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   
   if(isDoubletap && Exploit.GetCharge() >= 0.5 ){
      value_arc = clamp(value_arc + fade_factor * 1.2 * value_dt, 0, 1)
     } else {
      value_arc = clamp(value_arc - fade_factor * 1.2 * value_arc, 0, 1)
     }
   
      if(UI.GetValue("DT indication type") == 1){
         //battery
         Render.Line( screen_size[0] / 2 + 7, screen_size[1] / 2 + 88 + add_dt * add_factor, screen_size[0] / 2 + 12, screen_size[1] / 2 + 88+ add_dt * add_factor, [ 255, 255,255, dt_color[3] ])
         Render.Line( screen_size[0] / 2 + 7, screen_size[1] / 2 + 89 + add_dt * add_factor, screen_size[0] / 2 + 12, screen_size[1] / 2 + 89+ add_dt * add_factor, [ 0, 0,0, dt_color[3] ])
         Render.Line( screen_size[0] / 2 + 7, screen_size[1] / 2 + 88 + add_dt * add_factor, screen_size[0] / 2 + 7, screen_size[1] / 2 + 81+ add_dt * add_factor, [ 255, 255,255, dt_color[3] ]) // left
         Render.Line(  screen_size[0] / 2 + 12, screen_size[1] / 2 + 88 + add_dt * add_factor, screen_size[0] / 2 + 12, screen_size[1] / 2 + 81+ add_dt * add_factor, [ 255, 255,255, dt_color[3] ]) //right
         Render.Line( screen_size[0] / 2 + 7, screen_size[1] / 2 + 81 + add_dt * add_factor, screen_size[0] / 2 + 8, screen_size[1] / 2 + 81+ add_dt * add_factor, [ 255, 255,255, dt_color[3] ])
         Render.Line(  screen_size[0] / 2 + 11, screen_size[1] / 2 + 81 + add_dt * add_factor, screen_size[0] / 2 + 12, screen_size[1] / 2 + 81+ add_dt * add_factor, [ 255, 255,255, dt_color[3] ])
         Render.Rect( screen_size[0] / 2 + 9, screen_size[1] / 2 + 80 + add_dt * add_factor, 2, 2, [ 255, 255,255, dt_color[3] ])
         //charge
         Render.FilledRect( screen_size[0] / 2 + 8, screen_size[1] / 2 + 82 + add_dt * add_factor, 4, 6, [ 0, 0,0,  dt_color[3] ])
         if(value_dt > 0.24 || value_hs > 0.24)
         Render.Line( screen_size[0] / 2 + 8, screen_size[1] / 2 + 87+ add_dt * add_factor, screen_size[0] / 2 + 11, screen_size[1] / 2 + 87+ add_dt * add_factor,dt_color)
         
         if(value_dt > 0.40 || value_hs > 0.40)
         Render.Line( screen_size[0] / 2 + 8, screen_size[1] / 2 + 86+ add_dt * add_factor, screen_size[0] / 2 + 11, screen_size[1] / 2 + 86+ add_dt * add_factor,dt_color)
         
         if(value_dt > 0.60 || value_hs > 0.60)
         Render.Line( screen_size[0] / 2 + 8, screen_size[1] / 2 + 85+ add_dt * add_factor, screen_size[0] / 2 + 11, screen_size[1] / 2 + 85+ add_dt * add_factor,dt_color)
         
         if(value_dt > 0.80 || value_hs > 0.80)
         Render.Line( screen_size[0] / 2 + 8, screen_size[1] / 2 + 84+ add_dt * add_factor, screen_size[0] / 2 + 11, screen_size[1] / 2 + 84+ add_dt * add_factor,dt_color)
         
         if(value_dt == 1 || value_hs == 1){
         Render.Line( screen_size[0] / 2 + 8, screen_size[1] / 2 + 83+ add_dt * add_factor, screen_size[0] / 2 + 11, screen_size[1] / 2 + 83+ add_dt * add_factor,dt_color)
         Render.Line( screen_size[0] / 2 + 8, screen_size[1] / 2 + 82+ add_dt * add_factor, screen_size[0] / 2 + 11, screen_size[1] / 2 + 82+ add_dt * add_factor,dt_color)
         }
      } else {

   //render arc
    if (alpha_main > 50 && Entity.IsAlive(player)) {
        
   //971
        x            = (screen_size[0] / 2 + 8)
        y            = (screen_size[1] / 2 + 84 + add_dt * add_factor)
        distance     = 4.5
        inner_radius = 2.3
        segments     = 30
        
        
      if(value_arc < 0.01) value_arc = 0
         max_angle                   = 360 * value_arc;
        

       render_arc(x + 2, y + 1, distance, inner_radius, -90, max_angle, segments, [0, 0, 0, 120 * alpha_dt]);
       render_arc(x, y, distance, inner_radius, -90, max_angle, segments, dt_color);



         function render_arc(x, y, radius, radius_inner, start_angle, end_angle, segments, dt_color) {
          while (360 % segments != 0) {
             segments++;
          }

          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_outer = x + rad_cos * radius;
              var y1_outer = y + rad_sin * radius;

              var x2_outer = x + rad2_cos * radius;
              var y2_outer = y + rad2_sin * radius;

             var x1_inner = x + rad_cos * radius_inner;
             var y1_inner = y + rad_sin * radius_inner;

             var x2_inner = x + rad2_cos * radius_inner;
             var y2_inner = y + rad2_sin * radius_inner;

             Render.Polygon([
                [x1_outer, y1_outer],
                [x2_outer, y2_outer],
                [x1_inner, y1_inner]
             ],
                dt_color
             );

             Render.Polygon([
                  [x1_inner, y1_inner],
                  [x2_outer, y2_outer],
                 [x2_inner, y2_inner]
               ],
                  dt_color
             );
          }
         }
      }
   }
}
function menu_cb()
{
   enabled = UI.GetValue( "Anti-aim indication");
   UI.SetEnabled( "DT indication type", enabled);

}
function menu_check() {
	if (UI.IsMenuOpen()) {
		menu_cb();
	}

}
Global.RegisterCallback("Draw", "menu_check")
Global.RegisterCallback("Draw", "indication")
