06.03.2014, 16:25
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:
Thank you for your help.
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;
}