Chatbubble
#2

Quote:
Originally Posted by Dan.
Посмотреть сообщение
How long can I display a chatbubble? I tried using this, but the text wont appear on his head:
pawn Код:
format(text, sizeof(text), "%s\n%s", RankName(playerid), ClassName(playerid))
SetPlayerChatBubble(playerid, text, TeamColor(playerid), 100.0, 10000*10*60);
I used 3DTextLabels before, but it will overlap the players name when you are like 10-... meters away from them.
You can use a timer/OnPlayerUpdate and use 3dtexts/SetPlayerChatBubble.]

A little example:

pawn Код:
SetTimer( "UpdatePlayerText", 1000, true );

forward UpdatePlayerText( );

public UpdatePlayerText( )
{
    for( new f = 0; f < MAX_PLAYERS; f++ )
    {
        if( IsPlayerConnected( f ) )
        {
            format(text, sizeof(text), "%s\n%s", RankName(playerid), ClassName(playerid));
            Update3DTextLabelText(YOUR_3dTEXT_ID, 0xFFFFFFFF, text); // or just replace it with Chatbubble
        }
    }
}
Reply


Messages In This Thread
Chatbubble - by Dan. - 24.08.2012, 11:01
Re: Chatbubble - by FalconX - 24.08.2012, 11:02
Re: Chatbubble - by [M.A]Angel[M.A] - 24.08.2012, 11:08
Re: Chatbubble - by Dan. - 24.08.2012, 11:11

Forum Jump:


Users browsing this thread: 1 Guest(s)