Page 1 of 1

/invisible - Zombie Survival Command.

PostPosted: 19 Feb 2014, 05:41
by Leeizazombie
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 :!: