This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Change the color for amx_chat messages?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lantz69
AMX Mod X Beta Tester
Join Date: Mar 2004
Location: Sweden, Skåne
Old 06-01-2005 , 06:24   Change the color for amx_chat messages?
Reply With Quote #1

Im just wondering how to change the color for amx_chat messages so you can see them better.
amx_psay messages would also be good to have another color.
If anyone has a clue how to do that with the default adminchat.sma please respond to this thread.

Thanks in advance.
__________________
Using: Amxmodx 1.8.1.xxxx, cstrike
http://www.vanilla.se/
lantz69 is offline
lantz69
AMX Mod X Beta Tester
Join Date: Mar 2004
Location: Sweden, Skåne
Old 06-09-2005 , 06:49  
Reply With Quote #2

*A gentle bump*
__________________
Using: Amxmodx 1.8.1.xxxx, cstrike
http://www.vanilla.se/
lantz69 is offline
Xerxes
Member
Join Date: Jun 2005
Old 06-09-2005 , 07:02  
Reply With Quote #3

amx_psay color texthere
amx_csay color texthere
amx_chat? Haven't heard anythinga about that so I have no idea at all.
Xerxes is offline
lantz69
AMX Mod X Beta Tester
Join Date: Mar 2004
Location: Sweden, Skåne
Old 06-09-2005 , 08:20  
Reply With Quote #4

Thanks for replying

But you cant do
amx_psay color texthere

Only hud mesages can have a color

You need to add some code into the adminchat.sma to make that posssible.

amx_psay and amx_chat dont have the possibility to have special colors

I know there is a plugin out there that made it possible to change the color of the chatmessages. Maybe that plugin can be used to color amx_chat and amx_psay messages.

http://forums.alliedmods.net/showthread.php?t=9213

Here is the code for that plugin



Code:
/* * * * * * * * * * * * * * * * * * * * * * * *  *   Admin_chatcolor, by BlueRaja (AMX Mod X)  *  *                                             *  *      Special thanks to Damaged Soul         *  * - not just for helping me when I needed it, *  *    but for putting up with all my shit ^_^  *  *                                             *  *************I hate asterisks.*****************  *                                             *  *           (c) Copyright 2005                *  * This file is provided as is (no warranties) *  * * * * * * * * * * * * * * * * * * * * * * * */ //Use !T for team-color (sorry, can't use red when on CT, and vice-versa) //!G for green, and !W for normal (it's more of a tan than a white...) //Includes #include <amxmodx> #include <cstrike> //Defines #if defined ACCESS_LEVEL     #undef ACCESS_LEVEL #endif //#define ACCESS_LEVEL ADMIN_CHAT   //UNCOMMENT THIS LINE to allow only admins (with ADMIN_CHAT) to use colors //Messages new gmsgSayText //Globals //Initialization public plugin_init() {     gmsgSayText = get_user_msgid("SayText")     register_clcmd("say", "CatchSay")     register_clcmd("say_team", "CatchSay")     register_plugin("Admin Chat Color","1.0","BlueRaja")     return PLUGIN_CONTINUE } //Functions public CatchSay(id) {     #if defined ACCESS_LEVEL         if( !(get_user_flags(id)&ACCESS_LEVEL) ) return PLUGIN_CONTINUE     #endif     new message[129]     read_argv(1,message,128)         if ( containi(message,"!t")==-1 &&          containi(message,"!w")==-1 &&          containi(message,"!g")==-1 )     {         return PLUGIN_CONTINUE     }         new szCommand[9]     read_argv(0,szCommand,8)     new CsTeams:team = cs_get_user_team(id)     new isAlive = is_user_alive(id)         new playerList[32]//players to send message to     new playerCount         new message_to_send[129] = "^x01"     new szFlags[4] = ""     if(isAlive){         add(szFlags,3,"a")//Only alive players     } else {         add(szFlags,3,"b")//Only dead players         add(message_to_send,128,"*DEAD*")     }     add(szFlags,3,"c")//skip bots         if(equal(szCommand,"say_team")) {         add(szFlags,3,"e")//Match with passed teamname         if(team==CS_TEAM_T){             get_players(playerList,playerCount,szFlags,"TERRORIST")             add(message_to_send,128,"(Terrorist) ^x03")         } else if(team==CS_TEAM_CT) {             get_players(playerList,playerCount,szFlags,"CT")             add(message_to_send,128,"(Counter-terrorist) ^x03")         } else { //assume Spectator             get_players(playerList,playerCount,szFlags,"SPECTATOR")             add(message_to_send,128,"(Spectator) ^x03")         }     } else { //assume "say"         get_players(playerList,playerCount,szFlags)         if(isAlive)         {             add(message_to_send,128,"^x03")         } else {             add(message_to_send,128," ^x03")         }     }           new username[129]     get_user_name(id,username,128)     add(message_to_send,128,username)     add(message_to_send,128,"^x01 :  ")     add( message_to_send,128,message,(128-strlen(message_to_send)) )     while(containi(message_to_send,"!t") != -1)     {         replace(message_to_send,128,"!T","^x03")         replace(message_to_send,128,"!t","^x03")     }     while(containi(message_to_send,"!g") != -1)     {         replace(message_to_send,128,"!G","^x04")         replace(message_to_send,128,"!g","^x04")     }     while(containi(message_to_send,"!w") != -1)     {         replace(message_to_send,128,"!W","^x01")         replace(message_to_send,128,"!w","^x01")     }     for(new i=0; i<playerCount; i++)     {         message_begin(MSG_ONE, gmsgSayText, {0,0,0}, playerList[i])         write_byte(playerList[i])         write_string(message_to_send)         message_end()     }     return PLUGIN_HANDLED }
__________________
Using: Amxmodx 1.8.1.xxxx, cstrike
http://www.vanilla.se/
lantz69 is offline
Xerxes
Member
Join Date: Jun 2005
Old 06-09-2005 , 08:37  
Reply With Quote #5

Oh ok, well try use that and see how it goes
Xerxes is offline
Reply



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 11:17.


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