Ir para conteúdo

Featured Replies

  • Respostas 19
  • Visualizações 4.2k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Tenta esse : local savingEvent = 0 function onSay(cid, words, param, channel) local tmp = tonumber(param) if(tmp ~= nil) then stopEvent(savingEvent) save(tmp * 60 * 1000) elseif(param:trim()

Postado

Tenta:

 

local config = {
        broadcast = {120, 30},
        flags = 13,
        delay = 120,
        events = 30
}


local function executeSave(seconds)
        if(isInArray(config.broadcast, seconds)) then
                doBroadcastMessage("Server save within " .. seconds .. " seconds, please mind it may freeze!")
        end


        if(seconds > 0) then
                addEvent(executeSave, config.events * 1000, seconds - config.events)
        else
                doSaveServer(config.flags)
        end
end


function onThink(interval)
        if(table.maxn(config.broadcast) == 0) then
                doSaveServer(config.flags)
        else
                executeSave(config.delay)
        end


        return true
end
 

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo