After 9 PM weather change - 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)
+--- Thread: After 9 PM weather change (
/showthread.php?tid=388859)
After 9 PM weather change -
SkyWings - 30.10.2012
How i can make a script wich i can change after 9 PM to evening weather?
AW: After 9 PM weather change -
Skimmer - 30.10.2012
Do you use a script for server time ?
Код:
static Minute, Second;
etc.
Re: After 9 PM weather change -
SkyWings - 30.10.2012
No, i didn't use any scripts for server time.
AW: After 9 PM weather change -
Skimmer - 30.10.2012
Copy this top of the script.
Код:
static Minute, Second;
forward SecondTimer();
Add this under
OnGameModeInit()
Код:
SetTimer("SecondTimer", 1000, 1);
Copy this script bottom of the script.
Код:
public SecondTimer()
{
Second++;
if(Second == 60)
{
Second = 0;
Minute++;
if(Minute == 21) // It's 9 PM
{
SetWeather(3); // Your weather ID
}
if(Minute == 24)
{
Minute = 0;
}
}
return 1;
}
This under
OnPlayerStateChange()
Код:
SetPlayerTime(playerid, Minute, Second);
Visit
http://weedarr.wikidot.com/weather for a list of weather IDs with pictures!
Re: After 9 PM weather change -
SkyWings - 30.10.2012
Thanks dude
AW: After 9 PM weather change -
Skimmer - 30.10.2012
No problem.