Hello everybody...
I started using the InSim.NET library to compile an InSim app, for personal programming skills improvement. Basically, I added some packets successfully, as BTN, MSO, STA, BTC. Anyway, now I'm trying to include MCI packets to get user position on track. Follow the code I added already:
Flag call on init:
And packet handling itself:
My intention is to get a message if player is not on "2234" (just a random number to test) X position. As you can see, I've linked Trackname to this action. I'm pretty sure Trackname is working, but to clear all possibilities, I already tested without this part of the code.
Any clue about? Thanks to all =)
                
            I started using the InSim.NET library to compile an InSim app, for personal programming skills improvement. Basically, I added some packets successfully, as BTN, MSO, STA, BTC. Anyway, now I'm trying to include MCI packets to get user position on track. Follow the code I added already:
      insim.Bind<IS_ISM>(HandlePacket);
            insim.Bind<IS_NPL>(HandlePacket);
            insim.Bind<IS_PLL>(HandlePacket);
            insim.Bind<IS_LAP>(HandlePacket);
            insim.Bind<IS_ISI>(HandlePacket);
            insim.Bind<IS_SPX>(HandlePacket);
            insim.Bind<IS_MSO>(MessageOut);
            insim.Bind<IS_BTC>(ButtonClicked);
            insim.Bind<IS_STA>(TrackInfo);Flag call on init:
 insim.Initialize(new InSimSettings {
                Host = host,
                Port = port,
                Admin = admin,
                IName = "^2Testserver",
                Prefix = '!',
                Flags = InSimDotNet.Packets.InSimFlags.ISF_MCI | InSimDotNet.Packets.InSimFlags.ISF_CON | InSimDotNet.Packets.InSimFlags.ISF_MSO_COLS | InSimDotNet.Packets.InSimFlags.ISF_OBH,
            });And packet handling itself:
void MultiCarInfo(InSim insim, IS_MCI mci)
        {
            foreach (CompCar car in mci.Info)
            {
                switch (TrackName)
                {
                    case "BL1":
                        insim.Send("PACKET CHECK");
                        if (car.X != 2234)
                            {
                                insim.Send("POSITION CHECK");
                            }
                        break;
                }
            }
        }My intention is to get a message if player is not on "2234" (just a random number to test) X position. As you can see, I've linked Trackname to this action. I'm pretty sure Trackname is working, but to clear all possibilities, I already tested without this part of the code.
Any clue about? Thanks to all =)