This commit is contained in:
hydrant
2018-10-15 19:29:37 +02:00
2 changed files with 14 additions and 2 deletions

View File

@@ -660,7 +660,19 @@ namespace reallife_gamemode.Server.Commands
} }
else 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; break;

View File

@@ -21,7 +21,7 @@ namespace reallife_gamemode.Server.Entities
public int Id { get; set; } public int Id { get; set; }
[ForeignKey("Shop")] [ForeignKey("Shop")]
public int ShopId { get; set; } public int? ShopId { get; set; }
public Shop Shop { get; set; } public Shop Shop { get; set; }
public VehicleHash Model { get; set; } public VehicleHash Model { get; set; }