Special Server Restarter - Storm Effect - Live Countdown Timer - Supports txAdmin

A script by dalifoughali

No reviews yet.
Special Server Restarter - Storm Effect - Live Countdown Timer - Supports txAdmin main image

Full Description

Special Server Restarter - Live Countdown Timer - Supports txAdmin

The Special Server Restarter is a Standalone FiveM Scripts, that makes your server’s restart more advanced and exciting with showing a countdown timer once the txAdmin Scheduled Restart starts, with a special storm starts in the last minute of the restart, with an earthquake effect and a special sound effect, caused by the thunder strikes that makes the players in an alert state.
You can alse start a manual restart and cancel it by command, and the script automatically kick all the players and restart your server.

Features:

  • Countdown timer once the Auto-restart or the manual restart starts
  • Special Storm effect with earthquake and thunder strikes sound effect
  • Auto-kick players and stop & start the server (easy manual restart)

Config File:

Config = {}

--------------------------------------------------------------------------
------------------------ txAdmin Scheduled Restart -----------------------

Config.ScheduledRestartTimer = 30 -- In minutes - Min 1 / Max 30

--------------------------------------------------------------------------
--------------------------- Last Seconds Storm ---------------------------

Config.EnableStorm = true -- Either enable or disable the Weather change and the thunder strike
Config.StormDuration = 60 -- In seconds, The Storm starts in the last 60 seconds of server restart timer

Config.EnableFallAndFleeNPCs = true -- Either enable or disable the falling and fleeing effect of your server's NPCs

--------------------------------------------------------------------------
------------------------- Thunder Effect & Sound -------------------------

Config.EnableThunder = true -- Either enable or disable the tunder strikes and earthquakes
Config.ThunderInterval = 10 -- In seconds, Thunder strike each 10 seconds in default
Config.EnableThunderSound = true -- Either enable or disable tunder sound effects
Config.ThunderSoundVolume = 80 -- Thunder Sound Volume, from 0 to 100

-- Note: The Storm must enabled for The Thunder effect & sound to work

--------------------------------------------------------------------------
------------------------ Timer UI Screen Position ------------------------

Config.TimerScreenPos = "centerright" --  Timer Screen Positions: "topcenter" | "topleft" | "topright" | "bottomcenter" | "bottomleft" | "bottomright" | "centercenter" | "centerleft" | "centerright"

--------------------------------------------------------------------------
------------------------- Storm Weather Funtions -------------------------

Config.StormWeather = function() -- Triggered function to change the weather when the storm hits
	-- Server side "thunder storm weather" event or export or function, QBCore and Execute Command example
	
	-- Pre-configured Examples:
	-- ExecuteCommand('weather thunder') -- Server side execute command example (works with vSync)
	-- exports['qb-weathersync']:setWeather('thunder') -- QBCore weathersync script export example
end

Config.ClearWeather = function() -- Triggered function to reset the weather to default status
	-- Server side "clear weather" event or export or function or command, QBCore and Execute Command example
	
	-- Pre-configured Examples:
	-- ExecuteCommand('weather clear') -- Server side execute command example (works with vSync)
	-- exports['qb-weathersync']:setWeather('clear') -- QBCore weathersync script export example
end

--------------------------------------------------------------------------
------------------------------ Translations ------------------------------

Config.Translations = {
	['auto_restart'] = 'Auto-Restart',
	['auto_restart_canceled'] = 'Auto-Restart Cenceled',
	
	['server_restart'] = 'Server Restart',
	['server_restart_canceled'] = 'Server Restart Cenceled',
	
	['kick_message'] = 'Server Restart 😊',
}

Server Commands File:

-- Default script command to start and cancel manual server restart
-- You can change them to your framework permission level to use this two commands

RegisterCommand('startrestart', function(source, args)
	local Timer = tonumber(args[1]) -- countdown timer in minutes
	if (Timer ~= nil) and (Timer > 0) then
		StartServerRestart(Timer) -- function to start a manual server restart
	end
end, true)

RegisterCommand('cancelrestart', function(source, args)
	CancelServerRestart() -- function to cancel the manual server restart
end, true)

Preview: Youtube Link
Buy Here : Tebex Link ($9.99 + Tax)

You might like one of my scripts (20% off discount)

Code is accessible Config & Server Commands files
Subscription-based No
Lines (approximately) +200
Requirements txAdmin
Support Yes