SA-MP Forums Archive
how to show a text over a player's head? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how to show a text over a player's head? (/showthread.php?tid=149287)



how to show a text over a player's head? - pmk1 - 21.05.2010

hey guys, i'd like to know hwo to show a text over a player's head? because while looking at the dialogs i made, i don't want the payer to move
( i used toggleplayercontrollable(playerid, 0) and i want the text BUSY to show on their heads. i tried something like
SetPlayerChatBubble(playerid, COLOR_YELLOW, "BUSY"); then i tried:

SetPlayerChatBubble(playerid, COLOR_YELLOW, 100.0, 0, "BUSY");

but it was a fail and said: tags mismatched. i don't think it's too hard to do, can someone help me out? thanks


Re: how to show a text over a player's head? - iStarzz - 21.05.2010

https://sampwiki.blast.hk/wiki/SetPlayerChatBubble


Re: how to show a text over a player's head? - pmk1 - 21.05.2010

banned, you did not get what i want. i know how to use setchatbubble, i meant how to set a text over a player's head permanently?


Re: how to show a text over a player's head? - rbN. - 21.05.2010

You done it wrong?:

Wikipedia:

https://sampwiki.blast.hk/wiki/SetPlayerChatBubble

Code:
public OnPlayerText(playerid, text[])
{
  SetPlayerChatBubble(playerid, text, 0xFF0000FF, 100.0, 10000);
  return 1;
}
Quote:

(playerid, text[], color, Float:drawdistance, expiretime)

playerid The player which should have the chat bubble.
text[] The text to display.
color The text color
drawdistance The distance from where players are able to see the chat bubble.
expiretime The time in miliseconds the bubble should be displayed for.

I don't know if im right, coz im sux scripter =D


Re: how to show a text over a player's head? - DJDhan - 21.05.2010

Use CreatePlayer3DTextLabel then attach it to a player head using Attach3DTextLabelToPlayer.


Re: how to show a text over a player's head? - pmk1 - 21.05.2010

no robin, i know how to use setchatbubble, i was wanting to add a text over a player'S head,

nvm djd got it, that was what i wanted, thanks