コード例 #1
0
 public static void DisconnectHardcoreExec(ClientInfo _cInfo, int _zKills, int _playerKills, int _deaths, int _score, string _session)
 {
     try
     {
         if (_cInfo != null)
         {
             string _phrase951;
             if (!Phrases.Dict.TryGetValue(951, out _phrase951))
             {
                 _phrase951 = "Hardcore Game Over: Player {PlayerName}, Zombie Kills {ZombieKills}, Player Kills {PlayerKills}, Deaths {Deaths}, Score {Score}, Playtime {Playtime}";
             }
             _phrase951 = _phrase951.Replace("{PlayerName}", _cInfo.playerName);
             _phrase951 = _phrase951.Replace("{ZombieKills}", _zKills.ToString());
             _phrase951 = _phrase951.Replace("{PlayerKills}", _playerKills.ToString());
             _phrase951 = _phrase951.Replace("{Deaths}", _deaths.ToString());
             _phrase951 = _phrase951.Replace("{Score}", _score.ToString());
             _phrase951 = _phrase951.Replace("{Playtime}", _session);
             ChatHook.ChatMessage(_cInfo, LoadConfig.Chat_Response_Color + _phrase951 + "[-]", -1, LoadConfig.Server_Response_Name, EChatType.Global, null);
             Timers.DisconnectHardcorePlayer(_cInfo);
         }
     }
     catch (Exception e)
     {
         Log.Out(string.Format("[SERVERTOOLS] Error in Hardcore.DisconnectHardcoreExec: {0}.", e.Message));
     }
 }
コード例 #2
0
 public static void Disconnect(ClientInfo _cInfo, string[] _stats)
 {
     try
     {
         if (_cInfo != null)
         {
             Phrases.Dict.TryGetValue(594, out string _phrase594);
             _phrase594 = _phrase594.Replace("{PlayerName}", _stats[0]);
             _phrase594 = _phrase594.Replace("{PlayTime}", _stats[1]);
             _phrase594 = _phrase594.Replace("{PlayerKills}", _stats[2]);
             _phrase594 = _phrase594.Replace("{ZombieKills}", _stats[3]);
             _phrase594 = _phrase594.Replace("{Deaths}", _stats[4]);
             _phrase594 = _phrase594.Replace("{Score}", _stats[5]);
             ChatHook.ChatMessage(_cInfo, Config.Chat_Response_Color + _phrase594 + "[-]", -1, Config.Server_Response_Name, EChatType.Whisper, null);
             Timers.DisconnectHardcorePlayer(_cInfo);
         }
     }
     catch (Exception e)
     {
         Log.Out(string.Format("[SERVERTOOLS] Error in Hardcore.Disconnect: {0}", e.Message));
     }
 }