then it removeobject =player, when i teleport command again it gose correct zone like in pictures
the code is bellow but what code do i add to make it teleport twice with a waiting period till it shows the removeobject on console screen then teleport 2nd time ?
static public List<GmCommandHandler> BaseCommand = new List<GmCommandHandler>()
{
new GmCommandHandler("info",Info, null, 1, 0, "Info of selected target"),
new GmCommandHandler("invinsible",Invinsible, null, 1, 0, "Set target invinsible"),
new GmCommandHandler("save",Save, null, 1, 0, "Save target"),
new GmCommandHandler("gps",Gps, null, 1, 0, "Print your position"),
new GmCommandHandler("kill",Kill, null, 1, 0, "Kill target"),
new GmCommandHandler("revive",Revive, null, 1, 0, "Rez target Unit"),
new GmCommandHandler("teleport",null, TeleportCommands, 1, 0, "Teleport commands"),
new GmCommandHandler("gmmode",GmMode, null, 1, 0, "Set Invisible / Invinsible"),
- Code: Select all
#region Teleport static public bool TeleportMap(Player Plr, ref List<string> Values) { int ZoneID = GetInt(ref Values); int WorldX = GetInt(ref Values); int WorldY = GetInt(ref Values); int WorldZ = GetInt(ref Values); Plr.Teleport((UInt16)ZoneID, (uint)WorldX, (uint)WorldY, (UInt16)WorldZ, 0); GMCommandLog Log = new GMCommandLog(); Log.PlayerName = Plr.Name; Log.AccountId = (uint)Plr.Client._Account.AccountId; Log.Command = "TELEPORT TO " + ZoneID + " " + WorldX + " " + WorldY; Log.Date = DateTime.Now; WorldMgr.Database.AddObject(Log); return true; } static public bool TeleportAppear(Player Plr, ref List<string> Values) { string PlayerName = GetString(ref Values); Player Target = Player.GetPlayer(PlayerName); if (Target == null) { Plr.SendMessage(0, "Server", "Player not found :" + PlayerName, SystemData.ChatLogFilters.CHATLOGFILTERS_SHOUT); return false; } if (Target.Zone == null) return false; Plr.Teleport(Target.Zone, (uint)Target.WorldPosition.X, (uint)Target.WorldPosition.Y, (UInt16)Target.WorldPosition.Z, 0); GMCommandLog Log = new GMCommandLog(); Log.PlayerName = Plr.Name; Log.AccountId = (uint)Plr.Client._Account.AccountId; Log.Command = "APPEAR PLAYER " + Target.Name + " TO " + Target.Zone.ZoneId + " " + Target._Value.WorldX + " " + Target._Value.WorldY; Log.Date = DateTime.Now; WorldMgr.Database.AddObject(Log); return true; } static public bool TeleportSummon(Player Plr, ref List<string> Values) { string PlayerName = GetString(ref Values); Player Target = Player.GetPlayer(PlayerName); if (Target == null) { Plr.SendMessage(0, "Server", "Player not found :" + PlayerName, SystemData.ChatLogFilters.CHATLOGFILTERS_SHOUT); return false; } Target.Teleport(Plr.Zone, (uint)Plr.WorldPosition.X, (uint)Plr.WorldPosition.Y, (UInt16)Plr.WorldPosition.Z, 0); GMCommandLog Log = new GMCommandLog(); Log.PlayerName = Plr.Name; Log.AccountId = (uint)Plr.Client._Account.AccountId; Log.Command = "SUMMON PLAYER " + Target.Name + " TO " + Plr.Zone.ZoneId + " " + Plr._Value.WorldX + " " + Plr._Value.WorldY; Log.Date = DateTime.Now; WorldMgr.Database.AddObject(Log); return true;