19.09.2010, 13:25
(
Last edited by nepstep; 25/09/2010 at 04:49 PM.
Reason: Include Updated!
)
.::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>
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);
}
Code:
Server will restart on 5 day(s).
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)
}
Code:
Server will restart on 45 second(s).