[FilterScript] 24hour auto restart(Beta)
#1

24 Hour Auto Restart

Today i decided that i am going to release my first full filterscript to get feedback, people to test it, and suggestions for a possible future update/release!!

With this filterscript the server owner can set a defined time (in minutes) for the server to restart or to have or to put the server maintenance mode (locks the server for owner to add/test things)
THIS DOES NOT RESTART SERVER IF IT CRASHES

Ingame commands
  • /2min
  • /5min
  • /10min
  • /24hour
  • /stoprestart
  • /maintain
  • /donemaintain
  • /rscmds
  • /restart <minutes>
  • NEW/rsp //only can use this when dialog option is set to true
Console commands:
  • 2min
  • 5min
  • 10min
  • stoprestart
  • 24hour
  • maintain
  • donemaintain
  • rscmds
How to set it up:
There is also a restart config that you have to set before use in the script, just these few lines...

pawn Code:
#define TIME            1441                                        //Edit this for defalt time amount 1441=24 hours.
#define ServerName      "Your server name"                          //Define your server name here.
#define PassWord        "changeme"                                  //this locks the server for maintenance mode and before restart so people cant join, to make your own put "Your_Pass_Here"
#define PassWord2       "0"                                         //"0" means password is getting removed, keep 0 unless your server has a password all the time then put "yourserverpass"
#define WarningMessage  "Restarting My Peeps!"//Put your warning message here. If you dont want any chat warning put ""
then you have to choose what warning limit you want.....
pawn Code:
#define Enable10Min     true
#define Enable5Min      false
#define Enable2Min      false
Make sure you only have one of them true otherwise you will have two warnings going at the same time.

NEW UPDATED FEATURES!!
Now have /restart <minutes>
all so a few extra things to set for the restart cofig.
pawn Code:
//set to false to disable dialogs if you have other filterscripts using dialogs or the scripts will interfear
#define EnableDialog    true
//if set to false only commands will work if set to true only dialogs will work
Set it to what ever you prefer, dialogs or commands.
NOTE:If you have other filterscripts with dialogs this may interfere so set it to false to use only the commands.

pawn Code:
//dialog ids note if you have other filterscripts that use dialogs then set dialogs to false cause the two scripts will interfere
#define DIALOG_RSP      3000
#define DIALOG_COMMANDS 3001
#define DIALOG_RESTART  3002
Set these to what you would like.

pawn Code:
#define EnableWelcome   true                        //put to false if you dont want a message on player connect
This is just a welcome message that says your servers name is using this script, please use it but if you dont want to just put to false.
I also fixed a few bugs i had with maintain mode so please update to have the latest version!!!

End of Update

Then download the include called timerfix,
Get that from here: https://sampforum.blast.hk/showthread.php?tid=289675
Then save it as timerfix, this include is not needed but recommended cause it will make the timers very accurate.
pawn Code:
#tryinclude <timerfix>
How to install:
Save and compile in your filterscipts folder,
Name it 24hr (or what ever you like),
Then add 24hr (or what you named it) to your servercfg in the filterscipts line.
And start your server and loginto rcon in your server and do /rscmds for the ingame commands.

Pastebin:
V 2.0
http://pastebin.com/NxCpCZht
V 1.0.5
http://pastebin.com/yhHyfayd

Need more info/questions/comments/suggestions post below!!
Keep in mind that this is my first full filterscipt, so its not perfect.
Have a great day!!
Reply


Messages In This Thread
24hour auto restart V2.0 - by nickdodd25 - 26.03.2012, 02:44
Re: 24hour auto restart(Beta) - by Juninho_Oakley - 26.03.2012, 02:46
Re: 24hour auto restart(Beta) - by [IZ]Kira - 26.03.2012, 03:03
Re: 24hour auto restart(Beta) - by nickdodd25 - 26.03.2012, 03:07
Respuesta: 24hour auto restart(Beta) - by LuisGraph - 26.03.2012, 03:37
Re: 24hour auto restart(Beta) - by samlee304 - 26.03.2012, 05:54
Re: 24hour auto restart(Beta) - by nickdodd25 - 26.03.2012, 14:39
Re: 24hour auto restart(Beta) - by nickdodd25 - 01.05.2012, 05:30
Respuesta: 24hour auto restart(Beta) - by [Vector] - 01.05.2012, 05:56
Re: Respuesta: 24hour auto restart(Beta) - by nickdodd25 - 01.05.2012, 06:19
Re: 24hour auto restart(Beta) - by MaySee - 01.05.2012, 08:01
Re: 24hour auto restart(Beta) - by rbN. - 01.05.2012, 08:26
Re: 24hour auto restart(Beta) - by nickdodd25 - 01.05.2012, 14:27
Respuesta: 24hour auto restart(Beta) - by javi - 01.05.2012, 14:30
Re: 24hour auto restart(Beta) - by tiernantheman - 01.05.2012, 15:00
Re: 24hour auto restart(Beta) - by nickdodd25 - 02.05.2012, 15:17
Re: 24hour auto restart(Beta) - by [MM]18240[FMB] - 20.01.2014, 17:55
Re: 24hour auto restart(Beta) - by FreeWorld - 20.01.2014, 18:12
Re: 24hour auto restart(Beta) - by FallweN - 20.01.2014, 21:47
Re: 24hour auto restart(Beta) - by Team_PRO - 23.01.2014, 05:04
Re: 24hour auto restart(Beta) - by Proximo - 03.05.2014, 09:19
Re: 24hour auto restart(Beta) - by Ke_NiReM - 03.05.2014, 10:08
Re: 24hour auto restart(Beta) - by iRaiDeN - 03.05.2014, 10:09
Re : 24hour auto restart(Beta) - by med01 - 28.11.2014, 04:49
Re: 24hour auto restart(Beta) - by onur0616 - 07.12.2014, 16:58
Re: 24hour auto restart(Beta) - by Airblog - 08.12.2014, 11:43
Re: 24hour auto restart(Beta) - by Bridge - 08.12.2014, 11:45
Re: 24hour auto restart(Beta) - by MD5 - 08.12.2014, 12:57

Forum Jump:


Users browsing this thread: 4 Guest(s)