SA-MP Forums Archive
Restart help - 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 help (/showthread.php?tid=596494)



Restart help - PoTaToKiNgZ - 18.12.2015

Hi guys it's hard for me to create an /restart cmd i want to restart my server while ingame not going to the host and then restart it there i want it with this code please

Код:
CMD:restart(playerid)
{
	if(pInfo[playerid][pAdminLevel] >= 10)
	{
Help= +1 REP


Re: Restart help - xXRevolverXx - 18.12.2015

if you are logged in with rcon you already can restart it without any script, by /rcon gmx, (do not forget to login as rcon ( /rcon login password)


if you wish to make this cmd used by admins, add this into your adminsystem, then try /gmx , (do not forget that you must be ad administrator level ? as you want, edit on line 2)

Код:
CMD:gmx(playerid,params[]) {
	if(PlayerInfo[playerid][Level] >= 5) {
		SendRconCommand("gmx");
		return SendClientMessage(playerid,COLOR_WHITE,"RCON Command Sent");
	} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
}



Re: Restart help - PoTaToKiNgZ - 18.12.2015

Quote:
Originally Posted by xXRevolverXx
Посмотреть сообщение
if you are logged in with rcon you already can restart it without any script, by /rcon gmx, (do not forget to login as rcon ( /rcon login password)


if you wish to make this cmd used by admins, add this into your adminsystem, then try /gmx , (do not forget that you must be ad administrator level ? as you want, edit on line 2)

Код:
CMD:gmx(playerid,params[]) {
	if(PlayerInfo[playerid][Level] >= 5) {
		SendRconCommand("gmx");
		return SendClientMessage(playerid,COLOR_WHITE,"RCON Command Sent");
	} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
}
Thanks! it worked