SA-MP Forums Archive
samp restart server! - 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)
+--- Thread: samp restart server! (/showthread.php?tid=521354)



samp restart server! - danish007 - 22.06.2014

how can i restart server without gmx?

bcoz when i type gmx all players /q /q /q /q / /q /q /q

but i want to restart server with a msg
Server Restarting Please Wait in Chat Only!!!!!!
No /q's!


Re: samp restart server! - Vanter - 22.06.2014

You can't, it's something SAMP related not client.


Re: samp restart server! - Barnwell - 22.06.2014

you can restart your server in your hosting company


Re: samp restart server! - Private200 - 22.06.2014

You can make a command in your script.

pawn Код:
CMD:resetart(playerid, params[]) // zCMD will be required
{
     new string(128);
     format(string, sizeof(string), "~w~Server is restarting. Please be patient and wait.");
     GameTextForAll(string, 5000, 3);
     SendRconCommand("gmx");
     return 1;
}
This is same as the /gmx, just that it will announce before restarting. If you want it for admins only, you have use:

pawn Код:
CMD:restart(playerid, params[])
{
     if(IsPlayerAdmin)
    {
         // the code up there (not the command lines, just the code after the brackets)
    }
    else SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You have to be admin to use this.");
    return 1;
}