Chatbubble - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Chatbubble (
/showthread.php?tid=371730)
Chatbubble -
Dan. - 24.08.2012
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.
Re: Chatbubble -
FalconX - 24.08.2012
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
}
}
}
Re: Chatbubble -
[M.A]Angel[M.A] - 24.08.2012
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.
Re: Chatbubble -
Dan. - 24.08.2012
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.