Пример #1
0
        /// <summary>
        /// Зарегистрировать двери магазина
        /// </summary>
        private void RegisterDoors(ClothesShopModel shop)
        {
            var leftDoorId = _doormanager.Register(shop.DoorId, shop.LeftDoorPosition);

            _doormanager.SetDoorState(leftDoorId, false, 0);
            if (shop.Type == ClothesShopType.Ponsonbys)
            {
                var rightDoorId = _doormanager.Register(shop.DoorId, shop.RightDoorPosition);
                _doormanager.SetDoorState(rightDoorId, false, 0);
            }
        }
Пример #2
0
        /// <summary>
        /// Загружает текстуры салонов и двери
        /// </summary>
        private void LoadInteriorsAndDoors()
        {
            API.requestIpl("imp_dt1_02_modgarage");
            var mainEnterLeft = _doormanager.Register(2059227086, new Vector3(-59.89302, -1092.952, 26.88362));

            _doormanager.SetDoorState(mainEnterLeft, false, 1);
            var mainEnterRight = _doormanager.Register(1417577297, new Vector3(-60.54582, -1094.749, 26.88872));

            _doormanager.SetDoorState(mainEnterRight, false, 1);
            var parkingEnterLeft = _doormanager.Register(2059227086, new Vector3(-39.13366, -1108.218, 26.7198));

            _doormanager.SetDoorState(parkingEnterLeft, false, 1);
            var parkingEnterRight = _doormanager.Register(1417577297, new Vector3(-37.33113, -1108.873, 26.7198));

            _doormanager.SetDoorState(parkingEnterRight, false, 1);
        }
Пример #3
0
 /// <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;
     }
 }
Пример #4
0
 /// <summary>
 /// Инициализировать тюрьму
 /// </summary>
 public void Initialize()
 {
     foreach (var position in _jailPositions)
     {
         var doorId = _doormanager.Register(631614199, position.Item1);
         _doormanager.SetDoorState(doorId, true, 0);
         API.createSphereColShape(position.Item1, JAIL_DOOR_RANGE).onEntityEnterColShape += (shape, entity) => {
             OnPutPrisonerInJail(entity, position.Item2);
         };
     }
     ActionHelper.StartTimer(CHECK_PRISONERS_TIMEOUT, CheckPrisoners);
 }