OTHispano
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.

Ir abajo
[GlobalEvent]Save Automatico 9uylN
"Ryukend"
Miembro
Mensajes Mensajes : 120

[GlobalEvent]Save Automatico Empty [GlobalEvent]Save Automatico

Mar Nov 08, 2011 1:15 pm
Otro Tutorial Basico Wink
vas a global event/scripts y pones esto:
Código:

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

despues vas a globalevent.xml y pones esto:
Código:

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

Bueno eso es Todo!! Da +REP si te gusto Very Happy
Angelshitho
Angelshitho
Administrador
Mensajes Mensajes : 64
http://forum.GamesOnCheats.net

[GlobalEvent]Save Automatico Empty Re: [GlobalEvent]Save Automatico

Mar Nov 08, 2011 3:17 pm
Cerrado!
Razon: Esto Viene en todos los Server
Asi que no necesita ser posteado
Es como Postear
"Como entrar a OtSuporter"
Si esta viendo el tema pues ya entro!
Volver arriba
Permisos de este foro:
No puedes responder a temas en este foro.