SA-MP Forums Archive
Server restart command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Server restart command (/showthread.php?tid=249851)



Server restart command - HondaCBR - 20.04.2011

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?


AW: Server restart command - xerox8521 - 20.04.2011

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


put all sendcleintmessage above the gmx part


Re: Server restart command - HondaCBR - 20.04.2011

i used what you gave, and it still exactly thesame


Re: Server restart command - grand.Theft.Otto - 21.04.2011

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


Re: Server restart command - Haydz - 21.04.2011

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.