SA-MP Forums Archive
[ajuda]TextDraw nгo aparece - 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]TextDraw nгo aparece (/showthread.php?tid=347391)



[ajuda]TextDraw nгo aparece - SuperChock - 01.06.2012

Eu fiz um TextDraw com imagens, fiz tudo direitinho, se eu colocar outra imagem no lugar dessa, aparece certinho... mas essa nгo aparece. Alguйm saberia me dizer por que?


pawn Код:
new Text:Img;

public OnGameModeInit()
{
    Img = TextDrawCreate(-1.000000, 0.000000, "fronten2:back2"); // se trocar por "loadsuk:loadsc8" funciona perfeitamente.
    TextDrawUseBox(Img, true);
    TextDrawBackgroundColor(Img, 255);
    TextDrawFont(Img, 4);
    TextDrawLetterSize(Img, 0.500000, 1.000000);
    TextDrawColor(Img, -1);
    TextDrawSetOutline(Img, 0);
    TextDrawSetProportional(Img, 1);
    TextDrawSetShadow(Img, 1);
    TextDrawBoxColor(Img, 255);
    TextDrawTextSize(Img, 645.000000, 455.000000);
    return 1;
}

public OnPlayerConnect(playerid)
{
    TextDrawShorForPlayer(playerid, Img);
    return 1;
}
Eu queria muito usar essa imagem e jб vi servers usando... entгo tem que funcionar


Re: TextDraw nгo aparece - mau.tito - 01.06.2012

pawn Код:
public OnPlayerSpawn(playerid)
{
   TextDrawShowForPlayer(playerid, Img);
   TextDrawHideForPlayer(playerid, Img);
   return 0;
}



Re: TextDraw nгo aparece - SuperChock - 01.06.2012

Pra que mostrar e ocultar ele na mesma hora? Isso sim faria ele jamais aparecer... ¬¬


Re: TextDraw nгo aparece - sanalex - 01.06.2012

Tб loko mau.tito ele quer que a imagem apareзa apenas quando o cara se conectar.

Ver agora
pawn Код:
public OnGameModeInit()
{
    Img = TextDrawCreate(-1.000000, 0.000000, "back2:back2"); // se trocar por "loadsuk:loadsc8" funciona perfeitamente.
    TextDrawUseBox(Img, true);
    TextDrawBackgroundColor(Img, 255);
    TextDrawFont(Img, 4);
    TextDrawLetterSize(Img, 0.500000, 1.000000);
    TextDrawColor(Img, -1);
    TextDrawSetOutline(Img, 0);
    TextDrawSetProportional(Img, 1);
    TextDrawSetShadow(Img, 1);
    TextDrawBoxColor(Img, 255);
    TextDrawTextSize(Img, 645.000000, 455.000000);
    return 1;
}



Re: TextDraw nгo aparece - SuperChock - 01.06.2012

Sanalex, mesmo vocк tendo apenas trocado a imagem ela ainda nгo aparece.


Re: TextDraw nгo aparece - sanalex - 01.06.2012

Editei lб ver agora..


Re: TextDraw nгo aparece - SuperChock - 01.06.2012

Continua sem aparecer Sanalex, o cуdigo estб igualzinho ao meu.


Re: TextDraw nгo aparece - sanalex - 01.06.2012

Agora vai .

pawn Код:
public OnGameModeInit()
{
    Img = TextDrawCreate(-1.000000, 0.000000, "back2:back2"); // se trocar por "loadsuk:loadsc8" funciona perfeitamente.
    TextDrawUseBox(Img, true);
    TextDrawBackgroundColor(Img, 255);
    TextDrawFont(Img, 4);
    TextDrawLetterSize(Img, 0.500000, 1.000000);
    TextDrawColor(Img, -1);
    TextDrawSetOutline(Img, 0);
    TextDrawSetProportional(Img, 1);
    TextDrawSetShadow(Img, 1);
    TextDrawBoxColor(Img, 255);
    TextDrawTextSize(Img, 645.000000, 455.000000);
 for(new i; i < MAX_PLAYERS; i ++)
    {
        if(IsPlayerConnected(i))
        {
            TextDrawShowForPlayer(i, Img);
        }
    }

    return 1;
}
Faзo o teste tambйm com: fronten2:back2.

Vocк baixou o txdworkshop?


Re: TextDraw nгo aparece - SuperChock - 01.06.2012

Amigo, й contra a lуgica da programaзгo colocar aquele loop ali no OnGameModeInit... quando o gamemode iniciar nгo tem ninguйm conectado... entгo aquele cуdigo ali й inъtil. Mas mesmo assim eu testei ele, tanto com fronten2:back2 e back2:back2 e nenhum funcionou.

Nem conheзo esse "txdworkshop", eu uso o SpriteBrowser pra pegar as texturas e instalo elas pelo filterscript editor.


Re: TextDraw nгo aparece - sanalex - 01.06.2012

Vou nem comentar... provalmente vc nгo tem a textura..