[SOLVED]Chat bug - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED]Chat bug (
/showthread.php?tid=83034)
[SOLVED]Chat bug -
bigcomfycouch - 22.06.2009
I've got a chat bug where it says everything twice. Here's my OnPlayerText:
Код:
public OnPlayerText(playerid, text[])
{
new string[256];
new tmp[256];
new playername[MAX_PLAYER_NAME];
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "You can't speak because you're muted.");
return 0;
}
if (realchat)
{
if(gPlayerLogged[playerid] == 0)
{
return 0;
}
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "%s Says: %s", playername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
return 0;
}
return 1;
}
I've gone over it 100 times and still can't find what's wrong. An example of the problem is as follows.
Quote:
Some_Guy Says: Hello!
Some_Guy: Hello!
|
And I've still not yet found why it's doing that. Any real help is appreciated.
Re: Chat bug -
Grim_ - 22.06.2009
It must be the ProxDetector function.
This problem has been solved before, search.
Re: Chat bug -
bigcomfycouch - 22.06.2009
I have, I'm not that moronic. I've replaced my function a good 15 times.
Re: Chat bug -
bigcomfycouch - 22.06.2009
I've fixed it. It was right under my nose the whole time.
Re: [SOLVED]Chat bug -
pascallj - 22.06.2009
It would be nice, if you say what was wrong. For the next ppl with this problem..
Re: [SOLVED]Chat bug -
SiJ - 22.06.2009
He had to return 0; instead of returning 1 at the end of public OnPlayerText