já sei porque está acontecendo isso e é bem simples, o seu script já veio com a função errada.
sabe essa linha:
doTeleportThing(cid, fromPosition, false)
vc tem que colocar true.
doTeleportThing(cid, fromPosition, true)
ai ai, nem reparei nisso.
local tp_mineracao = {x = 2848, y = 2871, z = 8}
local areasMineracao = {
{{x = 2803, y = 2861, z = 8}, {x = 2864, y = 2896, z = 8}},
{{x = 2799, y = 2864, z = 9}, {x = 2869, y = 2903, z = 9}},
{{x = 2802, y = 2876, z = 10}, {x = 2894, y = 2923, z = 10}}
}
function onStepIn(cid, item, position, fromPosition, toPosition)
local max, ret = 3,0 -- 3 por account
if not isPlayer(cid) then
return true
end
for _, v in pairs(areasMineracao) do
for _, pid in pairs(getPlayersOnline()) do
if (getPlayerIp(pid) == getPlayerIp(cid) and isInRange(getThingPos(pid), v[1], v[2])) then
ret = ret+1
end
end
end
if ret > max then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Só é permitido "..max.." jogadores por IP na mineração.")
doTeleportThing(cid, fromPosition, true)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
return true
end
doTeleportThing(cid, tp_mineracao, false)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
setPlayerStorageValue(cid, 45393, 1)
return true
end