Code to crash my own server with.
#1

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.
Reply
#2

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.
Reply
#3

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)
Reply
#4

You could try reading a file that doesn't exist?

https://sampwiki.blast.hk/wiki/Fopen
Reply
#5

That will crash the server and then the server is offline.
Reply
#6

Oh, cool. Thanks. I didn't think of that.
Reply
#7

Crashing your server could risk saving player stats, etc.

Hopefully you're saving the stats before hand.
Reply
#8

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.
Reply
#9

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.
Reply
#10

Passing a null string to CallLocalFunction should do the trick.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)