Hey, this command is for my spleef server, can I have some help please from any of you nerds
![Bardzo szczęśliwy :D](./images/smilies/icon_e_biggrin.gif)
, the adminium blocks wont show, if they are supposed to then let me know, could be something wrong with my pc!
- Code: Select all
using System;
using System.Threading;
namespace MCDzienny
{
public class Cmdnuke : Command
{
public override string name { get { return "nuke"; } }
public override string shortcut { get { return ""; } }
public override string type { get { return "other"; } }
public override bool museumUsable { get { return false; } }
public override LevelPermission defaultRank { get { return LevelPermission.Operator; } }
public override void Use(Player p, string message)
{
if (p.money < 500)
{
Player.SendMessage(p, "You need more spleef tokens!");
}
else
{
p.money = p.money - 500;
Thread.Sleep(1000);
Command.all.Find("ht").Use(p, p.color + p.name + " %ahas called a nuke!");
Thread.Sleep(2000);
Command.all.Find("ht").Use(p, "");
Player.players.ForEach(delegate(Player who)
{
if (who == p)
{
Player.SendMessage(p, "You now have " + p.money + " " + Server.moneys + " left");
}
else
{
if (who.hidden == true)
{
Player.SendMessage(who, "Your invisible powers protected you from the nuke, lucky!");
}
else
{
if (p.level == who.level)
{
p.level.MakeExplosion((ushort)(who.pos[0] / 32), (ushort)(who.pos[1] / 32), (ushort)(who.pos[2] / 32), (byte)7);
}
else
{
Player.SendMessage(who, "The nuke didnt reach you, lucky son of a bitch!");
}
}
}
});
}
}
public override void Help(Player p)
{
Player.SendMessage(p, "/nuke - Nukes people within the nuke callers radius!");
}
}
}