Tenta:
local config = {
soundName = "sounds/Centralplains.wav",
tileId = 103,
storage = 55000,
}
function onStepIn(cid, item, pos, fromPos)
if not isPlayer(cid) then return true end
if getPlayerStorageValue(cid, config.storage) < 1 then
if getPlayerStorageValue(cid, 91821) > os.time() then
return setPlayerStorageValue(cid,config.storage,1)
else
doPlayerSendTextMessage(cid, 26, config.soundName)
setPlayerStorageValue(cid, config.storage, 1)
setPlayerStorageValue(cid, 91821, os.time() + 118)
end
end
return true
end
function onStepOut(cid, item, position, fromPosition)
if not isPlayer(cid) then return true end
if getPlayerStorageValue(cid, config.storage) == 1 and getTileItemById(position, config.tileId).uid <= 0 then
setPlayerStorageValue(cid, config.storage, -1)
end
return true
end