AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Changing admin chat color (https://forums.alliedmods.net/showthread.php?t=295682)

M3Power 04-01-2017 17:32

Changing admin chat color
 
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?

http://i.imgur.com/vxEJ25K.png

Thanks in advance :)

M3Power 04-02-2017 10:49

Re: Changing admin chat color
 
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.

ambn 04-02-2017 14:17

Re: Changing admin chat color
 
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.

Wilczek 04-02-2017 15:15

Re: Changing admin chat color
 
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);
    }



M3Power 04-02-2017 16:43

Re: Changing admin chat color
 
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 :-)

Wilczek 04-03-2017 00:53

Re: Changing admin chat color
 
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 ;)


All times are GMT -4. The time now is 09:38.

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