/clientfreeze

Re: /clientfreeze

Postby leicestercity » 04 May 2014, 16:00

Ok so i found the problems myself as well when it was tested and one more. On classicube it does not work as /clientfreeze because it opens up /client for classicube so i renamed the command /xclientfreeze and the shortcut /xcf. I worked on the problems so if it works please let me know, if not then tell me where i've gone wrong and how to correct it.

Code: Select all
using System;
using System.IO;
using System.Threading;
     
namespace MCDzienny
{
    public class cmdXclientfreeze : Command
    {
        public override string name { get { return "xclientfreeze"; } }
        public override string shortcut { get { return "xcf"; } }
        public override string type { get { return "mod"; } }
        public override bool museumUsable { get { return false; } }
        public override LevelPermission defaultRank { get { return LevelPermission.Advbuilder; } }
        public override void Use(Player p, string message)
        {
        {
        player who = Player.Find(message);
        if (who == null) 
        }
            Player.Sendmessage(p, message + "Player is not online");
         return;
        {   
            Command.all.find("freeze").Use(p, who.name);
            Player.GlobalMessage(who.PublicName + who.color + server.DefaultColor "has been frozen please turn off your hacks");
        }
       }
        public override void Help(Player p)
        {
            Player.SendMessage(p, "/xclientfreeze [Playername] or /xcf [Playername] - Freezes the chosen player and tell them to get off their hacks.");
        }
    }
}
LEICESTER TILL I DIE
leicestercity
 
Posts: 33
Joined: 08 Mar 2014, 16:36

Previous

Return to Custom Commands

Who is online

Users browsing this forum: No registered users and 6 guests