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

Changing admin chat color


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
M3Power
Member
Join Date: Apr 2017
Old 04-01-2017 , 17:32   Changing admin chat color
Reply With Quote #1

Hello

I dont know a lot about source pawn so I'd like someone to tell me how to edit sm_say chat colors.
The default color is green and its (ALL) Admin: , but I'd like to make it custom just like on the picture below. How to do that?



Thanks in advance
M3Power is offline
M3Power
Member
Join Date: Apr 2017
Old 04-02-2017 , 10:49   Re: Changing admin chat color
Reply With Quote #2

I guess that shouldn't be difficult to do, or? Can someone tell/learn me how to change the admin chat colors and change "ALL" to "Admin". Hope for an answer as soon as possible

Thanks.
M3Power is offline
ambn
Veteran Member
Join Date: Feb 2015
Location: Fun servers
Old 04-02-2017 , 14:17   Re: Changing admin chat color
Reply With Quote #3

https://forums.alliedmods.net/showthread.php?p=1721580
or just try hooking say command as a ConosleCommand and then remove command say flags then try printtochat all and design it as you wish.
__________________
ambn is offline
Wilczek
AlliedModders Donor
Join Date: Oct 2012
Location: Poland
Old 04-02-2017 , 15:15   Re: Changing admin chat color
Reply With Quote #4

Open basechat.sp, somewhere around line 324:

PHP Code:
SendChatToAll(client, const String:message[])
{
    new 
String:nameBuf[MAX_NAME_LENGTH];
    
    for (new 
1<= MaxClientsi++)
    {
        if (!
IsClientInGame(i) || IsFakeClient(i))
        {
            continue;
        }
        
FormatActivitySource(clientinameBufsizeof(nameBuf));
        
        
PrintToChat(i"\x01 \x07(Admin) \x06%s: %s"nameBufmessage);
    }

__________________
Wilczek is offline
M3Power
Member
Join Date: Apr 2017
Old 04-02-2017 , 16:43   Re: Changing admin chat color
Reply With Quote #5

My knowledge about scripting is 0. So I've done a request ( https://forums.alliedmods.net/showthread.php?t=295716 ) for a simple thing. It's a plugin but it just needs some simple editing in my opinion to get what I want :-)
M3Power is offline
Wilczek
AlliedModders Donor
Join Date: Oct 2012
Location: Poland
Old 04-03-2017 , 00:53   Re: Changing admin chat color
Reply With Quote #6

If you wish to use the base chatting system (not Custom Chat Colors plugin), simply open the basechat.sp as I told you, find the command SendChatToAll and replace it with the one I already pasted. Then close the file, drag&drop it on spcomp.exe and you've got your new, shiny plugin ready to work ;)
__________________
Wilczek is offline
Reply


Thread Tools
Display Modes

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 06:51.


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