Usa esse
function onLogin(cid)
if getPlayerStorageValue(cid, 12000) - os.time() > 0 then
setPlayerStorageValue(cid, 15000, 1)
end
function remove(cid)
if isPlayer(cid) then
db.executeQuery("UPDATE `players` SET `name` = '"..string.sub(getCreatureName(cid), 7).."' WHERE `id` = "..getPlayerGUID(cid)..";")
doRemoveCreature(cid)
end
end
local pos = {x = 160, y = 50, z = 7} -- posiçao do templo.
if getPlayerStorageValue(cid, 15000) == 1 and getPlayerStorageValue(cid, 12000) - os.time() < 1 or getPlayerStorageValue(cid, 12000) - os.time() == 0 then
doTeleportThing(cid, pos)
doPlayerPopupFYI(cid, "Seu tutor acabou.")
setPlayerStorageValue(cid, 15000, -1)
addEvent(remove, 2*1000, cid)
end
return TRUE
end