AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Advanced Menu Say for Admins, Non-Admins, Private MSG & Coloured Hud Say [17 Jun 09] (https://forums.alliedmods.net/showthread.php?t=72341)

MoggieX 06-05-2008 16:25

Advanced Menu Say for Admins, Non-Admins, Private MSG & Coloured Hud Say [17 Jun 09]
 
1 Attachment(s)
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?"

http://www.ukmandown.co.uk/media/sm_pmsay.jpg

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

http://www.ukmandown.co.uk/media/sm_amsay.jpg

sm_hudsay green This is a test message

http://www.ukmandown.co.uk/media/sm_hudsay.jpg

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!

SixSicSix 06-05-2008 16:29

Re: Menu Say for Admins Only & Private Messages V1.0 [5 Jun 08]
 
I have a suggestion:

Allow admins to initiate 1 on 1 private chat with any other player/admin. When the other player types in either team or normal chat, it goes only to the admin with whom the chat is initiated. Just like SourceOP.

MoggieX 06-05-2008 16:32

Re: Menu Say for Admins Only & Private Messages V1.0 [5 Jun 08]
 
Quote:

Originally Posted by SixSicSix (Post 635067)
I have a suggestion:

Allow admins to initiate 1 on 1 private chat with any other player/admin. When the other player types in either team or normal chat, it goes only to the admin with whom the chat is initiated. Just like SourceOP.

Sorry, that is beyond my copy/paste abilities, if anyone wants to point me in the right direction, I'll have a stab at it though.

Actually, would something like this be useful?

In chat: !helpme can an admin help me please?
Then a menu to admins is created?

Matt

SixSicSix 06-05-2008 16:36

Re: Menu Say for Admins Only & Private Messages V1.0 [5 Jun 08]
 
http://forums.alliedmods.net/showthr...072#post635072

MoggieX 06-05-2008 16:39

Re: Menu Say for Admins Only & Private Messages V1.0 [5 Jun 08]
 
Quote:

Originally Posted by SixSicSix (Post 635073)

That requires an understanding of sourcepawn that I do not have :(

Matt

ottobohn 06-05-2008 17:27

Re: Menu Say for Admins Only & Private Messages V1.1 [5 Jun 08]
 
Nice! We actually did this in supermenu months ago. We went as far as to do sm_csay and sm_hsay for messages such as "rescue the hostages", "Plant the bomb", and "Get out of Spawn" as a few examples.

Cool plugin.

Otto

MoggieX 06-05-2008 18:29

Re: Menu Say for Admins Only & Private Messages V1.1 [5 Jun 08]
 
Quote:

Originally Posted by ottobohn (Post 635087)
Nice! We actually did this in supermenu months ago. We went as far as to do sm_csay and sm_hsay for messages such as "rescue the hostages", "Plant the bomb", and "Get out of Spawn" as a few examples.

Cool plugin.

Otto

Yea, I got fed up of the poor messaging colours in CSS, you can;t miss a menu!

Matt

MoggieX 06-09-2008 08:12

Re: Menu Say for Admins Only & Private Messages V1.2 [5 Jun 08]
 
I think I can make this plugin work more cleanly, with if statements inside a single function, rather than using multiple functions that is bloating it.

Will post an updated version when complete

Matt

MoggieX 06-09-2008 13:39

Re: Menu Say for Admins Only & Private Messages V1.2 [5 Jun 08]
 
Quote:

Originally Posted by MoggieX (Post 636641)
I think I can make this plugin work more cleanly, with if statements inside a single function, rather than using multiple functions that is bloating it.

Will post an updated version when complete

Matt

Done and uploaded :)

Matt

ottobohn 06-09-2008 14:30

Re: Advanced Menu Say for Admins Only, Non-Admins & Private Messages V2.0 [9 Jun 08]
 
This is really good. I hope they add this to the core.

Otto


All times are GMT -4. The time now is 15:10.

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