Postado Dezembro 20, 2016 8 anos Qual versão? @This life is filled with hurt When happiness doesn't work Trust me and take my hand When the lights go out you will understand
Postado Dezembro 20, 2016 8 anos tenta trocar essa parte : local text = "O server será salvo em alguns minutos, pode haver um pequeno travamento!" por esta: local text ="O server será salvo em ((config.broadcast)/60) minutos, poder haver um pequeno travamento!" e swallow em yes to me batendo aqui . tenta a opçao acima. amanha em meu pc tenho script de server salver com time, ai eu edito ok? . essa funçao ai de cima ta meio complicada de entender. Amanha então Editado Dezembro 20, 2016 8 anos por lucasvtr1 (veja o histórico de edições)
Postado Dezembro 20, 2016 8 anos Use este código: local config = { broadcast = {120, 30}, flags = 13, delay = 120, events = 30 } local function executeSave(seconds) if(isInArray(config.broadcast, seconds)) then doBroadcastMessage("[Server]: Server save within " .. seconds .. " seconds, please mind it may freeze!", MESSAGE_STATUS_CONSOLE_BLUE) end if(seconds > 0) then addEvent(executeSave, config.events * 1000, seconds - config.events) else doSaveServer(config.flags) doBroadcastMessage("[Server]: Server save completed.", MESSAGE_STATUS_CONSOLE_BLUE) end end function onThink(interval) if(table.maxn(config.broadcast) == 0) then doSaveServer(config.flags) else executeSave(config.delay) end return true end @This life is filled with hurt When happiness doesn't work Trust me and take my hand When the lights go out you will understand
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.