Freeze weather + time
#1

How can i make the weather freeze and doesnt change? i got a /weather [weather id] but it just changes it and then the weather changes again. Same with day/night thingie
Reply
#2

use timer.
under your "OnGameModeInit" put:
pawn Код:
SetTimer("ChangeWeatherBack",60000,1);
somwhere in your GM:
pawn Код:
forward ChangeWeatherBack()
public ChangeWeatherBack()
{
for(new i = 0; i < MAX_PLAYERS; i++) {
SetPlayerWeather(i,Weatherid);
}
}
Reply
#3

Thanks, And for Day/Night ?
Reply
#4

Put this outside the loop
pawn Код:
SetWorldTime(12);//12:00
and this under OnPlayerConnect

pawn Код:
TogglePlayerClock(playerid, 0); // hide the clock
Reply
#5

Quote:
Originally Posted by viddo
Посмотреть сообщение
Thanks, And for Day/Night ?
just calculate.
Код:
1,000 = Second
60,000 = Minute
60,000 * 60 = 3,600,000 (1 hour)
3,600,000 * 24 = 86,400,000 (< Full day)
86,400,000 / 2 = 43,200,000 (< Half day)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)