diff --git a/Server/Commands/Admin.cs b/Server/Commands/Admin.cs index f31408dd..3c6d03f8 100644 --- a/Server/Commands/Admin.cs +++ b/Server/Commands/Admin.cs @@ -199,7 +199,10 @@ namespace reallife_gamemode.Server.Commands using (var dbContext = new DatabaseContext()) { Entities.GotoPoint p = dbContext.GotoPoints.FirstOrDefault(x => x.Description == location); - player.MovePosition(new Vector3(p.X, p.Y, p.Z), 0); + + if (player.IsInVehicle && player.VehicleSeat == -1) player.Vehicle.Position = new Vector3(p.X, p.Y, p.Z); + else player.Position = new Vector3(p.X, p.Y, p.Z); + } } [Command("gotohelp", "~m~Benutzung: ~s~/gotohelp")] @@ -230,7 +233,8 @@ namespace reallife_gamemode.Server.Commands return; } - player.Position = new Vector3(x, y, z); + if (player.IsInVehicle && player.VehicleSeat == -1) player.Vehicle.Position = new Vector3(x, y, z); + else player.Position = new Vector3(x, y, z); } [Command("gh", "~m~Benutzung: ~s~/gh [Name]")]