Raised This Month: $12 Target: $400
 3% 

Std Admin Color Chat


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Admin Commands        Approver:   devicenull (200)
vandercal
Member
Join Date: Apr 2004
Location: Sweden
Old 07-11-2005 , 09:45   Std Admin Color Chat
Reply With Quote #1

Standard Admin Color Chat

Headline: amx_psay, amx_chat and amx_say in green chat text
Have you ever asked how you are supposed to see the admin chat, amx_say or how people are supposed to be able to read your PMs? The solution is simple. All that text will show as green, making it a whole lot easier to spot and read.

NEW version 1.1.1!
Minor code changes with the purpose of making it easy to change the pre message part. Just change the text in some defines and recompile the plugin, its that simple.
Code:
// Text defines, PREFIX is text before and SUFFIX is text after the username in a message.
// Feel free to change these. Also note that ^x01 and ^x04 is color codes.

// Text before the username in amx_chat command
#define AMX_CHAT_PREFIX "^x04"

// Text after the username in amx_chat command
#define AMX_CHAT_SUFFIX	" tells admins: "

// Text before the username in a PM that you send
#define AMX_PSAY_SEND_PREFIX "^x04"

// Text after the username in a PM that you send
#define AMX_PSAY_SEND_SUFFIX " PMs you: ^x01"

// Text before the username in the confimation notice of the PM you send
#define AMX_PSAY_BACK_TO_SENDER_PREFIX	"^x04You PM "

// Text after the username in the confimation notice of the PM you send
#define AMX_PSAY_BACK_TO_SENDER_SUFFIX	": ^x01"

// Text before the username in the amx_say command
#define AMX_SAY_PREFIX	"^x04"

// Text after the username in the amx_say command
#define AMX_SAY_SUFFIX	" tells all: ^x01"

// E. g. an amx_chat message with the current settings will be as following example shows
// Command by player with the nick "Martin Van der Cal":
// amx_chat Hello admins
// Shows as:
// Martin Van der Cal tells admins: Hello admins
// Also note that with only the color code in the prefix the whole line will show as green to all admins
Screenshot:


Table of Content
License (GNU General Public License)
Standard Admin Color Chat Introduction
Get started
Credits
Changelog


License (GNU General Public License)
Standard Admin Color Chat for Counter Strike
Copyright (C) 2005, Martin J. Van der Cal

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Martin J. Van der Cal, Contact me with email [email protected].

Files:
std_admin_color_chat.sma

Standard Admin Color Chat Introduction
This plugin features the standard admin chat, but somewhat modified. See "Get Started" for what you can do.

Get started
Everyone can tell the admins by using team_say @ <message>, will show as a green message to admins
Everyone can tell the admins by using amx_chat <message>, will show as a green message to admins
Admins can send PMs to anyone by using <say or team_say> # <nick or steamid> <message>
Admins can send PMs to anyone by using amx_psay <nick or steamid> <message>
Admins can broadcast messages using amx_say <message>

NOTE 1! To overide the commands from the standard amxx adminchat plugin.
You need to put this plugin above the adminchat plugin in "plugins.ini":
Code:
std_admin_color_chat.amxx
adminchat.amxx
NOTE 2! When using amx_psay with nick, you dont have to type the whole nick, but just a part that is unique for that player.
NOTE 3! When sending PMs with say or team_say you cant use spaces in the nicks. If you have to, then use amx_psay command.

Credits
Thank you everyone who puts their codes up for people to see, great way to learn how to code and to lantz69 who was a great help telling me what he wanted ;)

Changelog

v. 1.1.1
Minor code changes, mainly to make it easy to change some parts of the messages.

v. 1.1.0
Added amx_say, shows as green text

v. 1.0.0
Anyone can send message to admins, shows as green text
Admins can send PMs to anyone, shows as green text
Works from server console and HLSW


PS. I have tested this on Counter-Strike. Hence Plugin Mod: Counter-Strike. It will probably work on other mods, but I can't tell for sure. Test if and see if it works. Post a message here if it works and I will add it in a little list below

Mods that has been tested:
Counter-Strike - Works
Battlegrounds - Number of people tested it(1), Didn't work(1), Worked(0)
Attached Files
File Type: sma Get Plugin or Get Source (std_admin_color_chat.sma - 63520 views - 13.8 KB)
__________________
vandercal is offline
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 07-11-2005 , 10:30  
Reply With Quote #2

maybe a screenshot
__________________
- Bye bye!
nightscreem is offline
vandercal
Member
Join Date: Apr 2004
Location: Sweden
Old 07-11-2005 , 10:45  
Reply With Quote #3

Good suggestion... Screenshot added ;)
vandercal is offline
Bend3R
Veteran Member
Join Date: Oct 2004
Location: Sweden (Stockholm)
Old 07-11-2005 , 10:47  
Reply With Quote #4

Very nice plugin and idé
Bend3R is offline
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 07-11-2005 , 10:56  
Reply With Quote #5

nice! keep up the good work
__________________
hello, i am pm
PM is offline
lantz69
AMX Mod X Beta Tester
Join Date: Mar 2004
Location: Sweden, Skåne
Old 07-11-2005 , 12:10  
Reply With Quote #6


Yeah you published the plugin.
I've wanted this for a long time and even requested it 2 months ago.

@vandercal
About NOTE 1! maybe change it to.
To overide the commands from the standard amxx adminchat plugin you need to put this plugin above it in plugins.ini
Like this:
Code:
std_admin_color_chat.amxx
adminchat.amxx
GJ
__________________
Using: Amxmodx 1.8.1.xxxx, cstrike
http://www.vanilla.se/
lantz69 is offline
vandercal
Member
Join Date: Apr 2004
Location: Sweden
Old 07-11-2005 , 13:04  
Reply With Quote #7

Done... thanks ;)
vandercal is offline
Bento
SourceMod Donor
Join Date: May 2005
Location: The Netherlands
Old 07-11-2005 , 13:30  
Reply With Quote #8

Cool plugin, is it possible to change the color to whatever you like?

I saw this:

Code:
    // The message that is going to be sent. ^x04 is green color new sRealMessage[MAX_MESSAGE_CHARS] = "^x04"

^x04 is green color

so what are the other colors?

and how do i modify this to also do these colors for amx_say ?
__________________
Bento is offline
Ingram
Veteran Member
Join Date: May 2004
Old 07-11-2005 , 13:46  
Reply With Quote #9

Quote:
PS. I have tested this on Counter-Strike. Hence Plugin Mod: Counter-Strike. It will probably work on other mods, but I can't tell for sure.
i tried this method on battlegrounds, didn't work , so it might work on some mods, but not all

i could be wrong, but
^x01 is the plain half-life colour
^x02 i don't know
^x03 is the team colour, it shows red to terrorists and blue to counter-terrorists
Ingram is offline
Bento
SourceMod Donor
Join Date: May 2005
Location: The Netherlands
Old 07-11-2005 , 14:04  
Reply With Quote #10

What color is the half life color and arent there any more colors?
__________________
Bento is offline
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 14:00.


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