time, data [clock]
#1

Here is the script. Updating time and date - every second. Tell me, is there a load on the server due to this timer? And is there an easier solution for setting the clock / date on the server?
And another question, tell me how to change the time zone on the server? SetWorldTime does not help ...
PHP код:
SetTimer("time"1000true);
forward time();
public 
time()
{
        new 
string[256], yearmonthdayhoursminutesseconds;
        
getdate(yearmonthday), gettime(hoursminutesseconds);
        
format(stringsizeof string"%d/%s%d/%s%d"day, ((month 10) ? ("0") : ("")), month, (year 10) ? ("0") : (""), year);
        
TextDrawSetString(Datestring);
        
format(stringsizeof string"%s%d:%s%d:%s%d", (hours 10) ? ("0") : (""), hours, (minutes 10) ? ("0") : (""), minutes, (seconds 10) ? ("0") : (""), seconds);
        
TextDrawSetString(Timestring);

Reply


Messages In This Thread
time, data [clock] - by EvgeniyHostel1992 - 02.03.2018, 15:18
Re: time, data [clock] - by NaS - 02.03.2018, 15:33
Re: time, data [clock] - by EvgeniyHostel1992 - 02.03.2018, 18:29
Re: time, data [clock] - by NaS - 02.03.2018, 19:10
Re: time, data [clock] - by EvgeniyHostel1992 - 02.03.2018, 19:20

Forum Jump:


Users browsing this thread: 1 Guest(s)