Chat problem
#1

When someone types something it appears two times in the chat. What can i do to fix this?
Here is my code in OnPlayertext

pawn Код:
public OnPlayerText(playerid,text[])
{

     new textstring[128];
    format(textstring, sizeof(textstring), "(%i) %s" ,playerid ,text);
    SendPlayerMessageToAll(playerid, textstring);

if(QuestionStarted == 1 && strfind(text[0], Question, false) == 0)
            {
                new string[128];
                    format(string, sizeof(string), " %s won $%d by typing '%s'!", PlayerName[playerid], RandomQuestionMoney, Question);
                    SendClientMessageToAll(COLOR_GREEN, string);
                    GivePlayerMoney(playerid, RandomQuestionMoney);
                    QuestionStarted = 0;
                    return 0;
            }

return 1;
}
Reply
#2

Change return 1 to return 0 at the bottom.
Reply
#3

thank you very much
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)