Hey i want help now my zombie event is like this local autoStartInterval = 60 -- time between arenas in minutes, default 60 = 1 hour
i want it so i can add this in globalevents <globalevent name="zombieevent" time="23:04:00" event="script" value="zombie/onstartup_autostart.lua"/> -->
script
bump
i want it so i can add this in globalevents <globalevent name="zombieevent" time="23:04:00" event="script" value="zombie/onstartup_autostart.lua"/> -->
script
Code:
local autoStartInterval = 60 -- time between arenas in minutes, default 60 = 1 hour
function onThink(interval, lastExecution, thinkInterval)
if(getStorage(ZE_STATUS) ~= 2) then
if(getStorage(45267)+autoStartInterval*60 <= os.time() and getStorage(45268) ~= 1) then
doSetStorage(45268, 1)
removeZombiesEventBlockEnterPosition()
doSetStorage(ZE_STATUS, 1)
doBroadcastMessage("Zombie Arena Event teleport will be opened for 2 minutes. We are waiting for " .. getZombiesEventPlayersLimit() - #getZombiesEventPlayers() .. " players to start.")
elseif(getStorage(45267)+autoStartInterval*60+120 <= os.time() and getStorage(45268) == 1) then
addZombiesEventBlockEnterPosition()
doSetStorage(45268, 0)
doSetStorage(ZE_STATUS, 2)
doSetStorage(45267, os.time())
doBroadcastMessage("Zombie Arena Event started.")
end
end
return true
end
bump
Last edited by a moderator: