hey can someone make this or tell me how to make it?
#1

i would like to put something in my GM that restarts the server every 12 hours for updates ect, but how would i do it , i know i would need to use a line of code like sendrconmessage but im not sure how to do the timers
Reply
#2

Try Making a Timer its easy to make
Reply
#3

pawn Код:
//OnGameModeInt

SetTimer("restart", 1000*60*60*12, 0);

//somewhere, like at the bottom of script

forward restart();
public restart()
{
  SendRconCommand("gmx");
}
Reply
#4

Another option

pawn Код:
forward GameModeRestart();

public OnGameModeInit()
{
    SetTimer("GameModeRestart", 43200000, false); // 43,200,000 milliseconds is 12 hours
    return 1;
}

public GameModeRestart()
{
    GameModeExit();
}
Reply
#5

Quote:
Originally Posted by MadeMan
Another option

pawn Код:
forward GameModeRestart();

public OnGameModeInit()
{
    SetTimer("GameModeRestart", 43200000, false); // 43,200,000 milliseconds is 12 hours
    return 1;
}

public GameModeRestart()
{
    GameModeExit();
}
That's better option just in-case
Reply
#6

hey thanks guys, I put you're names in the server /credits
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)