Ejemplo n.º 1
0
 private void isOnGui()
 {
     if (LocalPlayer.Base == null)
     {
         return;
     }
     try
     {
         for (int i = 0; i < DoorList.Count; i++)
         {
             Position = Camera.main.WorldToScreenPoint(DoorList[i].transform.position);
             if (MaociScreen.onScreenStrict(Position))
             {
                 KeyCardName = "";
                 if (excludedList.IndexOf(DoorList[i].KeyId) != -1)
                 {
                     KeyCardName = " (Card: " + GetKeyCardName(DoorList[i].KeyId) + ")";
                 }
                 Print.Special.DrawText(
                     $"{DoorDistance.ToString()}m" + KeyCardName,
                     Position.x,
                     MaociScreen.height - Position.y,
                     vec,
                     LabelSize,
                     ((Settings.CDoor.SelectedDoor == DoorList[i].Id.Replace("autoId_", "").Replace("0", "")) ? Settings.CDoor.DrawActiveColor : Settings.CDoor.DrawColor));
             }
         }
     }
     catch { errorCount++; }
 }
Ejemplo n.º 2
0
        public void OnGUI()
        {
            if (!Settings.CCorpse.Enable)
            {
                return; //enable?
            }
            if (Event.current.type != EventType.Repaint)
            {
                return; //should we repaint?
            }
            if (LocalPlayer.Base == null)
            {
                return; // gameworld is iniciated?
            }
            if (iCorpse.tempCamera == null)
            {
                iCorpse.tempCamera = Camera.main;
            }
            if (!iCorpse.tempCamera)
            {
                return;
            }

            var e = update.l_Corpse.GetEnumerator();

            while (e.MoveNext())
            {
                try
                {
                    iCorpse.tCorpse = e.Current;
                    if (iCorpse.tCorpse == null)
                    {
                        continue;
                    }
                    iCorpse.itemPositionW2S = iCorpse.tempCamera.WorldToScreenPoint(iCorpse.tCorpse.transform.position);
                    if (MaociScreen.onScreenStrict(iCorpse.itemPositionW2S))
                    {
                        iCorpse.DistanceToObject = (int)Vector3.Distance(iCorpse.tempCamera.transform.position, iCorpse.tCorpse.transform.position);
                        if (iCorpse.DistanceToObject < Settings.CCorpse.Distance)
                        {
                            iCorpse.LabelSize.fontSize         = MaociScreen.Scale.FontSizer(iCorpse.DistanceToObject);
                            iCorpse.LabelSize.normal.textColor = Settings.CCorpse.DrawColor;
                            text.Txt_1     = $"{iCorpse.DistanceToObject}m";
                            text.sizeTxt_1 = GUI.skin.GetStyle(text.Txt_1).CalcSize(text.content_1);
                            Print.Special.DrawPoint(iCorpse.itemPositionW2S.x - 1.5f, Screen.height - iCorpse.itemPositionW2S.y - 1.5f, 3f, Settings.CCorpse.DrawColor);
                            Print.Special.DrawText(
                                text.Txt_1,
                                iCorpse.itemPositionW2S.x - text.sizeTxt_1.x / 2f,
                                Screen.height - iCorpse.itemPositionW2S.y - 25f,
                                text.sizeTxt_1,
                                iCorpse.LabelSize,
                                Settings.CCorpse.DrawColor
                                );
                        }
                    }
                } catch { }
            }
        }
