/invisible - Zombie Survival Command.

/invisible - Zombie Survival Command.

Postby Leeizazombie » 19 Feb 2014, 05:41

Hello guys, I made temporary invisibility command for humans, the default price is 50 Server Money, and the invisibility lasts 10 seconds, it's simple to modify, if any problem, just ask! ;)

Note: Zombies cannot use this command, humans must still avoid contact with zombies while invisible and low connection speed will make you suffer in this command when you become visible (Teleport lag).

Use: /invisible
Shortcut: /w

Enjoy!!

Code:

Code: Select all
using System;
using System.Threading;

namespace MCDzienny
{
    public class CmdInvisible : Command
    {
        public override string name { get { return "invisible"; } }
        public override string shortcut { get { return "w"; } }
        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)
        {
            if (p.isZombie)
            {
                Player.SendMessage(p, Server.DefaultColor + " you cannot use this command as a zombie!");
                return;
            }

            int playermoney = p.money;

            if (playermoney >= 50)
            {
                p.money = p.money - 50;
                Player.GlobalDie(p, true);
                p.hidden = true;
                Player.GlobalMessage(p.color + p.PublicName + Server.DefaultColor + " has disapeared!");
                Thread.Sleep(10000);
                Player.GlobalSpawn(p, p.pos[0], p.pos[1], p.pos[2], p.rot[0], p.rot[1], true);
                p.hidden = false;
                Player.SendMessage(p, Server.DefaultColor + "You are now visible.");
               
            }
        }

        public override void Help(Player p)
        {
            Player.SendMessage(p, "/invisible - costs 50 " + Server.moneys + ", it will make you invisible for 10 seconds.");
        }
    }
}


As featured on [New] ZOMBIE SURVIVAL :!:
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