add adminCMD /anim & add UserCMD /hub
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -189,7 +189,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
|
||||
NAPI.Pools.GetAllPlayers().ForEach(p =>
|
||||
{
|
||||
if (p.GetUser()?.FactionLeader ?? false || player.HasData("toglc")) ChatService.SendMessage(p, broadcastMsg);
|
||||
if (p.GetUser()?.FactionLeader ?? false) ChatService.SendMessage(p, broadcastMsg);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -81,6 +81,17 @@ namespace ReallifeGamemode.Server.Commands
|
||||
{
|
||||
player.TriggerEvent("showUserhelp");
|
||||
}
|
||||
|
||||
[Command("hub")]
|
||||
public void CmdAnim(Player player)
|
||||
{
|
||||
if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true)
|
||||
{
|
||||
ChatService.NotAuthorized(player);
|
||||
return;
|
||||
}
|
||||
player.PlayAnimation("mp_am_hold_up", "handsup_base", (int)(AnimationFlags.Loop | AnimationFlags.OnlyAnimateUpperBody | AnimationFlags.AllowPlayerControl | AnimationFlags.Cancellable));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user