[Help] Change World time. - 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: [Help] Change World time. (
/showthread.php?tid=504113)
[Help] Change World time. -
Elanggg - 02.04.2014
How to change the World Time In Game to Real Time in my country?
*Comment please.
Re: [Help] Change World time. -
LocMax - 02.04.2014
Код:
new Time;
foreach(Player, i)
{
if(Time > 24) Time = 1;
else Time++;
SetPlayerTime(i, Time, 0);
}
And change it every 1 hour I guess
Re: [Help] Change World time. -
Elanggg - 02.04.2014
still can not
Re: [Help] Change World time. -
Elanggg - 02.04.2014
please help me ?
*reply this post
Re: [Help] Change World time. -
LocMax - 02.04.2014
What still can not? you need to add a timer.
If you have 1 second timer running already then add this:
On top of script;
Код:
new changedtime, Time;
In the function which is ran with a timer of 1 second
Код:
if(gettime() - changedtime > 6000)
{
foreach(Player, i)
{
if(Time > 24) Time = 1;
else Time++;
SetPlayerTime(i, Time, 0);
changedtime = gettime();
}
}
Re: [Help] Change World time. -
Elanggg - 02.04.2014
thanks