protected override void OnTimer(TickEventArgs args, Time sinceLastTimer) { base.OnTimer(args, sinceLastTimer); Program.Logger.PrintLine("ECHO", "{5}T\t | ▼{1} ({4})\t | ▲{0} ({3})\t | {2}t/s", new object[] { SizeFormatter.GetUnitFromSize(Program.Hack.Memory.BytesOut, true), SizeFormatter.GetUnitFromSize(Program.Hack.Memory.BytesIn, true), ((int)Program.Hack.TicksPerSecond).ToString(), //(int)args.TicksPerSecond.TPS, SizeFormatter.GetUnitFromSize(Program.Hack.Memory.BytesOut - lastOut, true), SizeFormatter.GetUnitFromSize(Program.Hack.Memory.BytesIn - lastIn, true), args.TicksPerSecond.TotalTicks.ToString().PadLeft(6, ' ') }); lastIn = Program.Hack.Memory.BytesIn; lastOut = Program.Hack.Memory.BytesOut; }
protected override void AfterPluginsTick(TickEventArgs args) { dbg = Program.Hack.Overlay.Renderer.Fonts[dbg]; if (Process.IsInForeground) { //Input Overlay.Menu.DrawString(Color.White, dbg, Vector2.Unit * 20f, Input.MousePos.ToString() + "\n" + Input.MouseMoveDist.ToString() + "\n" + string.Join(", ", Input.KeysDown.Select(x => x.ToString()))); //Mem var str = string.Format( "=============================\n" + "RPM: {0} calls\n" + " {1} total\n" + " {2}/s\n" + "WPM: {3} calls\n" + " {4} total\n" + " {5}/s\n" + "=============================", Memory.RPMCalls.ToString("N0"), SizeFormatter.GetUnitFromSize(Memory.BytesIn, true), SizeFormatter.GetUnitFromSize(Memory.BytesIn / args.Time.TotalTime.TotalSeconds, true), Memory.WPMCalls.ToString("N0"), SizeFormatter.GetUnitFromSize(Memory.BytesOut, true), SizeFormatter.GetUnitFromSize(Memory.BytesOut / args.Time.TotalTime.TotalSeconds, true)); var size = dbg.MeasureString(str); Overlay.Menu.DrawString(Color.White, dbg, Vector2.UnitY * (Overlay.Size.Y * 0.75f - size.Y * 0.5f), str); //Specs var lp = StateMod.LocalPlayer.Value; Color drawColor = Color.White; if (CSLocalPlayer.IsProcessable(lp) && !lp.IsDormant) { var players = StateMod.GetPlayersSet(true, false, true); Func <CSPlayer, bool> filter = null; filter = (x) => x.m_iID != lp.m_iID && x.m_hObserverTarget == lp.m_iID; if (players.Any(filter)) { var specs = players.Where(filter); if (specs.Any(x => x.m_iObserverMode == ObserverMode.Ego)) { drawColor = Color.Red; } else if (specs.Any(x => x.m_iObserverMode == ObserverMode.ThirdPerson)) { drawColor = Color.Orange; } string text = string.Join("\n", specs.Select(x => string.Format("▻ {0} ({1})", Program.Hack.StateMod.PlayerResources.Value.m_sNames[x.m_iID], x.m_iObserverMode.ToString()) ) ); Overlay.Menu.DrawString( drawColor, dbg, Vector2.UnitY * (Overlay.Size.Y / 2f), "[Specs]\n" + text); } else { Overlay.Menu.DrawString(drawColor, dbg, Vector2.UnitY * (Overlay.Size.Y / 2f), "[Specs]\n<none>"); } } else { Overlay.Menu.DrawString(drawColor, dbg, Vector2.UnitY * (Overlay.Size.Y / 2f), "[Specs]\n<not ingame>"); } } base.AfterPluginsTick(args); }