View Single Post
Author Message
MoggieX
Veteran Member
Join Date: Aug 2007
Location: n00bville
Old 06-05-2008 , 16:25   Advanced Menu Say for Admins, Non-Admins, Private MSG & Coloured Hud Say [17 Jun 09]
Reply With Quote #1

Advanced Menu Say for Admins Only, Non-Admins & Private Messages

What does it do & Why?
This plugin creates menu messages, just like sm_msay does in the base SM commands, but this plugin builds upon these and adds FOUR new commands:

sm_amsay <message> - sends message as a menu panel to admins only
Enables an admin to send a 'menu' message to just other admins with the ADMIN_CHAT flag enabled

sm_pmsay <name or #userid> <message> - sends private message as a menu panel
Because the private message system in the SM base chat commands prints a single message in the chat which gets spammed to hell and lost in the rest of the chat (I hate it, you might as well mash the keyboard), this plugin makes a menu for that as well!

sm_namsay
<message> - sends message to non-admins as a menu panel
I've added this for messaging non-admins in a menu panel as well.

sm_hudsay [colour] <message>
This is new in v2.1 and is purely thanks to spotting this in the the spray tracer plugin by nican.

This adds in orangebox games like TF2 and DOD:S, the ability to use hud messages, like were in HL:1 from AMX MOD and AdminMod.

Valid colours: White, Red, Green, Blue, Yellow, Purple, Cyan, Orange, Pink, Olive, Lime, Violet, Lightblue

What does it look like?
Here are two examples of it in action, just think how many times your message has been missed!

sm_pmsay J!m "oi j!m ya num nut can you see this?"



sm_amsay "Slap the crap out of j!m next round?"



sm_hudsay green This is a test message



Commands
sm_mpsay_version
- Duh
sm_pmsay <name or #userid> <message> - sends private message as a menu panel
sm_amsay <message> - sends message to admins as a menu panel
sm_namsay <message> - sends message to non-admins as a menu panel
sm_hudsay [colour] <message> - sends message to non-admins as a menu panel

Installation
Pop the smx file in your <mod dir>/sourcemod/plugins/ directory and change maps.

Requires
Sourcemod 1.1 or newer

Thanks to...
Tsunami for my n00b questions

Version History
1.0 - First release
1.1 - Fixed nub mistakes
1.2 - Added sm_namsay for messaging non admins
2.0 - A tidy up and took 3 functions and made them into one, passing an "identifier" for each option. My n00b coding skills are getting better!
2.1 - resolved MaxClients issue and added sm_hudsay

Suggestions?
I can only think that you may want to address non admins, which I'll add later... DONE in V2.0

Enjoy!
Attached Files
File Type: sp Get Plugin or Get Source (advanced-chat-menus.sp - 3228 views - 10.1 KB)
__________________

Last edited by MoggieX; 06-17-2009 at 11:28.
MoggieX is offline
Send a message via Skype™ to MoggieX