/cmddelete
Posted: 18 Dec 2013, 21:29
Here's just a command to add to the other cmd commands, basically deletes the .cs file so that you can add a new one and compile it over the old .dll.
I hope you find it usefull!
I hope you find it usefull!
- Code: Select all
using System;
using System.IO;
namespace MCDzienny
{
public class CmdCmddel : Command
{
public override string name { get { return "cmddelete"; } }
public override string shortcut { get { return "cmddel"; } }
public override string type { get { return "mod"; } }
public override bool museumUsable { get { return false; } }
public override LevelPermission defaultRank { get { return LevelPermission.Admin; } }
public override void Use(Player p, string message)
{
if (File.Exists("extra/commands/source/Cmd" + message + ".cs"))
{
File.Delete("extra/commands/source/Cmd" + message + ".cs");
Player.SendMessage(p, "%fCmd" + message + ".cs %ewas deleted.");
}
else
{
Player.SendMessage(p, "There is no such command.");
}
}
public override void Help(Player p)
{
Player.SendMessage(p, "/cmddel [command] - Deletes [command].");
}
}
}