diff --git a/Server/Commands/Admin.cs b/Server/Commands/Admin.cs index 2c2e54f0..30c34f08 100644 --- a/Server/Commands/Admin.cs +++ b/Server/Commands/Admin.cs @@ -660,7 +660,19 @@ namespace reallife_gamemode.Server.Commands } else { - SaveManager.SaveGotoPoint(player, description); + using (var dbContext = new DatabaseContext()) + { + Entities.GotoPoint p = dbContext.GotoPoints.FirstOrDefault(x => x.Description == description); + if(p == null) + { + SaveManager.SaveGotoPoint(player, description); + } + else + { + player.SendChatMessage("Einen Goto-Punkt mit dieser Bezeichnung gibt es schon!"); + } + } + } break; diff --git a/Server/Entities/ShopVehicles.cs b/Server/Entities/ShopVehicles.cs index dc09afe8..6dad3f85 100644 --- a/Server/Entities/ShopVehicles.cs +++ b/Server/Entities/ShopVehicles.cs @@ -21,7 +21,7 @@ namespace reallife_gamemode.Server.Entities public int Id { get; set; } [ForeignKey("Shop")] - public int ShopId { get; set; } + public int? ShopId { get; set; } public Shop Shop { get; set; } public VehicleHash Model { get; set; }