Example #1
0
        /// <summary>
        /// Инизиализировать место
        /// </summary>
        public override void Initialize()
        {
            API.requestIpl("bkr_biker_interior_placement_interior_6_biker_dlc_int_ware05_milo");
            CreateCars();
            _pointCreator.CreateBlip(MainPosition.DrivingSchool, 545, 3, name: "Автошкола");
            var enter = _pointCreator.CreateMarker(Marker.UpsideDownCone, MainPosition.DrivingSchool, Colors.Yellow, 1);

            enter.ColShape.onEntityEnterColShape += EnterIntoSchool;
            var exit = _pointCreator.CreateMarker(Marker.UpsideDownCone, new Vector3(1173.69, -3196.66, -39.01), Colors.Yellow, 1);

            exit.ColShape.onEntityEnterColShape += ExitFromSchool;
        }
Example #2
0
        /// <summary>
        /// Инициализировать вход и выход
        /// </summary>
        private void CreateEnters()
        {
            var enterPosition = new Vector3(-68.86, -801.40, 44.23);
            var roof          = new Vector3(-64.36, -820.48, 321.79);
            var enter         = _pointCreator.CreateMarker(Marker.UpsideDownCone, enterPosition, Colors.Yellow, 1f);

            enter.ColShape.onEntityEnterColShape += (shape, entity) => PlayerHelper.ProcessAction(entity, player => API.setEntityPosition(player, roof));
            var exitPosition = new Vector3(-67.35, -821.77, 321.29);
            var street       = new Vector3(-61.62, -792.95, 44.23);
            var exit         = _pointCreator.CreateMarker(Marker.UpsideDownCone, exitPosition, Colors.Yellow, 1f);

            exit.ColShape.onEntityEnterColShape += (shape, entity) => PlayerHelper.ProcessAction(entity, player => API.setEntityPosition(player, street));
        }
Example #3
0
        /// <summary>
        /// Создать точку сдачи добычи миссии
        /// </summary>
        private void CreateMissionEndPoint(long clanId, Vector3 position)
        {
            var endPoint = _pointCreator.CreateMarker(Enums.Marker.VerticalCylinder, position, GetClanColor(clanId), 3f);

            endPoint.ColShape.setData(CLAN_ID_KEY, clanId);
            endPoint.ColShape.onEntityEnterColShape += OnEnterEndPoint;
            endPoint.Marker.scale = new Vector3(3, 3, 1.2);
            API.setEntityTransparency(endPoint.Marker, 0);
            _markers.Add(endPoint.Marker);
            var label = API.createTextLabel("Сдача добычи", position.Add(new Vector3(0, 0, 2.5)), 10, 0.6F);

            API.setEntityTransparency(label, 0);
            _labels.Add(label);
        }
Example #4
0
 /// <summary>
 /// Инизиализировать место
 /// </summary>
 public override void Initialize()
 {
     LoadInteriorsAndDoors();
     foreach (var showroom in ShowroomsGetter.GetShowrooms())
     {
         _pointCreator.CreateBlip(showroom.Position, showroom.Blip, 30, name: showroom.Name);
         CreateSeller(showroom);
         if (showroom.Type == ShowroomType.Expensive)
         {
             var enter = _pointCreator.CreateMarker(Marker.UpsideDownCone, showroom.Position, Colors.Yellow, 1.5f);
             enter.ColShape.onEntityEnterColShape += (shape, entity) => TriggerShowroomEnter(entity, showroom, true);
             var exit = _pointCreator.CreateMarker(Marker.UpsideDownCone, showroom.ExitPosition, Colors.Yellow, 1.5f);
             exit.ColShape.onEntityEnterColShape += (shape, entity) => TriggerShowroomEnter(entity, showroom, false);
         }
     }
 }
