SA-MP Forums Archive
SetPlayerChatBubble Help with admin chat. - 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)
+--- Thread: SetPlayerChatBubble Help with admin chat. (/showthread.php?tid=499104)



SetPlayerChatBubble Help with admin chat. - Necip - 06.03.2014

I have an admin chat system, which you can chat using "." at start or "," for higher ranks. I tried to make it so that Chat Bubble doesn't show the chat, but it does. This is the OnPlayerText and what I tried to do:
pawn Код:
public OnPlayerText(playerid, text[])
{
    if(text[0] != '.' || text[0] != ',')
    {
        SetPlayerChatBubble(playerid, text, -1, 100.0, 5000);
    }
    if(text[0] == '.' && PlayerInfo[playerid][Level] >= 1) {
        new string[128]; GetPlayerName(playerid,string,sizeof(string));
        format(string,sizeof(string),"A.Chat:[%i]%s: %s",playerid,string,text[1]);
        MessageToAdmins(COLOR_PINK,string);
        return 0;
    }
    if(text[0] == ',' && PlayerInfo[playerid][Level] >= 5) {
        new string[128]; GetPlayerName(playerid,string,sizeof(string));
        format(string,sizeof(string),"L5.Chat:[%i]%s: %s",playerid,string,text[1]);
        MessageTo5(GREEN,string);
        return 0;
    }
    return 1;
}
Thank you for your help.


Re: SetPlayerChatBubble Help with admin chat. - park4bmx - 06.03.2014

you cant compare strings like that !
Strcmp