From da6d1ba7f6744f84f0988e3f1e7f766b2cfd8376 Mon Sep 17 00:00:00 2001 From: hydrant Date: Sat, 28 Mar 2020 14:13:25 +0100 Subject: [PATCH] Livery bei /vlivery speichern --- ReallifeGamemode.Server/Commands/AdminCommands.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 141e9fd8..3cac2992 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -1307,6 +1307,16 @@ namespace ReallifeGamemode.Server.Commands Vehicle playerVeh = player.Vehicle; playerVeh.Livery = livery; + + using (var dbContext = new DatabaseContext()) + { + ServerVehicle serverVeh = VehicleManager.GetServerVehicleFromVehicle(playerVeh, dbContext); + if (serverVeh != null) + { + serverVeh.Livery = livery; + dbContext.SaveChanges(); + } + } } [Command("vcolor", "~m~Benutzung: ~s~/vcolor [Farb-ID1] [Farb-ID2]")]