Server restart command
#1

hello i got server restart command:

pawn Код:
if (strcmp("/restart", cmdtext, true, 8 ) == 0)
    {
        if(IsPlayerAdmin(playerid))
        {
            GameTextForAll("~g~RESTART ~r~SERVERA ",10000,5);
//          SendRconCommand("reloadfs filtersctipt");
//          SendRconCommand("reloadfs filtersctipt");
//          SendRconCommand("reloadfs filtersctipt");
//          SendRconCommand("reloadfs filtersctipt");
//          SendRconCommand("reloadfs filtersctipt");
//          SendRconCommand("reloadfs filtersctipt");
//          SendRconCommand("reloadfs filtersctipt");
            SendRconCommand("gmx");
            SendClientMessageToAll(0xFFFF00AA, "             ");
            SendClientMessageToAll(0xFFFF00AA, "             ");
            SendClientMessageToAll(0xFFFF00AA, "             ");
            SendClientMessageToAll(0xFFFF00AA, "             ");
            SendClientMessageToAll(0xFFFF00AA, "             ");
            SendClientMessageToAll(0xFFFF00AA, "             ");
            SendClientMessageToAll(0xFFFF00AA, "             ");
            SendClientMessageToAll(0xFFFF00AA, "             ");
            SendClientMessageToAll(0xFFFF00AA, "             ");
            SendClientMessageToAll(0xFFFF00AA, "             ");
            SendClientMessageToAll(0xFFFF00AA, "             ");
            SendClientMessageToAll(0xFFFF00AA, "             ");
            SendClientMessageToAll(0xFFFF00AA, "             ");
            SendClientMessageToAll(0xFFFF00AA, "             ");
            SendClientMessageToAll(0xFFFF00AA, "             ");
            SendClientMessageToAll(0xFFFF00AA, "             ");
            SendClientMessageToAll(0xFFFF00AA, "             ");
            SendClientMessageToAll(0xFFFF00AA, "             ");
            SendClientMessageToAll(0xFFFF00AA, "             ");
            SendClientMessageToAll(0xFFFF00AA, "             ");
            SendClientMessageToAll(0xFFFF00AA, "             ");
            SendClientMessageToAll(0xFFFF00AA, "             ");
            SendClientMessageToAll(0xFFFF00AA, "             ");
            SendClientMessageToAll(0xFFFF00AA, "             ");
        }
        return 1;
    }
but insted of clearing the chat and getting restart gametext, the camera is positioned looking at LS, and it says: Server is restarting.

why is my gamtext not workign and chat not clearing etc?
Reply
#2

because you do the gmx command before sending the messages..
the order is in that case importent


put all sendcleintmessage above the gmx part
Reply
#3

i used what you gave, and it still exactly thesame
Reply
#4

I don't think "Server restarting..." can be forced to not show. I think it has to show for all restarts.

But I could be wrong
Reply
#5

If your server host has auto-reconnecting you could just crash your own server then let it reconnect.
pawn Код:
new File:Hello;
fclose(Hello);
It will crash your server then everybody will reconnect and it wont display the restart message.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)