/reviewmap (Review my map)

/reviewmap (Review my map)

Postby AFK_Games » 17 Jul 2014, 18:57

This command can be used for freebuild, zombie survival, lava survival etc... Feel free to customize it to your standards, just a very basic command, more advanced commands coming soon :D

Code: Select all
// Basic MCDzienny Namespace Command Generated By "MCDzienny Code Creator"
// Rules When Coding: No Swearing Language, No Racism Or Copyrighted Materials.
// Made By AFK_Games

using System;
using System.IO;
using System.Threading;

namespace MCDzienny
{
   public class CmdReviewMap : Command
   {
      public override string name { get { return "reviewmap"; } }
      public override string shortcut { get { return "rm"; } }
      public override string type { get { return "other"; } }
      public override bool museumUsable { get { return false; } }
      public override LevelPermission defaultRank { get { return LevelPermission.Guest; } }

      public override void Use(Player p, string message)
      {
         Player.GlobalMessage(p.PublicName + p.color + " has requested staff to review his/her map to be reviewed.");
         Player.SendMessage(p, "Thanks for your request, staff should be reviewing your map as soon as possible.");
      }

      public override void Help(Player p)
      {
         Player.SendMessage(p, "/reviewmap or /rm - Tells staff to come and check out their map.");
      }
   }
}
AFK_Games
 
Posts: 21
Joined: 11 Apr 2014, 21:19

Re: /reviewmap (Review my map)

Postby Leeizazombie » 19 Jul 2014, 07:21

Here are some suggestions:

You can use the following message to show messages to operators only:
Code: Select all
Player.GlobalMessageOps("Hello Ops!");


or alternatively you can send a message to all players with a certain permission or higher:

So for example, I made a rank called "HeadOperator" And it has permission 90, but I don't want operators to see the message, so check out the code:
Code: Select all
Player.players.ForEachSync(pl =>
                    {
                        if (pl.group.Permission >= (LevelPermission)90)
                        {
                            pl.SendMessage(message); //Sends the message to each of the players with 90+
                        }
                    });


Hope I helped! ;)
Owner of:
LeeIzaZombie Freebuild and Lava Survival V2 (Shut Down and updated)
LeeIzaZombie Survival (Comming back soon)

Contact:
Skype: leeizazombie
IRC: irc.geekshed.net, #leeizazombie, #mcclassichosting
User avatar
Leeizazombie
 
Posts: 536
Joined: 10 Jun 2013, 17:45
Location: Ireland.


Return to Custom Commands

Who is online

Users browsing this forum: No registered users and 1 guest

cron