Add /mark & /gotomark

This commit is contained in:
VegaZ
2018-10-19 16:13:39 +02:00
parent 1ada79ba73
commit 3432b46d05

View File

@@ -1306,6 +1306,27 @@ namespace reallife_gamemode.Server.Commands
} }
player.SendChatMessage(gotoString); player.SendChatMessage(gotoString);
} }
[Command("mark")]
public void CmdAdminMark(Client player)
{
if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true)
{
ChatService.NotAuthorized(player);
return;
}
player.SetData("mark", player.Position);
player.SendNotification("~y~Mark ~s~gespeichert", true);
}
[Command("gotomark")]
public void CmdAdminGotoMark(Client player)
{
if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true)
{
ChatService.NotAuthorized(player);
return;
}
player.Position = player.GetData("mark");
}
[Command("saveall")] [Command("saveall")]
public void SaveAll(Client player) public void SaveAll(Client player)
{ {