Text show 2 times - 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)
+--- Thread: Text show 2 times (
/showthread.php?tid=580818)
Text show 2 times -
Eestlane123 - 08.07.2015
Hello, i started new.pwn and now i have problem with chat. If i type something then it show two times in chat one is roleplay name one is with '_'.
here is my onplayertext
Код:
public OnPlayerText(playerid, text[])
{
new string[128];
format(string, sizeof(string), "%s ьtleb: %s",RPN(playerid), text);
ProxDetector(12.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
return 1;
}
Re: Text show 2 times -
dusk - 08.07.2015
To stop the original message, return 0 instead of 1.
Re: Text show 2 times -
Mouiz - 08.07.2015
Try this:
PHP код:
public OnPlayerText(playerid, text[])
{
new string[128];
format(string, sizeof(string), "%s ьtleb: %s",RPN(playerid), text);
ProxDetector(12.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
return 0;
}
or you can make a separate filterscript for OnPlayerText
Re: Text show 2 times -
JaydenJason - 08.07.2015
Quote:
Originally Posted by samp wiki
Returning 0 in this callback will stop the text from being sent to all players
|
https://sampwiki.blast.hk/wiki/OnPlayerText