Server Freeze/Endless Loop
#1

This is a strange question to ask but I need to know how I can possibly do it.
I am creating a script and I wanna know how I can have the server freeze if a file hasnt loaded correctly.

For example, a Settings file is deleted, the server will detect it and then show a message like:
Error: Settings.file has been deleted.
And then the server freezes and nothing will unfreeze it unless you reload the server with the Settings.file in the appropriote folder.

Its not detecting the file which is hard, its getting the server to freeze.
I was thinking of an endless loop but that could have alot of bugs.
Reply
#2

U can do it like this:

pawn Код:
if(!fexist("settings.ini")) // settings.ini should be inside scriptfiles folder. This code will run if it not exists there.
{
    printf("[SERVER] Settings.ini is missing from the scriptfiles folder! Server will be locked now.");
    SendRconCommand("password settings"); // Now the password to connect will be required.
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)