Chatbubble
#1

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.
Reply
#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
#3

Not important to use it just put //SetPlayerChatBubble(playerid, text, TeamColor(playerid), 100.0, 10000*10*60);
And add code:
SendClientMessageToAll(GetPlayerColor(playerid),st ring);
____________________
MY SERVER:

Server forum
-------
Be$t Host for your server : HostingTime Easy control panel with 1Euro for 20 slots.
Reply
#4

Angel, that line is in my code and it's not working. I guess you cant show a chatbubble over few seconds? So I think I have to use a loop to set it every second, alright thanks for the help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)