Example #5
0
 /// <summary>
 /// Инизиализировать больницу
 /// </summary>
 public override void Initialize()
 {
     API.requestIpl("Coroner_Int_on");
     foreach (var hospital in HospitalHelper.Hospitals)
     {
         _pointCreator.CreateBlip(hospital.Position, 153, 11, scale: 1.3f, name: "Госпиталь");
         var enter = _pointCreator.CreateMarker(Marker.UpsideDownCone, hospital.Position, Colors.Yellow, 1.5f);
         enter.ColShape.onEntityEnterColShape += (shape, entity) => PlayerEnterIntoHospital(entity, hospital.Dimension);
         var exit = _pointCreator.CreateMarker(Marker.UpsideDownCone, _exitPosition, Colors.Yellow, 1.5f, dimention: hospital.Dimension);
         exit.ColShape.onEntityEnterColShape += (shape, entity) => PlayerExitFromHospital(entity, hospital.PositionAfterExit);
         exit.ColShape.dimension              = hospital.Dimension;
         CreateNurse(hospital.Dimension);
         CreateSafeZone(SpawnPosition.Add(new Vector3(0, 0, -15)), 20f, hospital.Dimension);
         CreateSafeZone(hospital.PositionAfterExit, 27f);
     }
 }
Example #6
0
        /// <summary>
        /// Инизиализировать место
        /// </summary>
        public override void Initialize()
        {
            CreateNpcs();
            _pointCreator.CreateBlip(MainPosition.AirPort, 359, 63, name: "Аэропорт");
            var enter = _pointCreator.CreateMarker(Marker.UpsideDownCone, MainPosition.AirPort, Colors.Yellow, 1f);

            enter.ColShape.onEntityEnterColShape += (shape, entity) =>
                                                    PlayerHelper.ProcessAction(entity, player => API.setEntityPosition(player, AirPortData.AfterEnter));
            AirPortData.Exits.ForEach(exitPosition => {
                var exit = _pointCreator.CreateMarker(Marker.UpsideDownCone, exitPosition, Colors.Yellow, 1f);
                exit.ColShape.onEntityEnterColShape += (shape, entity) =>
                                                       PlayerHelper.ProcessAction(entity, player => API.setEntityPosition(player, AirPortData.AfterExit));
            });
            CreatePlanes();
            _pilotManager.Initialize();
        }
        /// <summary>
        /// Инизиализировать место
        /// </summary>
        public override void Initialize()
        {
            _pointCreator.CreateBlip(MainPosition.Tuning, 446, 47, name: "Автомастерская");
            var enter = _pointCreator.CreateMarker(Marker.VerticalCylinder, MainPosition.Tuning, Colors.Blue, 3f);

            enter.Marker.scale = new Vector3(3, 3, 1.5);
            enter.ColShape.onEntityEnterColShape += EnterToTuningGarage;
        }
