AutoRestarterV2[UPDATED] ++ Hours,Minutes,Seconds,Messages -
nepstep - 19.09.2010
.::AutoRestarter V2::.
1)Download the file
AutoRestarterV2.inc(4shared) , then place it on your includes folder wich is on pawno directory (pawno/include/)
2)At the top of your gamemode, include the include
pawn Code:
#include <AutoRestarterV2>
3)Place AutoRestarterV2 function where you want to trigger the restart timer.
4)Compile your gamemode and restart it.
.::AutoRestarterV2 Function::.
pawn Code:
ServerRestart(days,hours,minutes,seconds,message);
Code:
days = The days you want the server to restart.
hours = The hours you want the server to restart.
minutes = The minutes you want the server to restart.
seconds = The seconds you want the server to restart.
message = 0 or 1 or 2 or 3
0 = Nothing displaying
1 = Send only Server Console info message
2 = Send only Client info message
3 = Send both console and client message
.::Examples::.
Restart server every 5 days with displaying messages.
pawn Code:
public OnGameModeInit
{
ServerRestart(5,0,0,0,3);
}
When ServerRestart will triggered on console will be displayed this message:
Code:
Server will restart on 5 day(s).
Also when ServerRestart will triggered on client will be displayed this message:
Code:
Server will restart on 5 day(s).
Restart server when a deathmatch ends(The callback is just an example) with client message
pawn Code:
public DMend
{
GivePlayerMoney(playerid,1000);
SetPlayerHealth(playerid,100);
ServerRestart(0,0,0,45,2)
}
When ServerRestart will triggered on client will be displayed this message:
Code:
Server will restart on 45 second(s).
Enjoy..
Re: AutoRestarter -
HyperZ - 19.09.2010
Very Nice and Simple.
Re: AutoRestarter -
Basicz - 20.09.2010
Yeah, It's nice and simple!
Re: AutoRestarter -
royal_king - 20.09.2010
Nice Work Mate Keep It up
Re: AutoRestarter -
Geryy - 21.09.2010
gmx it's not full restart. And give many lags.
Re: AutoRestarter -
Mujib - 22.09.2010
Quote:
Originally Posted by Geryy
gmx it's not full restart. And give many lags.
|
How would you otherwise restart it?
Re: AutoRestarter -
Zack9764 - 22.09.2010
So simple, it's brilliant. :O
Re: AutoRestarter -
Lookin - 27.09.2010
im running my gm on 0.3b and tryed adding this to my script but came up with errors so my question is is this compatible with 3b?
Re: AutoRestarter -
Scenario - 27.09.2010
I didn't actually test this, as I just did it the simple way, with timers and stocks. However, since this was created after the 0.3G release, you would think that its compatible... What errors did you receive?
Re: AutoRestarter -
Lookin - 27.09.2010
Код:
#include <AutoRestarterV2>
new ServerRestart(days,hours,minutes,seconds,message);
OnGameModeInit
{
ServerRestart(5,0,0,0,3);
}
if ServerRestart(days,hours,minutes,seconds,message){
days = The days you want the server to restart.
hours = The hours you want the server to restart.
minutes = The minutes you want the server to restart.
seconds = The seconds you want the server to restart.
message = 0 or 1 or 2 or 3
0 = Nothing displaying
1 = Send only Server Console info message
2 = Send only Client info message
3 = Send both console and client message
return 1;
}
do i do it like this as i suspect i did it wrong
*EDIT this is not how i did it
Re: AutoRestarter -
[KMA]DlennartD - 27.09.2010
Great, I needed this, good job!
Re: AutoRestarter -
nepstep - 27.09.2010
Quote:
Originally Posted by Lookin
Код:
#include <AutoRestarterV2>
new ServerRestart(days,hours,minutes,seconds,message);
OnGameModeInit
{
ServerRestart(5,0,0,0,3);
}
if ServerRestart(days,hours,minutes,seconds,message){
days = The days you want the server to restart.
hours = The hours you want the server to restart.
minutes = The minutes you want the server to restart.
seconds = The seconds you want the server to restart.
message = 0 or 1 or 2 or 3
0 = Nothing displaying
1 = Send only Server Console info message
2 = Send only Client info message
3 = Send both console and client message
return 1;
}
do i do it like this as i suspect i did it wrong
*EDIT this is not how i did it
|
nahh
remove this code:
pawn Код:
new ServerRestart(days,hours,minutes,seconds,message);
if ServerRestart(days,hours,minutes,seconds,message){
days = The days you want the server to restart.
hours = The hours you want the server to restart.
minutes = The minutes you want the server to restart.
seconds = The seconds you want the server to restart.
message = 0 or 1 or 2 or 3
0 = Nothing displaying
1 = Send only Server Console info message
2 = Send only Client info message
3 = Send both console and client message
return 1;
}
This code it was just an example to figure out the variables of the function
so keep only this code:
pawn Код:
#include <AutoRestarterV2>
OnGameModeInit
{
ServerRestart(5,0,0,0,3);
}
It should work fine .
Best Regards
Re: AutoRestarter -
nepstep - 28.09.2010
28/09/2010 - 11:30
-Major bug fixed!
-File updated!
Re: AutoRestarter -
Lookin - 29.09.2010
thanks am testing it now
Re: AutoRestarter -
DiddyBop - 29.09.2010
Quote:
Originally Posted by Mujib
How would you otherwise restart it?
|
Close sa-mp.exe then re-open it? oh w8, thts 2 hard.
Re: AutoRestarter -
Lookin - 30.09.2010
Quote:
Originally Posted by DiddyBop
Close sa-mp.exe then re-open it? oh w8, thts 2 hard.
|
lmfao rofl
Re: AutoRestarter -
Awesome_Scripter - 30.09.2010
Done Verry Thanks im like it

_________________________
Re: AutoRestarter -
BP13 - 30.09.2010
Quote:
Originally Posted by Mujib
How would you otherwise restart it?
|
Kill the process and then reopen the server console. This way it will do a clean restart and no one will get "Server Closed Connection." GMX is crap and screws things up.
Re: AutoRestarter -
DSK_Vyorel - 30.09.2010
Wow! Very, very nice!
Re: AutoRestarter -
Lookin - 12.10.2010
i tested it out for awhile and it works great but be careful as it conflicts with a few things im not sure why
Код:
1. This forum requires that you wait 120 seconds between posts. Please try again in 41 seconds.
ok this is getting annoying lol