add adminCMD /anim & add UserCMD /hub

This commit is contained in:
michael.reiswich
2021-03-24 22:53:36 +01:00
parent 41b0cf0ac0
commit c0120bfbf5
12 changed files with 36 additions and 11 deletions

View File

@@ -34,6 +34,20 @@ namespace ReallifeGamemode.Server.Commands
{
#region Todo
[Command("anim", "~m~Benutzung: ~s~/anim [animDict] [animName]")]
public void CmdAnim(Player player, string animDict, string animName)
{
if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true)
{
ChatService.NotAuthorized(player);
return;
}
player.PlayAnimation(animDict, animName, (int)(AnimationFlags.Loop | AnimationFlags.OnlyAnimateUpperBody | AnimationFlags.AllowPlayerControl | AnimationFlags.Cancellable));
}
[Command("eat", "~m~Benutzung: ~s~/eat [Item]")]
public void CmdAdminEat(Player player, string item)
{
@@ -208,7 +222,7 @@ namespace ReallifeGamemode.Server.Commands
#region Support
[Command("tog", "~m~Benutzung: ~s~/tog [Typ = ~g~ip~s~, ~g~deathlogs~s~,~g~lc~s~", GreedyArg = true)]
[Command("tog", "~m~Benutzung: ~s~/tog [Typ = ~g~ip~s~, ~g~deathlogs~s~, ~g~lc~s~", GreedyArg = true)]
public void CmdTog(Player player, string typ, string option1 = null, string option2 = null)
{
if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true)