Completely restart server via amxx?
Is it possible to completely restart a server via amxx?
What I'm looking for is reloading metamod, so mapchange won't work. I guess having auto-restart on and just server_cmd("quit") would work but there must be some other better way. |
Re: Completely restart server via amxx?
server_cmd("restart");
|
Re: Completely restart server via amxx?
I don't think you can restart the server any other way, short of intentionally crashing it.
|
Re: Completely restart server via amxx?
_restart maybe, i not have sure.
Oh, and have a -autorestar parameter for HLDS i guess. |
Re: Completely restart server via amxx?
AMX Mod X is not running when the server is not running. I.e. you cannot do something with a plugin when it's not running. An external script is required which is why the server is restarted when there is a fatal error (with the exception of a few like seg faults) and when you use the quit command (if there is a script running to start the server which is typical of servers hosted by a GSP).
|
Re: Completely restart server via amxx?
I guess we can do that with Amxmodx Module using OS Threads and Process API. When you are going to "quit" an HLDS, start another individual process (store its handle in secondary storage). This process should give some delay after it has detected that hlds process has been ended and execute a start cmd to start HLDS again.
|
Re: Completely restart server via amxx?
Quote:
Ps. Crate a simple .bat file or use screen in linux to restart process using quit command. Is impossible to do a full restart without do it. |
Re: Completely restart server via amxx?
Quote:
|
Re: Completely restart server via amxx?
I would need this to work for every server that runs my plugin, not only my own
I will look at module loading / unloading then, I sort of knew this wasn't possible since the whole autorestart on crash thing relies on child processes edit:: server_cmd("restart") does the job are there any problems with using this, problems I haven't found yet? |
Re: Completely restart server via amxx?
Quote:
|
| All times are GMT -4. The time now is 18:42. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.