My onlinetimer is getting stucked!
#1

Hello Guys,

I have an online timer which modifies the worldtime in this form:Hour:minute | Day
Is working fine but after 2 days of uptime its getting stucked at a date..
I have no idea why,maybe if i'll show the code you could help me:
The timer added to OnGameModeInit:
pawn Код:
SetTimer( "onlineTimer", 1000, true );
And the online timer function:
pawn Код:
function onlineTimer( )
{
    new S_TIME[ 6 ], S_DAY[ 256 ], S_STRING[ 256 ];
    getdate( S_TIME[ 0 ], S_TIME[ 1 ], S_TIME[ 2 ] );
    gettime( S_TIME[ 3 ], S_TIME[ 4 ], S_TIME[ 5 ] );

    switch( GetDay( S_TIME[ 2 ], S_TIME[ 1 ], S_TIME[ 0 ] ) )
    {
        case 1: S_DAY = "Luni";
        case 2: S_DAY = "Marti";
        case 3: S_DAY = "Miercuri";
        case 4: S_DAY = "Joi";
        case 5: S_DAY = "Vineri";
        case 6: S_DAY = "Sambata";
        case 7: S_DAY = "Duminica";
    }
    format( S_STRING, sizeof( S_STRING ), "worldtime %02d:%02d | %s", S_TIME[ 3 ], S_TIME[ 4 ], S_DAY );
    SendRconCommand( S_STRING );
}
Sorry,if I couldn't explained it very well!
Reply
#2

UP!Please,answer
Reply
#3

Any ideas?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)