private IScope Render(IReportContext context, IScope scope, string templateUri, object item, string templateName, bool cache = false) { if (string.IsNullOrWhiteSpace(templateUri)) { return(null); } if (context.IsSet("-render_" + templateName.ToLowerInvariant())) { return(null); } if (!templateCache.ContainsKey(templateUri)) { templateCache[templateUri] = Renders.GetRender(templateUri, scope); } var template = templateCache[templateUri]; if (null == template) { throw new Exception("cannot find template " + templateUri); } var ts = scope; if (cache) { ts = new Scope(ts); ts["store_render"] = true; ts["no_render"] = true; ts["render_name"] = templateName; } var result = template.Render(context, ts, item); return(result); }
// Token: 0x0600001A RID: 26 RVA: 0x000027EC File Offset: 0x000009EC public static void DrawBox(Vector2 pos, Vector2 size, float thick, Color color) { Renders.BoxRect(new Rect(pos.x, pos.y, size.x, thick), color); Renders.BoxRect(new Rect(pos.x, pos.y, thick, size.y), color); Renders.BoxRect(new Rect(pos.x + size.x, pos.y, thick, size.y), color); Renders.BoxRect(new Rect(pos.x, pos.y + size.y, size.x + thick, thick), color); }
// Token: 0x0600001B RID: 27 RVA: 0x00002888 File Offset: 0x00000A88 public static void DrawHealth(Vector2 pos, float health, bool center = false) { if (center) { pos -= new Vector2(26f, 0f); } pos += new Vector2(0f, 18f); Renders.BoxRect(new Rect(pos.x, pos.y, 52f, 5f), Color.black); pos += new Vector2(1f, 1f); Color color = Color.green; bool flag = health <= 50f; if (flag) { color = Color.yellow; } bool flag2 = health <= 25f; if (flag2) { color = Color.red; } Renders.BoxRect(new Rect(pos.x, pos.y, 0.5f * health, 3f), color); }
void OnGUI() { GUI.skin = skin; if (EnableMenu) { rc = GUI.Window(0, rc, new GUI.WindowFunction(GI), "UFO HACKS: " + DateTime.Now.ToString()); } if (EnableHack) { if (EnableESP) { if (Players || Sleeper) { Visual.Players(); if (Skelet) { foreach (BasePlayer pl in BasePlayer.VisiblePlayerList) { if (pl != null && pl != LocalPlayer.Entity && !pl.IsSleeping()) { DrawBones(pl, Color.white); } } } if (Radar) { Renders.DrawRadarBackground(new Rect(30, 200, 200, 200)); Renders.BoxRect(new Rect(30 + (200 / 2) - 3, 200 + (200 / 2) - 3, 6f, 6f), UnityEngine.Color.cyan); foreach (BasePlayer p in BasePlayer.VisiblePlayerList) { if (p != null && p.health > 0f && !p.IsSleeping() && !p.IsLocalPlayer()) { if (Players) { Vector3 centerPos = LocalPlayer.Entity.transform.position; Vector3 extPos = p.transform.position; float dist = Vector3.Distance(centerPos, extPos); float dx = centerPos.x - extPos.x; float dz = centerPos.z - extPos.z; float deltay = Mathf.Atan2(dx, dz) * Mathf.Rad2Deg - 270 - LocalPlayer.Entity.transform.eulerAngles.y; float bX = dist * Mathf.Cos(deltay * Mathf.Deg2Rad); float bY = dist * Mathf.Sin(deltay * Mathf.Deg2Rad); bX = bX * ((float)200 / (float)radardist) / 2f; bY = bY * ((float)200 / (float)radardist) / 2f; if (dist <= radardist) { Renders.BoxRect(new Rect(30 + (200 / 2) + bX - 3, 200 + (200 / 2) + bY - 3, 6f, 6f), Color.white); } } } } } } } } }
// Token: 0x06000089 RID: 137 RVA: 0x00009F58 File Offset: 0x00008158 public void OnGUI() { try { bool localinfo = Config.ESP.localinfo; if (localinfo) { Weapon weapon = Misc.LocalPlayer.Weapon; Rect rect; rect..ctor((float)Screen.width - 250f, 120f, 200f, 51f); Renders.DrawRadarBackground(rect); bool flag = weapon != null; if (flag) { Renders.DrawString(new Vector2((float)Screen.width - 240f, 120.86956f), string.Format("{0}]", "LocalWeaponInfo"), Color.green, false, 12, true); Renders.DrawString(new Vector2((float)Screen.width - 240f, 137.82608f), string.Format("{0}+{1}/{2} [{3}]", new object[] { weapon.GetCurrentMagazine().Count, weapon.ChamberAmmoCount, weapon.GetCurrentMagazine().MaxCount, weapon.SelectedFireMode.ToString() }), Color.green, false, 12, true); } } bool weaponammo = Config.ESP.weaponammo; if (weaponammo) { Dictionary <Player, int> dictionary = new Dictionary <Player, int>(); Vector2 vector; vector..ctor((float)Screen.width / 2f, (float)Screen.height / 2f); Vector3 zero = Vector3.zero; foreach (GamePlayer gamePlayer in Misc.GamePlayers) { int num = (int)Vector2.Distance(Misc.MainCamera.WorldToScreenPoint(gamePlayer.Player.PlayerBones.Head.position), vector); int num2 = (int)Vector3.Distance(Misc.LocalPlayer.Transform.position, gamePlayer.Player.Transform.position); Vector3 vector2 = gamePlayer.Player.Transform.position - Misc.MainCamera.transform.position; bool flag2 = !MonoBehaviourSingleton <PreloaderUI> .Instance.IsBackgroundBlackActive && (float)num2 <= 5000f && (float)num <= 5000f && Vector3.Dot(Misc.MainCamera.transform.TransformDirection(Vector3.forward), vector2) > 0f; if (flag2) { dictionary.Add(gamePlayer.Player, num); } } bool flag3 = (double)dictionary.Count > 0.01; if (flag3) { dictionary = (from pair in dictionary orderby pair.Value select pair).ToDictionary((KeyValuePair <Player, int> pair) => pair.Key, (KeyValuePair <Player, int> pair) => pair.Value); Player player = dictionary.Keys.First <Player>(); Vector3 vector3 = Camera.main.WorldToScreenPoint(player.Transform.position); int num3 = (int)Vector3.Distance(Misc.MainCamera.transform.position, player.Transform.position); Vector3 position = player.PlayerBones.Head.position; Vector3 vector4 = Camera.main.WorldToScreenPoint(player.Transform.position); Weapon weapon2 = player.Weapon; Rect rect2; rect2..ctor((float)Screen.width - 250f, 50f, 200f, 35f); Renders.DrawRadarBackground(rect2); bool flag4 = (double)vector4.z > 0.01 && weapon2 != null; if (flag4) { Renders.DrawString(new Vector2((float)Screen.width - 240f, 53.04348f), string.Format("{0}]", "EnemyWeaponInfo"), Color.white, false, 12, true); Renders.DrawString(new Vector2((float)Screen.width - 240f, 70f), string.Format("{0}+{1}/{2} [{3}]", new object[] { weapon2.GetCurrentMagazine().Count, weapon2.ChamberAmmoCount, weapon2.GetCurrentMagazine().MaxCount, weapon2.SelectedFireMode.ToString() }), Color.white, false, 12, true); } } } } catch { } }