you can make something like this:
-- movement --
<movevent type="StepIn" actionid="12" event="script" value="example.lua"/>
-- script example.lua
function onStepIn(cid, item, frompos, item2, topos)
local timeToPass = 24 * 60 * 60 -- this mean 24 sec * 60 means minutes * 60 means hours
local storage = 12 -- or whatever storage you want
local destination = {x=x,y=y,z=z} -- put the destination what you want
if(not isPlayer(cid))then
return false
end
if(getPlayerStorageValue(cid, storage) < 0)then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Welcome!')
doTelepotThing(cid, destination)
doPlayerSetStorageValue(cid, storage, os.time())
elseif(os.time() - getPlayerStorageValue(cid, storage) >= timeToPass and item.actionid == 12)then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Welcome!')
doTelepotThing(cid, destination)
doPlayerSetStorageValue(cid, storage, os.time())
elseif(getPlayerStorageValue(cid, storage) > 0 and os.time() - getPlayerStorageValue(cid, storage) <= timeToPass and item.actionid == 12)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'You need to wait 24 hours to pass again!')
end
return true
end
-- Movement --
i hope it works 4 u