Bubble chat
#1

Im using local chat:
pawn Код:
public OnPlayerText(playerid, text[])
{
    new string[256];
    new sendername[MAX_PLAYER_NAME];
    if(gPlayerLogged[playerid] == 0)
    {
        return 0;
    }
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "%s mуwi: %s", sendername, text);
    ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
    ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,4,4);
    return 0;
}
What can I add to that so when you type for example .yo, it comes up in a bubble for few seconds, when you use a "." before the text
Reply
#2

pawn Код:
SetPlayerChatBubble(playerid, text[], color, Float:drawdistance, expiretime);
You mean adding bubble chat thing? Explain more.
Reply
#3

how can i add so the chat comes up when you use.text in chat
Reply
#4

Just add
SetPlayerChatBubble(playerid, text, COLOR YOU WANT, 100.0, 10000);
Reply
#5

But I dont want the chat to be in a bubble all the time.

hello - normal chat
.hello - in a bubble

so could someone add this part that checks for a "." before text, and if . is the first thing on the chat. It will come up in a bubble
Reply
#6

pawn Код:
if(!strcmp(text[0], ".", true))
{
    SetPlayerChatBubble(playerid, text[1], 0xFF0000FF, 100.0, 10000);
    return 0;
}
On OnPlayerText ofc
Reply
#7

I added it, but the text comes on chat with .text

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(!strcmp(text[0], ".", true))
    {
        SetPlayerChatBubble(playerid, text[1], 0xFF0000FF, 100.0, 10000);
        return 0;
    }
    new string[256];
    new sendername[MAX_PLAYER_NAME];
    if(gPlayerLogged[playerid] == 0)
    {
        return 0;
    }
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "%s mуwi: %s", sendername, text);
    ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
    ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,4,4);
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)