From 3b3fea3d4000b837e813a2f0a4c7ae29a120ec6f Mon Sep 17 00:00:00 2001 From: xSprite Date: Wed, 17 Oct 2018 13:32:52 +0200 Subject: [PATCH] C:/Program Files/Git/goto in car --- Server/Commands/Admin.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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]")]