Fixed /goto and /gethere
This commit is contained in:
@@ -104,6 +104,8 @@ namespace reallife_gamemode.Server.Commands
|
|||||||
ChatService.PlayerNotFound(player);
|
ChatService.PlayerNotFound(player);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
player.Position = target.Position;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Command("gotoxyz", "~m~Benutzung: ~s~/gotoxyz [X] [Y] [Z]")]
|
[Command("gotoxyz", "~m~Benutzung: ~s~/gotoxyz [X] [Y] [Z]")]
|
||||||
@@ -118,6 +120,26 @@ namespace reallife_gamemode.Server.Commands
|
|||||||
player.Position = new Vector3(x, y, z);
|
player.Position = new Vector3(x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Command("gethere", "~m~Benutzung: ~s~/goto [Name]")]
|
||||||
|
public void CmdAdminGethere(Client player, string name)
|
||||||
|
{
|
||||||
|
if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true)
|
||||||
|
{
|
||||||
|
ChatService.NotAuthorized(player);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Client target = ClientService.GetClientByName(name);
|
||||||
|
|
||||||
|
if (target == null)
|
||||||
|
{
|
||||||
|
ChatService.PlayerNotFound(player);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
target.Position = player.Position;
|
||||||
|
}
|
||||||
|
|
||||||
[Command("ipl", "~m~Benutzung: ~s~/ipl [Load / Remove] [Name]")]
|
[Command("ipl", "~m~Benutzung: ~s~/ipl [Load / Remove] [Name]")]
|
||||||
public void CmdAdminIpl(Client player, string option, string name)
|
public void CmdAdminIpl(Client player, string option, string name)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user