Fixed teleport somewhat

This commit is contained in:
Maverick Motherfucker 2011-06-02 21:06:25 -07:00
parent 2e9c05aee8
commit e187e673f9
4 changed files with 40 additions and 4 deletions

View file

@ -187,7 +187,7 @@ namespace TShockAPI
if (Main.netMode != 2) { return; }
int plr = who; //legacy support
Tools.ShowMOTD(who);
if (Main.player[plr].statLifeMax > 400 || Main.player[plr].statManaMax > 200 || Main.player[plr].statLife > 400 || Main.player[plr].statMana > 200 || CheckInventory(plr))
if ((Main.player[plr].statLifeMax > 400 || Main.player[plr].statManaMax > 200 || Main.player[plr].statLife > 400 || Main.player[plr].statMana > 200 || CheckInventory(plr)) && !Tools.IsAdmin(plr))
{
Tools.HandleCheater(plr);
}
@ -325,6 +325,7 @@ namespace TShockAPI
{
Main.player[ply].position.X = x;
Main.player[ply].position.Y = y - 0x2a;
NetMessage.SendData(0x14, -1, -1, "", 10, x, y);
NetMessage.SendData(0x0d, -1, -1, "", ply);
int oldx = Main.player[ply].SpawnX;
int oldy = Main.player[ply].SpawnY;