OnPlayerText Spamming Problem
#5

Quote:
Originally Posted by AndreiWow
Посмотреть сообщение
Why do you use SendPlayerMessageToAll and also playerid?

It is SendClientMessageToAll(color, string);

You don't need a playerid if you send it to everyone..
Quote:
Originally Posted by jlalt
Посмотреть сообщение
You've to return 0 to prevent sending player original message to others, so it will be:
PHP код:
public OnPlayerText(playeridtext[]) 
{  
   new 
gangstring[128]; 
   
format(gangstringsizeof(gangstring), "[%d] %s",playerid,  text); 
   
SendPlayerMessageToAll(playeridgangstring); 
   return 
0

Quote:
Originally Posted by Ultraz
Посмотреть сообщение
Use return 0 instead of return 1 to prevent repeating or use this code
Thanks all

@AndreiWow

SendPlayerMessageToAll is different than SendClientMessageToAll
Reply


Messages In This Thread
OnPlayerText Spamming Problem - by RyderX - 30.01.2017, 13:51
Re: OnPlayerText Spamming Problem - by jlalt - 30.01.2017, 13:53
Re: OnPlayerText Spamming Problem - by Ultraz - 30.01.2017, 13:58
Re: OnPlayerText Spamming Problem - by AndreiWow - 30.01.2017, 13:58
Re: OnPlayerText Spamming Problem - by RyderX - 30.01.2017, 14:03
Re: OnPlayerText Spamming Problem - by DaniceMcHarley - 30.01.2017, 14:34
Re: OnPlayerText Spamming Problem - by AndreiWow - 30.01.2017, 14:53

Forum Jump:


Users browsing this thread: 1 Guest(s)