Raised This Month: $342 Target: $400
 85%   Almost there!

[INC] CromChat - a better ColorChat!


Post New Thread Reply   
 
Thread Tools Display Modes
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-23-2020 , 15:46   Re: [INC] CromChat - a better ColorChat!
Reply With Quote #51

Then simply check if the user is connected when sending the message? Of course you will get an error when trying to retrieve the name from a client that isn't connected. I'm sure the same will happen with any other function. This isn't something I can fix - the %n parameter is not a part from the .inc file, it's from AMXX itself. If such a check needs to be added, it should be in AMXX, not in this function.
__________________

Last edited by OciXCrom; 04-23-2020 at 15:47.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 06-06-2020 , 13:48   Re: [INC] CromChat - a better ColorChat!
Reply With Quote #52

Hello OciXCrom,
There's an problem, idk if this in your INC file or in my plugin but i want you see this

i added "&x05" white color but when i connect to my server to see it , i see red color and sometime blue color can you tell me where is the problem and if this problem in your INC file then try to fix it.



Code:
PHP Code:
CC_SendMatched(0CC_COLOR_TEAM"&x01[ADMIN]&x04 %s&x01 has made &x04%s&x01 glow &x05%s",AdminName,VictimName,g_ColorNames[ColorNR]) 
Supremache is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 06-06-2020 , 16:28   Re: [INC] CromChat - a better ColorChat!
Reply With Quote #53

Use CC_SendMessage instead of CC_SendMatched. Right now you're making it use the team color.
__________________

Last edited by OciXCrom; 06-06-2020 at 16:29.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 06-06-2020 , 17:07   Re: [INC] CromChat - a better ColorChat!
Reply With Quote #54

Quote:
Originally Posted by OciXCrom View Post
Use CC_SendMessage instead of CC_SendMatched. Right now you're making it use the team color.
If I used CC_COLOR_NORMAL I will get the same problem?
Supremache is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 06-06-2020 , 18:26   Re: [INC] CromChat - a better ColorChat!
Reply With Quote #55

There is no such color.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 06-07-2020 , 12:33   Re: [INC] CromChat - a better ColorChat!
Reply With Quote #56

Quote:
Originally Posted by OciXCrom View Post
There is no such color.
i used "CC_SendMessage" But i got the same problem, after the map changing, the color changed from white to red or blue.

PHP Code:
CC_SendMessage(0"&x01[ADMIN]&x04 %s&x01 has made &x04%s&x01 glow &x05%s",AdminName,VictimName,g_ColorNames[ColorNR]) 

Last edited by Supremache; 06-07-2020 at 12:33.
Supremache is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 06-07-2020 , 14:13   Re: [INC] CromChat - a better ColorChat!
Reply With Quote #57

Well I don't know what to say anymore. If someone wants to check the .inc out and see if there's a problem, go ahead, but I think this is an internal problem with AMXX. The same issue happens with other colorchat includes.
__________________

Last edited by OciXCrom; 06-07-2020 at 14:13.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 06-17-2020 , 00:03   Re: [INC] CromChat - a better ColorChat!
Reply With Quote #58

@ OciXCrom
I want to add prefix for CC_SendMessage.
I did it
PHP Code:
new g_pCvarPrefix
new g_iMsgSayText
g_pCvarPrefix 
register_cvar("bb_shop_prefix""[BaseBuilderShop]")

stock CC_SendMessage(id, const Msg[], {FloatSqlResult,_}:...) 
{
    if (!
is_user_connected(id))
        return; 
    
    new 
Buffer[512], Buffer2[512], szPrefix[32]
    
get_pcvar_string(g_pCvarPrefixszPrefixcharsmax(Prefix))
    
formatex(Buffer2charsmax(Buffer2), "^x04%s ^x01%s"szPrefixMsg);
    
vformat(Buffercharsmax(Buffer), Buffer23);
   
    
message_begin(MSG_ONE_UNRELIABLEg_iMsgSayText_id);
    
write_byte(id);
    
write_string(Buffer);
    
message_end();

But it give errors, can you tell me how to do this ?

Last edited by Supremache; 06-17-2020 at 04:43.
Supremache is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 06-17-2020 , 07:20   Re: [INC] CromChat - a better ColorChat!
Reply With Quote #59

Don't touch anything in the cromchat.inc file. Use the "CC_SetPrefix" function or pass the value directly in the "CC_PREFIX" variable.

Code:
public plugin_init() {     g_pCvarPrefix = register_cvar("bb_shop_prefix", "[BaseBuilderShop]") } public plugin_cfg() {     get_pcvar_string(g_pCvarPrefix, CC_PREFIX, charsmax(CC_PREFIX)) }
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 21:11.


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