SA-MP Forums Archive
Restart server - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Restart server (/showthread.php?tid=193191)



Restart server - Cameltoe - 25.11.2010

Under linux when killing the server the server closes the clients connection.

How would i restart the server without gmx and without closing the clients connection?


Re: Restart server - Auxxx - 25.11.2010

I don't think it's possible, because linux terminates the connection between client and server permanently. I might be wrong, but in my opinion it is so...


Re: Restart server - Cameltoe - 25.11.2010

Quote:
Originally Posted by Auxxx
Посмотреть сообщение
I don't think it's possible, because linux terminates the connection between client and server permanently. I might be wrong, but in my opinion it is so...
That's what i believe too, though i wish to know if theres an way to do the opposite.


Re: Restart server - bigcomfycouch - 25.11.2010

This happens when I close the console on my Windows server, too, but only when I close the console. Restarting via rcon does not do this. I do not have access to my Linux pc right now to see the results on Linux as you have said, however, I think the results will be the same as the Windows results.


Re: Restart server - Auxxx - 25.11.2010

Quote:
Originally Posted by bigcomfycouch
Посмотреть сообщение
This happens when I close the console on my Windows server, too, but only when I close the console. Restarting via rcon does not do this. I do not have access to my Linux pc right now to see the results on Linux as you have said, however, I think the results will be the same as the Windows results.
Indeed, you are correct. The restarting of server, is closing the server (shutdown) and then turning it back on (start).


Re: Restart server - Cameltoe - 25.11.2010

Quote:
Originally Posted by bigcomfycouch
Посмотреть сообщение
This happens when I close the console on my Windows server, too, but only when I close the console. Restarting via rcon does not do this. I do not have access to my Linux pc right now to see the results on Linux as you have said, however, I think the results will be the same as the Windows results.
Restarting via rcon = gmx right? gmx buggs up.


Re: Restart server - Calgon - 25.11.2010

Quote:
Originally Posted by Cameltoe
Посмотреть сообщение
Restarting via rcon = gmx right? gmx buggs up.
How does it "bugg up?"

If you mean that files fail to save, you could try to utilise the OnGameModeExit function (which I think is called when a GMX ocurrs)?


Re: Restart server - Cameltoe - 25.11.2010

Quote:
Originally Posted by Calgon
Посмотреть сообщение
How does it "bugg up?"

If you mean that files fail to save, you could try to utilise the OnGameModeExit function (which I think is called when a GMX ocurrs)?
Thats one of the reasons, variables not getting reseted is yet another one.

I don't really need this, i just want to know if there's an way doing this : PP


Re: Restart server - Calgon - 25.11.2010

Quote:
Originally Posted by Cameltoe
Посмотреть сообщение
Thats one of the reasons, variables not getting reseted is yet another one.

I don't really need this, i just want to know if there's an way doing this : PP
I'm almost 100% positive that variables reset upon a GMX, as that's how I used to force restarts for my server, my only issue was functionality not being terminated and started again when the gamemode had started properly, which I resolved by exiting any of the plugin functions and calling them when the server starts again.

If that's not a feesible solution, I really can't think of anything else. I usually would just use killall samp03svr[pid] on Linux if I ever needed to force a restart via commandline, but I only hosted 1 SA-MP server on my server.


Re: Restart server - Sergei - 25.11.2010

Restart server using SendRconCommand("exit") to make sure everything reloads properly.