Example #1
0
 public static void Reload(CommandArgs args)
 {
     _config = AutoConfig.Read("powelder/broadcast.json");
     if (!File.Exists("powelder/broadcast.json"))
     {
         _config.Write("powelder/broadcast.json");
     }
     args.Player.SendMessage("[c/595959:ยป]  Broadcast zostal przeladowany.", Color.Gray);
 }
Example #2
0
 public static void StartBroadcast()
 {
     _config = AutoConfig.Read("powelder/broadcast.json");
     if (!File.Exists("powelder/broadcast.json"))
     {
         _config.Write("powelder/broadcast.json");
     }
     while (true)
     {
         Thread.Sleep(_config.Interval * 1000);
         TSPlayer.All.SendMessage(_config.Messages[_nr], new Color(_config.Red, _config.Green, _config.Blue));
         _nr++;
         if (_nr == _config.Messages.Length)
         {
             _nr = 0;
         }
     }
 }