/// <summary> /// Инизиализировать место /// </summary> public override void Initialize() { CreateVehicles(); _pointCreator.CreateBlip(MainPosition.PoliceDepartment, 526, 53, name: "Департамент полиции"); _pointCreator.CreateBlip(MainPosition.Jail, 188, 53, name: "Тюрьма"); _policeManager.Initialize(); _jailManager.Initialize(); }
/// <summary> /// Инизиализировать место /// </summary> public override void Initialize() { _pointCreator.CreateBlip(MainPosition.Farm, 88, 43, name: "Ферма"); _farmerManager.Initialize(); _tractorDriverManager.Initialize(); CreateTractors(); }
/// <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; }
/// <summary> /// Инизиализировать штрафстоянку /// </summary> public override void Initialize() { _wreckerManager.Initialize(); _pointCreator.CreateBlip(MainPosition.ParkingFine, 68, 6, name: "Штрафстоянка (Эвакуаторщик)"); CreateTowTrucks(); var parkingFine = API.createSphereColShape(new Vector3(409.83, -1637.81, 29.29), 5.5f); parkingFine.onEntityEnterColShape += (shape, entity) => ParkingFineAction(entity, vehicle => vehicle.setData(ON_PARKING_FINE, true)); parkingFine.onEntityExitColShape += (shape, entity) => ParkingFineAction(entity, vehicle => vehicle.resetData(ON_PARKING_FINE)); }
/// <summary> /// Создать нпс /// </summary> public void Initialize() { _pointCreator.CreateBlip(MainPosition.BusDriver, 513, 47, name: "Автобусный парк"); var point = _pointCreator.CreatePed( PedHash.ONeil, "Онэил", MainPosition.BusDriver, new Vector3(0, 0, -100), new Vector3(46.5, -843.66, 29.97), Colors.VividCyan ); point.ColShape.onEntityEnterColShape += OnEntityEnterColShape; point.ColShape.onEntityExitColShape += OnEntityExitColShape; }
/// <summary> /// Инизиализировать заправки /// </summary> public override void Initialize() { foreach (var station in GetFillingPositions()) { var position = station.Position; _pointCreator.CreateBlip(position, 361, 12, name: "Заправка"); InitializeInside(station); CreateFillingPoints(station); } }
/// <summary> /// Проинициализировать дворик /// </summary> public void Initialize(long clanId, ClanCourtyardInfo courtyard) { CreateMissionEndPoint(clanId, courtyard.MissionEndPoint); CreateVansGarage(clanId, courtyard); var blip = _pointCreator.CreateBlip(courtyard.VansGarage, 357, 19, name: "Фургоны для миссии"); API.setBlipTransparency(blip, 0); _vansBlips.Add(blip); ClientEventHandler.Add(ClientEvent.SPAWN_MISSION_VANS, OnSpawnMissionVans); }
/// <summary> /// Инизиализировать место /// </summary> public override void Initialize() { foreach (var shop in PositionsGetter.GetShops()) { RegisterDoors(shop); _pointCreator.CreateBlip(shop.BlipPosition, shop.Blip, shop.Type == ClothesShopType.SubUrban ? 25 : 63, name: shop.Type.GetDescription() ); CreateSeller(shop); } }
/// <summary> /// Инизиализировать магазин /// </summary> public override void Initialize() { var shops = GetShops(); foreach (var shop in shops) { var position = shop.Position; _pointCreator.CreateBlip(position, 52, 69, name: "Магазин 24/7"); InitializeInside(shop); } }
/// <summary> /// Создать нпс парковки /// </summary> public void Initialize() { _pointCreator.CreateBlip(MainPosition.Parking, 524, 41, name: "Главная парковка"); var ped = _pointCreator.CreatePed( PedHash.TrafficWarden, "Парковщик Себастьян", MainPosition.Parking, new Vector3(0.00, 0.00, 84.02), new Vector3(-346.20, -822.24, 30.64), Colors.VividCyan ); ped.ColShape.onEntityEnterColShape += (shape, entity) => PlayerHelper.ProcessAction(entity, PlayerComeToNpc); ped.ColShape.onEntityExitColShape += (shape, entity) => PlayerHelper.ProcessAction(entity, PlayerAwayFromNpc); }
/// <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 CreateBlips(HouseInfo house, Vector3 position) { var hasOwner = house.OwnerId != NO_OWNER; var playerName = hasOwner ? _playerInfoManager.Get(house.OwnerId)?.Name : string.Empty; var blip = _pointCreator.CreateBlip(position, hasOwner ? 40 : 374, 0, scale: 0.6f); _blipsByHouses.Add(house.Id, blip); UpdateBlip(house, playerName); }
/// <summary> /// Создать нпс /// </summary> public void Initialize() { _pointCreator.CreateBlip(MainPosition.TaxiDriver, 56, 46, name: "Таксопарк"); var point = _pointCreator.CreatePed( PedHash.ArmLieut01GMM, "Луи", MainPosition.TaxiDriver, new Vector3(0, 0, 80), new Vector3(211.36, -808.47, 29.93), Colors.VividCyan ); point.ColShape.onEntityEnterColShape += OnEntityEnterColShape; point.ColShape.onEntityExitColShape += OnEntityExitColShape; }
/// <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; }
/// <summary> /// Создать нпс /// </summary> public void Initialize() { _pointCreator.CreateBlip(MainPosition.Race, 315, 69, name: "Гонки"); var ped = _pointCreator.CreatePed( PedHash.Bevhills02AMM, "Пол", MainPosition.Race, new Vector3(0.00, 0.00, -33.72), new Vector3(-1650.48, -957.17, 6.79), Colors.VividCyan ); ped.ColShape.onEntityEnterColShape += (shape, entity) => PlayerComeToNpc(entity); ped.ColShape.onEntityExitColShape += (shape, entity) => PlayerHelper.ProcessAction(entity, player => API.triggerClientEvent(player, ServerEvent.HIDE_RACE_MENU)); }
/// <summary> /// Создать нпс /// </summary> public void Initialize() { _pointCreator.CreateBlip(MainPosition.StreetFights, 311, 49, name: "Уличные драки"); var ped = _pointCreator.CreatePed( PedHash.StrPunk02GMY, "Тайлер", MainPosition.StreetFights, new Vector3(0.00, 0.00, 84.50), new Vector3(-22.78, -1228.62, 28.43), Colors.VividCyan ); ped.ColShape.onEntityEnterColShape += (shape, entity) => PlayerHelper.ProcessAction(entity, player => API.triggerClientEvent(player, ServerEvent.SHOW_FIGHT_MENU, StreetFights.Members.Count)); ped.ColShape.onEntityExitColShape += (shape, entity) => PlayerHelper.ProcessAction(entity, player => API.triggerClientEvent(player, ServerEvent.HIDE_FIGHT_MENU)); }
/// <summary> /// Инизиализировать морской торговый порт /// </summary> public override void Initialize() { foreach (var truckerNpc in TruckersDataGetter.TruckerNpcs) { _pointCreator.CreateBlip(truckerNpc.Position, 477, 21, name: "Грузоперевозка"); var ped = _pointCreator.CreatePed( truckerNpc.Hash, truckerNpc.Name, truckerNpc.Position, truckerNpc.Rotation, truckerNpc.MarkerPosition, Colors.VividCyan ); ped.ColShape.onEntityEnterColShape += (shape, entity) => PlayerComeToNpc(entity, truckerNpc.Contracts); ped.ColShape.onEntityExitColShape += (shape, entity) => PlayerAwayFromNpc(entity); } CreateTrucks(); _truckersManager.Initialize(); }
/// <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}\"!"); }
/// <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); } }
/// <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); } } }
/// <summary> /// Создать нпс /// </summary> public void Initialize() { var npcs = GetNpcsPositions(); foreach (var npc in npcs) { _pointCreator.CreateBlip(npc.Position, 512, 9, name: "Аренда скутеров"); var point = _pointCreator.CreatePed( PedHash.ChiGoon01GMM, "Аренда скутеров", npc.Position, npc.Rotation, npc.MarkerPosition.Add(new Vector3(0, 0, 0.1f)), Colors.VividCyan ); point.ColShape.onEntityEnterColShape += (shape, entity) => { OnEntityEnterColShape(entity, npc.ScooterPosition, npc.ScooterRotation, npc.District); }; point.ColShape.onEntityExitColShape += OnEntityExitColShape; } }
/// <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 override void Initialize() { var position = new Vector3(-75.68, -826.21, 326.18); _pointCreator.CreateBlip(position, 377, 63, scale: 1.3f, name: "Прыжок с парашютом"); CreateEnters(); var ped = _pointCreator.CreatePed( PedHash.ExArmy01, NAME, position, new Vector3(0.00, 0.00, -15.22), new Vector3(-75.47, -825.44, 325.18), Colors.VividCyan ); ped.ColShape.onEntityEnterColShape += (shape, entity) => PlayerHelper.ProcessAction(entity, player => API.triggerClientEvent(player, ServerEvent.SHOW_PARACHUTE_MENU) ); ped.ColShape.onEntityExitColShape += (shape, entity) => PlayerHelper.ProcessAction(entity, player => API.triggerClientEvent(player, ServerEvent.HIDE_PARACHUTE_MENU) ); ClientEventHandler.Add(ClientEvent.BUY_PARACHUTE, BuyParachute); }
/// <summary> /// Инизиализировать место /// </summary> public override void Initialize() { ClientEventHandler.Add(ClientEvent.BUY_WEAPON, BuyWeapon); ClientEventHandler.Add(ClientEvent.BUY_AMMO, BuyAmmo); foreach (var shop in AmmuNationData.Shops) { _pointCreator.CreateBlip(shop.LeftDoorPosition, 110, 45, name: shop.Name); var leftDoodId = _doormanager.Register(97297972, shop.LeftDoorPosition); var rightDoorId = _doormanager.Register(-8873588, shop.RightDoorPosition); _doormanager.SetDoorState(leftDoodId, false, 1); _doormanager.SetDoorState(rightDoorId, false, 1); var seller = _pointCreator.CreatePed( PedHash.Ammucity01SMY, "Продавец", shop.SellerPosition, shop.SellerRotation, shop.Marker, Colors.VividCyan ); seller.ColShape.onEntityEnterColShape += (shape, entity) => PlayerComeToSeller(entity, shop.District); seller.ColShape.onEntityExitColShape += PlayerAwayFromSeller; } }
/// <summary> /// Инизиализировать место /// </summary> public override void Initialize() { _pointCreator.CreateBlip(MainPosition.ScrapMetalDump, 478, 21, name: "Свалка металлолома"); _loaderManager.Initialize(); }
/// <summary> /// Инизиализировать место /// </summary> public override void Initialize() { _pointCreator.CreateBlip(MainPosition.FishingVillage, 410, 63, name: "Рыбацкое поселение"); _fishermanManager.Initialize(); CreateBoats(); }
/// <summary> /// Инизиализировать закусочную /// </summary> public override void Initialize() { _pointCreator.CreateBlip(MainPosition.Bistro, 106, 49, scale: 0.8f, name: "Закусочная"); CreateVehicles(); _bistroManager.CreatePoints(); }
/// <summary> /// Инизиализировать место /// </summary> public override void Initialize() { _pointCreator.CreateBlip(MainPosition.Building, 475, 56, name: "Стройка"); _builderManager.Initialize(); }
/// <summary> /// Инизиализировать место /// </summary> public override void Initialize() { _pointCreator.CreateBlip(MainPosition.TextileMill, 50, 14, name: "Текстильная фабрика"); _forkliftManager.Initialize(); CreateForklifts(); }