Raised This Month: $32 Target: $400
 8% 

[Any] Map History (Updated 24-11-2013 @ 1.1.1)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Plugin ID:
3001
Plugin Version:
1.1.1
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    1 
    Plugin Description:
    Allow any user to see map history in a menu
    Old 06-09-2012 , 11:27   [Any] Map History (Updated 24-11-2013 @ 1.1.1)
    Reply With Quote #1

    Map History

    v. 1.1.1

    Features :
    • Allow any players to see the last X maps by typing !lastmaps. Click image for larger version

Name:	maphistorypanel.png
Views:	1331
Size:	37.7 KB
ID:	104819

    Why I made this plugin :
    • I felt like it was needed on my community's server, where an admin can't see map history because that server uses MAP and is very slowly getting on Sourcemod.
    • Admins sometimes want to vote a certain map, but they don't know when it was last played (I know, it is built-in in Sourcemod in "nextmap" plugin; but read the other points; and this one is standalone).
    • Let normal players know what were the last maps, so you can tell them to use !lastmaps. This prevents further whinning about asking for a map that was just played.

    In short : plugin is standalone and everyone can see map history.

    Commands :
    • <sm_lastmap | say !lastmap> to show what was the last map and when it started.
    • <sm_lastmaps | say !lastmaps> to show what were the last maps and when they started.

    ConVars :
    Code:
    // Allow people to use 'lastmap' command to see the last map. 0=disable command, 1=enable command (default).
    // -
    // Default: "1.0"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    mh_allow_lastmap "1.0"
    
    // Allow people to use the menu to show last maps. 0=disable command, 1=enable command (default).
    // -
    // Default: "1.0"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    mh_allow_menu "1.0"
    
    // Minimum time in seconds between two menu requests for a player. Default 2.
    // -
    // Default: "2.0"
    // Minimum: "0.000000"
    mh_allow_menu_delaymin "2.0"
    
    // Allow people to use the menu to show last maps. 0=disable command, 1=enable command (default).
    // -
    // Default: "32.00"
    // Minimum: "0.000000"
    // Maximum: "32.000000"
    mh_allow_menu_mapnumbershown "32.00"
    
    // Restrict 'lastmap' to people with this flag. "" for everyone.
    // -
    // Default: ""
    mh_lastmap_flag ""
    
    // Restrict 'lastmap' to people with this override. "" for everyone.
    // -
    // Default: ""
    mh_lastmap_override ""
    
    // Restrict 'menu' to people with this flag. "" for everyone.
    // -
    // Default: ""
    mh_menu_flag ""
    
    // Restrict 'menu' to people with this override. "" for everyone.
    // -
    // Default: ""
    mh_menu_override ""
    
    // Show current map in '!lastmaps' ? 1=yes, 0=no (default) ; changing value requires map change
    // -
    // Default: "0.0"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    mh_showcurrentmap "0.0"
    Known bugs :
    • None at the moment, please report any.

    Notes :
    • Place phrases in translation folder.
    • You may want to redefine the number of maps kept in memory at line 16 and recompile. 32 by default.
    • This uses a Panel and not a menu that you cycle through. This means a 1-page-only menu. I suggest avoiding big number of maps kept in history.
    • Thanks to graczu for his Mapcycle plugin that showed how to use Panels.

    --------------

    Changelog :
    • 1.0.0 Initial release. (09-06-2012)
    • 1.1.0 (20-12-2012)
      • Added support for admin flag and override. See ConVars :
        • mh_lastmap_flag
        • mh_lastmap_override
        • mh_menu_flag
        • mh_menu_override
      • Plugin now creates its own config files (due to a lot of ConVar) with the other SM cfgs (/cfg/sourcemod/).
      • Added possibility to choose the number of maps dynamically we want via a ConVar. See mh_allow_menu_mapnumbershown.
      • Added anti-menu spam. See ConVar mh_allow_menu_delaymin.
      • Removed FCVAR_NOTIFY from non-version ConVars and removed FCVAR_REPLICATED from version ConVar.
    • 1.1.1 (24-11-2013)
      • Modified how the plugin works (+updated for approval) :
        • It now uses the internal Sourcemod map history,
        • This allows to show the load the plugin on the fly and access the map history.
      • New convar mh_showcurrentmap, allowing to show or not the current map when using sm_lastmaps. Default is 0 (not showing current map).
      • Menu is now loaded on map change, rather than when asked (tiny optimization)
    • Approved by Peace-Maker. (31-12-2014)

    Todo list :
    • None at the moment.
    Attached Files
    File Type: txt maphistory.phrases.txt (454 Bytes, 739 views)
    File Type: sp Get Plugin or Get Source (maphistory.sp - 1325 views - 9.6 KB)
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work

    Last edited by RedSword; 02-25-2015 at 20:52. Reason: 107dl; Ready for review.
    RedSword is offline
     



    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 21:04.


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