From 54705c4b25250c9084cfec7932afb059de83837b Mon Sep 17 00:00:00 2001 From: Luke Date: Fri, 2 Jul 2021 14:58:49 +0200 Subject: [PATCH] tp befehle mit dimension --- .../Commands/AdminCommands.cs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 22377498..4b9907d9 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -432,13 +432,20 @@ namespace ReallifeGamemode.Server.Commands ChatService.PlayerNotFound(player); return; } + //TODO: Als Supporter nur, wenn mit dem Ziel ein offenes Ticket besteht. Ansonsten kein Teleport if (player.IsInVehicle && player.VehicleSeat == 0) { player.Vehicle.Position = target.Position; + player.Vehicle.Dimension = target.Dimension; NAPI.Entity.SetEntityVelocity(player.Vehicle, new Vector3()); } - else player.SafeTeleport(target.Position); + else + { + player.SafeTeleport(target.Position); + player.Dimension = target.Dimension; + } + ChatService.SendMessage(player, "~c~* Du hast dich teleportiert."); } @@ -462,9 +469,14 @@ namespace ReallifeGamemode.Server.Commands if (target.IsInVehicle && target.VehicleSeat == 0) { target.Vehicle.Position = player.Position; + target.Vehicle.Dimension = player.Dimension; NAPI.Entity.SetEntityVelocity(target.Vehicle, new Vector3()); } - else target.SafeTeleport(player.Position); + else + { + target.SafeTeleport(player.Position); + target.Dimension = player.Dimension; + } ChatService.SendMessage(target, "~c~* Du wurdest teleportiert."); } @@ -1150,6 +1162,7 @@ namespace ReallifeGamemode.Server.Commands } player.SafeTeleport(v.Position.Add(new Vector3(0, 0, 2))); + player.Dimension = v.Dimension; } [Command("ghv", "~m~Benutzung: ~s~/ghv [Fahrzeug ID]")] @@ -1169,6 +1182,7 @@ namespace ReallifeGamemode.Server.Commands } v.Position = player.Position; + v.Dimension = player.Dimension; player.SafeTeleport(player.Position.Add(new Vector3(0, 0, 2))); }