SA-MP Forums Archive
[Pedido] AJUDA TEMPO SERVE - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] AJUDA TEMPO SERVE (/showthread.php?tid=462410)



AJUDA TEMPO SERVE - powerths - 06.09.2013

Alguem sabe me dizer ou manda um codigo de clima, Tipo 8:00 da manhan o ( ID Clima 15 ) ai quando dб as 17:00 da noite ai ja muda para ( ID Clima 30 ), Depois das 21:00 ai muda clima ( ID Clima 38 ) Se alguem me puder ajudar como fazer isso ou atй mesmo fazer o codigo pra min eu agradeзo.


Re: AJUDA TEMPO SERVE - Kuddy - 06.09.2013

Isso й o bбsico do bбsico sobre variбveis.


Re: AJUDA TEMPO SERVE - Coe1 - 06.09.2013

pawn Код:
public OnGameModeInit()
{
    SetTimer( "Tempo", 10000, false );
    return 1;
}

forward Tempo();
public Tempo()
{
    new
        hora,
        minuto,
        segundos
    ;
    gettime( hora, minuto, segundos );
    if( hora == 6 )
        SetWorldTime( 8 );
    else if( hora == 12 )
        SetWorldTime( 10 );
    else if( hora == 13 )
        SetWorldTime( 16 );
    else if( hora == 17 )
        SetWorldTime( 21 );
    else if( hora == 20 )
        SetWorldTime( 23 );
    else if( hora == 22 )
        SetWorldTime( 0 );
    else if( hora == 0 )
        SetWorldTime( 3 );
    else if( hora == 5 )
        SetWorldTime( 5 );
    return 1;
}



Re: AJUDA TEMPO SERVE - powerths - 06.09.2013

Quote:
Originally Posted by Coe1
Посмотреть сообщение
pawn Код:
public OnGameModeInit()
{
    SetTimer( "Tempo", 10000, false );
    return 1;
}

forward Tempo();
public Tempo()
{
    new
        hora,
        minuto,
        segundos
    ;
    gettime( hora, minuto, segundos );
    if( hora == 6 )
        SetWorldTime( 8 );
    else if( hora == 12 )
        SetWorldTime( 10 );
    else if( hora == 13 )
        SetWorldTime( 16 );
    else if( hora == 17 )
        SetWorldTime( 21 );
    else if( hora == 20 )
        SetWorldTime( 23 );
    else if( hora == 22 )
        SetWorldTime( 0 );
    else if( hora == 0 )
        SetWorldTime( 3 );
    else if( hora == 5 )
        SetWorldTime( 5 );
    return 1;
}
TESTANDO..


Re: AJUDA TEMPO SERVE - powerths - 06.09.2013

O codigo que vc passo compilou sertinho mais nгo muda o tempo : /