Thread: RADAR Script
View Single Post
  #9  
Old 06-25-2012, 03:03 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Corrected:

Code:
public override void OnTickGame()
    {
        if (Time.tickCounter()%864000 == 72000) // 864000 = 8 hour repeat, 72000 = 40 min delay.
        {
            GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/July1940_v10/Missionen/Mission2.mis");
           
            List<Player> players = new List<Player>();
            if (GamePlay.gpPlayer() != null)
                players.Add(GamePlay.gpPlayer());
            if (GamePlay.gpRemotePlayers() != null)
                players.AddRange(GamePlay.gpRemotePlayers());

            Player[] Reds = players.FindAll(item => item.Army() == 1).ToArray();
            Player[] Blues = players.FindAll(item => item.Army() == 2).ToArray();

            if (Reds.Length > 0)
            {
                GamePlay.gpHUDLogCenter(Reds, "RAF- Fly CAP between Calais and Dover", new object[] {}, 2);
                GamePlay.gpLogServer(Reds, "RAF- Fly CAP between Calais and Dover", new object[] {});
            }
            if (Blues.Length > 0)
            {
                GamePlay.gpHUDLogCenter(Blues, "LW- Meet a flight of HE111's 5000m over Calais.\n In appr. 10 minutes inot mission! Escort them to Dover!", new object[] { }, 2);
                GamePlay.gpLogServer(Blues, "LW- Meet a flight of HE111's 5000m over Calais.\n In appr. 10 minutes inot mission! Escort them to Dover!", new object[] { });
            }
        }
    }
Reply With Quote