SA-MP Forums Archive
[Ajuda] Esconder TextDraw durante seleзгo de skin - 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] Esconder TextDraw durante seleзгo de skin (/showthread.php?tid=436776)



Esconder TextDraw durante seleзгo de skin - focaximubh - 12.05.2013

Boa tarde, pois й gostaria de saber uma coisinha, estou com um problema para saber como eu faria para esconder uma uma textdraw durante a seleзгo de skin de forma que ela volte quando o player dк Spawn.....


pawn Код:
new Text:ScoreTextDraw[MAX_PLAYERS]
//Gostaria de usar este TextDrawHideForPlayer no
Public OnPlayerRequestClass...;

Tentei da seguinte forma:

TextDrawHideForPlayer(playerid, ScoreTextDraw[playerid]);

Lembrando: Quando eu uso TextDrawHideForPlayer(playerid, ScoreTextDraw[playerid]);
a textdraw desejada somente desaparece por milйsimos de segundos quando aperta a seta para selecionar a skin....
//Sem sucesso......

Tentei: TextDrawDestroy(ScoreTextDraw[playerid]);
public OnPlayerSpawn

TextDrawShowForPlayer(playerid, ScoreTextDraw[playerid]);
ESTE Й O CУDIGO COMPLETO....

pawn Код:
//No Topo do GM:

new Text:ScoreTextDraw[MAX_PLAYERS];



//No OnGameModeInit:

SetTimer("AtualizarScore", 1000, true);
    for(new x = 0; x < MAX_PLAYERS; x++)
    {
        ScoreTextDraw[x] = TextDrawCreate(32.000000, 317.000000, "Score: 1000000");
        TextDrawBackgroundColor(ScoreTextDraw[x], 255);
        TextDrawFont(ScoreTextDraw[x], 1);
        TextDrawLetterSize(ScoreTextDraw[x], 0.440000, 1.500000);
        TextDrawColor(ScoreTextDraw[x], -1);
        TextDrawSetOutline(ScoreTextDraw[x], 0);
        TextDrawSetProportional(ScoreTextDraw[x], 1);
        TextDrawSetShadow(ScoreTextDraw[x], 1);
    }



//E, no Final do GM:

forward AtualizarScore();
public AtualizarScore()
{
    for(new x = 0, y = GetMaxPlayers(); x != y; x++)
    {
        if(!IsPlayerConnected(x)) continue;
        new STR[26];
        format(STR, 26, "~r~Score: ~w~%d", GetPlayerScore(x));
        TextDrawShowForPlayer(x, ScoreTextDraw[x]);
        TextDrawSetString(ScoreTextDraw[x], STR);
    }
    return true;
}
Se ajudarem ficarei grato


Re: Esconder TextDraw durante seleзгo de skin - xRaZeR - 12.05.2013

TextDrawHideForPlayer


Re: Esconder TextDraw durante seleзгo de skin - .FuneraL. - 12.05.2013

Crie a textdraw e apenas mostre-a no OnPlayerSpawn.