[Dyn Native] ColorChat v0.3.2 (04 jul 2013)
16 Attachment(s)
Note that this has been integrated to amxx 1.8.3 core since build 185
Usage here : https://forums.alliedmods.net/showpo...&postcount=232 ColorChat Native__________________ .: Stock Version :.__________________ .: Module Version :.__________________ |
Re: Native : ColorChat
Nice work man! :)
|
Re: Native : ColorChat
Rockin'! :up:
I think I will finally start using colorchat now :mrgreen: It looks great, I just noticed two things: Quote:
Code:
while( replace() ) |
Re: Native : ColorChat
Thanks for the blue color :)
Was first using replace_all, but that one check in every loop if string contain 'what[]', store position in string and check is there is enough place left to replace (+ this stock fails as you can get errors with it when you don't set good len params...). Since i'm replacing 2 chars with 2 chars, there shouldn't be any place problem. There could be a better stock though. From what i've tried, pass directly ^3 or ^4 in calling native works, but from what i remember when was using color chat in the past, some times when multi formating, it is altered, i haven't made enough tests yet to know if this replace stuff can be removed, gonna try to put ^4 in ML keys to see what happen. |
Re: Native : ColorChat
The problem with "^4" or the others in the ML is that it doesn't read '^' as the escape character. It reads it as "^^4".
So, you can do it with "!g" or "^4" or whatever you prefer, but you will need to end up using replace() to fix it. |
Re: Native : ColorChat
Quote:
[EDIT] !g code replacement is now only for ML and is proceeded at map start. |
Re: Native : ColorChat
this may come into conflict with Zombie_plague code.
cuz of " Send_TeamInfo(id, MSG_ONE_UNRELIABLE, g_szTeamName[iColor]) " user's team on scoreboard will be screwed up when we use GREY(or RED, BLUE, too) |
Re: Native : ColorChat
that i understand... i have to add !t !g and/or !n into the .sma of my plugins right?
good plugin i think... and one more question... its posible to force a color like "red, blue or grey"? for example i want to put a red message for TTs, CTs, and SPECS too... its posible? |
Re: Native : ColorChat
C... C... Cool!
|
Re: Native : ColorChat
Quote:
Quote:
Color will be user team color if you specify player id + use color = DontChange. |
Re: Native : ColorChat
ConnorMcLeod, i need example, have some info plugins about shopping!
What i doo, i put in sma include chatcolor line.. like amxmodx, engine, fakemeta and other, yea. Then, i have that code, some line: client_print_color(id,print_chat, "[AMXX] ^3SMS Code - ^4Bla Bla Bla %s Server - to number blablabla, 1 SMS",name) Need use "^3" or simple ^3 before text. Correct me please, if i have mistakes.. :oops::) |
Re: Native : ColorChat
2nd arg is the color that will show when you use ^3 or !t, not the print location as you can only display it in chat.
Code:
|
Re: Native : ColorChat
Thank you werry mutch :) its work :)
I love you! |
Re: Native : ColorChat
4 Attachment(s)
Example on how to use it with default adminchat retailed.
Don't use the Get Plugin link This plugin is just an example, the web compiler won't give you a working plugin, compile it locally if you want to use it. + Added to default adminchat, for admins, say #c text, where c can be r, b, g for the 3 teamx colors. |
Re: [Native] ColorChat
thanks, good job man.
|
Re: [Native] ColorChat
Updated.
Added comments through code, hope color change when id=0 is fixed. |
Re: [Native] ColorChat
I would make like this
PHP Code:
PHP Code:
|
Re: [Native] ColorChat
1. No, so bots are still usable as reference for team change color.
2. yes -edit- v0.1.0 Now fixed colorchange when id=0 and ML was used. Reason was i was altering TeamInfo once by MSG_BROADCAST, then send multiple MSG_ONE_UNRELIABLE. In fact, that way doesn't work for "some" reasons, now send as many TeamInfo msgs as SayText msgs num. |
Re: [Native] ColorChat v0.1.0
Can you add only Grey, Red and Blue colors, it have been nice if you do that:)
|
Re: [Native] ColorChat v0.1.0
Quote:
|
Re: [Native] ColorChat v0.1.0
Thank you, it is very useful and works very well, both in the modified adminchat and in my own plugin, excellent!
Only one very small thing; It is confusing that this thread is called colorchat, and you refer to the plugin as "colorchat", but doing #include <colorchat> will not work as the file itself is called chatcolor.inc - I just wanted to let you know before everyone starts using it - if you want to change this filename it should be now before everyone starts using it ;) |
Re: [Native] ColorChat v0.1.0
I find this rather useless and I don't see why this was made into a plugin. Why didn't you just post this in the code snippets section? I don't really want to unapprove this but I also find it difficult to approve. I'm going to ask BAILOPAN about this case.
|
Re: [Native] ColorChat v0.1.0
Because of all this plugins using that colorchat include so that code is duplicated in all of them.
Anyway, the plugin is released, feel free to unapprove. |
Re: [Native] ColorChat v0.1.0
I really like this, I have included it into several of the plugins we use on our servers, as well as the ones I hack away at myself. I really like the idea of collecting widely used functions like these in separate files+methods. Thanks a bunch!
I have one question regarding the adminchat on page 2; When regular players use "say_team @", their message is now displayed BOTH in regular teamchat as well as amxchat (picture). Is this caused by us running ultimate_chat where admin is set to see all text, or is this a bug that should be fixed? We didn't have this problem before switching to the adminchat on page 2 here, and have been running ultimate_chat all along. |
Re: [Native] ColorChat v0.1.0
This is cause by ultimate chat, which one of the plugin have you declared in first in plugins.ini ? (Should be adminchat to avoid that bug)
|
Re: [Native] ColorChat v0.1.0
I didn't really get a useful reply from BAILOPAN, although he stated that he agrees with me in that this would be useful as a snippet.
For this reason, I have decided to move this plugin to the code snippets section. I am also marking it as approved (so it appears in your plugin list). |
Re: [Native] ColorChat v0.1.0
I'm getting error:
"L 08/19/2009 - 12:25:28: [AMXX] Plugin "adminchat.amxx" failed to load: Module/Library "chatcolor" required for plugin. Check modules.ini." when I start my server. I don't know what could cause it. adminchat.amxx is the plugin from 2nd page in this topic. I completed it (.sma) locally (without any errors) and chatcolor.inc is in include folder. |
Re: [Native] ColorChat v0.1.0
Get chatcolor.sma too...
|
Re: [Native] ColorChat v0.1.0
Thanks, my mistake.
This stuff would be really great if another amxx plugin wouldn't be neccesary. |
Re: [Native] ColorChat v0.1.0
I'm using this to print to amx_chat if the connecting user is an admin.
Problems arise when users have one of the color triggers as part of their nicks, for instance "r!tual is an admin" shows up as rual is an admin. So I need to escape that, I am just wondering how to escape only the nicks/user input while still maintaining my intended colorchange triggers. Any help appreciated. |
Re: [Native] ColorChat v0.1.0
Well, the easiest solution is to replace all the !t with !!t, and the same pattern for the others.
|
Re: [Native] ColorChat v0.1.0
Thanks Exolent, I tried the following which as this screenshot shows did not stop the !t from being interpreted as a color shift trigger. Posting the code I use to print these lines. Any help appreciated.
PHP Code:
|
Re: [Native] ColorChat v0.1.0
Hmm. I guess I wasn't thinking clearly to catch that.
I guess you are going to have to modify the ColorChat function to fix this. I suggest removing the !x syntax from the function, and then you can remember to use ^1, ^3, and ^4 yourself. Here is the relationship: !n = ^1 !t = ^3 !g = ^4 |
Re: [Native] ColorChat v0.1.0
Hey Connor I am having trouble installing this plugin. I think this is a great plugin and would like to use it.
*Have put in plugins folder and scripting folder. and enabled it in plugins.ini. What else do I need to do. Thankyou, Steve |
Re: [Native] ColorChat v0.1.0
This should be installed as a normal plugin.
Compile the sma, place the amxx file in plugins folder, after that add it in plugins.ini. Also you need to put that include file (chatcolor.inc) in scripting/include folder. After this you are prepared to make plugins using this extension. |
Greetings, ConnorMcLeod
Greetings, ConnorMcLeod. I wonder how I could do to put color messages that come in chat, as an example: if I have the plugin high_ping_kicker, chat messages in the default color come in yellow, if I want to leave the letters in colors or each word in a single color, as it could, that you do with all the plugins so you can differentiate them in chat to have the colors in a certain order, because they come without applying any color. This would facilitate a more pleasant view of chat, and for persons with visual problems would help them avoid straining the eyes. Thanks beforehand for any help.
|
Re: [Native] ColorChat v0.1.0
client_print(id, print_chat, ......)
Change into client_print_color(id, Whatcoloryouwant, .....) |
Re: [Native] ColorChat v0.1.0
Quote:
Testing and told me, but I think I learned not to make, to compile gave me error. piece of code : public showWarn (param []) client_print (param [0], print_chat," Players with ping above% D will be kicked!", get_cvar_num ("amx_hpk_ping")) |
Re: [Native] ColorChat v0.1.0
Please put your code between [ php ] tags or just remove it.
The answer is in first post : Quote:
|
Re: [Native] ColorChat v0.1.0
1 Attachment(s)
Thank ConnorMcLeod and apology step you file, you can have if I take a hand, just want to change its color, you could tell me you need to amend or include this code, to put color messages that will run in chat, so you'll know who to ask for more .
|
All times are GMT -4. The time now is 18:40. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.