19.06.2013, 16:03
When someone types something it appears two times in the chat. What can i do to fix this?
Here is my code in OnPlayertext
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;
}