Example #1
0
        public static void PLP(InSim insim, IS_PLP PLP)
        {
            try
            {
                Players._players.Remove(PLP.PLID);

                foreach (Connections Conn in Connections._connections.Values)
                {
                    if (Conn.PLID == PLP.PLID)
                    {
                    }
                }
            }
            catch (InSimException IEx) { Logger.Error(IEx.Message, Logger.Types.PLP); }
        }
Example #2
0
 // Removes PLID from player and removes the car with same PLID
 private void PlayerPits(InSim insim, IS_PLP plp)
 {
     if (allCars.GetCarID(plp.PLID) != -1)
     {
         _inSim.Send(
             new IS_MSL {
             Msg = players.GetNameByPLID(plp.PLID) + "^3 went to garage and drove " + (allCars.GetCarByPLID(plp.PLID).GetDistance()) + " meters", ReqI = 1
         }
             );
         players.RemoveCarByPLID(plp.PLID);
         allCars.RemoveCarByPLID(plp.PLID);
         // This is to stop activing current car functions and wait for new STA packet to arrive to update current car.
         if (activePLID == plp.PLID)
         {
             activePLID = -1;
         }
     }
 }