Esempio n. 1
0
 public static void RemoveNearestSign()
 {
     if (RoadSignsWithInvisWallsAndPeds.Count > 0)
     {
         Tuple <Rage.Object, Rage.Object, Ped> coneset = (from x in RoadSignsWithInvisWallsAndPeds orderby x.Item1.DistanceTo(Game.LocalPlayer.Character.Position) select x).FirstOrDefault();
         if (coneset.Item1.Exists())
         {
             coneset.Item1.Delete();
         }
         if (coneset.Item2.Exists())
         {
             coneset.Item2.Delete();
         }
         if (coneset.Item3.Exists())
         {
             coneset.Item3.Delete();
         }
         World.RemoveSpeedZone(speedZones[RoadSignsWithInvisWallsAndPeds.IndexOf(coneset)]);
         speedZones.RemoveAt(RoadSignsWithInvisWallsAndPeds.IndexOf(coneset));
         RoadSignsWithInvisWallsAndPeds.Remove(coneset);
     }
 }