Raised This Month: $ Target: $400
 0% 

[TF2/ANY] VIP (weighted) Mapvotes - Updated 19 Sept 2014


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
El Diablo War3Evo
Veteran Member
Join Date: Jun 2013
Plugin ID:
4221
Plugin Version:
1.0.0.2
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    1 
    Plugin Description:
    VIP Mapvotes - Allows you to setup admin flags and maps to have a weighted votes added to them. Like VIP can stand for 3 votes instead of 1. Maps can add to votes also.
    Old 05-27-2014 , 02:07   [TF2/ANY] VIP (weighted) Mapvotes - Updated 19 Sept 2014
    Reply With Quote #1

    VIP Mapvotes

    I was going to call this, Weighted Map Votes, but decided the main use we use this for on our servers is for VIP players, I decided to call it VIP Map Votes.

    This is work in progress and is not a final product. I just created this within the last 2 days and only tested it for 1 day with our server full of VIPs. At this time, there does not seem to be any known quirks.

    I'm also sorry there isn't many CVARs for customizations, and you will have to modify some numbers on the top of the source and compile it for better customization. I added comments where you can modify the code, and explained in best detail what they are used for. I will be adding more CVARS as I work on this, so please don't down me for that yet.

    Only the Admin Flag you assign can see the Time Remaining and the Vote Numbers, everyone else just sees the menu. I decided not to let our VIP see the voting progress in the center screen for obvious reasons.




    By the default vip_mapvotes.ini file, VIP can type !mapvote or /mapvote in chat to trigger the map voting menu. They can only call for this vote during the last 10 minutes of the map.



    Add to your server.cfg:

    ** 19 sept 2014 NEW ** On our server the location ends up being:
    tf2/tf/addons/sourcemod/configs/vip_mapvotes.ini

    vip_matvote_location "configs/vip_mapvotes.ini"

    ** 19 sept 2014 Updated ** Use Admins flag(s) or "anyone" to assign players whom can see the voting progress:
    mapvote_admin_can_see_vote_progress c

    The amount of minutes left on map when the map vote command can be triggered. (0 = disabled) (default 10):

    vip_mapvotes_voting_allowed_time 10

    The Number of minutes to set a map for when the map is changed to the map voted by VIP MAPVOTES. (0 = disabled) (default 20):

    vip_mapvotes_map_timelimit 20

    The number of warnings that will let a vip know they can place a map vote (0 = disabled) (default 2):

    vip_mapvotes_vote_timer_warning 2

    Keep logs of specific important things that happen in vip_mapvotes. Like, who started the vip mapvotes command and what map was choosen. (default 1 = on)
    vip_mapvotes_logs 1


    NOW The Fun customization part!

    vip_mapvotes.ini

    This is the customization file.

    ** 19 sept 2014 Updated ** The CanTriggerMapVote section is the section you setup for who can trigger the map votes. The program looks thru the code from top to bottom. So the order is best to start from top to bottom. Yes means the person with that admin flag or flags is allowed to type vipmapvote or what ever you assign your command in the sourcecode. You can use combonations. Like "ab" would mean they must have both "a" and "b" flags in order to be able to use this command. ** You can now use "anyone" as a flag so that anyone can trigger the map vote.

    ** 19 sept 2014 NEW ** The MapVotingCommands section is the section where you can setup the chat commands that trigger the map voting.

    The AdminFlags section is order of top to bottom for flag searches. If the player has the cbt flag, that player will only receive bonus points for the "c" flag only. The Bonus points are applied to that player's vote. A player with "c" would gain +3 votes to what ever they choose. You can put negative numbers on this section if you want certain flags to have a negative weight.

    ** 19 sept 2014 NEW ** The NamesBeginWith section is the section what you can use to add bonus points to certain players that begin with certain words or clan tags.

    NamesContain is a section that are going to be added soon and have not yet been added. Some of the sourcecode has been already added.

    The MapPool is the section that holds all the maps that a voter can choose from for this plugin. The numbers beside the maps are how much bonus each player will gain for picking that map on a map vote. You can add negative numbers too, if for instance you only want your VIP to vote for a certain map.. just make it like -2 if the VIP has a positive 3.

    The MapPool contains the TF2 Quickplay list of maps, but you can customize this how you see fit for your game.


    IF your VIP only has the "a" flag, please be sure to modify the file "vip_mapvotes.ini" and change "no" to "yes". Our trial VIP have "a", and our real VIP has "ab".

    ** 19 sept 2014 Updated vip_mapvotes.ini text below**
    Code:
    "AwesomeSettings" 
    { 
        "CanTriggerMapVote" 
        { 
        // "Admin Flag"                "Can trigger !mapvote? yes or no" // comment on default admin flags 
        // Can do Mixes being required instead of just checking for singles, 
        // but if you do require ab, then they MUST have both a and b or 
        // any other combonation 
     
        // The order of choice is from top to bottom: 
            "anyone"                        "no" // anyone can trigger map vote 
     
        // Combonations: 
            "ab"                            "no" //requires both a and b flags 
        // Singles: 
            "a"                            "yes" //Reserved slot access. 
            "b"                            "yes" //Generic admin; required for admins. 
            "c"                            "yes" //Kick other players. 
            "d"                            "yes" //Ban other players. 
            "e"                            "yes" //Remove bans. 
            "f"                            "yes" //Slay/harm other players. 
            "g"                            "yes" //Change the map or major gameplay features. 
            "h"                            "yes" //Change most cvars. 
            "i"                            "yes" //Execute config files. 
            "j"                            "yes" //Special chat privileges. 
            "k"                            "yes" //Start or create votes. 
            "l"                            "yes" //Set a password on the server. 
            "m"                            "yes" //Use RCON commands. 
            "n"                            "yes" //Change sv_cheats or use cheating commands. 
            "o"                            "no" //Custom 
            "p"                            "no" //Custom 
            "q"                            "no" //Custom 
            "r"                            "no" //Custom 
            "s"                            "no" //Custom 
            "t"                            "no" //Custom 
            "z"                            "yes" //Magically enables all flags and ignores immunity values. 
        } 
     
        "MapVotingCommands" 
        { 
        // yes enables command and no disables command 
            "!mapvote"                        "yes" 
            "/mapvote"                        "yes" 
        } 
     
        "AdminFlags" 
        { 
        // ORDER MATTERS! 
        // The order of choice is from top to bottom: 
     
        // "Admin Flag(s)"                "Points for vote (can be negative)" 
            "c"                            "1" // admin 
            "b"                            "1" // real vip 
            "t"                            "1" // custom member 
        } 
     
        "NamesBeginWith" 
        { 
        //    "Name Begins with"            "Points for vote (can be negative)" 
            "-W3E-"                            "1" 
        } 
     
        // NamesContain isn't implemented yet 
        "NamesContain" 
        { 
        //    "Names Contain"            "Points for vote" 
            "none"                    "0" 
        } 
     
        "MapPool" 
        { 
            // Map                Points (Added to vote when picked) 
            "cp_dustbowl"                "0" 
            "cp_egypt_final"            "0" 
            "cp_gorge"                "0" 
            "cp_gravelpit"                "0" 
            "cp_junction_final"            "0" 
            "cp_mountainlab"            "0" 
            "cp_steel"                "0" 
            "cp_5gorge"                "0" 
            "cp_badlands"                "0" 
            "cp_coldfront"                "0" 
            "cp_fastlane"                "0" 
            "cp_freight_final1"            "0" 
            "cp_granary"                "0" 
            "cp_well"                "0" 
            "cp_yukon_final"            "0" 
            "cp_foundry"                "0" 
            "cp_gullywash_final1"            "0" 
            "cp_process_final"            "0" 
            "cp_standin_final"            "0" 
            "cp_snakewater_final1"            "0" 
            "ctf_2fort"                "0" 
            "ctf_doublecross"            "0" 
            "ctf_sawmill"                "0" 
            "ctf_turbine"                "0" 
            "ctf_well"                "0" 
            "koth_badlands"                "0" 
            "koth_harvest_final"            "0" 
            "koth_lakeside_final"            "0" 
            "koth_nucleus"                "0" 
            "koth_sawmill"                "0" 
            "koth_viaduct"                "0" 
            "koth_king"                "0" 
            "pl_badwater"                "0" 
            "pl_frontier_final"            "0" 
            "pl_goldrush"                "0" 
            "pl_hoodoo_final"            "0" 
            "pl_thundermountain"            "0" 
            "pl_upward"                "0" 
            "pl_barnblitz"                "0" 
            "plr_hightower"                "0" 
            "plr_pipeline"                "0" 
            "plr_nightfall_final"            "0" 
            "sd_doomsday"                "0" 
        } 
    }
    As ROOT admin, you can cancel any voting (untested) and issue this comand in your console: sm_rcon sm_cancelvoting

    As ROOT admin you can also Initialize the data, just in cause you need it after doing a cancel vote... sm_init

    As ROOT admin you can also Reload the vip_mapvotes.ini file by typing sm_reloadconfig in the console menu or /reloadconfig in chat.

    Players can type !revote anytime during the voting progress to change their votes.

    You can compile the sourcecode at http://www.sourcemod.net/compiler.php

    Code:
    Change Log:
    
    19 Sept 2014 - version 1.0.0.2 - Added new vip_matvote_location convar, updated CanTriggerMapVote to allow the use of "anyone" flag, added new MapVotingCommands to the vip_mapvotes.ini configuration file to allow server owners to change the map voting command, added sm_reloadconfig, added NamesBeginWith so that you can give bonus points to players whom have names that begin with some text, updated mapvote_admin_can_see_vote_progress to be able to use the new "anyone" flag
    
    31 May 2014 - version 1.0.0.1 - Added Cvars, adding a logging feature to keep track of which VIP uses the command, and which map is set for nextmap.
    
    1.0.0.0 - Initial Commit
    TO DO LIST:

    -- Add translations support
    -- Convert more internal stuff into CVARS
    -- Add bypass support for Ultimate Mapchooser and Extended Mapchooser

    Try it out, let me know of any improvements you'd like to see.
    Attached Files
    File Type: ini vip_mapvotes.ini (3.1 KB, 491 views)
    File Type: sp Get Plugin or Get Source (vip_mapvotes.sp - 1188 views - 26.1 KB)
    __________________

    Last edited by El Diablo War3Evo; 09-19-2014 at 21:38. Reason: updated vip_mapvotes.sp and vip_mapvotes.ini
    El Diablo War3Evo 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 23:13.


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