Ir para conteúdo
  • Cadastre-se

Posts Recomendados

  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

Mostrar mais  

 

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

Link para o post
Compartilhar em outros sites
  • Respostas 7
  • Created
  • Última resposta

Top Posters In This Topic

Top Posters In This Topic

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. "

 

 

 

Link para o post
Compartilhar em outros sites
  • 3 years later...
  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
Expand   Mostrar mais  

 

Quando abro o loader do servidor aparece o seguinte erro:

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

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Estatísticas dos Fóruns

    96845
    Tópicos
    519598
    Posts



×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo