Raised This Month: $276 Target: $400
 69% 

Rock The Vote


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author
ferret
SourceMod Developer
Join Date: Dec 2004
Location: Atlanta, GA
Plugin ID:
46
Plugin Version:
1.4
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    26 
    Plugin Description:
    Allows players to start a vote for a new map.
    Unapprover:
    Reason for Unapproving:
    Obsolete
    Old 06-28-2007 , 10:44   Rock The Vote
    #1

    Rock The Vote
    Version 1.4

    By: ferret!

    Description

    This plugin is a standalone RTV plugin. It does not provide an end-of-map vote (1), nor nextmap functionality (2).

    Players can say rtv or rockthevote to initiate the process. When enough votes have been cast, a menu will appear for players to choose the nextmap. At the end of that vote, the map will change. The menu consists of 4 map options and a fifth option, "Keep Current Map".

    The 4 map options are chosen at random unless players have nominated maps. A player can nominate by simply saying "nominate". They will be displayed a menu with available maps to choose. 4 nominates per map are allowed, first come first serve. A player can only nominate once.

    The nomination list comes from addons/sourcemod/configs/maps.ini if it exists. Otherwise, your normal map cycle file will be used.

    Commands
    • sm_rtv_addmap <mapname>
      • Adds a map to the next RTV vote. This is like a console version of nominate, but can be used repeatedly and by rcon or a config file. If you add too many maps, it pushes the oldest ones off. Each time you add a map in this method, it will lower the number of nominatable maps as well.
    Cvars
    • sm_rtv_needed
      • Controls how many votes are needed to begin.
      • Default value is 0.60 (60%)
      • Range is 0.05 (5%) to 1.0 (100%)
    • sm_rtv_file
      • Specify a map list to use for RTV. This is relative to the Sourcemod folder
      • Default is "configs/maps.ini" (That is, addons/sourcemod/configs/maps.ini)
    • sm_rtv_maps
      • Specifies how many maps to have in the vote, and how many nominations as a result.
      • Default value is 4.
      • Range is 2 to 6.
    • sm_rtv_minplayers
      • Sets the required players online before RTV can begin
      • Default value is 0.
      • Range is 0 to 64
    • sm_rtv_nominate
      • Turns the nominate command on and off
      • Default is 1, on.
      • Set to 0 to turn off.
    Change Log
    • Version 1.4
      • Abandoned Hungarian notation
      • Stopped RTV from triggering when last player disconnects.
      • Removed LANG_SERVER wherever possible.
      • Added sm_rtv_minplayers cvar
      • Added sm_rtv_nominate cvar
      • Added sm_rtv_addmap command.
      • Fixed crashes due to small mapcycles.
      • New phrase: "Minimal Players Not Met"
      • New phrase: "Map Inserted"
      • New phrase: "Map Already in Vote"
      • Added INS say2.
    • Version 1.3.1 (July 2nd)
      • Fixed german translation for new phrase, thanks Isias.
      • Fixed issue of rtv becoming permanently "started"
    • Version 1.3 (July 1st)
      • Added new cvar, sm_rtv_maps. This lets you control the number of maps in the vote. It also acts as the nomination limit. See above.
      • RTV is now delayed by 30 seconds on map start. Players must wait that long until trying to start it (New phrase, get the translation file!)
      • Votes needed is now recalculated each time a player connects or disconnects, rather than the first time someone says "RTV". If someone disconnects, causing the votes to be higher than the needed value, RTV will begin.
      • RTV is now delayed 2 seconds after the needed votes are reached. I didn't like it immediately appearing, bugged me for some reason.
      • You can now use: bind key "say rtv"
    • Version 1.2 (June 20th)
      • Fixed nominate command, you can now nominate until the vote is displayed.
      • Changed the RTVStarted phrase slightly.
    • Version 1.1 (June 29th)
      • Added sm_rtv_file so that you can customize the map file without editing the plugin.
      • Conformed to plugin submission rules
      • Added version cvar sm_rockthevote_version
      • Bots excluded from "vote required" total.
    • Version 1.0
      • German Translation
      • Added a check for number of nominations after user picks a map, in case multiple people tried to nominate at the same time.
      • Forgot to set g_bRTVEnded when it ended.
      • Visual fix for when player selects current map
    • Version 0.7
      • Uh.. whoops. We now increment the votes when they are cast.
      • Close the menu on map end, so it's ready to be rebuilt next map.
      • Set g_bNominated when a player successfully nominates.. rofl.
      • I shouldn't code at work.
    • Version 0.6
      • Fixed translation error in nomination handler
      • Fixed checking client 0 for "is in game"
    Bugs, Requests, Translations, or Other Issues

    Please use my project area on the Allied Modders Bug Tracker to report any issues or make requests. Your login for the bug tracker is the same as your forum login. Set the category to this plugin's name.

    Notes

    (1) MapChooser plugin for End Of Map: http://forums.alliedmods.net/showthread.php?t=56714
    (2) NextMap plugin for nextmap and sm_nextmap: http://forums.alliedmods.net/showthread.php?t=56689
    Attached Files
    File Type: sp Get Plugin or Get Source (rockthevote.sp - 59909 views - 13.8 KB)
    File Type: txt plugin.rockthevote.txt (3.9 KB, 29285 views)
    __________________
    I'm a blast from the past!

    Last edited by ferret; 07-13-2007 at 17:29.
    ferret is offline
    ferret
    SourceMod Developer
    Join Date: Dec 2004
    Location: Atlanta, GA
    Old 06-28-2007 , 10:48   Re: Rock The Vote
    #2

    Please note that I wrote this at work, because I was bored and I'm waiting for someone to finish some documentation. Therefore, it has NOT been tested on a live server. I can 100% gaurentee that it compiles with the latest SourceMod build. I can 99% gaurentee it actually works, because I'm awesome. But there's a 1% chance that I'm not awesome.
    __________________
    I'm a blast from the past!
    ferret is offline
    Hell Phoenix
    Senior Member
    Join Date: Jan 2005
    Old 06-28-2007 , 11:10   Re: Rock The Vote
    #3

    Guess you are not awesome ;)

    Code:
    L 06/28/2007 - 10:11:20: [SM] Native "IsClientInGame" reported: Client index 0 is invalid
    L 06/28/2007 - 10:11:20: [SM] Displaying call stack trace:
    L 06/28/2007 - 10:11:20: [SM]   [0]  Line 116, rockthevote.sp::Command_Say()
    L 06/28/2007 - 10:11:22: [SM] Native "IsClientInGame" reported: Client index 0 is invalid
    L 06/28/2007 - 10:11:22: [SM] Displaying call stack trace:
    L 06/28/2007 - 10:11:22: [SM]   [0]  Line 116, rockthevote.sp::Command_Say()
    L 06/28/2007 - 10:11:29: [SM] Plugin "rockthevote.smx" encountered error 4: Invalid parameter or parameter type
    L 06/28/2007 - 10:11:29: [SM] Native "VFormat" reported: Translation failed: invalid client index 1394634574
    L 06/28/2007 - 10:11:29: [SM] Displaying call stack trace:
    L 06/28/2007 - 10:11:29: [SM]   [0]  Line 234, D:\sourcetest\dod\addons\sourcemod\scripting\include\halflife.inc::PrintToChatAll()
    L 06/28/2007 - 10:11:29: [SM]   [1]  Line 259, rockthevote.sp::Handler_MapSelectMenu()
    __________________

    Last edited by Hell Phoenix; 06-28-2007 at 11:12.
    Hell Phoenix is offline
    ferret
    SourceMod Developer
    Join Date: Dec 2004
    Location: Atlanta, GA
    Old 06-28-2007 , 11:29   Re: Rock The Vote
    #4

    Fixed both.
    __________________
    I'm a blast from the past!
    ferret is offline
    Hell Phoenix
    Senior Member
    Join Date: Jan 2005
    Old 06-28-2007 , 12:40   Re: Rock The Vote
    #5

    No errors but now nominate doesnt show any maps, and the vote doesnt display although if you type in nominate after you rtv, it says you cant nominate because the vote has already been rocked.
    __________________
    Hell Phoenix is offline
    ferret
    SourceMod Developer
    Join Date: Dec 2004
    Location: Atlanta, GA
    Old 06-28-2007 , 13:28   Re: Rock The Vote
    #6

    Empty menus, or no menu at all?
    __________________
    I'm a blast from the past!
    ferret is offline
    ferret
    SourceMod Developer
    Join Date: Dec 2004
    Location: Atlanta, GA
    Old 06-28-2007 , 13:35   Re: Rock The Vote
    #7

    New test version up. Fixed three things, may have resolved everything you described.
    __________________
    I'm a blast from the past!
    ferret is offline
    Hell Phoenix
    Senior Member
    Join Date: Jan 2005
    Old 06-28-2007 , 13:51   Re: Rock The Vote
    #8

    Works like a champ now! Just a quick question...didnt look through the code but does the nominate go to the regular mapvote too (non-rtv)? Im assuming not but that would be cool to do.
    __________________
    Hell Phoenix is offline
    ferret
    SourceMod Developer
    Join Date: Dec 2004
    Location: Atlanta, GA
    Old 06-28-2007 , 13:58   Re: Rock The Vote
    #9

    No. They are seperate. RTV and MapChooser are meant to provide two basic functions seperately, for people who like things lightweight and small.

    They aren't meant to be a big huge Deagle's style map management system. More like "plug and play" features.
    __________________
    I'm a blast from the past!
    ferret is offline
    Hell Phoenix
    Senior Member
    Join Date: Jan 2005
    Old 06-28-2007 , 14:00   Re: Rock The Vote
    #10

    Thats what I figured...thanks!
    __________________
    Hell Phoenix is offline
    Closed Thread


    Thread Tools
    Display Modes

    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:01.


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