28.08.2010, 10:18
How can i do that: If in real life(gettime, btw..) are 20h, in game will be dark? and la la la.... P.S only 20h.
SetTimer("Weather", 60000, 1); //OnGameModeInIt
forward Weather();
public Weather()
{
new hour, minute, second;
gettime(hour, minute, second);
if (hour == 20)
{
SetWeather(12);
}
}
//top
new ClockTime;
new Shour, Sminute, Ssecond;
forward Clock_Timer();
//---//
public OnGameModeInit() {
ClockTime = SetTimer("Clock_Timer", 1000, true);
}
public Clock_Timer() {
gettime(Shour, Sminute, Ssecond);
for(new i; i<MAX_PLAYERS; i++) SetPlayerTime(i, Shour, Sminute);
SetWorldTime(Shour);
}