SA-MP Forums Archive
hello world i need little help - 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: hello world i need little help (/showthread.php?tid=629508)



hello world i need little help - Bojaa - 27.02.2017

I want to fix server hour on 20:00 never be changed does any one have script for that i used
PHP код:
SetPlayerTime(playerid120); // Noon
And
SetWorldTime 
But dont work?


Re: hello world i need little help - Ultraz - 27.02.2017

Explain with more details
PS: I'm back.

EDIT:
On top of script
Код:
new changedtime, Time;
In the function which is running with a timer of 2 second

Код:
if(gettime() - changedtime > 12000)
{
     foreach(Player, i)
     {
          if(Time > 24) Time = 1;
          else Time++;
          SetPlayerTime(i, Time, 0);
          changedtime = gettime();
     }
}
2ND EDIT:
https://sampwiki.blast.hk/wiki/SetWorldTime is the best stuff


Re: hello world i need little help - Bojaa - 28.02.2017

Any One Have Another code to set world time fixed on 20:00 means set server time to 20:00 never changed


Re: hello world i need little help - Sew_Sumi - 28.02.2017

-Edit- SetWorldTime sets time to a fixed state.


Re: hello world i need little help - Vince - 28.02.2017

What a load of shit. SetWorldTime fixes the time at the specified hour. Remove all references to TogglePlayerClock and SetPlayerTime.


Re: hello world i need little help - Sew_Sumi - 28.02.2017

Quote:
Originally Posted by Vince
Посмотреть сообщение
What a load of shit. SetWorldTime fixes the time at the specified hour. Remove all references to TogglePlayerClock and SetPlayerTime.
"My bad" I thought it rolled over...