Posts: 457
Threads: 7
Joined: Jul 2017
Quote:
Originally Posted by kAn3
Yes, but I'do it more short
PHP код:
forward ServerTime();
public ServerTime()
{
new h, m, s;
gettime(h, m, s);
foreach(Player, k)SetPlayerTime(k, h, m);
return 1;
}
PHP код:
SetTimer("ServerTime", 300000, true); // Check every 5 mins
Also, I'd suggest you to create an enum to store server variables just like server hour,minute and seconds, so you can create a clock with textdraws and add the current server time to it.
|
do you know what are you doing?
he want 4 hours of dark and 20 hours of morning
and instand of setting each player time you can set the whole server time by using SetWorldTime
your version is not optimized at all but it gonna work.