Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado
local function getPlayerInArea(fromPos, toPos)
local online = getPlayersOnline()
local players = {}
	for i=1, #online do
		if isInArea(getPlayerPosition(online[i]), fromPos, toPos) then
			players[#players+1] = online[i]
		end
	end
	return players
end

function onStepIn(cid, position, fromPostion, toPosition)

local fromPos = {x =1000, y =1000, z =7} -- Posição da área (de)
local toPos = {x =2000, y =2000, z =7} -- Posição da área (até)
local actionID = 2520 -- Action ID que você colocará no Teleporte

local players = getPlayerInArea(fromPos, toPos)
if isPlayer(cid) then
	if item.actionid == actionID then
		if #players > 1 then
			doTeleportThing(cid, fromPosition)
		end
	end
end
	return true
end

Bem, tenta esse... se houver algum erro no distro, printa, e me mande. Bote da forma que eu coloquei.

"A alma permanece em suas criações" V89E5aN.png


142c9d3439.jpg
(Não dou suporte por mensagem privada.)

  • Respostas 10
  • Visualizações 676
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Jamison Collins
    Jamison Collins

    local function getPlayerInArea(fromPos, toPos) local online = getPlayersOnline() local players = {} for i=1, #online do if isInArea(getPlayerPosition(online[i]), fromPos, toPos) then players[#pl

  • Jamison Collins
    Jamison Collins

    local function getPlayerInArea(fromPos, toPos) local online = getPlayersOnline() local players = {} for i=1, #online do if isInArea(getPlayerPosition(online[i]), fromPos, toPos) then players[#pl

Postado
  • Autor
local function getPlayerInArea(fromPos, toPos)
local online = getPlayersOnline()
local players = {}
	for i=1, #online do
		if isInArea(getPlayerPosition(online[i]), fromPos, toPos) then
			players[#players+1] = online[i]
		end
	end
	return players
end

function onStepIn(cid, position, fromPostion, toPosition)

local fromPos = {x =1000, y =1000, z =7} -- Posição da área (de)
local toPos = {x =2000, y =2000, z =7} -- Posição da área (até)
local actionID = 2520 -- Action ID que você colocará no Teleporte

local players = getPlayerInArea(fromPos, toPos)
if isPlayer(cid) then
	if item.actionid == actionID then
		if #players > 1 then
			doTeleportThing(cid, fromPosition)
		end
	end
end
	return true
end

Bem, tenta esse... se houver algum erro no distro, printa, e me mande. Bote da forma que eu coloquei.

 

 

Testei, não deu também, sem erros na distro.

Postado
local function getPlayerInArea(fromPos, toPos)
local online = getPlayersOnline()
local players = {}
	for i=1, #online do
		if isInArea(getPlayerPosition(online[i]), fromPos, toPos) then
			players[#players+1] = online[i]
		end
	end
	return players
end

function onStepIn(cid, position, fromPostion, toPosition)

local teleportPos = {x = 3000, y = 3000, z = 7}

local fromPos = {x =1000, y =1000, z =7} -- Posição da área (de)
local toPos = {x =2000, y =2000, z =7} -- Posição da área (até)
local actionID = 2520 -- Action ID que você colocará no Teleporte

local players = getPlayerInArea(fromPos, toPos)
if isPlayer(cid) then
	if item.actionid == actionID then
		if #players > 1 then
			doTeleportThing(cid, fromPosition)
                else
                        doTeleportThing(cid, teleportPos)
		end
	end
end
	return true
end

Bem, configure a posição do "teleportPos" para posição que o teleport deverá levar, que eu adicionei no Script...

E não se esqueça de remover as posições do Teleport configurada no Map editor!

"A alma permanece em suas criações" V89E5aN.png


142c9d3439.jpg
(Não dou suporte por mensagem privada.)

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo