BubbleChat
#8

Ok I sorted everything out now.
pawn Код:
public OnPlayerText(playerid, text[])
{
    if(text[0]=='.')
    {
        new string[256];
        format(string, sizeof(string), "((%s))",text[1]);
        SetPlayerChatBubble(playerid, string, COLOR_LIGHTLIGHTBLUE, 15.0, 7000);

        new string2[256];
        format(string2, sizeof(string2), "[ID:%d][OOC]Oscar Gonzalez: %s",playerid,text[1]);
        SendClientMessage(playerid, COLOR_WHITE, string2);

        return 0;
    }
    if(text[1]=='!')
    {
        new string[256];
        new sendername[MAX_PLAYER_NAME];
        if(gPlayerLogged[playerid] == 0)
        {
            return 0;
        }
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "%s krzyczy: %s!!", sendername, text);
        ProxDetector(40.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
        return 0;
    }
    else
    {
        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;
    }
    return 1;
}
All i need now, is in the second part:

pawn Код:
if(text[1]=='!')
    {
        new string[256];
        new sendername[MAX_PLAYER_NAME];
        if(gPlayerLogged[playerid] == 0)
        {
            return 0;
        }
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "%s krzyczy: %s!!", sendername, text);
        ProxDetector(40.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
        return 0;
    }
So when you type "wtf is this!" it will work, because currently it only works if "!" is the 2nd character, and ideas? ! needs to be in somewhere but not first, it would be best if you could use it last.
Reply


Messages In This Thread
BubbleChat - by HondaCBR - 29.12.2011, 16:12
Re: BubbleChat - by James Coral - 29.12.2011, 16:17
Re: BubbleChat - by HondaCBR - 29.12.2011, 19:25
Re: BubbleChat - by thimo - 29.12.2011, 19:42
Re: BubbleChat - by HondaCBR - 29.12.2011, 21:43
Re: BubbleChat - by Azzeto - 29.12.2011, 21:53
Re: BubbleChat - by HondaCBR - 29.12.2011, 22:36
Re: BubbleChat - by HondaCBR - 30.12.2011, 01:06

Forum Jump:


Users browsing this thread: 1 Guest(s)