View Single Post
  #21  
Old 05-28-2011, 01:08 AM
TheEnlightenedFlorist TheEnlightenedFlorist is offline
Approved Member
 
Join Date: May 2011
Location: SLC, Utah, USA
Posts: 143
Default

Alright, I finally have a solution. This won't send a message to the server, but it will appear in the server logs as something like "server to [username]: ". It will appear every five minutes for everybody connected to the server. You can decrease the time interval by changing 9000 to a lower number.

As a reminder, this code goes in the OnTickGame() method and both sides have to have at least one aircraft. I hope this helps.

Code:
        if (GamePlay.gpAirGroups(1) != null && GamePlay.gpAirGroups(2) != null)
        {
            if (Time.tickCounter() % 9000 == 0)
            {
                int totalAircraft = GamePlay.gpAirGroups(1).Length + GamePlay.gpAirGroups(2).Length;
                if (GamePlay.gpRemotePlayers().Length > 0)
                {
                    GamePlay.gpLogServerBegin(GamePlay.gpRemotePlayers(), totalAircraft.ToString());
                    GamePlay.gpLogServerEnd();
                }
            }
        }

Last edited by TheEnlightenedFlorist; 05-29-2011 at 02:05 AM.
Reply With Quote