Weather
#1

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.
Reply
#2

https://sampwiki.blast.hk/wiki/SetWorldTime
or
https://sampwiki.blast.hk/wiki/SetPlayerTime
and
https://sampwiki.blast.hk/wiki/Gettime
Reply
#3

yeah i need same at SetWorldTime, but idk how can i do that.. ( t.y if 20h in real life, in game will be weather 12id.... )


t.y weather id will be 12, if hour are 19:00 >>>> 02:00
Reply
#4

BUMP, PLEASE...
Reply
#5

pawn Код:
SetTimer("Weather", 60000, 1); //OnGameModeInIt

forward Weather();
public Weather()
{
    new hour, minute, second;
    gettime(hour, minute, second);
    if (hour == 20)
    {
        SetWeather(12);
    }
}
Reply
#6

Just like this:

pawn Код:
//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);
}
Reply
#7

Thanks all..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)