Weather Timer?
#2

Maybe you forgot something, I'll make you a new one, just follow the tutorial!
1. add
Код:
forward RandomWeather();
2. search "enum pinfo" and then add:
Код:
enum weather_info
{
	wt_id,
	wt_text[255]
};

new gRandomWeatherIDs[][weather_info] =
{
	{1,"Plavo nebo"},
	{2,"Plavo nebo"},
	{3,"Plavo nebo"},
	{7,"Plavo nebo"},
	{8,"Oluja"},
	{9,"Hladno i maglovito"},
	{10,"Čisto Plavo nebo"},
 	{11,"Vrućina"},
	{12,"Normalno,Suncano"},
	{16,"Kiљovito"}
};
3. go on "ongamemodeinit" and add
Код:
SetTimer("RandomWeather", 600000, 1);
4. go on at the end of Scripts and add
Код:
public RandomWeather()
{
	new rand = random(sizeof(gRandomWeatherIDs));
	new strout[256];
	format(strout, sizeof(strout), "Vremenska prognoza: Vrijeme ce biti %s", gRandomWeatherIDs[rand][wt_text]);
	SetWeather(gRandomWeatherIDs[rand][wt_id]);
	SendClientMessageToAll(COLOR_LIGHTGREEN,strout);
	print(strout);
}
This code is on croatian language,easily translate If there is something not good to say.
SORRY FOR MY BAD ENGLISH!
Reply


Messages In This Thread
Weather Timer? - by Luis- - 07.11.2010, 14:38
Re: Weather Timer? - by Ivica_Razor - 07.11.2010, 15:08
Re: Weather Timer? - by gr56 - 07.11.2010, 15:41
Re: Weather Timer? - by Luis- - 07.11.2010, 16:04
Re: Weather Timer? - by TouR - 07.11.2010, 16:07

Forum Jump:


Users browsing this thread: 1 Guest(s)