Fix spectate und Movement im Creator geht jez nich mehr

This commit is contained in:
VegaZ
2021-05-04 23:29:21 +02:00
parent 6cf20abb7b
commit 62d283600e
3 changed files with 75 additions and 10 deletions

View File

@@ -1796,14 +1796,23 @@ namespace ReallifeGamemode.Server.Commands
return;
}
Player target;
if (targetname != null)
{
target = PlayerService.GetPlayerByNameOrId(targetname);
if (target == null || !target.IsLoggedIn())
{
ChatService.PlayerNotFound(player);
return;
}
if(target.Name == player.Name)
{
ChatService.ErrorMessage(player, "Du kannst dich nicht selbst spectaten");
return;
}
player.TriggerEvent("SERVER:ADMIN_SPECTATE", target);
}
else