Ejemplo n.º 3
0
        private void isOnGui()
        {
            if (!Settings.CThrowable.Enable)
            {
                return;
            }
            if (LocalPlayer.Base == null)
            {
                return;
            }
            if (Event.current.type != EventType.Repaint)
            {
                return;
            }
            tempCamera = Camera.main;
            if (!tempCamera)
            {
                return;
            }
            var e = CGameWorld.Base.Grenades.GetValuesEnumerator().GetEnumerator();

            while (e.MoveNext())
            {
                iGrenade.grenade = e.Current;
                if (iGrenade.grenade == null)
                {
                    continue;
                }
                if (MaociScreen.onScreenStrict(tempCamera.WorldToScreenPoint(iGrenade.grenade.transform.position)))
                {
                    iGrenade.DistanceToObject = (int)Vector3.Distance(tempCamera.transform.position, iGrenade.grenade.transform.position);
                    if (iGrenade.DistanceToObject < Settings.CThrowable.Distance)
                    {
                        iGrenade.Style.fontSize         = MaociScreen.Scale.FontSizer(iGrenade.DistanceToObject);
                        iGrenade.positionW2S            = tempCamera.WorldToScreenPoint(iGrenade.grenade.transform.position);
                        iGrenade.positionOnScreenY      = (Screen.height - iGrenade.positionW2S.y);
                        iGrenade.Style.normal.textColor = Settings.CThrowable.DrawColor;
                        iGrenade.label.Text             = $"{iGrenade.DistanceToObject}m - {func.ThrowableName(iGrenade.grenade.name.Localized())}";
                        iGrenade.label.size             = GUI.skin.GetStyle(iGrenade.label.Text).CalcSize(new GUIContent(iGrenade.label.Text));
                        Print.Special.DrawPoint(iGrenade.positionW2S.x - 1.5f, iGrenade.positionOnScreenY - 1.5f, 3f, Settings.CThrowable.DrawColor);
                        Print.Special.DrawText(
                            iGrenade.label.Text,
                            iGrenade.positionW2S.x - iGrenade.label.size.x / 2f,
                            iGrenade.positionOnScreenY - 25f,
                            iGrenade.label.size,
                            iGrenade.Style,
                            Settings.CThrowable.DrawColor
                            );
                    }
                }
            }
        }
Ejemplo n.º 4
0
 private static void DrawScavExfil(ScavExfiltrationPoint tExfil = null)
 {
     if (tExfil == null)
     {
         return;
     }
     if (MaociScreen.onScreenStrict(camera.WorldToScreenPoint(tExfil.transform.position)))
     {
         data.DistanceToObject = (int)Vector3.Distance(camera.transform.position, tExfil.transform.position);
         if (data.DistanceToObject < Settings.CExfiltration.Distance)
         {
             positionW2S                 = camera.WorldToScreenPoint(tExfil.transform.position);
             data.Style.fontSize         = MaociScreen.Scale.FontSizer(data.DistanceToObject);
             data.Style.normal.textColor = Settings.CExfiltration.DrawColor;
             data.text.Txt_1             = tExfil.Settings.Name;
             data.text.Txt_2             = $"({func.TypeOfExfiltration(tExfil.Status)})";
             data.text.Txt_3             = $"{data.DistanceToObject}m";
             data.text.sizeTxt_1         = GUI.skin.GetStyle(data.text.Txt_1).CalcSize(data.text.content_1);
             data.text.sizeTxt_2         = GUI.skin.GetStyle(data.text.Txt_2).CalcSize(data.text.content_2);
             data.text.sizeTxt_3         = GUI.skin.GetStyle(data.text.Txt_3).CalcSize(data.text.content_3);
             data.onScreenY              = Screen.height - positionW2S.y;
             // drawing starts
             Print.Special.DrawPoint(positionW2S.x - data.size.half, (float)(Screen.height - positionW2S.y) - data.size.half, data.size.full, Settings.CExfiltration.DrawColor);
             Print.Special.DrawText(
                 data.text.Txt_1,
                 positionW2S.x - data.text.sizeTxt_1.x / 2f,
                 data.onScreenY - Settings.CExfiltration.DeltaDistance - 2,
                 data.text.sizeTxt_1,
                 data.Style,
                 Settings.CExfiltration.DrawColor
                 );
             Print.Special.DrawText(
                 data.text.Txt_2,
                 positionW2S.x - data.text.sizeTxt_2.x / 2f,
                 data.onScreenY - Settings.CExfiltration.DeltaDistance - data.Style.fontSize - 2,
                 data.text.sizeTxt_2,
                 data.Style,
                 Settings.CExfiltration.DrawColor
                 );
             Print.Special.DrawText(
                 data.text.Txt_3,
                 positionW2S.x - data.text.sizeTxt_3.x / 2f,
                 data.onScreenY - Settings.CExfiltration.DeltaDistance - data.Style.fontSize - data.Style.fontSize - 2,
                 data.text.sizeTxt_3,
                 data.Style,
                 Settings.CExfiltration.DrawColor
                 );
         }
     }
 }
