コード例 #1
0
 public static void EnableChams()
 {
     if (ESPOptions.ChamsEnabled && ESPCoroutines.Chams != null && ESPOptions.ChamsMode < ESPCoroutines.Chams.Length)
     {
         foreach (SteamPlayer steamPlayer in Provider.clients)
         {
             Player player = steamPlayer.player;
             if (player && player != Player.player && player.gameObject)
             {
                 Color32 front  = FriendUtilities.IsFriendly(player) ? ColorUtilities.getColor("_ChamsFriendVisible") : ColorUtilities.getColor("_ChamsEnemyVisible");
                 Color32 behind = FriendUtilities.IsFriendly(player) ? ColorUtilities.getColor("_ChamsFriendInvisible") : ColorUtilities.getColor("_ChamsEnemyInvisible");
                 ESPCoroutines.DoChamsGameObject(player.gameObject, front, behind);
             }
         }
         return;
     }
 }
コード例 #2
0
 // Token: 0x060001FE RID: 510 RVA: 0x000130F0 File Offset: 0x000112F0
 public static void Tab()
 {
     Prefab.ScrollView(new Rect(0f, 0f, 611f, 275f), "Игроки", ref PlayersTab.PlayersScroll, delegate()
     {
         for (int i = 0; i < Provider.clients.Count; i++)
         {
             Player player = Provider.clients[i].player;
             if (!(player == Player.player) && !(player == null))
             {
                 bool flag   = FriendUtilities.IsFriendly(player);
                 bool flag2  = MiscOptions.SpectatedPlayer == player;
                 bool flag3  = false;
                 bool flag4  = player == PlayersTab.SelectedPlayer;
                 string text = flag ? "<color=#00ff00ff>" : string.Empty;
                 if (Prefab.Button(string.Concat(new string[]
                 {
                     flag4 ? "<b>" : string.Empty,
                     flag2 ? "<color=#0000ffff>[НАБЛЮДЕНИЕ]</color> " : string.Empty,
                     text,
                     string.Format("{0}", player.name),
                     (flag || flag3) ? "</color>" : string.Empty,
                     flag4 ? "</b>" : string.Empty
                 }), 560f, 25f))
                 {
                     PlayersTab.SelectedPlayer = player;
                 }
                 GUILayout.Space(2f);
             }
         }
     }, 20);
     Prefab.MenuArea(new Rect(0f, 280f, 190f, 126f), "ОПЦИИ", delegate
     {
         if (PlayersTab.SelectedPlayer == null)
         {
             return;
         }
         CSteamID steamID = PlayersTab.SelectedPlayer.channel.owner.playerID.steamID;
         GUILayout.BeginHorizontal(Array.Empty <GUILayoutOption>());
         GUILayout.BeginVertical(Array.Empty <GUILayoutOption>());
         if (!PlayersTab.SelectedPlayer.quests.isMemberOfSameGroupAs(Player.player))
         {
             if (FriendUtilities.IsFriendly(PlayersTab.SelectedPlayer) && Prefab.Button("Убрать друга", 150f, 25f))
             {
                 FriendUtilities.RemoveFriend(PlayersTab.SelectedPlayer);
             }
             else if (Prefab.Button("Добавить друга", 150f, 25f))
             {
                 FriendUtilities.AddFriend(PlayersTab.SelectedPlayer);
             }
         }
         if (MiscOptions.SpectatedPlayer != PlayersTab.SelectedPlayer && Prefab.Button("Наблюдать", 150f, 25f))
         {
             MiscOptions.SpectatedPlayer = PlayersTab.SelectedPlayer;
         }
         if (MiscOptions.SpectatedPlayer == PlayersTab.SelectedPlayer && Prefab.Button("Прекратить наблюдение", 150f, 25f))
         {
             MiscOptions.SpectatedPlayer = null;
         }
         GUILayout.EndVertical();
         GUILayout.EndHorizontal();
     });
     Prefab.MenuArea(new Rect(196f, 280f, 415f, 126f), "ИНФО", delegate
     {
         if (PlayersTab.SelectedPlayer == null)
         {
             return;
         }
         GUILayout.BeginHorizontal(Array.Empty <GUILayoutOption>());
         GUILayout.BeginVertical(Array.Empty <GUILayoutOption>());
         GUILayout.Label("SteamID:", Array.Empty <GUILayoutOption>());
         GUILayout.TextField(PlayersTab.SelectedPlayer.channel.owner.playerID.steamID.ToString(), Prefab._TextStyle, Array.Empty <GUILayoutOption>());
         GUILayout.Space(2f);
         GUILayout.TextField("Местонахождение: " + LocationUtilities.GetClosestLocation(PlayersTab.SelectedPlayer.transform.position).name, Prefab._TextStyle, Array.Empty <GUILayoutOption>());
         GUILayout.Label("Оружие: " + ((PlayersTab.SelectedPlayer.equipment.asset != null) ? PlayersTab.SelectedPlayer.equipment.asset.itemName : "Нет оружия"), Prefab._TextStyle, Array.Empty <GUILayoutOption>());
         GUILayout.Label("Машина: " + ((PlayersTab.SelectedPlayer.movement.getVehicle() != null) ? PlayersTab.SelectedPlayer.movement.getVehicle().asset.name : "Нет машины"), Prefab._TextStyle, Array.Empty <GUILayoutOption>());
         GUILayout.Label("Члены группы: " + Provider.clients.Count((SteamPlayer c) => c.player != PlayersTab.SelectedPlayer && c.player.quests.isMemberOfSameGroupAs(PlayersTab.SelectedPlayer)), Prefab._TextStyle, Array.Empty <GUILayoutOption>());
         GUILayout.EndVertical();
         GUILayout.EndHorizontal();
     });
 }
