function teleportToPlayer()
local tSay = {}
local oldPlayerIndex = PlayerIndex;
local totalOnlinePlayers = 0;
local player = FirstPlayer()
while (player > 0) do
if player ~= oldPlayerIndex then
totalOnlinePlayers = totalOnlinePlayers + 1;
PlayerIndex = player;
tinsert(tSay,""..GetName().."/#reallyTeleportToPlayer("..player..")");
end
player = NextPlayer(player)
end
PlayerIndex = oldPlayerIndex;
tinsert(tSay, "T¹i h¹ chØ xem qua th«i/nothing");
Say(g_szTitle.."Found ".. totalOnlinePlayers .." players online. Who do you want to get to?", getn(tSay), tSay);
end
function reallyTeleportToPlayer(playerIndex)
local mapId, nX, nY = gf_GetWorldPos(playerIndex);
NewWorld(mapId, nX, nY);
end
function summonPlayer()
local tSay = {}
local oldPlayerIndex = PlayerIndex;
local totalOnlinePlayers = 0;
local player = FirstPlayer()
while (player > 0) do
if player ~= oldPlayerIndex then
totalOnlinePlayers = totalOnlinePlayers + 1;
PlayerIndex = player;
tinsert(tSay,""..GetName().."/#reallySummonPlayer("..player..")");
-- tinsert(tSay, format("%s/reallySummonPlayer", GetName()))
end
player = NextPlayer(player)
end
PlayerIndex = oldPlayerIndex;
tinsert(tSay, "T¹i h¹ chØ xem qua th«i/nothing");
Say(g_szTitle.."Found ".. totalOnlinePlayers .." players online. Who do you want to summon?", getn(tSay), tSay);
end
function reallySummonPlayer(playerIndex)
-- Msg2Player(playerIndex);
local mapId, nX, nY = GetWorldPos();
local oldPlayerIndex = PlayerIndex;
PlayerIndex = playerIndex or PlayerIndex;
NewWorld(mapId, nX, nY);
PlayerIndex = oldPlayerIndex;
end