SA-MP Forums Archive
[AJUDA] TextDraw - 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 (/showthread.php?tid=302477)



[AJUDA] TextDraw - [BWL]DuST - 09.12.2011

Coloquei um sistema de vezes que matou e vezes que morreu, no meu GM. Ta assim
pawn Код:
new Text:scoreT[MAX_PLAYER];
OnGameModeInit
pawn Код:
for( new i = 0; i < MAX_PLAYERS; i++ )
    {
        scoreT[ i ] = TextDrawCreate(12,208, "   " );
        TextDrawFont( scoreT[ i ], 3);
        TextDrawUseBox( scoreT[ i ], 0);
        TextDrawSetOutline( scoreT[ i ], 1);
        TextDrawBackgroundColor( scoreT[ i ], 0x000000FF);
        TextDrawColor( scoreT[ i ], 0x318CE7FF);
        TextDrawAlignment( scoreT[ i ], 1);
        TextDrawLetterSize(scoreT[ i ], 0.450000, 1.400000);
    }
OnPlayerSpawn
pawn Код:
for( new i = 0; i < MAX_PLAYERS; i++ )
    {
        if( IsPlayerConnected( i ) )
        {
TextDrawShowForPlayer( i, scoreT[ i ] );
}
}
SetTimerEx("AtualizarScore", 2000, true, "i", playerid);
pawn Код:
forward AtualizarScore();
public AtualizarScore()
{
     new usuario[ 86 ];
    for( new i = 0; i < MAX_PLAYERS; i++ )
    {
        if( IsPlayerConnected( i ) )
        {
        format(usuario, sizeof(usuario), Contas, Nome(i));
            format(usuario, sizeof(usuario), " ~W~Exp ~y~%d~p~/~r~3 ~p~] ~W~Score ~y~%d ~r~]", MMatou[i], GetPlayerScore(i));
            TextDrawSetString( scoreT[ i ], usuario);
        }
    }
    return 1;
}
Mais ta bugando pro id 1,nao sei se sу pro id 1, pq textei em 2, mas acho que sу pega pro ID 0, pra id 1+ apaece uma text em cima da outra pq ta assim? Alguem pode arrumar?


Re: [AJUDA] TextDraw - Vai_Besta - 09.12.2011

pawn Код:
forward AtualizarScore(playerid);
public AtualizarScore(playerid)
{
     new usuario[ 86 ];
     format(usuario, sizeof(usuario), " ~W~Exp ~y~%d~p~/~r~3 ~p~] ~W~Score ~y~%d ~r~]", MMatou[playerid], GetPlayerScore(playerid), GetPlayerWantedLevel(playerid));
     TextDrawSetString( scoreT[ playerid ], usuario);
    return 1;
}



Re: [AJUDA] TextDraw - [BWL]DuST - 09.12.2011

Sem o
pawn Код:
format(usuario, sizeof(usuario), Contas, Nome(i));
Nгo carrega as Informaзхes.


Re: [AJUDA] TextDraw - [BWL]DuST - 09.12.2011

Desculpa o DOuble mais por favor alguem me ajuda