コード例 #3
0
        // Token: 0x0600023A RID: 570 RVA: 0x000155C4 File Offset: 0x000137C4
        public static bool GetTargetObject(out GameObject Object, out Vector3 Point, float Range)
        {
            float num  = Range + 1f;
            float num2 = RaycastOptions.SilentAimFOV;

            Object = null;
            Point  = Vector3.zero;
            Vector3 position = Player.player.look.aim.position;
            Vector3 forward  = Player.player.look.aim.forward;

            foreach (GameObject gameObject in RaycastUtilities.Objects)
            {
                if (gameObject)
                {
                    Player component = gameObject.GetComponent <Player>();
                    if (!component || (!component.life.isDead && !FriendUtilities.IsFriendly(component) && (!RaycastOptions.WallCheck || RaycastUtilities.WallCheck(gameObject.transform))))
                    {
                        Zombie componentInParent  = gameObject.GetComponentInParent <Zombie>();
                        Animal componentInParent2 = gameObject.GetComponentInParent <Animal>();
                        if ((!componentInParent || !componentInParent.isDead) && (!componentInParent2 || !componentInParent2.isDead))
                        {
                            if (!gameObject.GetComponent <RaycastComponent>())
                            {
                                gameObject.AddComponent <RaycastComponent>();
                            }
                            Transform transform = gameObject.transform;
                            Vector3   vector    = transform.position;
                            float     num3      = Vector3.Distance(position, vector);
                            if (num3 <= Range)
                            {
                                if (RaycastOptions.SilentAimUseFOV)
                                {
                                    if (transform.CompareTag("Player") || transform.CompareTag("Enemy") || transform.CompareTag("Zombie") || transform.CompareTag("Animal"))
                                    {
                                        foreach (Transform transform2 in transform.GetComponentsInChildren <Transform>())
                                        {
                                            if (transform2.name.Equals("Skull"))
                                            {
                                                vector = transform2.position + new Vector3(0f, 0.4f, 0f);
                                                break;
                                            }
                                        }
                                    }
                                    float angleDelta = VectorUtilities.GetAngleDelta(position, forward, vector);
                                    if (angleDelta > num2)
                                    {
                                        continue;
                                    }
                                    num2 = angleDelta;
                                }
                                else if (num3 > num)
                                {
                                    continue;
                                }
                                if (SphereUtilities.GetRaycast(gameObject, position, out Point))
                                {
                                    Object = gameObject;
                                    num    = num3;
                                }
                            }
                        }
                    }
                }
            }
            return(Object != null);
        }