Ir para conteúdo
  • 0

Server Save


SkyDarkyes

Pergunta

Galera,quanto que eu ponho para o server save,ser a kd 2H

[code]

 

<?xml version="1.0" encoding="UTF-8"?>
<globalevents>
<globalevent name="save" interval="900" event="script" value="save.lua"/>
<globalevent name="serverstart" type="start" event="script" value="start.lua"/>
<globalevent name="playersrecord" type="record" event="script" value="record.lua"/>
<globalevent name="CTFStart" type="start" event="script" value="CTFMax.lua"/>
<globalevent name="ZombieGlobalThink" interval="5" event="script" value="zombie/onthink.lua"/>
<globalevent name="ZombieGlobalStartup" type="start" event="script" value="zombie/onstartup.lua"/>
        <globalevent name="AutoBroadcast" interval="1400" script="autobroadcast.lua"/>
        <globalevent name="lottery" interval="7200" script="lottery.lua"/>
        <globalevent name="GlobalBattle" interval="1000" event="script" value="BattleGlobalEvents.lua"/>
</globalevents>
Editado por SkyDarkyes
Link para o comentário
Compartilhar em outros sites

5 respostass a esta questão

Posts Recomendados

  • 0

Tente assim.

<?xml version="1.0" encoding="UTF-8"?>
<globalevents>
<globalevent name="save" interval="7200" event="script" value="save.lua"/>
<globalevent name="serverstart" type="start" event="script" value="start.lua"/>
<globalevent name="playersrecord" type="record" event="script" value="record.lua"/>
<globalevent name="CTFStart" type="start" event="script" value="CTFMax.lua"/>
<globalevent name="ZombieGlobalThink" interval="5" event="script" value="zombie/onthink.lua"/>
<globalevent name="ZombieGlobalStartup" type="start" event="script" value="zombie/onstartup.lua"/>
        <globalevent name="AutoBroadcast" interval="1400" script="autobroadcast.lua"/>
        <globalevent name="lottery" interval="7200" script="lottery.lua"/>
        <globalevent name="GlobalBattle" interval="1000" event="script" value="BattleGlobalEvents.lua"/>
</globalevents>
Link para o comentário
Compartilhar em outros sites

  • 0

Nesse caso tente substituir o conteudo do save.lua por esse.

local config = {
broadcast = {90, 90},
shallow = "no",
delay = 90,
events = 90
}
 
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!"
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
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...