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

[ANY] Noms - List Nominated Maps


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Malachi
Senior Member
Join Date: Jun 2010
Location: USA
Plugin ID:
3578
Plugin Version:
1.2.3
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Type "!noms" in chat to see a list of maps people nominated.
    Old 03-18-2013 , 12:06   [ANY] Noms - List Nominated Maps
    Reply With Quote #1

    Credits:
    Not sure who had the original idea, but I made it pretty. :)
    Thanks to MammalMaster and Necrophix.com for hosting my plugin development.
    Billeh for code cleanup/changeover to registered command.

    How It Works:
    Players can type !noms (or /noms) at any time and it will print out a list of maps that people have nominated.

    Notes:
    Pretty straightforward. Interfaces to mapchooser through the .inc file. Only tested on TF2, though I have no reason to think it won't work elsewhere. The one caveat is it uses color text which might not be supported elsewhere (its easy to remove). Must have mapchooser.smx loaded, not useful if you don't use the nominations.smx plugin. I didn't research what happens with really long player/map names. Worst case I don't think anything big would happen (maybe the noms plugin might crash) though I'm presuming that the PrintToChatAll handles this gracefully. Also, we use mapchooser/nominations/rockthevote/nextmap, so I'm not sure how the different combinations of these would work.

    CVARS:
    <none>

    Player Commands:
    !noms (/noms)

    Admin Commands:
    <none>

    Potential Future Enhancements:
    FIXED: Detect if mapchooser/nominations are loaded, gracefully exit if not.

    FIXED: Doesn't print the !noms command back to chat so players can't tell where it came from.
    FIXED: Doesn't honor the / silent chat convention.
    If a map vote was started but cancelled before it completed, !noms may report that the vote already took place even if new nominations are successfully made. This seems to be a bug in the way SM works, as I just rely on mapchooser for that info.
    Uses color - dunno if that's going to cause problems for games other than TF2. I can add a test to control whether or not color is used.
    Add a feature where it prints out all noms after somebody nominates? Or is that too much chat spam?

    Installation:
    Click 'Get Plugin' to download the .smx file. Place it in your plugins directory. Change maps or restart the server or issue a plugin load command.

    Versions:
    * 2013-01-23 - 0.1.1 - initial dev version
    * 2013-03-17 - 0.1.1.1 - Added new array handling
    * 2013-03-17 - 0.1.2 - Changed so map and player name print on same line.
    * 2013-03-17 - 0.1.3 - Check for console, check for empty noms list.
    * 2013-03-17 - 0.1.4 - Changed to use Plugin_Handled, added color.
    * 2013-03-17 - 0.1.5 - added test for map vote completed.
    * 2013-03-17 - 0.1.6 - fixed chat not showing up
    * 2013-03-18 - 1.0.0 - bumped version for release, commented out debug msg
    * 2013-03-18 - 1.0.1 - uncommented accidentally commented out debug msg, return !noms command to chat
    * 2013-03-18 - 1.1.0 - added tests to honor "/" silent chat
    * 2013-03-18 - 1.2.0 - Billeh: code cleanup, now use registered command
    * 2013-03-18 - 1.2.1 - style cleanup
    * 2013-03-21 - 1.2.2 - Number maps in printout, check for mapchooser dependency
    * 2013-03-21 - 1.2.3 - Show next map if vote already happened. (lifted from basetriggers.smx)

    Attachments:
    noms1.jpg - Example of typing !noms: empty list, some maps on list, after map vote.
    Attached Thumbnails
    Click image for larger version

Name:	noms1.jpg
Views:	1062
Size:	10.8 KB
ID:	117382  
    Attached Files
    File Type: sp Get Plugin or Get Source (noms.sp - 1117 views - 3.3 KB)

    Last edited by Malachi; 03-21-2013 at 02:12. Reason: Update to v1.2.1
    Malachi is offline
    ss2miraitrunks
    Senior Member
    Join Date: Dec 2005
    Old 03-18-2013 , 22:21   Re: [ANY] Noms - List Nominated Maps
    Reply With Quote #2

    make it compatible with ultimate map chooser?
    __________________


    ss2miraitrunks is offline
    Malachi
    Senior Member
    Join Date: Jun 2010
    Location: USA
    Old 03-19-2013 , 12:02   Re: [ANY] Noms - List Nominated Maps
    Reply With Quote #3

    Quote:
    Originally Posted by ss2miraitrunks View Post
    make it compatible with ultimate map chooser?
    I've glanced at UMC and it's very different. I might be able to make a different version for it - dunno, I'd have to set up umc on our server.
    Malachi is offline
    Sreaper
    髪を用心
    Join Date: Nov 2009
    Old 03-19-2013 , 15:54   Re: [ANY] Noms - List Nominated Maps
    Reply With Quote #4

    You don't need that attached .smx as it compiles fine on the forums.
    I also suggest you put anything that list anything into a panel or a menu for organization but otherwise your plugin looks nice.

    Would you also add screenshot(s)?

    Last edited by Sreaper; 03-19-2013 at 16:05.
    Sreaper is offline
    Powerlord
    AlliedModders Donor
    Join Date: Jun 2008
    Location: Seduce Me!
    Old 03-20-2013 , 09:30   Re: [ANY] Noms - List Nominated Maps
    Reply With Quote #5

    You might want to use RegConsoleCmd on "noms" (which auto-registers the /noms and !noms commands) instead of AddCommandListener on say and say_text.
    __________________
    Not currently working on SourceMod plugin development.
    Powerlord is offline
    Malachi
    Senior Member
    Join Date: Jun 2010
    Location: USA
    Old 03-20-2013 , 10:15   Re: [ANY] Noms - List Nominated Maps
    Reply With Quote #6

    Quote:
    Originally Posted by Powerlord View Post
    You might want to use RegConsoleCmd on "noms" (which auto-registers the /noms and !noms commands) instead of AddCommandListener on say and say_text.
    I was reluctant to add yet one more registered command, but maybe that's the way to go.
    Malachi is offline
    Malachi
    Senior Member
    Join Date: Jun 2010
    Location: USA
    Old 03-20-2013 , 12:14   Re: [ANY] Noms - List Nominated Maps
    Reply With Quote #7

    Quote:
    Originally Posted by Powerlord View Post
    You might want to use RegConsoleCmd on "noms" (which auto-registers the /noms and !noms commands) instead of AddCommandListener on say and say_text.
    Done. Thanks to Billeh who did the update.
    Malachi is offline
    Malachi
    Senior Member
    Join Date: Jun 2010
    Location: USA
    Old 03-20-2013 , 16:09   Re: [ANY] Noms - List Nominated Maps
    Reply With Quote #8

    Quote:
    Originally Posted by Sreaper View Post
    Would you also add screenshot(s)?
    Done.
    Malachi is offline
    Malachi
    Senior Member
    Join Date: Jun 2010
    Location: USA
    Old 03-21-2013 , 02:14   Re: [ANY] Noms - List Nominated Maps
    Reply With Quote #9

    Quote:
    Originally Posted by Sreaper View Post
    You don't need that attached .smx as it compiles fine on the forums.
    People have wrongly said this before so I just threw it in anyways - I guess this holds for standard includes, but not 3rd party includes.

    Last edited by Malachi; 03-21-2013 at 02:15.
    Malachi is offline
    Reply



    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 00:10.


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