Add ItemShop, fix ClotheShop Payment, fix Vehicle Respawn, Add Vehicle Lock from outside
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user