26.03.2012, 02:44
(
Last edited by nickdodd25; 04/03/2013 at 08:47 PM.
Reason: Updates and tryed to change name for thread but it wont change
)
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
There is also a restart config that you have to set before use in the script, just these few lines...
then you have to choose what warning limit you want.....
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.
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.
Set these to what you would like.
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.
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!!
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
- 2min
- 5min
- 10min
- stoprestart
- 24hour
- maintain
- donemaintain
- rscmds
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 ""
pawn Code:
#define Enable10Min true
#define Enable5Min false
#define Enable2Min false
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
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
pawn Code:
#define EnableWelcome true //put to false if you dont want a message on player connect
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>
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!!
