SA-MP Forums Archive
[FilterScript] 24hour auto restart(Beta) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] 24hour auto restart(Beta) (/showthread.php?tid=328781)

Pages: 1 2


24hour auto restart V2.0 - nickdodd25 - 26.03.2012

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!!



Re: 24hour auto restart(Beta) - Juninho_Oakley - 26.03.2012

Good Job man...


Re: 24hour auto restart(Beta) - [IZ]Kira - 26.03.2012

Yea is good,
Oh is BETA...
Good job ^^


Re: 24hour auto restart(Beta) - nickdodd25 - 26.03.2012

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!!


Respuesta: 24hour auto restart(Beta) - LuisGraph - 26.03.2012

Suggestions:

/restart [minutes]

God Job man.


Re: 24hour auto restart(Beta) - samlee304 - 26.03.2012

That Very Great man


Re: 24hour auto restart(Beta) - nickdodd25 - 26.03.2012

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.


Re: 24hour auto restart(Beta) - nickdodd25 - 01.05.2012

Bump!! Few updated features check them out


Respuesta: 24hour auto restart(Beta) - [Vector] - 01.05.2012


Too easy to do to be a beta.


Re: Respuesta: 24hour auto restart(Beta) - nickdodd25 - 01.05.2012

Quote:
Originally Posted by [Vector]
View Post

Too easy to do to be a beta.

Thanks for your criticism now go troll somewhere else.






Re: 24hour auto restart(Beta) - MaySee - 01.05.2012

Nice.


Re: 24hour auto restart(Beta) - rbN. - 01.05.2012

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


Re: 24hour auto restart(Beta) - nickdodd25 - 01.05.2012

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!


Respuesta: 24hour auto restart(Beta) - javi - 01.05.2012

Awesome job.

I was looking for it. Thanks


Re: 24hour auto restart(Beta) - tiernantheman - 01.05.2012

Nice really good and useful


Re: 24hour auto restart(Beta) - nickdodd25 - 02.05.2012

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.


Re: 24hour auto restart(Beta) - [MM]18240[FMB] - 20.01.2014

Amazing that it still works after all this time.


Re: 24hour auto restart(Beta) - FreeWorld - 20.01.2014

Nice Scipt


Re: 24hour auto restart(Beta) - FallweN - 20.01.2014

Great script, very good.


Re: 24hour auto restart(Beta) - Team_PRO - 23.01.2014

Good work