Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: LuGiCH poslato Maj 09, 2019, 14:11:12 POSLE PODNE

Naslov: Problem oko VremeInGame
Poruka od: LuGiCH poslato Maj 09, 2019, 14:11:12 POSLE PODNE
Problem(error/warning): Zbog hostinga mi je vreme na serveru kada je npr. 21:00 server kaze daje 22:00. Ako postoji nesto kako da pomerim sat unapred 1h.
Deo skripte: [ pawn ][pawn]   
   if( ( tmphour > ghour ) || ( tmphour == 0 && ghour == 23 ) ) {


       new stringic[ 15 ];
       format( stringic, sizeof( stringic ), "%d/%d/%d", day, month, year );
      TextDrawSetString( SMLinija[ 19 ], stringic );

      format( globalstring, sizeof( globalstring ), "Trenutno je %d:00 sati.", tmphour );
      OOCNews( BELA, globalstring );
      ghour = tmphour;

        if( tmphour == 21 ) {
         SetWeather( 10 );
      }

      if( realtime ) {
         SetWorldTime( tmphour );
         ServerInfo[ VremeInGame ] = tmphour;
      }[/pawn][ /pawn ]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]//[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): //
Naslov: Odg: Problem oko VremeInGame
Poruka od: // xunder poslato Maj 09, 2019, 16:35:33 POSLE PODNE

stock f_gettime(&hour, &minute, &second) {
new ret = gettime(hour, minute, second);
hour -= 1;
return ret - (60 * 60);
}

#if defined _ALS_gettime   
    #undef gettime
#else
    #define _ALS_gettime   
#endif
#define gettime f_gettime 


Stavi ovo ispred svih gettime funkcija
Tipa ispod a_samp includea bi bilo ok