Ir para conteúdo

Featured Replies

Postado
  Em 03/07/2014 em 01:01, ScripterCrazy disse:

Não tem a pasta Save. Até me Enganei, meu SERVER não da SAAVE '-' Por isso que não tinha encontrado, ajuda ae :D

 

Não é necessário ter uma pasta save, ali no caso save.lua é o arquivo do script...

  • Respostas 7
  • Visualizações 4.6k
  • Created
  • Última resposta

Top Posters In This Topic

Postado

Crie em global evento a Tack

<globalevent name="save" interval="9000000" event="script" value="save.lua"/>

Depois um Script com o nome

save

local config = {
broadcast = {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 = "Warning: S"
else
text = "S"
end

text = text .. "erver save within " .. seconds .. " seconds, please mind it may freeze!"
doBroadcastMessage(text)
end

if(seconds > 0) then
addEvent(executeSave, config.events * 1000, 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

TFS 0.4 DEV   | 

 

Ajudei você ? retribua a ajuda com uma Reputação positiva
" Se a sua vida for a melhor coisa que já te aconteceu, acredite, você tem mais sorte do que pode imaginar. "

 

 

 

  • 3 years later...
Postado
  Em 03/07/2014 em 01:05, PriisioneR disse:

Crie em global evento a Tack


<globalevent name="save" interval="9000000" event="script" value="save.lua"/>

Depois um Script com o nome

save


local config = {
broadcast = {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 = "Warning: S"
else
text = "S"
end

text = text .. "erver save within " .. seconds .. " seconds, please mind it may freeze!"
doBroadcastMessage(text)
end

if(seconds > 0) then
addEvent(executeSave, config.events * 1000, 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

 

Quando abro o loader do servidor aparece o seguinte erro:

[Warning - Event: : checkScript] Event onSay not found. scripts/save.lua

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