SA-MP Forums Archive
Restart Server By 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)
+--- Thread: Restart Server By Command (/showthread.php?tid=598473)



Restart Server By Command - SupperRobin6394 - 13.01.2016

Hey hey,

I have my own Server, I want to have a command that restarts it.
I do have a simple version, but I want to have a full one.
My simple version uses "SendRconCommand("gmx");" I want to have a full restart.

I do can restart my Server from the console, but I want an option to do this In-Game. My Server is hosted by Ultra-Host.

Anyone having any ideas?


Re: Restart Server By Command - Amunra - 13.01.2016

Maybe you can use This filterscript


Re: Restart Server By Command - Rog - 13.01.2016

CMD:gmx(playerid, params[])
{
if (!IsPlayerAdmin(playerid)) {
SendClientMessage(playerid,-1,"Server has been successfully restarted.");
return SendRconCommand("gmx");
} else return SendClientMessage(playerid,red,"ERROR: You need to be RCON Admin to use this command");
}//Use ZCMD include to use this command


Re: Restart Server By Command - SupperRobin6394 - 13.01.2016

Are there any alternatives?


Re: Restart Server By Command - FreAkeD - 13.01.2016

Use what Amunra linked you to.


Re: Restart Server By Command - BiosMarcel - 13.01.2016

I guess what u want is to completly close the server application and open it afterwards right?
You'd have to make a php script or smth i guess and then send the command per HTTP function.
I am not suer if that would work, i am just guessing ^^


Re: Restart Server By Command - SupperRobin6394 - 13.01.2016

I guess I will just keep with the gmx version I currently have, thank everyone!