Fixed an issue with /item

This commit is contained in:
Deathmax 2011-06-02 22:55:15 +08:00
parent 00ce4ff2c4
commit 098841e7e9
2 changed files with 6 additions and 6 deletions

View file

@ -51,6 +51,7 @@ namespace TShockAPI
TShock.admincommandList.Add("time", new CommandDelegate(Time));
TShock.admincommandList.Add("kill", new CommandDelegate(Kill));
TShock.admincommandList.Add("help", new CommandDelegate(Help));
TShock.admincommandList.Add("slap", new CommandDelegate(Slap));
TShock.commandList.Add("help", new CommandDelegate(Help));
TShock.commandList.Add("kill", new CommandDelegate(Kill));
}
@ -266,9 +267,9 @@ namespace TShockAPI
flag = true;
break;
}
if (!flag)
Tools.SendMessage(args.PlayerID, "You don't have free slots!", new float[] { 255f, 0f, 0f });
}
if (!flag)
Tools.SendMessage(args.PlayerID, "You don't have free slots!", new float[] { 255f, 0f, 0f });
}
else
Tools.SendMessage(args.PlayerID, "Invalid item type!", new float[] { 255f, 0f, 0f });
@ -452,18 +453,19 @@ namespace TShockAPI
{
int player = -1;
player = Tools.FindPlayer((msgargs[1].TrimEnd('"')).TrimStart('"'));
//Main.player[player].KillMe(99999, 1);
Tools.SendMessage(args.PlayerID, "You just killed " + Tools.FindPlayer(player) + "!");
Tools.SendMessage(player, Tools.FindPlayer(args.PlayerID) + " just killed you!");
TShock.KillMe(player);
}
else
{
//Main.player[args.PlayerID].KillMe(99999, 1);
Tools.SendMessage(args.PlayerID, "You just suicided.");
TShock.KillMe(args.PlayerID);
}
}
public static void Slap(CommandArgs args)
{
}
#endregion
}
}

View file

@ -210,8 +210,6 @@ namespace TShockAPI
int x = (int)Main.player[ply].position.X;
int y = (int)Main.player[ply].position.Y;
//if (Tools.IsAdmin(ply))
//{
if (msg.StartsWith("/"))
{
Commands.CommandArgs args = new Commands.CommandArgs(msg, x, y, ply);