TheEnlightenedFlorist |
05-28-2011 01:08 AM |
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. :grin:
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();
}
}
}
|