[FilterScript] [FS] Automatic Weather Changer
#1

Hi!

Today I making a filterscript for my server. This is changing the weather by user defined interval.
At starting this interval is 5 minutes.
You can write the time in Seconds or Milliseconds
If you want to write in Miliseconds, change this in the script:

pawn Code:
#define TIME_SECOND // Comment it (write two '/' to the front of this line)
How to use?

1. Download
2. Put it into your Filterscript folder
3. Write to the filterscripts line in Server.cfg: w-changer.
4. Play the game!


Download link:

1.0 - PWN File
1.0 - AMX File

1.1 - PWN File
1.1 - AMX File

Changes in 1.1:

Changed the define system's format.

In 1.0:
pawn Code:
//------------------------------------------------------------------------------
//This is the weather changer's interval (how often change the weather)

#define TIME_SECOND // If you defined this, it means you give the interval in SECONDS, not MILISECONDS.
// #define TIME_MILISEC // If you defined this, it means you give the interval in MILISECONDS, not SECONDS.

#define wtime 5 // If you defined TIME_SECOND, you have to put this interval in SECONDS, not MILISECONDS.

//This is the weather changer's interval (how often change the weather)
//------------------------------------------------------------------------------
//
// More lines after...
//
//
public WeatherChanger()
{
SendRconCommand("weather 0");
#if defined TIME_MILISEC
SetTimer("Weather3",wtime,0);
#endif
#if defined TIME_SECOND
SetTimer("Weather3",wtime*1000,0);
#endif
return 1;
}
See the 'If Defined' lines!
Now see these lines in 1.1, and see the defines:
pawn Code:
//------------------------------------------------------------------------------
//This is the weather changer's interval (how often change the weather)

#define TIME_SECOND // If you defined this, it means you give the interval in SECONDS, not MILLISECONDS.

#define wtime 300 // If you defined TIME_SECOND, you have to put this interval in SECONDS, not MILLISECONDS.

//This is the weather changer's interval (how often change the weather)
//------------------------------------------------------------------------------
//
//
// More lines after...
//
//
public WeatherChanger()
{
SendRconCommand("weather 0");
#if defined TIME_SECOND
SetTimer("Weather3",wtime*1000,0);
#else
SetTimer("Weather3",wtime,0);
#endif
return 1;
}
You need to see this lines in 1.0:
Quote:

//------------------------------------------------------------------------------
//This is the weather changer's interval (how often change the weather)

#define TIME_SECOND // If you defined this, it means you give the interval in SECONDS, not MILISECONDS.
// #define TIME_MILISEC // If you defined this, it means you give the interval in MILISECONDS, not SECONDS.

#define wtime 5 // If you defined TIME_SECOND, you have to put this interval in SECONDS, not MILISECONDS.

//This is the weather changer's interval (how often change the weather)
//------------------------------------------------------------------------------

More lines after...

#if defined TIME_MILISEC
SetTimer("Weather3",wtime,0);
#endif
#if defined TIME_SECOND
SetTimer("Weather3",wtime*1000,0);
#endif

And in 1.1:
Quote:

//------------------------------------------------------------------------------
//This is the weather changer's interval (how often change the weather)

#define TIME_SECOND // If you defined this, it means you give the interval in SECONDS, not MILLISECONDS.

#define wtime 300 // If you defined TIME_SECOND, you have to put this interval in SECONDS, not MILLISECONDS.

//This is the weather changer's interval (how often change the weather)
//------------------------------------------------------------------------------

More lines after...

#if defined TIME_SECOND
SetTimer("Weather3",wtime*1000,0);
#else
SetTimer("Weather3",wtime,0);
#endif

If you don't see the changes, you are stupid .
Bugs:
No bugs founded. If you find one please post!



Sorry for my English, that is not brilliant because I am Hungarian. (But I try to speak good and don't drop any language mistakes.)
Reply
#2

Very nice
Reply
#3

Quote:
Originally Posted by 3xPloSioNxXx
Very nice
Thanks
Reply
#4

this would be really good for RP server's! Well done!
Reply
#5

Quote:
Originally Posted by Roxan_Almighty
this would be really good for RP server's! Well done!
Thanks! I translated a sentence because I don't know how to write it in English.

I would not have believed it that a man likes this much what I did.

I want to say something like this:
I don't know before relasing this FS, how many people like it, and I posted it before 5 minutes.
Reply
#6

one problem...
you spelt milliseconds wrong.
you put one 'l' should be 2
Reply
#7

Okay, thanks, changed.

EDIT: And 1.1 is here.
Reply
#8

wow its cool thx for it
Reply
#9

Nice work! Very useful for RP/CnR servers!
Reply
#10

There is no DL link...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)