/// <summary> /// Инициализировать магазин внутри /// </summary> private void InitializeInside(ShopModel shop) { var pedPositions = PositionConverter.ToListVector3(shop.NpcPositions); var ped = _pointCreator.CreatePed(PedHash.Sweatshop01SFY, "Продавец", pedPositions[0], pedPositions[1], pedPositions[2], Colors.VividCyan); ped.ColShape.onEntityEnterColShape += (shape, entity) => PlayerComeToSeller(entity, shop.District); ped.ColShape.onEntityExitColShape += PlayerComeAwayFromSeller; }
/// <summary> /// Инициализировать заправку внутри /// </summary> private void InitializeInside(FillingModel station) { var pedPositions = PositionConverter.ToListVector3(station.NpcPositions); var ped = _pointCreator.CreatePed(PedHash.GuadalopeCutscene, "Продавец", pedPositions[0], pedPositions[1], pedPositions[2], Colors.VividCyan); ped.ColShape.onEntityEnterColShape += (shape, entity) => PlayerComeToSeller(entity, station.Id, station.District); ped.ColShape.onEntityExitColShape += PlayerComeAwayFromSeller; }
/// <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); } }