21.09.2009, 12:45
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:
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:
See the 'If Defined' lines!
Now see these lines in 1.1, and see the defines:
You need to see this lines in 1.0:
And in 1.1:
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.)
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)
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;
}
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;
}
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 |
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 |

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.)