Raised This Month: $51 Target: $400
 12% 

Solved [REQ - TF2]Team name colored


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Walgrim
AlliedModders Donor
Join Date: Dec 2015
Location: France
Old 08-19-2016 , 17:24   [REQ - TF2]Team name colored
Reply With Quote #1

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(sMessagesizeof(sMessage));
    
GetClientName(clientsClientNamesizeof(sClientName));
    
StripQuotes(sMessage);

    if (
CGetTeamColor(client) == COLOR_BLUE)
    {
      
CPrintToChatEx(clientclient"{steelblue}%s {default}: %s"sClientNamesMessage)
    }
    else if (
CGetTeamColor(client) == COLOR_RED)
    {
      
CPrintToChatEx(clientclient"{brown}%s {default}: %s"sClientNamesMessage)
    }
    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

Last edited by Walgrim; 08-30-2016 at 08:44.
Walgrim is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:58.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode