Weather - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Weather (
/showthread.php?tid=171899)
Weather -
AndriusZ* - 28.08.2010
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.
Re: Weather -
[HiC]TheKiller - 28.08.2010
https://sampwiki.blast.hk/wiki/SetWorldTime
or
https://sampwiki.blast.hk/wiki/SetPlayerTime
and
https://sampwiki.blast.hk/wiki/Gettime
Re: Weather -
AndriusZ* - 28.08.2010
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
Re: Weather -
AndriusZ* - 28.08.2010
BUMP, PLEASE...
Re: Weather -
Adil - 28.08.2010
pawn Код:
SetTimer("Weather", 60000, 1); //OnGameModeInIt
forward Weather();
public Weather()
{
new hour, minute, second;
gettime(hour, minute, second);
if (hour == 20)
{
SetWeather(12);
}
}
Re: Weather -
CAR - 28.08.2010
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);
}
Re: Weather -
AndriusZ* - 28.08.2010
Thanks all..