How can i make a auto-time changer?
#3

Quote:
Originally Posted by ronyx69
Under includes:
Код:
new weatherids[21] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
forward OnServerChangeWeather();
Under OnGameModeInIt:
Код:
SetTimer("OnServerChangeWeather", 300000, true);
Anywhere in your script since it is not in another callback:
Код:
public OnServerChangeWeather()
{
	new azhour, azminute, azsecond;
	gettime(azhour, azminute, azsecond);
	SetWorldTime(azhour);
    new weatherid = weatherids[random(21)];
    SetWeather(weatherid);
	return 1;
}
This will also sync the time in real world and game.
THANXXXXXXXXXXXXX!!!!!!!!!!!!!!!!!!!!!!!!
Reply


Messages In This Thread
How can i make a auto-time changer? - by arie9000nerd - 28.07.2009, 10:13
Re: How can i make a auto-time changer? - by ronyx69 - 28.07.2009, 11:42
Re: How can i make a auto-time changer? - by arie9000nerd - 28.07.2009, 12:53

Forum Jump:


Users browsing this thread: 1 Guest(s)