SA-MP Forums Archive
[Ajuda] Cor do Relogio - 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: [Ajuda] Cor do Relogio (/showthread.php?tid=361736)



Cor do Relogio - EbinhO_EBN - 22.07.2012

Olб Galera, Estou com uma Duvida, queria Colocar meu Relogio, Dentro de uma Cor e Fora de Outra. eu Sei Onde Esta o Relogio. Por Favor Ajuda ae!!!
Obg!!!


Re: Cor do Relogio - F_Cinco - 22.07.2012

Nгo mexo muito com TextDrawns, mais aq vai um exemplinho.

pawn Код:
exemplo = TextDrawCreate(532.000000,435.000000,"texto");
TextDrawFont(exemplo,1);
TextDrawColor(exemplo,0xAA3333AA);
TextDrawLetterSize(exemplo,0.599999,1.000000);
TextDrawSetOutline(exemplo,1);
TextDrawSetShadow(exemplo,1);
TextDrawSetProportional(exemplo,1);
TextDrawBackgroundColor(exemplo,0x000000ff);
As funзхes TextDrawColor(exemplo,0xAA3333AA); e TextDrawBackgroundColor(exemplo,0x000000ff); correspondem as cores da TextDrawn, o prуprio nome jб diz na 2Є funзгo, BackgroundColor, entгo, certamente alн estб a cor de fundo, basta alterar nas suas Texts, conforme a sua vontade.

Boa Sorte!


Respuesta: Cor do Relogio - RedBulL_x - 22.07.2012

TextDrawColor - https://sampwiki.blast.hk/wiki/TextDrawColor
TextDrawBackgroundColor - https://sampwiki.blast.hk/wiki/TextDrawBackgroundColor

Seletor de cores - http://www.ladylony.com/seletordecores.htm


Re: Cor do Relogio - EbinhO_EBN - 22.07.2012

Ok Vo Tentar, mas eu mudo a cor assim ~b~ e tal. o codigo onde mudo e esse
pawn Код:
public reloginho(){
    SyncTime();
    new
        string[256],
        ano,
        mes,
        dia,
        horas,
        minutos,
        segundos;   //Relogio EBN
    getdate(ano, mes, dia);gettime(horas, minutos, segundos);
    format(string, sizeof string, "~y~~h~~h~~h~%d/%s%d/2012", dia, ((mes < 10) ? ("0") : ("")), mes);TextDrawSetString(Reloginho1, string);
    format(string, sizeof string, "~y~~h~~h~~h~%s%d:%s%d:%s%d", (horas < 10) ? ("0") : (""), horas, (minutos < 10) ? ("0") : (""), minutos, (segundos < 10) ? ("0") : (""), segundos);TextDrawSetString(Reloginho2, string);
    TextDrawShowForAll(Reloginho1);TextDrawShowForAll(Reloginho2);}
, mas tem uma parte onde mexe no text draw vo tentar aki, Obrigado Pelas Respostas

@Edit
Deu Certo Valeu


Respuesta: Cor do Relogio - RedBulL_x - 22.07.2012

pawn Код:
TextDrawBackgroundColor(Reloginho2, COR);
A cor vocк pode estar pegando no seletor de cores que postei ai em cima.
http://www.ladylony.com/seletordecores.htm
Nгo precisa ~r~, acho que esses codigos й apйnas pra GameTextForPlayer.


Re: Cor do Relogio - .FuneraL. - 22.07.2012

Este tipo de cor й apenas para string quando utilizar TextdrawSetString, para TextDrawColor e TextDrawBackgroundColor й cores Macro.


Re: Cor do Relogio - F_Cinco - 22.07.2012

Quote:
Originally Posted by EbinhO_EBN
Посмотреть сообщение
Ok Vo Tentar, mas eu mudo a cor assim ~b~ e tal. o codigo onde mudo e esse, mas tem uma parte onde mexe no text draw vo tentar aki, Obrigado Pelas Respostas
Use [*pawn][*/pawn], sem os asteriscos.

pawn Код:
public reloginho()
{
    SyncTime();
    new string[128],
        ano,
        mes,
        dia,
        horas,
        minutos,
        segundos; //Relogio EBN
        getdate(ano, mes, dia);gettime(horas, minutos, segundos);
        format(string, sizeof string, "~y~~h~~h~~h~%d/%s%d/2012", dia, ((mes < 10) ? ("0") : ("")), mes);
        TextDrawSetString(Reloginho1, string);
        format(string, sizeof string, "~y~~h~~h~~h~%s%d:%s%d:%s%d", (horas < 10) ? ("0") : (""), horas, (minutos < 10) ? ("0") : (""), minutos, (segundos < 10) ? ("0") : (""), segundos);
        TextDrawSetString(Reloginho2, string);
        TextDrawShowForAll(Reloginho1);
        TextDrawShowForAll( Reloginho2);
    return 1;
}
Mais afinal, oq a de errado com seu cуdigo?


Respuesta: Cor do Relogio - RedBulL_x - 22.07.2012

Atб ele usa String, agora que fui perceber. -facepalms


Re: Cor do Relogio - EbinhO_EBN - 22.07.2012

Resolvido