Text show 2 times
#1

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;
}
Reply
#2

To stop the original message, return 0 instead of 1.
Reply
#3

Try this:

PHP код:
public OnPlayerText(playeridtext[])
{
        new 
string[128];
        
format(stringsizeof(string), "%s ьtleb: %s",RPN(playerid), text);
    
ProxDetector(12.0playeridstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
    return 
0;

or you can make a separate filterscript for OnPlayerText
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)