Example #8
0
 /// <summary>
 /// Инизиализировать место
 /// </summary>
 public override void Initialize()
 {
     LoadIteriors();
     foreach (var clanInfo in ClanDataGetter.ClansInfo)
     {
         _pointCreator.CreateBlip(clanInfo.Enter, 181, clanInfo.BlipColor, name: $"{clanInfo.ClanName} ({clanInfo.LeaderName})");
         var enter = _pointCreator.CreateMarker(Marker.UpsideDownCone, clanInfo.Enter, Colors.Yellow, 1f);
         enter.ColShape.onEntityEnterColShape += (shape, entity) => PlayerEnterClanHall(entity, clanInfo.AfterEnter);
         CreateLeader(clanInfo);
         CreateAdmin(clanInfo);
         CreateGunsmith(clanInfo);
         CreateMechanic(clanInfo);
         CreateDressingRoom(clanInfo);
         var exit = _pointCreator.CreateMarker(Marker.UpsideDownCone, clanInfo.Exit, Colors.Yellow, 1f);
         exit.ColShape.onEntityEnterColShape += (shape, entity) => PlayerExitClanHall(entity, clanInfo.AfterExit);
         _clanCourtyard.Initialize(clanInfo.ClanId, clanInfo.Courtyard);
     }
 }
 /// <summary>
 /// Загрузить дома
 /// </summary>
 public void Initialize()
 {
     API.requestIpl("apa_v_mp_h_04_a");
     API.requestIpl("TrevorsTrailerTidy");
     ServerState.Houses = _housesProvider.GetHouses().ToDictionary(e => e.Id);
     foreach (var house in ServerState.Houses.Values)
     {
         var position = PositionConverter.ToVector3(house.Position);
         CreateBlips(house, position);
         var enter = _pointCreator.CreateMarker(Marker.UpsideDownCone, position, Colors.Yellow, SHAPE_RANGE);
         enter.ColShape.onEntityEnterColShape += (shape, entity) => _houseEventManager.OnPlayerWentToEnter(entity, house.Id);
         enter.ColShape.onEntityExitColShape  += (shape, entity) => _houseEventManager.OnPlayerAway(entity);
         InitializeHouseInside(house);
         InitializeGarage(house);
     }
     _storageManager.Initialize();
     ActionHelper.StartTimer(PLAYER_HEAL_TIMEOUT, HealPlayersInHouses);
     ActionHelper.StartTimer(RENT_CHECK_TIMEOUT, SyncroizeRent);
 }
        /// <summary>
        /// Запускает миссию
        /// </summary>
        public void Start()
        {
            Active    = true;
            StartTime = DateTime.Now;
            var position = MissionDataGetter.GetMissionPosition(Place);

            _bootyPoint = _pointCreator.CreateMarker(Marker.VerticalCylinder, position, Colors.DarkBlue, 1.5f);
            _bootyPoint.Marker.scale = new Vector3(3, 3, 1);
            _bootyPoint.ColShape.onEntityEnterColShape += (shape, entity) => PlayerHelper.ProcessAction(entity, OnPlayerEnterBootyShape);
            _blip = _pointCreator.CreateBlip(position, 78, 19, name: "Миссия банды");
        }
        /// <summary>
        /// Инициализировать бензоколонки на заправке
        /// </summary>
        private void CreateFillingPoints(FillingModel station)
        {
            var positions  = PositionConverter.ToListVector3(station.FillingPoints);
            var stationKey = string.Format(STATION_KEY, station.Id);

            foreach (var position in positions)
            {
                _pointCreator.CreateMarker(Marker.HorizontalCircleFlat, position.Add(_pointDowngrade), Colors.VividCyan, 1f);
                var point = API.createSphereColShape(position, 2f);
                point.onEntityEnterColShape += (shape, entity) => PlayerEnterFillingPoint(entity, stationKey);
                point.onEntityExitColShape  += (shape, entity) => PlayerExitFillingPoint(entity, stationKey);
            }
        }
Example #12
0
        /// <summary>
        /// Запускает войну за район
        /// </summary>
        public void StartWar()
        {
            ClientEventHandler.Add(ClientEvent.CAPTURE_DISTRICT, CaptureStreet);
            _district = _districtsProvider.GetNext();
            _clanManager.RemoveDistrict(_district.Id);
            var position = PositionConverter.ToVector3(_district.Position);

            _blip         = _pointCreator.CreateBlip(position, 439, 4, scale: 2f, name: "Война за район");
            _capturePoint = _pointCreator.CreateMarker(Marker.VerticalCylinder, position, Colors.White, 3.7f, "Точка захвата района");
            _capturePoint.ColShape.onEntityEnterColShape += PlayerComeToCapturePoint;
            _capturePoint.ColShape.onEntityExitColShape  += PlayerAwayFromCapturePoint;
            API.setMarkerScale(_capturePoint.Marker, new Vector3(4, 4, 4));
            API.setEntityPosition(_capturePoint.Label, _capturePoint.Label.position.Add(new Vector3(0, 0, 2)));
            API.sendChatMessageToAll($"~b~[Банды] Началось сражение за район \"{_district.Name}\"!");
        }