Code to crash my own server with. -
[WSF]ThA_Devil - 28.03.2016
Hello, I've been wondering if anyone has come up with code that can crash the server.
I'm interested in this because of the auto restart system I have. Using GMX isn't that good of an idea, because it doesn't reload the script, I could use 'rcon exit' but that forces the "Server Closed Connection" message on the users, which I don't want. If you got a solid way to crash it or restart it without GMX or RCON EXIT, it would be appreciated if you let me know.
Re: Code to crash my own server with. -
Mencent - 28.03.2016
Hi!
I think there isn't a way to restart the server (script?) with a crash. You have to turn off the server and start it again.
Re: Code to crash my own server with. -
[WSF]ThA_Devil - 28.03.2016
Yeah, but that can't be synced up with the code that well, the restart messages and stuff. So I suppose I have to put up with 'rcon exit' unless someone gives me another idea on how to do it. (linux bash autostart script ftw)
Re: Code to crash my own server with. -
Kimble - 28.03.2016
You could try reading a file that doesn't exist?
https://sampwiki.blast.hk/wiki/Fopen
Re: Code to crash my own server with. -
Mencent - 28.03.2016
That will crash the server and then the server is offline.
Re: Code to crash my own server with. -
[WSF]ThA_Devil - 28.03.2016
Oh, cool. Thanks. I didn't think of that.
Re: Code to crash my own server with. -
itsCody - 28.03.2016
Crashing your server could risk saving player stats, etc.
Hopefully you're saving the stats before hand.
Re: Code to crash my own server with. -
introzen - 28.03.2016
I'm not quite sure what you're trying to accomplish when you say that GMX doesn't reload the script.
However, I use "changemode yourgamemode" for my own /gmx command. It perfectly reloads the whole gamemode after updating.
Re: Code to crash my own server with. -
[WSF]ThA_Devil - 29.03.2016
Quote:
Originally Posted by itsCody
Crashing your server could risk saving player stats, etc.
Hopefully you're saving the stats before hand.
|
I'm saving stuff whenever something changes, so I'm not worried about that. It's not like my server has much to save anyway.
Quote:
Originally Posted by introzen
I'm not quite sure what you're trying to accomplish when you say that GMX doesn't reload the script.
However, I use "changemode yourgamemode" for my own /gmx command. It perfectly reloads the whole gamemode after updating.
|
Oh, okay. I'll look into that as well. Thanks.
Re: Code to crash my own server with. -
Spmn - 29.03.2016
Passing a null string to CallLocalFunction should do the trick.