SetPlayerChatBubble

From SA-MP Wiki

Revision as of 09:31, 27 August 2019; view current revision
←Older revision | Newer revision→
Jump to: navigation, search


SetPlayerChatBubble was added in SA-MP 0.3a This function was added in SA-MP 0.3a and will not work in earlier versions!


Description:

Creates a chat bubble above a player's name tag.


Parameters:
(playerid, text[], color, Float:drawdistance, expiretime)
playeridThe player which should have the chat bubble.
text[]The text to display.
colorThe text color
drawdistanceThe distance from where players are able to see the chat bubble.
expiretimeThe time in miliseconds the bubble should be displayed for.


Return Values:

  • 1: The function executed successfully.
  • 0: The function failed to execute. This means the player specified does not exist.


Image:32px-Ambox_warning_orange.png

Note

You can't see your own chatbubbles. The same applies to attached 3D text labels.


Example Usage:

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


Tips

Image:Light_bulb_icon.png

  • You can use color embedding for multiple colors in the message.
  • Using '-1' as the color will make the text white (for the simple reason that -1, when represented in hexadecimal notation, is 0xFFFFFFFF).

In other languages