I can't use the popular all chat plugin because it doesn't work well when formatting player names with simple chat processor (SCP). Names just show up like chat-yellow. I tried making an all chat plugin with SCP but it acts very weird. For every player on a team, it will say the chat message that many times for everyone. So if 5 people are on a team and someone types "hi", it will say "hi" to everyone 5 times. Anyone know how to fix this?
Link to SCP:
https://sourcemod.net/showthread.php?t=198501
PHP Code:
public Action:OnChatMessage(&author, Handle:recipients, String:name[], String:message[])
{
if(GetMessageFlags() & CHATFLAGS_ALL)
{
ClearArray(recipients);
for(new i=1; i<=MaxClients; i++)
{
if(IsClientInGame(i))
{
PushArrayCell(recipients, i);
}
}
return Plugin_Changed;
}
return Plugin_Continue;
}