Thread: chat messages
View Single Post
  #4  
Old 03-11-2012, 11:39 PM
Smokeynz Smokeynz is offline
Approved Member
 
Join Date: Apr 2011
Posts: 106
Default

Btw, please use code # holder when you post code, easier to handle.

just rebuilt the code layout in visual studio, already contains the code screen messages to players. plus on take off.

If you find the on take off lines in code, see how I added the on take off message in the following example.

note: Salmos examples for message cycles will actually conflict with timers in current code, they are only examples. Quite often you need to modify to use.

Code:
public override void OnAircraftTookOff(int missionNumber, string shortName, AiAircraft aircraft)
    {
        #region stats
        base.OnAircraftTookOff(missionNumber, shortName, aircraft);
        try
        {
            stats.aircraftTakeoff(shortName, aircraft);
        }
        catch (Exception ex)
        {
            System.Console.WriteLine("Stats.OnAircraftTookOff - Exception: " + ex);
        }
        #endregion

        sendChatMessageTo(aircraft.Army(), " 79 Dev says The aircraft took off", null);

        //add your code here
    }

Last edited by Smokeynz; 03-12-2012 at 12:00 AM.
Reply With Quote