Ejemplo n.º 5
0
 private void isOnUpdate()
 {
     if (LocalPlayer.Base == null)
     {
         return;
     }
     try
     {
         // creater list of players only on screen less ressource hungry
         // it can also be done using FOV * 2 to add to list
         vars.tPlayers = new List <Player>();
         vars.list_tmp = CGameWorld.Base.RegisteredPlayers.GetEnumerator();
         vars.countObj = 0;
         while (vars.list_tmp.MoveNext())
         {
             vars.tmpItem = vars.list_tmp.Current;
             if (vars.tmpItem == null)
             {
                 continue;
             }
             vars.tmpHeadPos = vars.tmpItem.PlayerBones.Head.position;
             if (MaociScreen.onScreenStrict(Camera.main.WorldToScreenPoint(vars.tmpHeadPos)))
             {         // if players head is on screen then .Add
                 if (Settings.CAimH.Distance > Vector3.Distance(Camera.main.transform.position, vars.tmpHeadPos))
                 {     // if players distance is in range
                     if (!CPlayer.Function.inGroup(vars.tmpItem))
                     { // exclude players in group
                         vars.tPlayers.Add(vars.tmpItem);
                         vars.countObj++;
                     }
                 }
             }
         }
         vars.tPlayers = Prioritize.SortData(vars.tPlayers);
         vars.l_Player = vars.tPlayers;
     }
     catch { }
     if (vars.countObj == 0)
     {
         return;
     }
     vars.PlayerAimedAt = func.ChooseTarget(Settings.CAimH.ForceAim);
 }
Ejemplo n.º 6
0
        private void isOnUpdate()
        {
            if (!Settings.CPlayer.Enable)
            {
                return;
            }
            if (LocalPlayer.Base == null)
            {
                if (NoGroup != "")
                {
                    NoGroup = "";
                }
                return;
            }

            if (CGameWorld.Base.RegisteredPlayers == null)
            {
                return;
            }
            if (CGameWorld.Base.RegisteredPlayers.Count < 1)
            {
                return;
            }

            l_Player_temp = CGameWorld.Base.RegisteredPlayers.GetEnumerator();
            l_Player      = new List <BasePlayer>();
            while (l_Player_temp.MoveNext())
            {
                var current = l_Player_temp.Current;
                if (current == null)
                {
                    continue;
                }
                if (Camera.main == null)
                {
                    continue;
                }
                if (Settings.CPlayer.BaseDistance > Vector3.Distance(Camera.main.transform.position, current.Transform.position))
                {
                    try
                    {
                        tBasePlayer                = new BasePlayer();
                        tBasePlayer.player         = current;
                        tBasePlayer.onScreenHead   = Camera.main.WorldToScreenPoint(current.PlayerBones.Head.position);
                        tBasePlayer.onScreenNeck   = Camera.main.WorldToScreenPoint(current.PlayerBones.Neck.position);
                        tBasePlayer.Distance       = (int)Vector3.Distance(Camera.main.transform.position, current.Transform.position);
                        tBasePlayer.onScreen       = MaociScreen.onScreenStrict(Camera.main.WorldToScreenPoint(current.Transform.position));
                        tBasePlayer.Health         = Function.GetPlayerTotalHealth(current);
                        tBasePlayer.EquipmentValue = Function.CalculateEQValue(current);
                        tBasePlayer.ItemInHands    = current.HandsController.Item.ShortName.Localized();
                        if (tBasePlayer.ItemInHands.IndexOf("Short") != -1)
                        {
                            tBasePlayer.ItemInHands = "";
                        }
                        try
                        {
                            tBasePlayer.WeaponAmmoCounter = " |" + (current.Weapon.GetCurrentMagazineCount() + current.Weapon.ChamberAmmoCount).ToString() + "|";
                        }
                        catch
                        {
                            tBasePlayer.WeaponAmmoCounter = "";
                        }
                        tBasePlayer.PreviousPosition = current.Transform.position;
                        l_Player.Add(tBasePlayer);
                    }
                    catch { }
                }
            }
        }
