Bug with chat! +rep
#1

I have a problem, not always but players reported that when they type something like: Blabla it shows 2 times some kind of bug, happend to me once if anyone knows the problem pls help.
Код:
public OnPlayerText(playerid, text[])
{
        SetPlayerChatBubble(playerid, text, 0xFF0000FF, 30.0, 5000);
	new is1=0;
 	new r=0;
 	while(strlen(text[is1]))
 	{
  	if('0'<=text[is1]<='9')
  	{
 	new is2=is1+1;
  	new p=0;
   	while(p==0)
  	{
   	if('0'<=text[is2]<='9'&&strlen(text[is2])) is2++;
 	else
  	{
   	strmid(strR[r],text,is1,is2,255);
   	if(strval(strR[r])<255) r++;
        is1=is2;
        p=1;
        }
        }
        }
        is1++;
 	}
 	if(r>=4)
 	{
  	new strMy[255];
   	new STRname[255];
   	GetPlayerName(playerid,STRname,255);
  	format(strMy, sizeof(strMy), " Suspicion of advertising %s(%d): %s",STRname,playerid,text);
  	for(new j1=0; j1 < MAX_PLAYERS;j1++)
   	if(IsPlayerAdmin(j1)) SendClientMessage(j1, 0xFF0000FF, strMy);
  	for(new z=0;z<r;z++)
  	{
   	new pr2;
   	while((pr2=strfind(text,strR[z],true))!=-1) for(new i=pr2,j=pr2+strlen(strR[z]);i<j;i++) text[i]='*';
        SendClientMessage(playerid, red, "You are Banned! Reason: No advertize on this server!!!");
	Ban(playerid);
	}
 	}
 	if(strval(text) == ContestAnswer && ContestAnswer != -1)
  	{
                OnPlayerWinContest(playerid);
  	}
	return 1;
}
Reply
#2

Remove the line:
pawn Код:
SetPlayerChatBubble(playerid, text, 0xFF0000FF, 30.0, 5000);
Reply
#3

hmmm you shure that is the problem?
Reply
#4

You mean two times of sending message?

If so, then change return 1; to return 0;

Still not sure, Please give some more info.
Reply
#5

look at my new thread about this prob you will see picture
Reply
#6

Don't doublepost.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)