/restart command? u_u
#1

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.
Reply
#2

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.
Reply
#3

Thank you dude.
Reply
#4

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;
Reply
#5

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


Forum Jump:


Users browsing this thread: 1 Guest(s)