Ir para conteúdo

Featured Replies

  • Respostas 30
  • Visualizações 1.9k
  • Created
  • Última resposta

Top Posters In This Topic

Postado
  • Autor
local config = {
broadcast = {120, 30},
shallow = "no",
delay = 120,
events = 30
}
 
config.shallow = getBooleanFromString(config.shallow)
 
local function executeSave(seconds)
if(isInArray(config.broadcast, seconds)) then
local text = ""
if(not config.shallow) then
text = "Full s"
else
text = "S"
end
 
text = text .. "erver Vai Ser Salvo Em " .. seconds .. " Seg, Save Server!"
doBroadcastMessage(text)
end
 
if(seconds > 0) then
addEvent(executeSave, config.events * 1, seconds - config.events)
else
doSaveServer(config.shallow)
end
end
 
function onThink(interval, lastExecution, thinkInterval)
if(table.maxn(config.broadcast) == 0) then
doSaveServer(config.shallow)
else
executeSave(config.delay)
end
 
return true
end
Postado

Tenta mudar para este :

local savingEvent = 0

function onSay(cid, words, param, channel)
	if(isNumber(param)) then
		stopEvent(savingEvent)
		save(tonumber(param) * 60 * 1000)
	else
		doSaveServer()
	end
	return true
end

function save(delay)
	doSaveServer()
	if(delay > 0) then
		savingEvent = addEvent(save, delay, delay)
	end
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.6k

Informação Importante

Confirmação de Termo