Garry's Mod

Garry's Mod

39 ratings
sv_restart (superadmin command)
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
File Size
Posted
Updated
2.039 KB
1 Jul, 2016 @ 9:37pm
4 Nov, 2016 @ 8:09am
4 Change Notes ( view )

Subscribe to download
sv_restart (superadmin command)

In 5 collections by Cédric GÉRILLE [GiletJaune]
Soccer by Mohamed RACHID
37 items
Université Joseph Poireau (serveur)
70 items
MR: Serveur Garry's Mod Jeu en 2D
11 items
Dev Tests Mohamed
50 items
G-1:788429
50 items
Description
This addon provides the console command sv_restart. It allows to restart the server easily without using RCon.

Notes
- This addon is only designed for servers. Do not put it as auto-download for clients.
- The default bash that comes with Garry's Mod for Linux does not restart the server (with crash or not). You need to fix it for the restart to work.
- On Windows you need to loop your .cmd / .bat script. Here is how you do it:
:begin srcds.exe ..... goto begin

[curse.com]

Usage
Restart the server in {delay} seconds:
sv_restart [delay=10]
Cancel a pending restart:
sv_restart -1

See also
map_reload (superadmin command)
32 Comments
Cédric GÉRILLE [GiletJaune]  [author] 10 Sep, 2021 @ 9:15pm 
What is wrong? :steamsad:
MARK_EDINOROGLOVE 19 Feb, 2021 @ 12:24pm 
sv_restart
Commencing connection retry to 192.168.0.100:27015
Restoring gamemode to sandbox
Client sending to server with no netchannel!
SoundEmitter: removing map sound overrides [3 to remove, 0 to restore]
Connecting to 192.168.0.100:27015...
The server will restart in 0 seconds!
Please wait before coming back.
Restoring gamemode to sandbox

This is run in the game
Cédric GÉRILLE [GiletJaune]  [author] 18 Feb, 2021 @ 3:31pm 
Do you know what the retry command is?
Run it from your game, not on the server!
MARK_EDINOROGLOVE 17 Feb, 2021 @ 12:18pm 
sv_restart
Dropped MARK_EDINOROGLOVE from server (Disconnect by user.)
Dropped vandrenko from server (Disconnect by user.)
86.100.164.25:27005: password failed.
192.168.0.100:27006: password failed.
Cédric GÉRILLE [GiletJaune]  [author] 14 Feb, 2021 @ 3:23pm 
I mean when you run it yourself from the console of your game.
MARK_EDINOROGLOVE 4 Feb, 2021 @ 9:23am 
In what sense manually?
Cédric GÉRILLE [GiletJaune]  [author] 3 Feb, 2021 @ 2:16pm 
Hi! I have not started GMod in a while, that must be due to an update.
What happens when you manually use the retry console command??
MARK_EDINOROGLOVE 11 Jan, 2021 @ 1:56pm 
I have a new problem here, when I write sv_restart the server starts the report, as soon as it reaches zero, the message is displayed, the server will restart in 0 seconds! 192.168.0.100:27007: password failed is written to the server console. although there is no password on the server( what to do?
Cédric GÉRILLE [GiletJaune]  [author] 8 Jul, 2020 @ 6:57am 
Huh, on Windows here is how you do it:
:begin
srcds.exe .....
goto begin
MARK_EDINOROGLOVE 8 Jul, 2020 @ 2:28am 
Okay, but how can I edit the script then, it’s just that I have a server that opens in cmd and half of the FIG add-ons know where, but there is nothing in the addons folder, or maybe then drop the repository from github or maybe send it to discord ... ??