01.06.2010, 21:51
Well. I'll explain.
This at top of your script:
This will repeat the timer every 5 secconds.
And this somewhere in your script:
Best to put it at the bottom.:
The i here:for(new i = 0; i < MAX_PLAYERS; i++)//
Will do it for all players. Means that the i is everyone.
SetPlayerTime(i,0,0);
That means that the time will set to 0,0 (midnight) for i. (everyone)
The SetPlayerWeather is just the same. You can change this to whatever you like.
18 is the nicest night weather. It looks very cool when there are many lights on the street ^^
This at top of your script:
Код:
SetTimer("NightWeather", 5000, true);//Repeating NightWeather evry 5 seconds
And this somewhere in your script:
Best to put it at the bottom.:
Код:
forward NightWeather(); public NightWeather() { for(new i = 0; i < MAX_PLAYERS; i++)// { SetPlayerTime(i, 0,0);//Sets all players time to 0 SetPlayerWeather(i, 18);//Sets all players weather to 16 } return 1; }
Will do it for all players. Means that the i is everyone.
SetPlayerTime(i,0,0);
That means that the time will set to 0,0 (midnight) for i. (everyone)
The SetPlayerWeather is just the same. You can change this to whatever you like.
18 is the nicest night weather. It looks very cool when there are many lights on the street ^^