[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
#2

Good Job man...
Reply
#3

Yea is good,
Oh is BETA...
Good job ^^
Reply
#4

Quote:
Originally Posted by Juninho_Oakley
View Post
Good Job man...
Thank you!!
Quote:
Originally Posted by [IZ]Kira
View Post
Yea is good,
Oh is BETA...
Good job ^^
Yea its beta cause i still have more ideas for it and i just decided to release it for suggestions and to see if it needs any inprovements. And Thank you!!
Reply
#5

Suggestions:

/restart [minutes]

God Job man.
Reply
#6

That Very Great man
Reply
#7

Quote:
Originally Posted by LuisGraph
View Post
Suggestions:

/restart [minutes]

God Job man.
Quote:
Originally Posted by samlee304
View Post
That Very Great man
Thank you both!!

And yea i plan on adding /restart [minutes] yet. Also i am adding a command that uses dialogs so you can choose all the commands or the single command to open the dialog.
Reply
#8

Bump!! Few updated features check them out
Reply
#9


Too easy to do to be a beta.
Reply
#10

Quote:
Originally Posted by [Vector]
View Post

Too easy to do to be a beta.

Thanks for your criticism now go troll somewhere else.



Reply
#11

Nice.
Reply
#12

Maybe an better idea for people who don't want timerfix include, use gettime(); .
Reply
#13

Quote:
Originally Posted by RobinOwnz
Посмотреть сообщение
Maybe an better idea for people who don't want timerfix include, use gettime(); .
hmm good idea i never thought about that. As it is right now if the person dosnt want to get the timerfix include he dosnt have to cause it only checks to see if its there.

Thanks for the suggestion i will have to switch it over to that!!

And thanks MaySee!
Reply
#14

Awesome job.

I was looking for it. Thanks
Reply
#15

Nice really good and useful
Reply
#16

Thank You!! and i am currently using this script with the timer fix include on my server and it litteraly restarts on the same minute for week straight with no problems. I also posted a pic of the /rsp (restart pannel) its in the main post!! Just click it to make it bigger. Still kinda looks bla but theres not much to it.
Reply
#17

Amazing that it still works after all this time.
Reply
#18

Nice Scipt
Reply
#19

Great script, very good.
Reply
#20

Good work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)