SA-MP Forums Archive
[Pedido]tempo teal - 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]tempo teal (/showthread.php?tid=346779)



[Pedido]tempo teal - [Dk]TuReTOo - 30.05.2012

Boas alguem me consegue arranjar um sistema de tempo real ?? se ficar noite aqui no servidor tambem fica, e ficar dia tambem fica, etc
agradeзo ^^

Jб usei search nao encontro..


Re: [Pedido]tempo teal - .FuneraL. - 30.05.2012

Quote:
Originally Posted by [Dk]TuReTOo
Посмотреть сообщение
Boas alguem me consegue arranjar um sistema de tempo real ?? se ficar noite aqui no servidor tambem fica, e ficar dia tambem fica, etc
agradeзo ^^

Jб usei search nao encontro..
No Proprio "SA:MP Windows Server" jб vem um filterscript que faz isso .-.


AW: [Pedido]tempo teal - kinhobryant - 30.05.2012

Use SetWorldTime na stock SetHorA


Re: [Pedido]tempo teal - [Dk]TuReTOo - 30.05.2012

gl_realtime isso e da hora e nao do tempo....


Re: [Pedido]tempo teal - ViniBorn - 30.05.2012

Basta usar SetWorldTime de acordo com o seu fuso horбrio.

No Brasil, por exemplo, eu uso da seguinte forma
pawn Код:
SetWorldTime(HORA+3);
Dessa forma o servidor fica escuro por volta de 18 / 19 horas


Re: [Pedido]tempo teal - Delete_ - 30.05.2012

pawn Код:
new Hour, Min, Sec;
    gettime(Hour,Min,Sec);
    new string2[16];
    switch(Hour){

    case 0..5:
    {
        format(string2, sizeof(string2), "~y~Boa Madruga");
        GameTextForPlayer(playerid, string2, 5000, 1);
        SetWorldTime(3);
    }
    case 6..11:
    {
        format(string2, sizeof(string2), "~y~Bom Dia");
        GameTextForPlayer(playerid, string2, 5000, 1);
        SetWorldTime(7);
    }
    case 12..18:
    {
        format(string2, sizeof(string2), "~y~Boa Tarde");
        GameTextForPlayer(playerid, string2, 5000, 1);
        SetWorldTime(15);
    }
    case 19..23:
    {
        format(string2, sizeof(string2), "~y~Boa Noite");
        GameTextForPlayer(playerid, string2, 5000, 1);
        SetWorldTime(24);
        }
    }



Re: [Pedido]tempo teal - StrondA_ - 30.05.2012

Corrigindo e funcionando perfeitamente do jeito que vocк quer:

pawn Код:
public OnPlayerSpawn(playerid)
{
    new Hour, Min, Sec;
    gettime(Hour,Min,Sec);
    switch(Hour)
    {
        case 0..5:
        {
            GameTextForPlayer(playerid, "~y~Boa Madrugada", 2000, 6), SetWorldTime(3);
        }
        case 6..11:
        {
            GameTextForPlayer(playerid, "~g~Bom Dia", 2000, 6), SetWorldTime(7);
        }
        case 12..18:
        {
            GameTextForPlayer(playerid, "~r~Boa Tarde", 2000, 6), SetWorldTime(15);
        }
        case 19..23:
        {
            GameTextForPlayer(playerid, "~w~Boa Noite", 2000, 6), SetWorldTime(24);
        }
    }
    return 1;
}
+ Reputaзгo para o delete.


Re: [Pedido]tempo teal - Delete_ - 30.05.2012

/\ Entra no msn .-.


Re: [Pedido]tempo teal - Smoking_Script - 28.01.2013

Quote:
Originally Posted by delete
Посмотреть сообщение
pawn Код:
new Hour, Min, Sec;
    gettime(Hour,Min,Sec);
    new string2[16];
    switch(Hour){

    case 0..5:
    {
        format(string2, sizeof(string2), "~y~Boa Madruga");
        GameTextForPlayer(playerid, string2, 5000, 1);
        SetWorldTime(3);
    }
    case 6..11:
    {
        format(string2, sizeof(string2), "~y~Bom Dia");
        GameTextForPlayer(playerid, string2, 5000, 1);
        SetWorldTime(7);
    }
    case 12..18:
    {
        format(string2, sizeof(string2), "~y~Boa Tarde");
        GameTextForPlayer(playerid, string2, 5000, 1);
        SetWorldTime(15);
    }
    case 19..23:
    {
        format(string2, sizeof(string2), "~y~Boa Noite");
        GameTextForPlayer(playerid, string2, 5000, 1);
        SetWorldTime(24);
        }
    }
Deu certo aqui obrigado = )