public static void BasicControls(ESPTarget esptarget) { ESPVisual espvisual = ESPOptions.VisualOptions[(int)esptarget]; Prefab.Toggle("Активировать", ref espvisual.Enabled, 17); bool flag = !espvisual.Enabled; if (!flag) { Prefab.Toggle("Надписи", ref espvisual.Labels, 17); bool labels = espvisual.Labels; if (labels) { Prefab.Toggle("Показывать имя", ref espvisual.ShowName, 17); Prefab.Toggle("Показывать дистанцию", ref espvisual.ShowDistance, 17); Prefab.Toggle("Показывать угол", ref espvisual.ShowAngle, 17); } Prefab.Toggle("Вох", ref espvisual.Boxes, 17); bool boxes = espvisual.Boxes; if (boxes) { Prefab.Toggle("2D Вох", ref espvisual.TwoDimensional, 17); } Prefab.Toggle("Обводка", ref espvisual.Glow, 17); Prefab.Toggle("Линия до объекта", ref espvisual.LineToObject, 17); Prefab.Toggle("Масштаб текста", ref espvisual.TextScaling, 17); bool textScaling = espvisual.TextScaling; if (textScaling) { espvisual.MinTextSize = Prefab.TextField(espvisual.MinTextSize, "Минимальный размер текста: ", 30, 0, 255); espvisual.MaxTextSize = Prefab.TextField(espvisual.MaxTextSize, "Максимальный размер текста: ", 30, 0, 255); GUILayout.Space(3f); GUILayout.Label("Масштабирование текста по расстоянию: " + Mathf.RoundToInt(espvisual.MinTextSizeDistance), Prefab._TextStyle, new GUILayoutOption[0]); Prefab.Slider(0f, 1000f, ref espvisual.MinTextSizeDistance, 200); GUILayout.Space(3f); } else { espvisual.FixedTextSize = Prefab.TextField(espvisual.FixedTextSize, "Фиксированный размер текста: ", 30, 0, 255); } Prefab.Toggle("Дистанция на всю карту", ref espvisual.InfiniteDistance, 17); bool flag2 = !espvisual.InfiniteDistance; if (flag2) { GUILayout.Label("ESP Расстояние: " + Mathf.RoundToInt(espvisual.Distance), Prefab._TextStyle, new GUILayoutOption[0]); Prefab.Slider(0f, 4000f, ref espvisual.Distance, 200); GUILayout.Space(3f); } Prefab.Toggle("Лимит объектов", ref espvisual.UseObjectCap, 17); bool useObjectCap = espvisual.UseObjectCap; if (useObjectCap) { espvisual.ObjectCap = Prefab.TextField(espvisual.ObjectCap, "Object cap:", 30, 0, 255); } espvisual.BorderStrength = Prefab.TextField(espvisual.BorderStrength, "Border Strength:", 30, 0, 255); } }
public static void Initialize() { for (int i = 0; i < ESPOptions.VisualOptions.Length; i++) { ESPTarget Target = (ESPTarget)i; Color32 DefaultColor = Color.red; Color32 DefaultTextColor = Color.white; #region Default ESP Colors switch (Target) { case ESPTarget.Items: DefaultColor = new Color32(0, 255, 0, 255); break; case ESPTarget.Storage: DefaultColor = new Color32(0, 255, 255, 255); break; case ESPTarget.Vehicles: DefaultColor = new Color32(255, 255, 0, 255); break; case ESPTarget.Generators: DefaultColor = new Color32(255, 245, 180, 255); break; case ESPTarget.Beds: DefaultColor = new Color32(255, 170, 255, 255); break; case ESPTarget.ClaimFlags: DefaultColor = new Color32(255, 255, 255, 255); break; case ESPTarget.Sentries: DefaultColor = new Color32(220, 10, 10, 255); break; case ESPTarget.Zombies: DefaultColor = new Color32(115, 255, 110, 255); break; } #endregion ColorUtilities.addColor(new ColorVariable($"_{Target}", $"ESP - {Target}", DefaultColor, false)); ColorUtilities.addColor(new ColorVariable($"_{Target}_Text", $"ESP - {Target} (Text)", DefaultTextColor, false)); ColorUtilities.addColor(new ColorVariable($"_{Target}_Outline", $"ESP - {Target} (Outline)", Color.black, false)); ColorUtilities.addColor(new ColorVariable($"_{Target}_Glow", $"ESP - {Target} (Glow)", Color.yellow, false)); } ColorUtilities.addColor(new ColorVariable("_ESPFriendly", "Friendly Players", Color.green, false)); ColorUtilities.addColor(new ColorVariable("_ChamsFriendVisible", "Chams - Visible Friend", Color.green, false)); ColorUtilities.addColor(new ColorVariable("_ChamsFriendInisible", "Chams - Invisible Friend", Color.blue, false)); ColorUtilities.addColor(new ColorVariable("_ChamsEnemyVisible", "Chams - Visible Enemy", new Color32(255, 165, 0, 255), false)); ColorUtilities.addColor(new ColorVariable("_ChamsEnemyInvisible", "Chams - Invisible Enemy", Color.red, false)); }
// Token: 0x06000280 RID: 640 RVA: 0x00017130 File Offset: 0x00015330 public static void VisualTab(string name, ESPTarget target, Action code = null) { Prefab.SectionTabButton(name, delegate { GUILayout.BeginHorizontal(Array.Empty <GUILayoutOption>()); GUILayout.BeginVertical(new GUILayoutOption[] { GUILayout.Width(240f) }); VisualsTab.BasicControls(target); GUILayout.EndVertical(); if (code != null && ESPOptions.VisualOptions[(int)target].Enabled) { GUILayout.BeginVertical(Array.Empty <GUILayoutOption>()); code(); GUILayout.EndVertical(); GUILayout.FlexibleSpace(); } GUILayout.EndHorizontal(); }, 0f, 20); Prefab.ToggleLast(ref ESPOptions.VisualOptions[(int)target].Enabled); }
// Token: 0x06000187 RID: 391 RVA: 0x00002B7C File Offset: 0x00000D7C public static IEnumerator UpdateObjectList() { for (;;) { bool flag = !DrawUtilities.ShouldRun(); bool flag5 = flag; if (flag5) { yield return(new WaitForSeconds(2f)); } else { List <ESPObject> objects = ESPVariables.Objects; objects.Clear(); List <ESPTarget> targets = (from k in ESPOptions.PriorityTable.Keys orderby ESPOptions.PriorityTable[k] descending select k).ToList <ESPTarget>(); int num; for (int i = 0; i < targets.Count; i = num + 1) { ESPTarget target = targets[i]; ESPVisual vis = ESPOptions.VisualOptions[(int)target]; bool flag2 = !vis.Enabled; bool flag6 = !flag2; if (flag6) { Vector3 pPos = OptimizationVariables.MainPlayer.transform.position; switch (target) { case ESPTarget.Игроки: { SteamPlayer[] objarray = (from p in Provider.clients orderby VectorUtilities.GetDistance(pPos, p.player.transform.position) descending select p).ToArray <SteamPlayer>(); bool useObjectCap = vis.UseObjectCap; bool flag7 = useObjectCap; if (flag7) { objarray = objarray.TakeLast(vis.ObjectCap).ToArray <SteamPlayer>(); } for (int j = 0; j < objarray.Length; j = num + 1) { SteamPlayer sPlayer = objarray[j]; Player plr = sPlayer.player; bool flag3 = plr.life.isDead || plr == OptimizationVariables.MainPlayer; bool flag8 = !flag3; if (flag8) { objects.Add(new ESPObject(target, plr, plr.gameObject)); sPlayer = null; plr = null; } num = j; sPlayer = null; plr = null; } break; } case ESPTarget.Зомби: { Zombie[] objarr = (from obj in ZombieManager.regions.SelectMany((ZombieRegion r) => r.zombies) orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <Zombie>(); bool useObjectCap2 = vis.UseObjectCap; bool flag9 = useObjectCap2; if (flag9) { objarr = objarr.TakeLast(vis.ObjectCap).ToArray <Zombie>(); } for (int k2 = 0; k2 < objarr.Length; k2 = num + 1) { Zombie obj9 = objarr[k2]; objects.Add(new ESPObject(target, obj9, obj9.gameObject)); obj9 = null; num = k2; obj9 = null; } break; } case ESPTarget.Предметы: { InteractableItem[] objarr2 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableItem>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableItem>(); bool useObjectCap3 = vis.UseObjectCap; bool flag10 = useObjectCap3; if (flag10) { objarr2 = objarr2.TakeLast(vis.ObjectCap).ToArray <InteractableItem>(); } for (int l = 0; l < objarr2.Length; l = num + 1) { InteractableItem obj10 = objarr2[l]; bool flag4 = ItemUtilities.Whitelisted(obj10.asset, ItemOptions.ItemESPOptions) || !ESPOptions.FilterItems; bool flag11 = flag4; if (flag11) { objects.Add(new ESPObject(target, obj10, obj10.gameObject)); } obj10 = null; num = l; obj10 = null; } break; } case ESPTarget.Турели: { InteractableSentry[] objarr3 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableSentry>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableSentry>(); bool useObjectCap4 = vis.UseObjectCap; bool flag12 = useObjectCap4; if (flag12) { objarr3 = objarr3.TakeLast(vis.ObjectCap).ToArray <InteractableSentry>(); } for (int m = 0; m < objarr3.Length; m = num + 1) { InteractableSentry obj11 = objarr3[m]; objects.Add(new ESPObject(target, obj11, obj11.gameObject)); obj11 = null; num = m; obj11 = null; } break; } case ESPTarget.Кровати: { InteractableBed[] objarr4 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableBed>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableBed>(); bool useObjectCap5 = vis.UseObjectCap; bool flag13 = useObjectCap5; if (flag13) { objarr4 = objarr4.TakeLast(vis.ObjectCap).ToArray <InteractableBed>(); } for (int n = 0; n < objarr4.Length; n = num + 1) { InteractableBed obj12 = objarr4[n]; objects.Add(new ESPObject(target, obj12, obj12.gameObject)); obj12 = null; num = n; obj12 = null; } break; } case ESPTarget.КлеймФлаги: { InteractableClaim[] objarr5 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableClaim>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableClaim>(); bool useObjectCap6 = vis.UseObjectCap; bool flag14 = useObjectCap6; if (flag14) { objarr5 = objarr5.TakeLast(vis.ObjectCap).ToArray <InteractableClaim>(); } for (int j2 = 0; j2 < objarr5.Length; j2 = num + 1) { InteractableClaim obj13 = objarr5[j2]; objects.Add(new ESPObject(target, obj13, obj13.gameObject)); obj13 = null; num = j2; obj13 = null; } break; } case ESPTarget.Транспорт: { InteractableVehicle[] objarr6 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableVehicle>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableVehicle>(); bool useObjectCap7 = vis.UseObjectCap; bool flag15 = useObjectCap7; if (flag15) { objarr6 = objarr6.TakeLast(vis.ObjectCap).ToArray <InteractableVehicle>(); } for (int j3 = 0; j3 < objarr6.Length; j3 = num + 1) { InteractableVehicle obj14 = objarr6[j3]; bool isDead = obj14.isDead; bool flag16 = !isDead; if (flag16) { objects.Add(new ESPObject(target, obj14, obj14.gameObject)); obj14 = null; } num = j3; obj14 = null; } break; } case ESPTarget.Ящики: { InteractableStorage[] objarr7 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableStorage>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableStorage>(); bool useObjectCap8 = vis.UseObjectCap; bool flag17 = useObjectCap8; if (flag17) { objarr7 = objarr7.TakeLast(vis.ObjectCap).ToArray <InteractableStorage>(); } for (int j4 = 0; j4 < objarr7.Length; j4 = num + 1) { InteractableStorage obj15 = objarr7[j4]; objects.Add(new ESPObject(target, obj15, obj15.gameObject)); obj15 = null; num = j4; obj15 = null; } break; } case ESPTarget.Генераторы: { InteractableGenerator[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableGenerator>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableGenerator>(); bool useObjectCap9 = vis.UseObjectCap; bool flag18 = useObjectCap9; if (flag18) { objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <InteractableGenerator>(); } for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1) { InteractableGenerator obj16 = objarr8[j5]; objects.Add(new ESPObject(target, obj16, obj16.gameObject)); obj16 = null; num = j5; obj16 = null; } break; } case ESPTarget.Животные: { Animal[] objarr9 = (from obj in UnityEngine.Object.FindObjectsOfType <Animal>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <Animal>(); bool useObjectCap10 = vis.UseObjectCap; bool flag19 = useObjectCap10; if (flag19) { objarr9 = objarr9.TakeLast(vis.ObjectCap).ToArray <Animal>(); } for (int j6 = 0; j6 < objarr9.Length; j6 = num + 1) { Animal obj17 = objarr9[j6]; objects.Add(new ESPObject(target, obj17, obj17.gameObject)); obj17 = null; num = j6; obj17 = null; } break; } case ESPTarget.Ловшуки: { InteractableTrap[] objarr10 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableTrap>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableTrap>(); bool useObjectCap11 = vis.UseObjectCap; bool flag20 = useObjectCap11; if (flag20) { objarr10 = objarr10.TakeLast(vis.ObjectCap).ToArray <InteractableTrap>(); } for (int j7 = 0; j7 < objarr10.Length; j7 = num + 1) { InteractableTrap obj18 = objarr10[j7]; objects.Add(new ESPObject(target, obj18, obj18.gameObject)); obj18 = null; num = j7; obj18 = null; } break; } case ESPTarget.Аирдропы: { Carepackage[] objarr11 = (from obj in UnityEngine.Object.FindObjectsOfType <Carepackage>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <Carepackage>(); bool useObjectCap12 = vis.UseObjectCap; bool flag21 = useObjectCap12; if (flag21) { objarr11 = objarr11.TakeLast(vis.ObjectCap).ToArray <Carepackage>(); } for (int j8 = 0; j8 < objarr11.Length; j8 = num + 1) { Carepackage obj19 = objarr11[j8]; objects.Add(new ESPObject(target, obj19, obj19.gameObject)); obj19 = null; num = j8; obj19 = null; } break; } case ESPTarget.Двери: { InteractableDoorHinge[] objarr12 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableDoorHinge>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableDoorHinge>(); bool useObjectCap13 = vis.UseObjectCap; bool flag22 = useObjectCap13; if (flag22) { objarr12 = objarr12.TakeLast(vis.ObjectCap).ToArray <InteractableDoorHinge>(); } for (int j9 = 0; j9 < objarr12.Length; j9 = num + 1) { InteractableDoorHinge obj20 = objarr12[j9]; objects.Add(new ESPObject(target, obj20, obj20.gameObject)); obj20 = null; num = j9; obj20 = null; } break; } case ESPTarget.Ягоды: { InteractableForage[] objarr13 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableForage>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableForage>(); bool useObjectCap14 = vis.UseObjectCap; bool flag23 = useObjectCap14; if (flag23) { objarr13 = objarr13.TakeLast(vis.ObjectCap).ToArray <InteractableForage>(); } for (int j10 = 0; j10 < objarr13.Length; j10 = num + 1) { InteractableForage obj21 = objarr13[j10]; objects.Add(new ESPObject(target, obj21, obj21.gameObject)); obj21 = null; num = j10; obj21 = null; } break; } case ESPTarget.астения: { InteractableFarm[] objarr14 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableFarm>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableFarm>(); bool useObjectCap15 = vis.UseObjectCap; bool flag24 = useObjectCap15; if (flag24) { objarr14 = objarr14.TakeLast(vis.ObjectCap).ToArray <InteractableFarm>(); } for (int j11 = 0; j11 < objarr14.Length; j11 = num + 1) { InteractableFarm obj22 = objarr14[j11]; objects.Add(new ESPObject(target, obj22, obj22.gameObject)); obj22 = null; num = j11; obj22 = null; } break; } case ESPTarget.C4: { InteractableCharge[] objarr15 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableCharge>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableCharge>(); bool useObjectCap16 = vis.UseObjectCap; bool flag25 = useObjectCap16; if (flag25) { objarr15 = objarr15.TakeLast(vis.ObjectCap).ToArray <InteractableCharge>(); } for (int j12 = 0; j12 < objarr15.Length; j12 = num + 1) { InteractableCharge obj23 = objarr15[j12]; objects.Add(new ESPObject(target, obj23, obj23.gameObject)); obj23 = null; num = j12; obj23 = null; } break; } case ESPTarget.Fire: { InteractableFire[] objarr16 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableFire>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableFire>(); bool useObjectCap17 = vis.UseObjectCap; bool flag26 = useObjectCap17; if (flag26) { objarr16 = objarr16.TakeLast(vis.ObjectCap).ToArray <InteractableFire>(); } for (int j13 = 0; j13 < objarr16.Length; j13 = num + 1) { InteractableFire obj24 = objarr16[j13]; objects.Add(new ESPObject(target, obj24, obj24.gameObject)); obj24 = null; num = j13; obj24 = null; } break; } case ESPTarget.Лампы: { InteractableSpot[] objarr17 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableSpot>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableSpot>(); bool useObjectCap18 = vis.UseObjectCap; bool flag27 = useObjectCap18; if (flag27) { objarr17 = objarr17.TakeLast(vis.ObjectCap).ToArray <InteractableSpot>(); } for (int j14 = 0; j14 < objarr17.Length; j14 = num + 1) { InteractableSpot obj25 = objarr17[j14]; objects.Add(new ESPObject(target, obj25, obj25.gameObject)); obj25 = null; num = j14; obj25 = null; } break; } case ESPTarget.Топливо: { InteractableObjectResource[] objarr18 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableObjectResource>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableObjectResource>(); bool useObjectCap19 = vis.UseObjectCap; bool flag28 = useObjectCap19; if (flag28) { objarr18 = objarr18.TakeLast(vis.ObjectCap).ToArray <InteractableObjectResource>(); } for (int j15 = 0; j15 < objarr18.Length; j15 = num + 1) { InteractableObjectResource obj26 = objarr18[j15]; objects.Add(new ESPObject(target, obj26, obj26.gameObject)); obj26 = null; num = j15; obj26 = null; } break; } case ESPTarget.Генератор_безопасной_зоны: { InteractableSafezone[] objarr19 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableSafezone>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableSafezone>(); bool useObjectCap20 = vis.UseObjectCap; bool flag29 = useObjectCap20; if (flag29) { objarr19 = objarr19.TakeLast(vis.ObjectCap).ToArray <InteractableSafezone>(); } for (int j16 = 0; j16 < objarr19.Length; j16 = num + 1) { InteractableSafezone obj27 = objarr19[j16]; objects.Add(new ESPObject(target, obj27, obj27.gameObject)); obj27 = null; num = j16; obj27 = null; } break; } case ESPTarget.Генератор_Воздуха: { InteractableOxygenator[] objarr20 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableOxygenator>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableOxygenator>(); bool useObjectCap21 = vis.UseObjectCap; bool flag30 = useObjectCap21; if (flag30) { objarr20 = objarr20.TakeLast(vis.ObjectCap).ToArray <InteractableOxygenator>(); } for (int j17 = 0; j17 < objarr20.Length; j17 = num + 1) { InteractableOxygenator obj28 = objarr20[j17]; objects.Add(new ESPObject(target, obj28, obj28.gameObject)); obj28 = null; num = j17; obj28 = null; } break; } } } num = i; vis = null; } yield return(new WaitForSeconds(5f)); objects = null; targets = null; objects = null; targets = null; } } yield break; }
// Token: 0x060000EF RID: 239 RVA: 0x00003CE9 File Offset: 0x00001EE9 public ESPObject(ESPTarget t, Component o) { this.Target = t; this.Object = o; }
private static void BasicControls(ESPTarget esptarget) { int target = (int)esptarget; ESPVisual visual = ESPOptions.VisualOptions[target]; Prefab.Toggle("Enabled", ref visual.Enabled); if (!visual.Enabled) { return; } Prefab.Toggle("Labels", ref visual.Labels); if (visual.Labels) { Prefab.Toggle("Show Name", ref visual.ShowName); Prefab.Toggle("Show Distance", ref visual.ShowDistance); Prefab.Toggle("Show Angle", ref visual.ShowAngle); Prefab.Toggle("Custom Text Color", ref visual.CustomTextColor); } Prefab.Toggle("Box ESP", ref visual.Boxes); if (visual.Boxes) { Prefab.Toggle("2D Boxes", ref visual.TwoDimensional); } Prefab.Toggle("Glow", ref visual.Glow); Prefab.Toggle("Line To Object", ref visual.LineToObject); Prefab.Toggle("Text Scaling", ref visual.TextScaling); if (visual.TextScaling) { visual.MinTextSize = Prefab.TextField(visual.MinTextSize, "Min Text Size:", 30); visual.MaxTextSize = Prefab.TextField(visual.MaxTextSize, "Max Text Size:", 30); GUILayout.Space(3); GUILayout.Label("Text Scaling Falloff Distance: " + Mathf.RoundToInt(visual.MinTextSizeDistance), Prefab._TextStyle); Prefab.Slider(0, 1000, ref visual.MinTextSizeDistance, 200); GUILayout.Space(3); } else { visual.FixedTextSize = Prefab.TextField(visual.FixedTextSize, "Fixed Text Size:", 30); } Prefab.Toggle("Infinite Distance", ref visual.InfiniteDistance); if (!visual.InfiniteDistance) { GUILayout.Label("ESP Distance: " + Mathf.RoundToInt(visual.Distance), Prefab._TextStyle); Prefab.Slider(0, 4000, ref visual.Distance, 200); GUILayout.Space(3); } Prefab.Toggle("Limit Object Numer", ref visual.UseObjectCap); if (visual.UseObjectCap) { visual.ObjectCap = Prefab.TextField(visual.ObjectCap, "Object cap:", 30); } visual.BorderStrength = Prefab.TextField(visual.BorderStrength, "Border Strength:", 30); }
public ESPObject(ESPTarget t, object o, GameObject go) { Target = t; Object = o; GObject = go; }
public static IEnumerator UpdateObjectList() { while (true) { if (!DrawUtilities.ShouldRun()) { yield return(new WaitForSeconds(2)); continue; } List <ESPObject> objects = ESPVariables.Objects; objects.Clear(); List <ESPTarget> targets = ESPOptions.PriorityTable.Keys.OrderByDescending(k => ESPOptions.PriorityTable[k]).ToList(); for (int i = 0; i < targets.Count; i++) { ESPTarget target = targets[i]; ESPVisual vis = ESPOptions.VisualOptions[(int)target]; if (!vis.Enabled) { continue; } Vector3 pPos = OptimizationVariables.MainPlayer.transform.position; switch (target) { case ESPTarget.Players: { SteamPlayer[] objarray = Provider.clients .OrderByDescending(p => VectorUtilities.GetDistance(pPos, p.player.transform.position)).ToArray(); if (vis.UseObjectCap) { objarray = objarray.TakeLast(vis.ObjectCap).ToArray(); } for (int j = 0; j < objarray.Length; j++) { SteamPlayer sPlayer = objarray[j]; Player plr = sPlayer.player; if (plr.life.isDead || plr == OptimizationVariables.MainPlayer) { continue; } objects.Add(new ESPObject(target, plr, plr.gameObject)); } break; } case ESPTarget.Zombies: { Zombie[] objarr = ZombieManager.regions.SelectMany(r => r.zombies) .OrderByDescending(obj => VectorUtilities.GetDistance(pPos, obj.transform.position)).ToArray(); if (vis.UseObjectCap) { objarr = objarr.TakeLast(vis.ObjectCap).ToArray(); } for (int j = 0; j < objarr.Length; j++) { Zombie obj = objarr[j]; objects.Add(new ESPObject(target, obj, obj.gameObject)); } break; } case ESPTarget.Items: { InteractableItem[] objarr = Object.FindObjectsOfType <InteractableItem>() .OrderByDescending(obj => VectorUtilities.GetDistance(pPos, obj.transform.position)).ToArray(); if (vis.UseObjectCap) { objarr = objarr.TakeLast(vis.ObjectCap).ToArray(); } for (int j = 0; j < objarr.Length; j++) { InteractableItem obj = objarr[j]; if (ItemUtilities.Whitelisted(obj.asset, ItemOptions.ItemESPOptions) || !ESPOptions.FilterItems) { objects.Add(new ESPObject(target, obj, obj.gameObject)); } } break; } case ESPTarget.Sentries: { InteractableSentry[] objarr = Object.FindObjectsOfType <InteractableSentry>() .OrderByDescending(obj => VectorUtilities.GetDistance(pPos, obj.transform.position)).ToArray(); if (vis.UseObjectCap) { objarr = objarr.TakeLast(vis.ObjectCap).ToArray(); } for (int j = 0; j < objarr.Length; j++) { InteractableSentry obj = objarr[j]; objects.Add(new ESPObject(target, obj, obj.gameObject)); } break; } case ESPTarget.Beds: { InteractableBed[] objarr = Object.FindObjectsOfType <InteractableBed>() .OrderByDescending(obj => VectorUtilities.GetDistance(pPos, obj.transform.position)).ToArray(); if (vis.UseObjectCap) { objarr = objarr.TakeLast(vis.ObjectCap).ToArray(); } for (int j = 0; j < objarr.Length; j++) { InteractableBed obj = objarr[j]; objects.Add(new ESPObject(target, obj, obj.gameObject)); } break; } case ESPTarget.ClaimFlags: { InteractableClaim[] objarr = Object.FindObjectsOfType <InteractableClaim>() .OrderByDescending(obj => VectorUtilities.GetDistance(pPos, obj.transform.position)).ToArray(); if (vis.UseObjectCap) { objarr = objarr.TakeLast(vis.ObjectCap).ToArray(); } for (int j = 0; j < objarr.Length; j++) { InteractableClaim obj = objarr[j]; objects.Add(new ESPObject(target, obj, obj.gameObject)); } break; } case ESPTarget.Vehicles: { InteractableVehicle[] objarr = Object.FindObjectsOfType <InteractableVehicle>() .OrderByDescending(obj => VectorUtilities.GetDistance(pPos, obj.transform.position)).ToArray(); if (vis.UseObjectCap) { objarr = objarr.TakeLast(vis.ObjectCap).ToArray(); } for (int j = 0; j < objarr.Length; j++) { InteractableVehicle obj = objarr[j]; if (obj.isDead) { continue; } objects.Add(new ESPObject(target, obj, obj.gameObject)); } break; } case ESPTarget.Storage: { InteractableStorage[] objarr = Object.FindObjectsOfType <InteractableStorage>() .OrderByDescending(obj => VectorUtilities.GetDistance(pPos, obj.transform.position)).ToArray(); if (vis.UseObjectCap) { objarr = objarr.TakeLast(vis.ObjectCap).ToArray(); } for (int j = 0; j < objarr.Length; j++) { InteractableStorage obj = objarr[j]; objects.Add(new ESPObject(target, obj, obj.gameObject)); } break; } case ESPTarget.Generators: { InteractableGenerator[] objarr = Object.FindObjectsOfType <InteractableGenerator>() .OrderByDescending(obj => VectorUtilities.GetDistance(pPos, obj.transform.position)).ToArray(); if (vis.UseObjectCap) { objarr = objarr.TakeLast(vis.ObjectCap).ToArray(); } for (int j = 0; j < objarr.Length; j++) { InteractableGenerator obj = objarr[j]; objects.Add(new ESPObject(target, obj, obj.gameObject)); } break; } } } yield return(new WaitForSeconds(5)); } }
// Token: 0x0600014A RID: 330 RVA: 0x0000299C File Offset: 0x00000B9C public ESPObject(ESPTarget t, object o, GameObject go) { this.Target = t; this.Object = o; this.GObject = go; }
// Token: 0x06000281 RID: 641 RVA: 0x00017180 File Offset: 0x00015380 private static void BasicControls(ESPTarget esptarget) { ESPVisual espvisual = ESPOptions.VisualOptions[(int)esptarget]; Prefab.Toggle(Names.All[11], ref espvisual.Enabled); if (!espvisual.Enabled) { return; } Prefab.Toggle(Names.All[12], ref espvisual.Labels); if (espvisual.Labels) { Prefab.Toggle(Names.All[13], ref espvisual.ShowName); Prefab.Toggle(Names.All[14], ref espvisual.ShowDistance); Prefab.Toggle(Names.All[15], ref espvisual.ShowAngle); } Prefab.Toggle(Names.All[16], ref espvisual.Boxes); if (espvisual.Boxes) { Prefab.Toggle(Names.All[17], ref espvisual.TwoDimensional); } Prefab.Toggle(Names.All[18], ref espvisual.Glow); Prefab.Toggle(Names.All[19], ref espvisual.LineToObject); Prefab.Toggle(Names.All[25], ref espvisual.InfiniteDistance); if (!espvisual.InfiniteDistance) { GUILayout.Label(Names.All[26] + (int)espvisual.Distance, Prefab._TextStyle, Array.Empty <GUILayoutOption>()); espvisual.Distance = Prefab.Slider(0f, 2000f, espvisual.Distance, 200); GUILayout.Space(3f); } Prefab.Toggle(Names.All[27], ref espvisual.UseObjectCap); if (espvisual.UseObjectCap) { GUILayout.Label(Names.All[28] + espvisual.ObjectCap, Prefab._TextStyle, Array.Empty <GUILayoutOption>()); espvisual.ObjectCap = (int)Prefab.Slider(1f, 50f, (float)espvisual.ObjectCap, 200); } Prefab.Toggle(Names.All[20], ref espvisual.TextScaling); GUILayout.Space(3f); if (espvisual.TextScaling) { GUILayout.Label(Names.All[21] + espvisual.MinTextSize, Prefab._TextStyle, Array.Empty <GUILayoutOption>()); espvisual.MinTextSize = (int)Prefab.Slider(8f, 16f, (float)espvisual.MinTextSize, 200); GUILayout.Label(Names.All[22] + espvisual.MaxTextSize, Prefab._TextStyle, Array.Empty <GUILayoutOption>()); espvisual.MaxTextSize = (int)Prefab.Slider(8f, 16f, (float)espvisual.MaxTextSize, 200); GUILayout.Space(3f); GUILayout.Label(Names.All[23] + (int)espvisual.MinTextSizeDistance, Prefab._TextStyle, Array.Empty <GUILayoutOption>()); espvisual.MinTextSizeDistance = Prefab.Slider(0f, 1000f, espvisual.MinTextSizeDistance, 200); GUILayout.Space(3f); } else { GUILayout.Label(Names.All[24] + espvisual.FixedTextSize, Prefab._TextStyle, Array.Empty <GUILayoutOption>()); espvisual.FixedTextSize = (int)Prefab.Slider(8f, 16f, (float)espvisual.FixedTextSize, 200); } GUILayout.Space(3f); GUILayout.Label(Names.All[29] + espvisual.BorderStrength, Prefab._TextStyle, Array.Empty <GUILayoutOption>()); espvisual.BorderStrength = (int)Prefab.Slider(0f, 2f, (float)espvisual.BorderStrength, 200); GUILayout.Space(3f); string[] array = new string[] { Names.All[30], Names.All[31], Names.All[32], Names.All[33], Names.All[34], Names.All[35], Names.All[36], Names.All[37], Names.All[38] }; ESPOptions.VisualOptions[(int)esptarget].Location = (LabelLocation)Prefab.Arrows(220f, (int)ESPOptions.VisualOptions[(int)esptarget].Location, array[(int)ESPOptions.VisualOptions[(int)esptarget].Location], array.Length - 1); }
public static IEnumerator UpdateObjectList() { for (; ;) { bool flag = !DrawUtilities.ShouldRun(); if (flag) { yield return(new WaitForSeconds(2f)); } else { List <ESPObject> objects = ESPVariables.Objects; objects.Clear(); List <ESPTarget> targets = (from k in ESPOptions.PriorityTable.Keys orderby ESPOptions.PriorityTable[k] descending select k).ToList <ESPTarget>(); int num; for (int i = 0; i < targets.Count; i = num + 1) { ESPTarget target = targets[i]; ESPVisual vis = ESPOptions.VisualOptions[(int)target]; bool flag2 = !vis.Enabled; if (!flag2) { Vector2 pPos = OptimizationVariables.MainPlayer.transform.position; switch (target) { case ESPTarget.Игроки: { SteamPlayer[] objarray = (from p in Provider.clients orderby VectorUtilities.GetDistance(pPos, p.player.transform.position) descending select p).ToArray <SteamPlayer>(); bool useObjectCap = vis.UseObjectCap; if (useObjectCap) { objarray = objarray.TakeLast(vis.ObjectCap).ToArray <SteamPlayer>(); } for (int j = 0; j < objarray.Length; j = num + 1) { SteamPlayer sPlayer = objarray[j]; Player plr = sPlayer.player; bool flag3 = plr.life.isDead || plr == OptimizationVariables.MainPlayer; if (!flag3) { objects.Add(new ESPObject(target, plr, plr.gameObject)); sPlayer = null; plr = null; } num = j; } break; } case ESPTarget.Зомби: { Zombie[] objarr = (from obj in ZombieManager.regions.SelectMany((ZombieRegion r) => r.zombies) orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <Zombie>(); bool useObjectCap2 = vis.UseObjectCap; if (useObjectCap2) { objarr = objarr.TakeLast(vis.ObjectCap).ToArray <Zombie>(); } for (int k2 = 0; k2 < objarr.Length; k2 = num + 1) { Zombie obj9 = objarr[k2]; objects.Add(new ESPObject(target, obj9, obj9.gameObject)); obj9 = null; num = k2; } break; } case ESPTarget.Предметы: { InteractableItem[] objarr2 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableItem>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableItem>(); bool useObjectCap3 = vis.UseObjectCap; if (useObjectCap3) { objarr2 = objarr2.TakeLast(vis.ObjectCap).ToArray <InteractableItem>(); } for (int l = 0; l < objarr2.Length; l = num + 1) { InteractableItem obj2 = objarr2[l]; bool flag4 = ItemUtilities.Whitelisted(obj2.asset, ItemOptions.ItemESPOptions) || !ESPOptions.FilterItems; if (flag4) { objects.Add(new ESPObject(target, obj2, obj2.gameObject)); } obj2 = null; num = l; } break; } case ESPTarget.Турели: { InteractableSentry[] objarr3 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableSentry>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableSentry>(); bool useObjectCap4 = vis.UseObjectCap; if (useObjectCap4) { objarr3 = objarr3.TakeLast(vis.ObjectCap).ToArray <InteractableSentry>(); } for (int m = 0; m < objarr3.Length; m = num + 1) { InteractableSentry obj3 = objarr3[m]; objects.Add(new ESPObject(target, obj3, obj3.gameObject)); obj3 = null; num = m; } break; } case ESPTarget.Кровати: { InteractableBed[] objarr4 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableBed>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableBed>(); bool useObjectCap5 = vis.UseObjectCap; if (useObjectCap5) { objarr4 = objarr4.TakeLast(vis.ObjectCap).ToArray <InteractableBed>(); } for (int n = 0; n < objarr4.Length; n = num + 1) { InteractableBed obj4 = objarr4[n]; objects.Add(new ESPObject(target, obj4, obj4.gameObject)); obj4 = null; num = n; } break; } case ESPTarget.КлеймФлаги: { InteractableClaim[] objarr5 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableClaim>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableClaim>(); bool useObjectCap6 = vis.UseObjectCap; if (useObjectCap6) { objarr5 = objarr5.TakeLast(vis.ObjectCap).ToArray <InteractableClaim>(); } for (int j2 = 0; j2 < objarr5.Length; j2 = num + 1) { InteractableClaim obj5 = objarr5[j2]; objects.Add(new ESPObject(target, obj5, obj5.gameObject)); obj5 = null; num = j2; } break; } case ESPTarget.Транспорт: { InteractableVehicle[] objarr6 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableVehicle>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableVehicle>(); bool useObjectCap7 = vis.UseObjectCap; if (useObjectCap7) { objarr6 = objarr6.TakeLast(vis.ObjectCap).ToArray <InteractableVehicle>(); } for (int j3 = 0; j3 < objarr6.Length; j3 = num + 1) { InteractableVehicle obj6 = objarr6[j3]; bool isDead = obj6.isDead; if (!isDead) { objects.Add(new ESPObject(target, obj6, obj6.gameObject)); obj6 = null; } num = j3; } break; } case ESPTarget.Ящики: { InteractableStorage[] objarr7 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableStorage>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableStorage>(); bool useObjectCap8 = vis.UseObjectCap; if (useObjectCap8) { objarr7 = objarr7.TakeLast(vis.ObjectCap).ToArray <InteractableStorage>(); } for (int j4 = 0; j4 < objarr7.Length; j4 = num + 1) { InteractableStorage obj7 = objarr7[j4]; objects.Add(new ESPObject(target, obj7, obj7.gameObject)); obj7 = null; num = j4; } break; } case ESPTarget.Генераторы: { InteractableGenerator[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableGenerator>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableGenerator>(); bool useObjectCap9 = vis.UseObjectCap; if (useObjectCap9) { objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <InteractableGenerator>(); } for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1) { InteractableGenerator obj8 = objarr8[j5]; objects.Add(new ESPObject(target, obj8, obj8.gameObject)); obj8 = null; num = j5; } break; } case ESPTarget.Животные: { Animal[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <Animal>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <Animal>(); bool useObjectCap9 = vis.UseObjectCap; if (useObjectCap9) { objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <Animal>(); } for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1) { Animal obj8 = objarr8[j5]; objects.Add(new ESPObject(target, obj8, obj8.gameObject)); obj8 = null; num = j5; } break; } case ESPTarget.Ловшуки: { InteractableTrap[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableTrap>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableTrap>(); bool useObjectCap9 = vis.UseObjectCap; if (useObjectCap9) { objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <InteractableTrap>(); } for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1) { InteractableTrap obj8 = objarr8[j5]; objects.Add(new ESPObject(target, obj8, obj8.gameObject)); obj8 = null; num = j5; } break; } case ESPTarget.Аирдропы: { Carepackage[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <Carepackage>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <Carepackage>(); bool useObjectCap9 = vis.UseObjectCap; if (useObjectCap9) { objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <Carepackage>(); } for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1) { Carepackage obj8 = objarr8[j5]; objects.Add(new ESPObject(target, obj8, obj8.gameObject)); obj8 = null; num = j5; } break; } case ESPTarget.Двери: { InteractableDoorHinge[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableDoorHinge>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableDoorHinge>(); bool useObjectCap9 = vis.UseObjectCap; if (useObjectCap9) { objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <InteractableDoorHinge>(); } for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1) { InteractableDoorHinge obj8 = objarr8[j5]; objects.Add(new ESPObject(target, obj8, obj8.gameObject)); obj8 = null; num = j5; } break; } case ESPTarget.Ягоды: { InteractableForage[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableForage>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableForage>(); bool useObjectCap9 = vis.UseObjectCap; if (useObjectCap9) { objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <InteractableForage>(); } for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1) { InteractableForage obj8 = objarr8[j5]; objects.Add(new ESPObject(target, obj8, obj8.gameObject)); obj8 = null; num = j5; } break; } case ESPTarget.астения: { InteractableFarm[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableFarm>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableFarm>(); bool useObjectCap9 = vis.UseObjectCap; if (useObjectCap9) { objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <InteractableFarm>(); } for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1) { InteractableFarm obj8 = objarr8[j5]; objects.Add(new ESPObject(target, obj8, obj8.gameObject)); obj8 = null; num = j5; } break; } case ESPTarget.C4: { InteractableCharge[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableCharge>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableCharge>(); bool useObjectCap9 = vis.UseObjectCap; if (useObjectCap9) { objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <InteractableCharge>(); } for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1) { InteractableCharge obj8 = objarr8[j5]; objects.Add(new ESPObject(target, obj8, obj8.gameObject)); obj8 = null; num = j5; } break; } case ESPTarget.Fire: { InteractableFire[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableFire>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableFire>(); bool useObjectCap9 = vis.UseObjectCap; if (useObjectCap9) { objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <InteractableFire>(); } for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1) { InteractableFire obj8 = objarr8[j5]; objects.Add(new ESPObject(target, obj8, obj8.gameObject)); obj8 = null; num = j5; } break; } case ESPTarget.Лампы: { InteractableSpot[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableSpot>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableSpot>(); bool useObjectCap9 = vis.UseObjectCap; if (useObjectCap9) { objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <InteractableSpot>(); } for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1) { InteractableSpot obj8 = objarr8[j5]; objects.Add(new ESPObject(target, obj8, obj8.gameObject)); obj8 = null; num = j5; } break; } case ESPTarget.Топливо: { InteractableObjectResource[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableObjectResource>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableObjectResource>(); bool useObjectCap9 = vis.UseObjectCap; if (useObjectCap9) { objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <InteractableObjectResource>(); } for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1) { InteractableObjectResource obj8 = objarr8[j5]; objects.Add(new ESPObject(target, obj8, obj8.gameObject)); obj8 = null; num = j5; } break; } case ESPTarget.Генератор_безопасной_зоны: { InteractableSafezone[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableSafezone>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableSafezone>(); bool useObjectCap9 = vis.UseObjectCap; if (useObjectCap9) { objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <InteractableSafezone>(); } for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1) { InteractableSafezone obj8 = objarr8[j5]; objects.Add(new ESPObject(target, obj8, obj8.gameObject)); obj8 = null; num = j5; } break; } case ESPTarget.Генератор_Воздуха: { InteractableOxygenator[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableOxygenator>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <InteractableOxygenator>(); bool useObjectCap9 = vis.UseObjectCap; if (useObjectCap9) { objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <InteractableOxygenator>(); } for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1) { InteractableOxygenator obj8 = objarr8[j5]; objects.Add(new ESPObject(target, obj8, obj8.gameObject)); obj8 = null; num = j5; } break; } case ESPTarget.NPC: { ResourceManager[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <ResourceManager>() orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending select obj).ToArray <ResourceManager>(); bool useObjectCap9 = vis.UseObjectCap; if (useObjectCap9) { objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <ResourceManager>(); } for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1) { ResourceManager obj8 = objarr8[j5]; objects.Add(new ESPObject(target, obj8, obj8.gameObject)); obj8 = null; num = j5; } break; } } } num = i; } yield return(new WaitForSeconds(5f)); objects = null; targets = null; } } }