View Single Post
  #6  
Old 08-08-2011, 06:33 PM
41Sqn_Banks 41Sqn_Banks is offline
Approved Member
 
Join Date: Oct 2007
Posts: 644
Default

Yes the chat is captured during the mission.

http://code.google.com/p/il2dce/sour...IL2DCE/Core.cs

Code:
        public Core(GameDef game)
        {
            _game = game;

            Game.EventChat += new GameDef.Chat(Game_EventChat);

Code:
        void Game_EventChat(IPlayer from, string msg)
        {
            if(msg.Contains("!hello"))
            {
                Game.gpLogServer(new Player[] { from }, "Hello World!", null);
            }
        }
Here is how the GameDef is given to the Core. This is also the entry point for the addin.
http://code.google.com/p/il2dce/sour.../GameSingle.cs
Code:
public GameSingle(GameSingleIterface game)
                : base(game)
            {
                core = new Core(this);
            }
To load the addin you need to have a .xml file:
http://code.google.com/p/il2dce/sour...GameSingle.xml
Reply With Quote