Ejemplo n.º 7
0
            public static void PlayerBones(float distance, Player player)
            {
                if (distance < Settings.CPlayer.BonesDistance)
                {
                    TempBones.RightPalm     = Camera.main.WorldToScreenPoint(player.PlayerBones.RightPalm.position);
                    TempBones.LeftPalm      = Camera.main.WorldToScreenPoint(player.PlayerBones.LeftPalm.position);
                    TempBones.LeftShoulder  = Camera.main.WorldToScreenPoint(player.PlayerBones.LeftShoulder.position);
                    TempBones.RightShoulder = Camera.main.WorldToScreenPoint(player.PlayerBones.RightShoulder.position);
                    TempBones.Neck          = Camera.main.WorldToScreenPoint(player.PlayerBones.Neck.position);
                    TempBones.Pelvis        = Camera.main.WorldToScreenPoint(player.PlayerBones.Pelvis.position);
                    TempBones.KickingFoot   = Camera.main.WorldToScreenPoint(player.PlayerBones.KickingFoot.position);
                    TempBones.LeftFoot      = Camera.main.WorldToScreenPoint(Functions.PlayerBones.GetBoneById(player, 18));
                    TempBones.LeftForearm   = Camera.main.WorldToScreenPoint(Functions.PlayerBones.GetBoneById(player, 91));
                    TempBones.RightForearm  = Camera.main.WorldToScreenPoint(Functions.PlayerBones.GetBoneById(player, 112));
                    TempBones.LeftCalf      = Camera.main.WorldToScreenPoint(Functions.PlayerBones.GetBoneById(player, 17));
                    TempBones.RightCalf     = Camera.main.WorldToScreenPoint(Functions.PlayerBones.GetBoneById(player, 22));
                    boneColor = (Raycast.isVisible(iPlayer.BPlayer.player)) ? Colors.Visible : Colors.NotVisible;

                    /*
                     #region look direction - is buggy
                     * var PositionOfLook = FUNC.W2S(player.PlayerBones.Head.position);
                     * var PositionOfLookFront = FUNC.W2S(player.PlayerBones.Head.position + player.PlayerBones.Head.up * 2f);
                     * Drawing.Bone.Draw(PositionOfLookFront, PositionOfLook, new Color(0f,1f,0f,.6f));
                     #endregion
                     */
                    #region Drawed Weapon Line -> best for looking at direction
                    TempBones.GunPointingAt        = Camera.main.WorldToScreenPoint(player.PlayerBones.WeaponRoot.position);
                    TempBones.GunPointingAtForward = Camera.main.WorldToScreenPoint(player.PlayerBones.WeaponRoot.position - player.PlayerBones.WeaponRoot.up * 1.3f);
                    Print.Bone.Draw(TempBones.GunPointingAtForward, TempBones.GunPointingAt, Colors.Green06, boneThicc);
                    #endregion

                    if (MaociScreen.onScreenStrict(TempBones.Neck) && MaociScreen.onScreenStrict(TempBones.Pelvis))
                    {
                        Print.Bone.Draw(TempBones.Neck, TempBones.Pelvis, boneColor, boneThicc);
                    }
                    if (MaociScreen.onScreenStrict(TempBones.LeftShoulder) && MaociScreen.onScreenStrict(TempBones.LeftForearm))
                    {
                        Print.Bone.Draw(TempBones.LeftShoulder, TempBones.LeftForearm, boneColor, boneThicc);
                    }
                    if (MaociScreen.onScreenStrict(TempBones.RightShoulder) && MaociScreen.onScreenStrict(TempBones.RightForearm))
                    {
                        Print.Bone.Draw(TempBones.RightShoulder, TempBones.RightForearm, boneColor, boneThicc);
                    }
                    if (MaociScreen.onScreenStrict(TempBones.LeftForearm) && MaociScreen.onScreenStrict(TempBones.LeftPalm))
                    {
                        Print.Bone.Draw(TempBones.LeftForearm, TempBones.LeftPalm, boneColor, boneThicc);
                    }
                    if (MaociScreen.onScreenStrict(TempBones.RightForearm) && MaociScreen.onScreenStrict(TempBones.RightPalm))
                    {
                        Print.Bone.Draw(TempBones.RightForearm, TempBones.RightPalm, boneColor, boneThicc);
                    }
                    if (MaociScreen.onScreenStrict(TempBones.RightShoulder) && MaociScreen.onScreenStrict(TempBones.LeftShoulder))
                    {
                        Print.Bone.Draw(TempBones.RightShoulder, TempBones.LeftShoulder, boneColor, boneThicc);
                    }
                    if (MaociScreen.onScreenStrict(TempBones.LeftCalf) && MaociScreen.onScreenStrict(TempBones.Pelvis))
                    {
                        Print.Bone.Draw(TempBones.LeftCalf, TempBones.Pelvis, boneColor, boneThicc);
                    }
                    if (MaociScreen.onScreenStrict(TempBones.RightCalf) && MaociScreen.onScreenStrict(TempBones.Pelvis))
                    {
                        Print.Bone.Draw(TempBones.RightCalf, TempBones.Pelvis, boneColor, boneThicc);
                    }
                    if (MaociScreen.onScreenStrict(TempBones.LeftCalf) && MaociScreen.onScreenStrict(TempBones.LeftFoot))
                    {
                        Print.Bone.Draw(TempBones.LeftCalf, TempBones.LeftFoot, boneColor, boneThicc);
                    }
                    if (MaociScreen.onScreenStrict(TempBones.RightCalf) && MaociScreen.onScreenStrict(TempBones.KickingFoot))
                    {
                        Print.Bone.Draw(TempBones.RightCalf, TempBones.KickingFoot, boneColor, boneThicc);
                    }
                }
            }
