Add ItemShop, fix ClotheShop Payment, fix Vehicle Respawn, Add Vehicle Lock from outside

This commit is contained in:
Siga
2020-02-03 18:13:10 +01:00
parent be6ef1cf1c
commit 154b0ca0fe
42 changed files with 1920 additions and 50 deletions

View File

@@ -6,6 +6,7 @@ using GTANetworkAPI;
using ReallifeGamemode.Database.Entities.Saves;
using ReallifeGamemode.Database.Models;
using ReallifeGamemode.Server.Shop.Clothing;
using ReallifeGamemode.Server.Shop.SevenEleven;
namespace ReallifeGamemode.Server.Managers
{
@@ -13,6 +14,7 @@ namespace ReallifeGamemode.Server.Managers
{
public static List<ClotheShop> clotheStores = new List<ClotheShop>();
public static List<ItemShop> itemShops = new List<ItemShop>();
public static void LoadClotheShops()
{
@@ -42,10 +44,26 @@ namespace ReallifeGamemode.Server.Managers
clotheStores.Add(newShop);
NAPI.Util.ConsoleOutput($"Loading ClotheShop {store.Name}");
}
}
}
public static void LoadItemShops()
{
using(var dbContext = new DatabaseContext())
{
int id = 0;
List<SavedBlip> shops = dbContext.Blips.ToList().FindAll(s => s.Name == "24/7");
foreach(var store in shops)
{
Vector3 pos = new Vector3(store.PositionX, store.PositionY, store.PositionZ);
ItemShop newShop = new ItemShop(pos, id);
itemShops.Add(newShop);
id++;
}
NAPI.Util.ConsoleOutput($"Loaded {itemShops.Count}x 24/7");
}
}
}
}