[Help] Change World time.
#1


How to change the World Time In Game to Real Time in my country?



*Comment please.
Reply
#2

Код:
new Time;
foreach(Player, i)
{
     if(Time > 24) Time = 1;
     else Time++;
     SetPlayerTime(i, Time, 0);
}
And change it every 1 hour I guess
Reply
#3

still can not
Reply
#4

please help me ?


*reply this post
Reply
#5

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();
     }
}
Reply
#6

thanks
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)