[AJUDA] Textdraw
#1

pawn Код:
forward AtualizarPing();
new Text:PingT[MAX_PLAYERS];
//init
    for( new i = 0; i < MAX_PLAYERS; i++ )
    {
        PingT[ i ] = TextDrawCreate(537.000000, 341.000000, "   " );
        TextDrawFont( PingT[ i ], 3);
        TextDrawUseBox( PingT[ i ], 0);
        TextDrawSetOutline( PingT[ i ], 1);
        TextDrawLetterSize(PingT[ i ], 0.290000, 1.300000);
        TextDrawBackgroundColor( PingT[ i ], 0x32CD32FF);
        TextDrawColor( PingT[ i ], 0x000000FF);
        TextDrawAlignment( PingT[ i ], 1);
    }

    SetTimer( "AtualizarPing", 1000, 1 );
//spawn
for( new i = 0; i < MAX_PLAYERS; i++ )
    {
        if( IsPlayerConnected( i ) )
        {
    TextDrawShowForPlayer( i, PingT[ i ] );
}
}
//public
public AtualizarPing()
{
    new string[ 16 ];
    for( new i = 0; i < MAX_PLAYERS; i++ )
    {
        if( IsPlayerConnected( i ) )
        {
            format( string, sizeof( string ), "Ping: %d Score:%d", GetPlayerPing(i),GetPlayerScore(i));
            TextDrawSetString( PingT[ i ], string);
        }
    }
    return 1;
}
oq a de eraado nisso?
o ping aparese de boa
o score aparese so a mentade porque ajuda ai
Ex score:%d lah aparese so Score tipo a metade
e quando eu ponho asim
Ex: %d aparese de boa ajuda ai
Reply
#2

tenta ae
pawn Код:
forward AtualizarPing();
new Text:PingT[MAX_PLAYERS];
//init
    for( new i = 0; i < MAX_PLAYERS; i++ )
    {
        PingT[ i ] = TextDrawCreate(537.000000, 341.000000, "   " );
        TextDrawFont( PingT[ i ], 3);
        TextDrawUseBox( PingT[ i ], 0);
        TextDrawSetOutline( PingT[ i ], 1);
        TextDrawLetterSize(PingT[ i ], 0.290000, 1.300000);
        TextDrawBackgroundColor( PingT[ i ], 0x32CD32FF);
        TextDrawColor( PingT[ i ], 0x000000FF);
        TextDrawAlignment( PingT[ i ], 2);
    }

    SetTimer( "AtualizarPing", 1000, 1 );
//spawn
for( new i = 0; i < MAX_PLAYERS; i++ )
    {
        if( IsPlayerConnected( i ) )
        {
    TextDrawShowForPlayer( i, PingT[ i ] );
}
}
//public
public AtualizarPing()
{
    new string[ 16 ];
    for( new i = 0; i < MAX_PLAYERS; i++ )
    {
        if( IsPlayerConnected( i ) )
        {
            format( string, sizeof( string ), "Ping: %d Score:%d", GetPlayerPing(i),GetPlayerScore(i));
            TextDrawSetString( PingT[ i ], string);
        }
    }
    return 1;
}
Reply
#3

So mudou a pos do text mais nao apareseu o score
Reply
#4

pawn Код:
//public
public AtualizarPing()
{
    new string[ 44 ];
    for( new i = 0; i < MAX_PLAYERS; i++ )
    {
        if( IsPlayerConnected( i ) )
        {
            format( string, sizeof( string ), "Ping: %d Score:%d", GetPlayerPing(i),GetPlayerScore(i));
            TextDrawSetString( PingT[ i ], string);
        }
    }
    return 1;
}
Reply
#5

Ninjas responderam '-' ¬¬ '-' -qqqqqqqqqqqqq
Reply
#6

allefereira vlw, so uma pergunta
quando entrar mais q 1 player nao vai tipo bugar?
Reply
#7

pawn Код:
Nгo .. ', mas se quiser testar manda ip ou add msn e manda ip
sa-mi-r@hotmail.com
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)