Server time
#1

Hello.

I make this for changing server time (real time).

But when is 0 minute she spam 10 time,becouse this public called by timer every 10 seconds.

Who can help me and say me how to make better function?

Код:
public MedServerTimer1()
{
    new Minute;
    gettime(Minute);
    if(Minute == 0)
    {
    new Hour, Second;
    gettime(Hour,Second);
    if(Second > 15) return 1;
    SetWorldTime(Hour);

	new string[124];
    format(string, sizeof(string),""COL_LIME"[ULN]: "COL_WHITE"Sada je %d sati. Vrijeme je: Vedro.", Hour);
   	SendClientMessageToAll(-1,string);
    }

    return 1;
}
Reply
#2

What are you trying to do exactly? Are you trying to do something when the time changes to X:00 for example 2:00.

?
Reply
#3

when is 00 minutes change to next hour
Reply
#4

You could try this.

PHP код:
public MedServerTimer1()
{
    new 
HourSecondMinute;
    
gettime(HourMinuteSecond);
    if(
Hour >= && Minute == && Second == 0)
    {
        
SetWorldTime(Hour);

        new 
string[124];
        
format(stringsizeof(string),""COL_LIME"[ULN]: "COL_WHITE"Sada je %d sati. Vrijeme je: Vedro."Hour);
           
SendClientMessageToAll(-1,string);
    }
    return 
1;

Reply
#5

Thanks but im fixed rep+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)