View Single Post
Plugin Info:     Modification:          Category:         
faenix
Junior Member
Join Date: Aug 2005
Old 08-20-2005 , 22:32   Green Admin Name
Reply With Quote #1

This plugin replaces the adminchat.amxx functions (amx_say, amx_chat, amx_psay) with ones that display a green admin name. I removed amx_tsay because in my opinion there are too many problems with trying to get players to read a hud message, the green text stands out enough now. Also, using at @ sign in front of a say message will send an amx_say, and using an @ sign in front of a say_team message will send an amx_chat.

Update 1.1 (Suggestion by Hawk552)
Now you have the option to give administrators green names while obeying all the regular rules of chatting. It uses all the regular CS rules:

Alive people chat, only other alive people can see
Dead people chat, only dead and spectators can see
Team chat, only people on the same team can see
Spectator, only dead and other spectator
- and any combination of the above that is possible

You can enable/disable this feature using amx_namegreen <1 or 0> or setting sv_namegreen <1 or 0>.

Update 1.11
Changed cvar name from sv_chatgreen to sv_namegreen to avoid confusion, as well as amx_chatgreen to amx_namegreen

Update 1.2
Chat text that begins with / will revert back to normal counter-strike chat and strip the leading /. This is so that if you need to use a CS command from another plugin, such as /rank, you can do it by typing //rank. Or if you want to hide your admin without turning off the cvar, start every sentence with a /.

Fixed bug where amx_psay would still have quotes if used.

Fixed bug where / was stripped even if the cvar was turned off.

Notes
This will override any other plugins that manipulate chatting, such as dead people can see alive people's chat... won't work. The solution to this is to use a / in front of commands that should work with other plugins, or just use the cvar to turn off green admin names for regular chat.

Current version has no logging (i wouldn't use logs for this anyway). If anybody requests it i'll throw in some amx_log here and there =p

Attached Files
File Type: sma Get Plugin or Get Source (adminchat.sma - 3340 views - 6.7 KB)
faenix is offline