local toPos = {x = 1029, y = 910, z = 4} --pos para onde o player vai ser teleportado
local tempo = 5 --tempo q ele vai ficar la... em segs
local pos = getPlayerPosition(itemEx.uid)
local function teleport(cid, pos)
if isCreature(itemEx.uid) then
doSendMagicEffect(pos, 21)
doTeleportThing(itemEx.uid, pos, false)
end
end
function onUse(cid, Item, fromPosition, itemEx, toPosition)
doTeleportThing(itemEx.uid, toPos, false)
doSendMagicEffect(pos, 21)
addEvent(teleport, tempo*1000, itemEx.uid, pos)
return true
end




info
Grupo: Artesão
Registrado: 31/12/10
Posts: 136
Reputação: +1
precisso modificar essa actions , Eu quero que ela funcione da seguinte maneira
se eu usar ela em algum player ele é teleportado para z x y e depois de 10 segundos volta de onde tinha saido porem , ela esta com um bug , ao eu usar em alguem ela me teleporta nao a pessoa ... !
me ajudem pf
local toPos = {x = 1029, y = 910, z = 4} --pos para onde o player vai ser teleportado
local tempo = 0 --tempo q ele vai ficar la... em segs
local function teleport(cid, pos)
if isCreature(cid) then
doSendMagicEffect(pos, 21)
doTeleportThing(cid, pos, false)
end
end
function onUse(cid, Item, fromPosition, itemEx, toPosition)
local pos = getPlayerPosition(cid)
doTeleportThing(cid, toPos, false)
doSendMagicEffect(pos, 21)
addEvent(teleport, tempo*1000, cid, pos)
return true
end