Ejemplo n.º 8
0
        private void isOnGui()
        {
            try
            {
                if (!Settings.CPlayer.Enable)
                {
                    return;
                }
                if (LocalPlayer.Base == null)
                {
                    return;
                }
                if (Event.current.type != EventType.Repaint)
                {
                    return;
                }
                Camera camera = Camera.main;
                if (!camera)
                {
                    return;
                }

                var e = l_Player.GetEnumerator();
                while (e.MoveNext())
                {
                    iPlayer.BPlayer = e.Current;
                    if (iPlayer.BPlayer.player == LocalPlayer.Base)
                    {
                        continue;
                    }
                    #region [Snap.Lines]
                    if (Settings.CPlayer.DrawSnapLines)
                    {
                        iPlayer.Name      = Function.PlayerName(iPlayer.BPlayer.player, ref iPlayer.PlayerType);
                        iPlayer.UserColor = Function.PlayerColor(iPlayer.PlayerType);
                        Function.SnapLines(iPlayer.BPlayer.player, iPlayer.UserColor);
                    }
                    #endregion
                    if (MaociScreen.onScreenYZ(Camera.main.WorldToScreenPoint(iPlayer.BPlayer.player.Transform.position)))
                    {
                        //fix for colors not holds after leaving screen
                        if (!Settings.CPlayer.DrawSnapLines)
                        {
                            iPlayer.Name      = Function.PlayerName(iPlayer.BPlayer.player, ref iPlayer.PlayerType);
                            iPlayer.UserColor = Function.PlayerColor(iPlayer.PlayerType);
                        }
                        if (MaociScreen.onScreenStrict(Camera.main.WorldToScreenPoint(iPlayer.BPlayer.player.Transform.position)))
                        {
                            iPlayer.DistanceToTarget = (int)Vector3.Distance(Camera.main.transform.position, iPlayer.BPlayer.player.Transform.position);
                            iPlayer.HeadPos          = iPlayer.BPlayer.onScreenHead; // Camera.main.WorldToScreenPoint(iPlayer.BPlayer.PlayerBones.Head.position);
                            iPlayer.NeckPos          = iPlayer.BPlayer.onScreenNeck; // Camera.main.WorldToScreenPoint(iPlayer.BPlayer.PlayerBones.Neck.position);
                            iPlayer.HeadNeck_Abs     = Math.Abs(iPlayer.HeadPos.y - iPlayer.NeckPos.y);
                            iPlayer.HeadOnScreen     = Screen.height - iPlayer.HeadPos.y;

                            iPlayer.HeadSize     = Math.Min(Math.Max(iPlayer.HeadNeck_Abs * 1.5f, 20f), 2f);
                            iPlayer.HeadSize     = (iPlayer.HeadSize > 30f) ? 30f : iPlayer.HeadSize;
                            iPlayer.halfHeadSize = iPlayer.HeadSize / 2f;

                            iPlayer.TextStyle.fontSize = MaociScreen.Scale.FontSizer(iPlayer.DistanceToTarget);

                            iPlayer.label.disText_1 = 20f + iPlayer.HeadNeck_Abs * 5;
                            iPlayer.label.disText_2 = iPlayer.label.disText_1 + iPlayer.TextStyle.fontSize + 1;
                            iPlayer.label.disText_3 = iPlayer.label.disText_2 + iPlayer.TextStyle.fontSize + 1;

                            iPlayer.Health = iPlayer.BPlayer.Health;// Function.GetPlayerTotalHealth(iPlayer.BPlayer); // Health here

                            if (iPlayer.PlayerType != Function.PlayerType.TeamMate)
                            {
                                Print.Special.DrawPoint(iPlayer.HeadPos.x - iPlayer.halfHeadSize, iPlayer.HeadOnScreen - iPlayer.halfHeadSize, iPlayer.HeadSize, Function.Colors.Red);
                            }
                            if (Settings.CPlayer.DrawBones)
                            {
                                Function.PlayerBones(iPlayer.DistanceToTarget, iPlayer.BPlayer.player);
                            }
                            #region [Text]
                            iPlayer.label.Text_1 = $"{iPlayer.Name} <{iPlayer.BPlayer.EquipmentValue}>";
                            iPlayer.label.Text_2 = $"[{iPlayer.DistanceToTarget}m] {iPlayer.Health}";
                            iPlayer.label.Text_3 = "";
                            #endregion
                            #region [TRY-DecodeWeaponName]

                            iPlayer.label.Text_3 = iPlayer.BPlayer.ItemInHands + iPlayer.BPlayer.WeaponAmmoCounter;
                            #endregion

                            iPlayer.TextStyle.normal.textColor = iPlayer.UserColor;
                            #region Slot 0 - Player Name
                            if (iPlayer.label.Text_1 != "")
                            {
                                iPlayer.label.vecText_1  = GUI.skin.GetStyle(iPlayer.label.Text_1).CalcSize(iPlayer.label.GuiText_1);
                                iPlayer.label.sizeText_1 = iPlayer.label.vecText_1.x;
                                Print.Special.DrawText(
                                    iPlayer.label.Text_1,
                                    iPlayer.HeadPos.x - iPlayer.label.sizeText_1 / 2f,
                                    iPlayer.HeadOnScreen - iPlayer.label.disText_1,
                                    iPlayer.label.vecText_1,
                                    iPlayer.TextStyle,
                                    iPlayer.UserColor
                                    );
                            }
                            #endregion
                            #region Slot 1 - distance, health
                            iPlayer.label.vecText_2  = GUI.skin.GetStyle(iPlayer.label.Text_2).CalcSize(iPlayer.label.GuiText_2);
                            iPlayer.label.sizeText_2 = iPlayer.label.vecText_2.x;
                            Print.Special.DrawText(
                                iPlayer.label.Text_2,
                                iPlayer.HeadPos.x - iPlayer.label.sizeText_2 / 2f,
                                iPlayer.HeadOnScreen - iPlayer.label.disText_2,
                                iPlayer.label.vecText_2,
                                iPlayer.TextStyle,
                                iPlayer.UserColor
                                );
                            #endregion
                            #region Slot 2 - Weapon Name
                            if (iPlayer.label.Text_3 != "")
                            {
                                iPlayer.label.vecText_3  = GUI.skin.GetStyle(iPlayer.label.Text_3).CalcSize(iPlayer.label.GuiText_3);
                                iPlayer.label.sizeText_3 = iPlayer.label.vecText_3.x;
                                Print.Special.DrawText(
                                    iPlayer.label.Text_3,
                                    iPlayer.HeadPos.x - iPlayer.label.sizeText_3 / 2f,
                                    iPlayer.HeadOnScreen - iPlayer.label.disText_3,
                                    iPlayer.label.vecText_3,
                                    iPlayer.TextStyle,
                                    iPlayer.UserColor
                                    );
                            }
                            #endregion
                        }
                    }
                }
            }
            catch
            {
            }
        }
