View Single Post
  #2  
Old 11-15-2011, 08:28 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

You can use the Player(int placeindex) member of the AiAircraft Class:

For example
GamePlay.gpLogServer(new Player[] { (actor as AiAircraft).Player(0) }, " Test ", null);

You should test the null value, if null no human player (Ai).

To send the message to all possible players in an Aircraft:
Code:
for (int i = 0; i < aircraft.Places(); i++)
            if (aircraft.Player(i) != null)
                GamePlay.gpLogServer(new Player[] {aircraft.Player(i)}, " Test ", null);

Last edited by FG28_Kodiak; 11-15-2011 at 08:33 AM.
Reply With Quote