Addon Information
This script allows you to schedule multiple automatic restarts throughout the day and send progressive alerts to players beforehand.
Admins can also dynamically postpone a restart using the !repousser <minutes> command.
Ideal for RP, sandbox, or PvP servers that require regular maintenance cycles or resets.
Features
Inside the auto_restart_notifier.lua file, you can customize:
lua
CopierModifier
-- Restart times (hour, minute, second)
restarts = {
{ hour = 4, min = 0, sec = 0 },
{ hour = 12, min = 0, sec = 0 },
{ hour = 20, min = 0, sec = 0 },
}
-- Alert delays before restart (in seconds)
alerts = {
1800, -- 30 minutes
600, -- 10 minutes
60, -- 1 minute
10, -- 10 seconds
}
-- Message format (use %time% to insert remaining time)
messageFormat = "[Server] Restart scheduled in %time%!"
-- Enable or disable automatic restarts
autoRestart = true
- Name: Auto Restart
- Author: Benjdiii
- Main File: lua/autorun/server/auto_restart_notifier.lua
- Dependencies: None
- Installation: Simply place the file in your addons/ folder
- Version: 1.0
This script allows you to schedule multiple automatic restarts throughout the day and send progressive alerts to players beforehand.
Admins can also dynamically postpone a restart using the !repousser <minutes> command.
Ideal for RP, sandbox, or PvP servers that require regular maintenance cycles or resets.
Features
- Schedule multiple restarts per day
- Automatic alerts sent to players before each restart
- Admin command to delay an upcoming restart in real-time
- Automatic map reload with changelevel
- No external addon required
- Simple configuration using a Lua table
- Chat-friendly messages for players
- Lightweight and optimized – no performance impact
Inside the auto_restart_notifier.lua file, you can customize:
lua
CopierModifier
-- Restart times (hour, minute, second)
restarts = {
{ hour = 4, min = 0, sec = 0 },
{ hour = 12, min = 0, sec = 0 },
{ hour = 20, min = 0, sec = 0 },
}
-- Alert delays before restart (in seconds)
alerts = {
1800, -- 30 minutes
600, -- 10 minutes
60, -- 1 minute
10, -- 10 seconds
}
-- Message format (use %time% to insert remaining time)
messageFormat = "[Server] Restart scheduled in %time%!"
-- Enable or disable automatic restarts
autoRestart = true