/fliphead <player>

/fliphead <player>

Postby Leeizazombie » 28 Jul 2013, 01:43

So this command lets you flip an individuals head instead of fliping all heads in the server, I found out how to make this by looking through the /flipheads code.

Code: Select all
using System;

namespace MCDzienny
{
   public class CmdFliphead : Command
   {
      public override string name { get { return "fliphead"; } }
      public override string shortcut { get { return "fh"; } }
      public override string type { get { return "other"; } }
      public override bool museumUsable { get { return true; } }
      public override LevelPermission defaultRank { get { return LevelPermission.Operator; } }
        public override void Use(Player p, string message)
        {
            if (String.IsNullOrEmpty(message) || message.IndexOf(' ') != -1) { Help(p); return; }

            Player who = Player.Find(message);

            if (who == null)
            {
                Player.SendMessage(p, "Player could not be found.");
                return;
            }
            {
                who.flipHead = !who.flipHead;
                if (who.flipHead)
                {
                    if (who.flipHead)
                        Player.GlobalMessage(who.color + who.PublicName + "&b had his/her neck broken!");

                    else
                        Player.GlobalMessage(who.color + who.PublicName + "&b had his/her neck fixed");
                }
            }
        }
         
      public override void Help(Player p)
      {
         Player.SendMessage(p, "/fliphead - Makes a players face go upside down. /fliphead Leebyrne115");
      }
   }
}
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.

Re: /fliphead <player>

Postby Clowny » 28 Jul 2013, 02:17

Nice this would be a cool little fun command to play around with :D
Founder Of MC Classic Hosting Community http://mcclassichosting.webs.com
Founder of MC Classic Software MCReborn http://mcreborn.tk
Professional Hoster and Basic C# Coder
Image
User avatar
Clowny
 
Posts: 112
Joined: 14 Jul 2013, 03:53


Return to Custom Commands

Who is online

Users browsing this forum: No registered users and 6 guests

cron