- Code:
//this is automatically generated and will be in every cmd you see
using System;
//the namespace is mcforge becuase this is what were making it for
namespace MCForge
{
//ive never touched this its always been generated for me
public class CmdFuck : Command
{
//this tells the server what the cmd name is
public override string name { get { return "fuck"; } }
//this is the shortcut for the cmd
public override string shortcut { get { return "fk"; } }
//this tells the server what help catagory to put it in
public override string type { get { return "other"; } }
//this tells the server if this cmd is allowed to be used well you are in a museum of a map
public override bool museumUsable { get { return false; } }
//this is the level that the cmd is allowed to be used at in this case anyone can use the cmd
public override LevelPermission defaultRank { get { return LevelPermission.Banned; } }
public override void Use(Player p, string message)
{
//this lets you use another persons name in a command if this isnt here you are only able to use the command on urself
Player who = Player.Find(message.Split(' ')[0]);
//this lets the server know that if you mispell or enter the cmd wrong to bring up the /help for it
if (message == "") { Help(p); return; }
//this basically says that if you put in a players name that isnt online it will give you that message
if (who == null) { Player.SendMessage(p, "Could not find player entered"); return; }
//same thing exept if you enter your own name it gives you that message
if (who == p) { Player.SendMessage(p, "Sorry, You can't do this kinda thing to yourself."); return; }
//this is just somthing i added XD i think it explains itself
if (who.name == "C41337") { Player.SendMessage(p, "Bitch please...."); return; }
//the player who and if message stuff you see up there you really dont need but i have added in for the cmd to work properly
{
//now inbetween these 2 brackets here is basically where you would put anything you want to happen when the cmd name is typed
//so for the /fuck cmd this just tells it to say the players name that typed it has fucked the players name that they chose
Player.GlobalMessage(p.color + p.name + Server.DefaultColor + " has fucked " + who.color + who.name);
}
}
public override void Help(Player p)
{
//this is what comes up when the player would type /help fuck
Player.SendMessage(p, "/fuck [Player] - Fucks a player.");
}
}
}
MOVED TO http://1337-servers.proboards.com