Bubble chat -
HondaCBR - 28.12.2011
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
Re: Bubble chat -
rinori - 29.12.2011
pawn Код:
SetPlayerChatBubble(playerid, text[], color, Float:drawdistance, expiretime);
You mean adding bubble chat thing? Explain more.
Re: Bubble chat -
HondaCBR - 29.12.2011
how can i add so the chat comes up when you use.text in chat
Re: Bubble chat -
Oh - 29.12.2011
Just add
SetPlayerChatBubble(playerid, text, COLOR YOU WANT, 100.0, 10000);
Re: Bubble chat -
HondaCBR - 29.12.2011
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
Re: Bubble chat -
[ABK]Antonio - 29.12.2011
pawn Код:
if(!strcmp(text[0], ".", true))
{
SetPlayerChatBubble(playerid, text[1], 0xFF0000FF, 100.0, 10000);
return 0;
}
On OnPlayerText ofc
Re: Bubble chat -
HondaCBR - 29.12.2011
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;
}