Exemple #1
0
 private string TPS(Tps tpsMonitor)
 {
     string tps1Min = tpsMonitor.get1Min().ToString("0.0");
     string tps5Min = tpsMonitor.get5Min().ToString("0.0");
     string tps15Min = tpsMonitor.get15Min().ToString("0.0");
     return tps1Min + ", " + tps5Min + ", " + tps15Min;
 }
Exemple #2
0
        public LineText(string configText, Tps tpsMonitor, UnturnedPlayer player)
        {
            configText = configText.Replace("%servername%", Provider.serverName);
            configText = configText.Replace("%playername%", player.CharacterName);
            configText = configText.Replace("%online%", Provider.clients.Count().ToString() + "/" + Provider.maxPlayers.ToString());
            configText = configText.Replace("%adminsonline%", Admins());
            configText = configText.Replace("%mode%", Provider.mode.ToString().ToLower());
            configText = configText.Replace("%pvp/pve%", PvPorPvE());
            configText = configText.Replace("%map%", Provider.map);
            configText = configText.Replace("%uptime%", UpTime());
            configText = configText.Replace("%tps%", TPS(tpsMonitor));

            text = configText;
        }