Author Topic: Server Restart command  (Read 48902 times)

0 Members and 1 Guest are viewing this topic.

Offline Dv2236

  • Jr. Member
  • **
  • Posts: 89
  • Karma: 0
    • MyGamingVoid
Server Restart command
« on: September 09, 2009, 08:16:06 AM »
Will, I don't thank you can really do a command to restart the server, But if the server crashes or closes it will restart if you have a host, serverdoc or a little scripted like me

Code: [Select]
@echo off
cls
echo Protecting srcds from crashes...
echo If you want to close srcds and this script, close the srcds window and type Y depending on your language followed by Enter.
title srcds.com Watchdog
:srcds
echo (%time%) srcds started.
start /wait c:\srcds\orangebox\srcds.exe -console -game garrysmod -snip
echo (%time%) WARNING: srcds closed or crashed, restarting.
goto srcds

Ok, when I want to restart my server I walk to it and type in exit, It than closes and starts back up.
You try that in-game and you close down :) maybe a command to force console to say it?

what about a command like !restart.

lets expand on this idea more!
Ever have them times when you need to restart the server and people are like "O god just 1 more min plz omfg let me finish this!" 10 min later "almost done OMFG plz dont restart yet" etc.

What about a countdown added to it like, !restart <time> and a box that said <time> Server Restart

so when they say it again, BAM !restart 60 you have 1 hr, log off and go to sleep or w/e.

I know this might not be added into ulx it's self but would make a nice little side addon :)

Could even be used to auto restart the server after <time> like week or something add it to the \addons\ULX\cfg\gamemodes files :)

Offline [WCA]AIDS

  • Jr. Member
  • **
  • Posts: 58
  • Karma: 7
    • PlanetWCA Forums
Re: Server Restart command
« Reply #1 on: September 09, 2009, 12:31:34 PM »
You can restart your server from RCon, either from HLSW or while in-game.
<quit|exit|restart> in HLSW will restart the server.
rcon <quit|exit|restart> -or- ulx rcon <quit|exit|restart>   will restart the server if you are in-game.
(It should be noted that if you don't have a auto-restarter installed that the above commands will only kill the server, it will not automagically come back up)


!restart <minutes till>
It seems feasible, I'll look into it.


As for having a "on this day of this week restart the server" function, there is already a program that can do that. GameMon (You will also need Qstat installed). I use GameMon on my TF2 server and it works quite well.




« Last Edit: September 09, 2009, 12:34:27 PM by [WCA]AIDS »

Offline Dv2236

  • Jr. Member
  • **
  • Posts: 89
  • Karma: 0
    • MyGamingVoid
Re: Server Restart command
« Reply #2 on: September 09, 2009, 12:43:52 PM »
I'll have to give that a try before I reinstall windows, but it would still be nice for the countdown part.

Edit
Just tried it before reinstalled windows and worked "ulx rcon exit" now to make it so my admins can used "ulx rcon" so they can restart the server.
« Last Edit: September 10, 2009, 12:13:39 PM by Dv2236 »