tp befehle mit dimension
This commit is contained in:
@@ -432,13 +432,20 @@ namespace ReallifeGamemode.Server.Commands
|
|||||||
ChatService.PlayerNotFound(player);
|
ChatService.PlayerNotFound(player);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: Als Supporter nur, wenn mit dem Ziel ein offenes Ticket besteht. Ansonsten kein Teleport
|
//TODO: Als Supporter nur, wenn mit dem Ziel ein offenes Ticket besteht. Ansonsten kein Teleport
|
||||||
if (player.IsInVehicle && player.VehicleSeat == 0)
|
if (player.IsInVehicle && player.VehicleSeat == 0)
|
||||||
{
|
{
|
||||||
player.Vehicle.Position = target.Position;
|
player.Vehicle.Position = target.Position;
|
||||||
|
player.Vehicle.Dimension = target.Dimension;
|
||||||
NAPI.Entity.SetEntityVelocity(player.Vehicle, new Vector3());
|
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.");
|
ChatService.SendMessage(player, "~c~* Du hast dich teleportiert.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -462,9 +469,14 @@ namespace ReallifeGamemode.Server.Commands
|
|||||||
if (target.IsInVehicle && target.VehicleSeat == 0)
|
if (target.IsInVehicle && target.VehicleSeat == 0)
|
||||||
{
|
{
|
||||||
target.Vehicle.Position = player.Position;
|
target.Vehicle.Position = player.Position;
|
||||||
|
target.Vehicle.Dimension = player.Dimension;
|
||||||
NAPI.Entity.SetEntityVelocity(target.Vehicle, new Vector3());
|
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.");
|
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.SafeTeleport(v.Position.Add(new Vector3(0, 0, 2)));
|
||||||
|
player.Dimension = v.Dimension;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Command("ghv", "~m~Benutzung: ~s~/ghv [Fahrzeug ID]")]
|
[Command("ghv", "~m~Benutzung: ~s~/ghv [Fahrzeug ID]")]
|
||||||
@@ -1169,6 +1182,7 @@ namespace ReallifeGamemode.Server.Commands
|
|||||||
}
|
}
|
||||||
|
|
||||||
v.Position = player.Position;
|
v.Position = player.Position;
|
||||||
|
v.Dimension = player.Dimension;
|
||||||
player.SafeTeleport(player.Position.Add(new Vector3(0, 0, 2)));
|
player.SafeTeleport(player.Position.Add(new Vector3(0, 0, 2)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user