Ejemplo n.º 9
0
        private void isOnGui()
        {
            if (LocalPlayer.Base == null)
            {
                return;
            }

            if (Settings.CAimH.KillaMode)
            {
                Print.Special.DrawText("KillaMode", vars.box2, vars.drawTextStyle);
            }
            else
            {
                Print.Special.DrawText(onWhatImGonnaAimAt(), vars.box2, vars.drawTextStyle);
            }
            if (Settings.CAimH.AimkeyFS && !Settings.CAimH.AimkeyFOV)
            {
                Print.Special.DrawText("Aim FS " + vars.vector.ToString() + " - " + vars.BodyPart_AimedAt.ToString(), vars.box, vars.drawTextStyle);
            }
            if (Settings.CAimH.AimkeyFOV && !Settings.CAimH.AimkeyFS)
            {
                Print.Special.DrawText("Aim FOV", vars.box, vars.drawTextStyle);
            }
            if (!Settings.CAimH.AimkeyFOV && !Settings.CAimH.AimkeyFS)
            {
                return;
            }
            vars.camera = Camera.main;
            if (!vars.camera)
            {
                return;
            }
            if (vars.countObj == 0)
            {
                return; // return if no object found
            }
            if (vars.PlayerAimedAt == null)
            {
                return; // oh somehow you get a default player object ... LOL
            }
            if (vars.BodyPart_AimedAt != AimBodyPart.Null)
            {
                vars.vector = Functions.PlayerBones.FinalVector(vars.PlayerAimedAt.PlayerBody.SkeletonRootJoint, (int)vars.BodyPart_AimedAt);// vars.PlayerAimedAt.PlayerBones.Head.position;// Functions.PlayerBones.FinalVector(vars.PlayerAimedAt.PlayerBody.SkeletonRootJoint, aimAtBodyPart);
            }
            else
            {
                return;
            }
            if (Settings.CAimH.DrawSnapLine)
            {
                #region DrawLineToTarget
                if (MaociScreen.onScreenStrict(vars.camera.WorldToScreenPoint(vars.PlayerAimedAt.Transform.position)))
                {
                    vars.prioritizeTarget   = vars.camera.WorldToScreenPoint(vars.vector);
                    vars.prioritizeTarget.y = MaociScreen.height - vars.prioritizeTarget.y;
                    Print.Line.Draw(vars.centerOfScreen, vars.prioritizeTarget, vars.colorToTarget, 2f);
                }
                #endregion
            }

            if (vars.vector != Vector3.zero)
            {
                if (!Settings.CAimH.AimkeyFS)
                {
                    if (Vector2.Distance(vars.centerOfScreen, vars.camera.WorldToScreenPoint(vars.vector)) > Settings.CAimH.FOV)
                    {
                        return;                                                                                                          // if not in FOV and FS is not pressed return
                    }
                }
                vars.distanceToTarget = Vector3.Distance(Camera.main.transform.position, vars.vector);
                vars.travelTime       = vars.distanceToTarget / LocalPlayer.Base.Weapon.CurrentAmmoTemplate.InitialSpeed;
                vars.vector          += vars.PlayerAimedAt.Velocity * vars.travelTime; // aim prediction to target move point depends on player movement
                vars.vector          -= LocalPlayer.Base.Velocity * Time.deltaTime;
                // should increase aiming by countind bullet drop
                if (vars.distanceToTarget > 100f)
                {
                    vars.vector = vars.vector + Vector3.up * func.BulletDrop(LocalPlayer.Base.Fireport.position, vars.vector, LocalPlayer.Base.Weapon.CurrentAmmoTemplate.InitialSpeed);
                }
                // predict own player movement and compensage aiming
                // strangely changes position of esp ... //Camera.main.transform.LookAt(vars.vector);
                //LocalPlayer.Base.Transform.LookAt(, Camera.main.transform.up);
                func.AimAtPos(vars.vector);
                if (NextMouseClick < Time.time && Settings.CAimH.AutoShoot && Raycast.isBodyPartVisible(vars.PlayerAimedAt, (int)vars.BodyPart_AimedAt))
                {// no need to viss check here cause we already know target is visible - making less cykles is better
                    MouseOperations.MouseEvent(MouseOperations.MouseEventFlags.LeftUp | MouseOperations.MouseEventFlags.LeftDown);
                    NextMouseClick = Time.time + 0.064f;
                }
            }
        }