SA-MP Forums Archive
[Ajuda] Bug - 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] Bug (/showthread.php?tid=498091)



Bug - Alisson Silva Alves - 01.03.2014

Oie

Tipo Eu Logo o Relуgio Ta La Em Cima, Mas Quando Loga Outro Player o Reloginho Some Da Minha Tela e Aparece Na Dele !

pawn Код:
new Text:Reloginho1;
new Text:Reloginho2;
forward reloginho(playerid);
pawn Код:
SetTimer("reloginho",1000,1);
pawn Код:
//===[Reloginho]================================================================
    Reloginho1 = TextDrawCreate(530.000000,5.000000,"--");
    Reloginho2 = TextDrawCreate(548.000000,23.000000,"--");
    TextDrawAlignment(Reloginho1,0);
    TextDrawAlignment(Reloginho2,0);
    TextDrawBackgroundColor(Reloginho1,0x000000FF);
    TextDrawBackgroundColor(Reloginho2,0x000000FF);
    TextDrawFont(Reloginho1,3);
    TextDrawLetterSize(Reloginho1,0.399999,2.000000);
    TextDrawFont(Reloginho2,3);
    TextDrawLetterSize(Reloginho2,0.399999,2.000000);
    TextDrawColor(Reloginho1,0x1C1C1CFF);
    TextDrawColor(Reloginho2,0x00FF00FF);
    TextDrawSetProportional(Reloginho1,1);
    TextDrawSetProportional(Reloginho2,1);
    TextDrawSetShadow(Reloginho1,1);
    TextDrawSetShadow(Reloginho2,1);
    TextDrawSetOutline(Reloginho1,1);
    TextDrawSetOutline(Reloginho2,1);
    TextDrawShowForAll(Reloginho1);
    TextDrawShowForAll(Reloginho2);
pawn Код:
TextDrawDestroy(Reloginho1);
    TextDrawDestroy(Reloginho2);
    TextDrawHideForAll(Reloginho1);
    TextDrawHideForAll(Reloginho2);
pawn Код:
TextDrawHideForAll(Reloginho1);
    TextDrawShowForPlayer(playerid, Reloginho1);
    TextDrawHideForAll(Reloginho2);
    TextDrawShowForPlayer(playerid, Reloginho2);
pawn Код:
public reloginho(playerid)
{
    new
        string[256],
        ano,
        mes,
        dia,
        horas,
        minutos,
        segundos;
    getdate(ano, mes, dia);
    gettime(horas, minutos, segundos);
    format(string, sizeof string, "%d/%s%d/2014", dia, ((mes < 10) ? ("0") : ("")), mes);
    TextDrawSetString(Reloginho1, string);
    format(string, sizeof string, "%s%d:%s%d:%s%d", (horas < 10) ? ("0") : (""), horas, (minutos < 10) ? ("0") : (""), minutos, (segundos < 10) ? ("0") : (""), segundos);
    TextDrawSetString(Reloginho2, string);
}
Podem Me Ajudar ?



Re: Bug - brunox - 02.03.2014

pawn Код:
// TextDrawHideForAll(Reloginho1); Tira isso
    TextDrawShowForPlayer(playerid, Reloginho1);
    // TextDrawHideForAll(Reloginho2); Tira isso
    TextDrawShowForPlayer(playerid, Reloginho2);



Re: Bug - yNexus - 02.03.2014

o erro esta ai

PHP код:
TextDrawHideForAll(Reloginho1);
    
TextDrawShowForPlayer(playeridReloginho1);
    
TextDrawHideForAll(Reloginho2);
    
TextDrawShowForPlayer(playeridReloginho2); 
o correto seria

PHP код:
TextDrawShowForPlayer(playeridReloginho1);
    
TextDrawShowForPlayer(playeridReloginho2);