[FilterScript] [FS] changing weather
#1

_________________________________________________weather_________________________________________________

i made this gamemode becouse i see a lot of servers who always have the same boring weather.
this script will change youre weather ever 20 min.
every player will get a wheather report about the weather.
like:
weather report: Its gonna rain today

this is a list of posible weathers:
-sunny (this is the most used in servers,this weather will come after each special weather like rain)
-rain
-storm
-sandstorm
-fog

Download (version 1)
Download (version 2)
Portuguese version
_________________________________________________screeeshots


Reply
#2

Nice
Reply
#3

Pretty cool
________
Daihatsu move
Reply
#4

i updated your weather updates and adjusted your final weather to get continuous cycle. The weather stopped on the final case and didnt restart from the beginning.

i have also added some defines so that you can change one word to adjust the time between weather updates.

take a look:

Код:
#define WHOUR 3600000
#define WDAY 86400000
#define W12H 43200000
#define W2H 7200000
#define W4H 14400000
#define W30MINS 1800000

#include <a_samp>
new CurrentMsg;
public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" weather by [SWA]BurningSWA & [SWA]NitroSWA");
	print("--------------------------------------\n");
	SetWeather(0);
	CurrentMsg = 1;
	SetTimer("Msg", W30MINS, 1);
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}
	
forward Msg();
public Msg()
{
	switch(CurrentMsg)
	{
		case 1: { 	SetWeather(0);
					SendClientMessageToAll(0x33AA33AA,"Weather Update: It's a nice day.");
					return CurrentMsg++;  }
		case 2: {	SetWeather(8);
					SendClientMessageToAll(0x33AA33AA,"Weather Update: It's now raining.");
					return CurrentMsg++;	}
		case 3: {  SetWeather(2);
					SendClientMessageToAll(0x33AA33AA,"Weather Update: It's a nice day.");
					return CurrentMsg++;  }
		case 4: {	SetWeather(9);
					SendClientMessageToAll(0x33AA33AA,"Weather Update: We have bad fog coming in!");
					SendClientMessageToAll(0x33AA33AA,"        Drivers please be careful.");
					return CurrentMsg++;  }
		case 5: {	SetWeather(1);
					SendClientMessageToAll(0x33AA33AA,"Weather Update: It's a nice day.");
					return CurrentMsg++;  }
		case 6: {	SetWeather(20);
					SendClientMessageToAll(0x33AA33AA,"Weather Update: It's wet outside now.");
					return CurrentMsg++;  }
		case 7: {	SetWeather(3);
					SendClientMessageToAll(0x33AA33AA,"Weather Update: It's a nice day.");
					return CurrentMsg++;  }
		case 8: {	SetWeather(19);
					SendClientMessageToAll(0x33AA33AA,"Weather Update: Beware of Sandstorms in the north!");
					return CurrentMsg++;  }
		case 9: {	SetWeather(1);
					SendClientMessageToAll(0x33AA33AA,"Weather Update: It's a nice day.");
					return CurrentMsg++;  }
		case 10: {	SetWeather(27);
					SendClientMessageToAll(0x33AA33AA,"Weather Update: The sky is lovely and blue now.");
					return CurrentMsg++;  }
		case 11: {	SetWeather(8);
					SendClientMessageToAll(0x33AA33AA,"Weather Update: It's raining again.");
					return CurrentMsg++;  }
 		case 12: { 	SetWeather(0);
					SendClientMessageToAll(0x33AA33AA,"Weather Update: It's a nice day.");
					return CurrentMsg++;  }
		case 13: {	SetWeather(8);
					SendClientMessageToAll(0x33AA33AA,"Weather Update: It's raining again.");
					return CurrentMsg++;	}
		case 14: { SetWeather(2);
					SendClientMessageToAll(0x33AA33AA,"Weather Update: It's a nice day.");
					return CurrentMsg++;  }
		case 15: {	SetWeather(9);
					SendClientMessageToAll(0x33AA33AA,"Weather Update: We have bad fog coming in!");
					SendClientMessageToAll(0x33AA33AA,"        Drivers please be careful");
					return CurrentMsg++;  }
		case 16: {	SetWeather(1);
					SendClientMessageToAll(0x33AA33AA,"Weather Update: It's a nice day.");
					return CurrentMsg++;  }
		case 17: {	SetWeather(20);
					SendClientMessageToAll(0x33AA33AA,"Weather Update: It's wet outside now.");
					return CurrentMsg++;  }
		case 18: {	SetWeather(3);
					SendClientMessageToAll(0x33AA33AA,"Weather Update: It's a nice day.");
					return CurrentMsg++;  }
		case 19: {	SetWeather(19);
					SendClientMessageToAll(0x33AA33AA,"Weather Update: Beware of sandstorms, they can be dangerous!");
					return CurrentMsg++;  }
		case 20: {	SetWeather(1);
					SendClientMessageToAll(0x33AA33AA,"Weather Update: It's a nice day.");
					return CurrentMsg++;  }
		case 21: {	SetWeather(27);
					SendClientMessageToAll(0x33AA33AA,"Weather Update: The sky is clear!");
					return CurrentMsg++;  }
		case 22: {	SetWeather(8);
					SendClientMessageToAll(0x33AA33AA,"Weather Update: It's raining again.");
					return CurrentMsg++;  }
 		case 23: { 	SetWeather(0);
					SendClientMessageToAll(0x33AA33AA,"Weather Update: It's a nice day.");
					CurrentMsg = 1;
					return CurrentMsg++;  }

	}
	return 1;
}
Reply
#5

thank you
i will update it
Reply
#6

3 more defines if you want to add them:

Код:
#define W20MINS 1200000
#define W15MINS 900000
#define W10MINS 600000
Reply
#7

Not bad
Reply
#8

Simple Script, awesome results
Reply
#9

Quote:
Originally Posted by adsy
3 more defines if you want to add them:

Код:
#define W20MINS 1200000
#define W15MINS 900000
#define W10MINS 600000
i alredy have made those 2 :P
and i made a more usefull
Код:
#define SAMP-DAY 14400000
Reply
#10

WDAY surely covers that?

Im thinking maybe make a setting at the top like

Код:
//settings
new wtype = "WDAY";
and change the timer line to:

Код:
SetTimer("Msg", wtype, 1);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)