Help with TIME.
#5

Well. I'll explain.

This at top of your script:
Код:
SetTimer("NightWeather", 5000, true);//Repeating NightWeather evry 5 seconds
This will repeat the timer every 5 secconds.


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;
}
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 ^^
Reply


Messages In This Thread
Help with TIME. - by DriftboyZ - 01.06.2010, 17:59
Re: Help with TIME. - by DriftboyZ - 01.06.2010, 19:35
Re: Help with TIME. - by Naxix - 01.06.2010, 20:21
Re: Help with TIME. - by DriftboyZ - 01.06.2010, 21:44
Re: Help with TIME. - by bartje01 - 01.06.2010, 21:51
Re: Help with TIME. - by DriftboyZ - 02.06.2010, 16:55

Forum Jump:


Users browsing this thread: 1 Guest(s)