Hello !
For a while now, I was looking for changing team name colors (I will explain what I'm looking for and what I tried).
So yes, team name colors like when a player is in the blue team, his name is
blue and for example I want it in a different color like a different
blue name, same case for Red Team and Spectator.
I tried some things with morecolors, without success (sad
), the only things I did is this :
PHP Code:
#include <sourcemod>
#include <morecolors>
public OnPluginStart()
{
AddCommandListener(ChatTriggers, "say");
AddCommandListener(ChatTriggers, "say_team");
}
public Action ChatTriggers(int client, const String:command[], int argc)
{
decl String:sMessage[255];
decl String:sClientName[64];
GetCmdArgString(sMessage, sizeof(sMessage));
GetClientName(client, sClientName, sizeof(sClientName));
StripQuotes(sMessage);
if (CGetTeamColor(client) == COLOR_BLUE)
{
CPrintToChatEx(client, client, "{steelblue}%s {default}: %s", sClientName, sMessage)
}
else if (CGetTeamColor(client) == COLOR_RED)
{
CPrintToChatEx(client, client, "{brown}%s {default}: %s", sClientName, sMessage)
}
return Plugin_Handled
}
I tried to understand simple chat processor in custom chat colors, without success (I am a real begineer) someone can help me/teach me how to do my request?
NB : Sorry if my English is bad