SA-MP Forums Archive
/restart command? u_u - 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: /restart command? u_u (/showthread.php?tid=163084)



/restart command? u_u - xfelipex - 26.07.2010

I'd like a command which would restart my server. Please, dont tell me about /rcon gmx, cause it just loads the game mode, but I'm meaning reload the game mode + all filterscripts ; if anybody has it, please post.


Re: /restart command? u_u - Hijolion - 26.07.2010

I just made a quick one, I use zcmd you can use any cmd to process the request.

if (strcmp("/restart", cmdtext, true, 8 ) == 0)
{
if(IsPlayerAdmin(playerid)) {
SendRconCommand("unloadfs filtersctipt");
SendRconCommand("unloadfs filtersctipt");
SendRconCommand("unloadfs filtersctipt");
SendRconCommand("unloadfs filtersctipt");
SendRconCommand("unloadfs filtersctipt");
SendRconCommand("unloadfs filtersctipt");
SendRconCommand("unloadfs filtersctipt");
SendRconCommand("unloadfs filtersctipt");
SendRconCommand("unloadfs filtersctipt");
SendRconCommand("unloadfs filtersctipt");
SendRconCommand("unloadfs filtersctipt");
SendRconCommand("unloadfs filtersctipt");
SendRconCommand("unloadfs filtersctipt");
SendRconCommand("unloadfs filtersctipt");

SendRconCommand("loadfs filtersctipt");
SendRconCommand("loadfs filtersctipt");
SendRconCommand("loadfs filtersctipt");
SendRconCommand("loadfs filtersctipt");
SendRconCommand("loadfs filtersctipt");
SendRconCommand("loadfs filtersctipt");
SendRconCommand("loadfs filtersctipt");
SendRconCommand("loadfs filtersctipt");
SendRconCommand("loadfs filtersctipt");
SendRconCommand("loadfs filtersctipt");
SendRconCommand("loadfs filtersctipt");
SendRconCommand("loadfs filtersctipt");
SendRconCommand("loadfs filtersctipt");
SendRconCommand("loadfs filtersctipt");
SendRconCommand("gmx"); }
return 1; }
return 0;

Replace the "filterscript" with your filterscripts file names.


Re: /restart command? u_u - xfelipex - 26.07.2010

Thank you dude.


Re: /restart command? u_u - willsuckformoney - 26.07.2010

here that looks dull from post above, just copy nd paste

pawn Код:
if (strcmp("/restart", cmdtext, true, 8 ) == 0)
{
if(IsPlayerAdmin(playerid)) {
SendRconCommand("reloadfs filtersctipt");
SendRconCommand("reloadfs filtersctipt");
SendRconCommand("reloadfs filtersctipt");
SendRconCommand("reloadfs filtersctipt");
SendRconCommand("reloadfs filtersctipt");
SendRconCommand("reloadfs filtersctipt");
SendRconCommand("reloadfs filtersctipt");
SendRconCommand("gmx"); }
return 1; }
return 0;



Re: /restart command? u_u - Hijolion - 26.07.2010

I changed it a little, haven't tested but I think you can do it either ways.