use on server update for nye timer

This commit is contained in:
Lorenc Pekaj 2018-12-27 18:30:50 +11:00
parent 6b2aecf757
commit 8d23fa1c90

View File

@ -22,7 +22,7 @@ hook OnScriptInit( )
return 1;
}
hook OnServerTickSecond( )
hook OnServerUpdate( )
{
new iCompare = NEW_YEAR_TIMESTAMP - GetServerTime( );
@ -30,7 +30,7 @@ hook OnServerTickSecond( )
if ( ! bNewYear ) {
if ( ! iCompare ) {
TextDrawSetString( g_NewYearCDTD[ 0 ], "~y~HAPPY NEW YEAR!" ), bNewYear = true;
TextDrawSetString( g_NewYearCDTD[ 0 ], "~y~Happy New Year!" ), bNewYear = true;
} else {
TextDrawSetString( g_NewYearCDTD[ 0 ], sprintf( "%s~n~ till %d", secstonewyear( iCompare ), NEW_YEAR ) );
}