problem with worldtime and realtime
#1

im try to make a code that if the time is set to 1:00, 2:00 3:00 it automatically setworldtime and automatically setworldtime when the server start

SOLVED:
i just add && second == 0 inside together with the minute
then SetTimer("Time",1000,true); --> OnGameModeInit

here is my code
PHP код:
public Time()
{
    new 
hour,minute,second;
    
gettime(hour,minute,second);
    
FixHour(hour);
    
hour shifthour;
    if(
minute == 0
    {
        switch(
hour)
        {
            case 
1:{SetWorldTime(1);SetWeather(random(18));}
            case 
2: {SetWorldTime(2); SetWeather(random(18));}
            case 
3: {SetWorldTime(3); SetWeather(random(18));}
            case 
4: {SetWorldTime(4); SetWeather(random(18));}
            case 
5: {SetWorldTime(5); SetWeather(random(18));}
            case 
6: {SetWorldTime(6); SetWeather(random(18));}
            case 
7: {SetWorldTime(7); SetWeather(random(18));}
            case 
8: {SetWorldTime(8); SetWeather(random(18));}
            case 
9: {SetWorldTime(9); SetWeather(random(18));}
            case 
10: {SetWorldTime(10);SetWeather(random(18));}
            case 
11: {SetWorldTime(11); SetWeather(random(18));}
            case 
12: {SetWorldTime(12); SetWeather(random(18));}
            case 
13: {SetWorldTime(13); SetWeather(random(18));}
            case 
14: {SetWorldTime(14); SetWeather(random(18));}
            case 
15: {SetWorldTime(15); SetWeather(random(18));}
            case 
16: {SetWorldTime(16); SetWeather(random(18));}
            case 
17: {SetWorldTime(17); SetWeather(random(18));}
            case 
18: {SetWorldTime(18); SetWeather(random(18));}
            case 
19: {SetWorldTime(19); SetWeather(random(18));}
            case 
20: {SetWorldTime(20); SetWeather(random(18));}
            case 
21: {SetWorldTime(21); SetWeather(random(18));}
            case 
22: {SetWorldTime(22); SetWeather(random(18));}
            case 
23: {SetWorldTime(23); SetWeather(random(18));}
            case 
24: {SetWorldTime(0);SetWeather(random(18));}
        }
    }

Reply


Messages In This Thread
problem with worldtime and realtime[SOLVED] - by drichie - 27.06.2013, 05:35
Re: problem with worldtime and realtime - by Niko_boy - 27.06.2013, 05:44
Re: problem with worldtime and realtime - by drichie - 27.06.2013, 06:04
Re: problem with worldtime and realtime - by drichie - 27.06.2013, 06:56
Re: problem with worldtime and realtime - by drichie - 27.06.2013, 09:03

Forum Jump:


Users browsing this thread: 1 Guest(s)