Clothe Shop finished
This commit is contained in:
@@ -110,9 +110,12 @@ namespace ReallifeGamemode.Server.Managers
|
||||
}
|
||||
else
|
||||
{
|
||||
houseBlips[house.Id] = NAPI.Blip.CreateBlip(40, house.Position, 0.7f, 11, "Haus", shortRange: true);
|
||||
//houseBlips[house.Id] = NAPI.Blip.CreateBlip(40, house.Position, 0.7f, 11, "Haus", shortRange: true); too many blips
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
houseLabels[house.Id] = NAPI.TextLabel.CreateTextLabel(text, house.Position, 10f, 1f, 0, new Color(255, 255, 255));
|
||||
|
||||
if (house.Price != 0)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using GTANetworkAPI;
|
||||
using ReallifeGamemode.Server.Shop.Clothing;
|
||||
|
||||
namespace ReallifeGamemode.Server.Managers
|
||||
{
|
||||
@@ -17,6 +18,9 @@ namespace ReallifeGamemode.Server.Managers
|
||||
public static List<ElevatorPoint> ElevatorPoints = new List<ElevatorPoint>();
|
||||
public static List<ColShape> ElevatorColShapes = new List<ColShape>();
|
||||
|
||||
public static List<ShopPoint> ShopPoints = new List<ShopPoint>();
|
||||
public static List<ColShape> ShopColShapes = new List<ColShape>();
|
||||
|
||||
[ServerEvent(Event.ResourceStart)]
|
||||
public void OnResourceStart()
|
||||
{
|
||||
@@ -48,8 +52,11 @@ namespace ReallifeGamemode.Server.Managers
|
||||
new Vector3(0, 0, 0), 3, new Color(255, 255, 255, 50), false, 0);
|
||||
NAPI.TextLabel.CreateTextLabel("Stempeluhr - Dr\u00fccke ~y~E\n~s~Dienstkleidung - Dr\u00fccke ~y~K", d.Position, 7, 1, 0, new Color(255, 255, 255), false, 0);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion DutyPoints
|
||||
|
||||
#region WeaponPoints
|
||||
|
||||
WeaponPoint weaponPointLSPD = new WeaponPoint()
|
||||
{
|
||||
Position = new Vector3(460.3162, -981.0168, 30.68959),
|
||||
@@ -83,8 +90,11 @@ namespace ReallifeGamemode.Server.Managers
|
||||
new Vector3(0, 0, 0), 2, new Color(255, 255, 255, 50), false, 0);
|
||||
NAPI.TextLabel.CreateTextLabel("Waffenspind - Dr\u00fccke ~y~E", w.Position, 7, 1, 0, new Color(255, 255, 255), false, 0);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion WeaponPoints
|
||||
|
||||
#region JailReleasePoints
|
||||
|
||||
JailReleasePoint jailPointLSPD = new JailReleasePoint()
|
||||
{
|
||||
Position = new Vector3(459.5327, -988.8435, 24.91487)
|
||||
@@ -103,8 +113,11 @@ namespace ReallifeGamemode.Server.Managers
|
||||
new Vector3(0, 0, 0), 1.5f, new Color(255, 255, 255, 50), false, 0);
|
||||
NAPI.TextLabel.CreateTextLabel("Gefängnis PC - Dr\u00fccke ~y~E", j.Position, 7, 1, 0, new Color(255, 255, 255), false, 0);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion JailReleasePoints
|
||||
|
||||
#region ElevetaorPoints
|
||||
|
||||
ElevatorPoint FibElevatorPointEG = new ElevatorPoint()
|
||||
{
|
||||
Position = new Vector3(136.1958, -761.657, 242.152), //FBI oben
|
||||
@@ -134,32 +147,63 @@ namespace ReallifeGamemode.Server.Managers
|
||||
new Vector3(0, 0, 0), 1.5f, new Color(255, 255, 255, 50), false, 0);
|
||||
NAPI.TextLabel.CreateTextLabel("Aufzug - Dr\u00fccke ~y~E", j.Position, 7, 1, 0, new Color(255, 255, 255), false, 0);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion ElevetaorPoints
|
||||
|
||||
#region Shops
|
||||
foreach (var shop in ShopManager.clotheStores)
|
||||
{
|
||||
shop.LoadClothes();
|
||||
ShopPoint shopPoint = new ShopPoint()
|
||||
{
|
||||
Position = shop.vector,
|
||||
clotheShop = shop
|
||||
};
|
||||
ShopPoints.Add(shopPoint);
|
||||
}
|
||||
|
||||
foreach(ShopPoint s in ShopPoints)
|
||||
{
|
||||
NAPI.Marker.CreateMarker(1, new Vector3(s.Position.X, s.Position.Y, s.Position.Z - 2), new Vector3(s.Position.X, s.Position.Y, s.Position.Z + 1),
|
||||
new Vector3(0, 0, 0), 2, new Color(255, 255, 255, 50), false, 0);
|
||||
NAPI.TextLabel.CreateTextLabel("Kleiderladen - Dr\u00fccke ~y~E", s.Position, 7, 1, 0, new Color(255, 255, 255), false, 0);
|
||||
}
|
||||
|
||||
#endregion Shops
|
||||
}
|
||||
}
|
||||
|
||||
public class DutyPoint
|
||||
{
|
||||
public Vector3 Position { get; set; }
|
||||
public int FactionId { get; set; }
|
||||
}
|
||||
|
||||
public class WeaponPoint
|
||||
{
|
||||
public Vector3 Position { get; set; }
|
||||
public int FactionId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class JailReleasePoint
|
||||
{
|
||||
public Vector3 Position { get; set; }
|
||||
}
|
||||
public class ElevatorPoint
|
||||
{
|
||||
public Vector3 Position { get; set; }
|
||||
public int FactionId { get; set; }
|
||||
public string Stage { get; set; }
|
||||
}
|
||||
public class DutyPoint
|
||||
{
|
||||
public Vector3 Position { get; set; }
|
||||
public int FactionId { get; set; }
|
||||
}
|
||||
|
||||
public class WeaponPoint
|
||||
{
|
||||
public Vector3 Position { get; set; }
|
||||
public int FactionId { get; set; }
|
||||
}
|
||||
|
||||
public class JailReleasePoint
|
||||
{
|
||||
public Vector3 Position { get; set; }
|
||||
}
|
||||
|
||||
public class ShopPoint
|
||||
{
|
||||
public Vector3 Position { get; set; }
|
||||
public ClotheShop clotheShop { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class ElevatorPoint
|
||||
{
|
||||
public Vector3 Position { get; set; }
|
||||
public int FactionId { get; set; }
|
||||
public string Stage { get; set; }
|
||||
}
|
||||
|
||||
|
||||
51
ReallifeGamemode.Server/Managers/ShopManager.cs
Normal file
51
ReallifeGamemode.Server/Managers/ShopManager.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using GTANetworkAPI;
|
||||
using ReallifeGamemode.Database.Entities.Saves;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
using ReallifeGamemode.Server.Shop.Clothing;
|
||||
|
||||
namespace ReallifeGamemode.Server.Managers
|
||||
{
|
||||
public class ShopManager
|
||||
{
|
||||
|
||||
public static List<ClotheShop> clotheStores = new List<ClotheShop>();
|
||||
|
||||
public static void LoadClotheShops()
|
||||
{
|
||||
using(var dbContext = new DatabaseContext())
|
||||
{
|
||||
List<SavedBlip> discount = dbContext.Blips.ToList().FindAll(s => s.Name == "Binco" || s.Name == "Discount Store");
|
||||
List<SavedBlip> midclass = dbContext.Blips.ToList().FindAll(s => s.Name == "Suburban");
|
||||
List<SavedBlip> luxury = dbContext.Blips.ToList().FindAll(s => s.Name == "Ponsonbys");
|
||||
|
||||
foreach(var store in discount) {
|
||||
Vector3 pos = new Vector3(store.PositionX, store.PositionY, store.PositionZ);
|
||||
ClotheShop newShop = new ClotheShop(1, pos);
|
||||
clotheStores.Add(newShop);
|
||||
NAPI.Util.ConsoleOutput($"Loading ClotheShop {store.Name}");
|
||||
}
|
||||
foreach(var store in midclass)
|
||||
{
|
||||
Vector3 pos = new Vector3(store.PositionX, store.PositionY, store.PositionZ);
|
||||
ClotheShop newShop = new ClotheShop(2, pos);
|
||||
clotheStores.Add(newShop);
|
||||
NAPI.Util.ConsoleOutput($"Loading ClotheShop {store.Name}");
|
||||
}
|
||||
foreach (var store in luxury)
|
||||
{
|
||||
Vector3 pos = new Vector3(store.PositionX, store.PositionY, store.PositionZ);
|
||||
ClotheShop newShop = new ClotheShop(2, pos);
|
||||
clotheStores.Add(newShop);
|
||||
NAPI.Util.ConsoleOutput($"Loading ClotheShop {store.Name}");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user