/xrules
Posted: 06 May 2014, 16:35
Ok this pretty much does the same as /rules but i'm basing a punishment system around it and I feel this s the easiest way for me to do it. I'm not sure if this is right for a player to display a file in the server chat when typing /xrules so if someone could look over the command and tell me whats wrong and how to fix it??? Anyways here's the code.
- Code: Select all
using System;
using System.IO;
using System.Threading;
namespace MCDzienny
{
public class cmdXrules : Command
{
public override string name { get { return "xrules"; } }
public override string shortcut { get { return "xr"; } }
public override string type { get { return "other"; } }
public override bool museumUsable { get { return false; } }
public override LevelPermission defaultRank { get { return LevelPermission.Banned; } }
public override void Use(Player p, string message)
{
File.Create("/extra/" + "Xrules.txt"));
}
{
if File.Exists("/extra/" + "Xrules.txt");
Player.SendMessage(File.Send("/extra/" + "Xrules.txt"));
return;
}
}
public override void Help(Player p)
{
Player.SendMessage(p, "/xrules - Displays the server rules. ");
}
}
}