Raised This Month: $182 Target: $400
 45% 

[ANY] Advanced Voting


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Gachl
BANNED
Join Date: Feb 2009
Plugin ID:
944
Plugin Version:
1.1.4
Plugin Category:
All
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    8 
    Plugin Description:
    Provides votes and runs a specific command when the vote ends depending on the result.
    Old 06-23-2009 , 12:09   [ANY] Advanced Voting
    Reply With Quote #1

    Advanced Voting
    Version 1.1.4
    Support level: Bugs only

    Description

    This plugin simply provides votes, but you can add a command for each voting option that's run if the option wins.

    Usage

    CVars
    Quote:
    • sm_avote_version
      The current version of the plugin.
    Commands
    Quote:
    • sm_avote <title> <option1> <command1> ... <option10> <command10>
      ADMFLAG_GENERIC
      Initiate a vote.
    • sm_asvote <title> <option1> <command1> ... <option10> <command10>
      ADMFLAG_BAN
      Initiate a vote. Commands will be executed on the server.
    Tip: You can use /avote or /asvote in chat.

    Example

    Code:
    sm_asvote "Enable something?" "Low grav" "sv_gravity 150" "Madness!" "sm_melee 1" "Something funny" "sm_beacon @all"
    If Low grav wins the vote sv_gravity 150 will be executed, if Madness! wins sm_melee 1 is executed etc.

    Screenshot
    Soon.

    Changelog
    • v1.0.0 2009/06/23 Plugin created.
    • v1.1.0 2009/06/25 Changed commands parameter, added sm_asvote
    • v1.1.2 2009/06/25 Hotfixed sm_avote would run as server command.
    • v1.1.3 2009/07/02 version cvar
    • v1.1.4 2009/07/08 version cvar (notify)
    Please report bugs here, I'll try to fix them as soon as possible.
    Attached Files
    File Type: sp Get Plugin or Get Source (AdvancedVoting.sp - 1267 views - 2.7 KB)

    Last edited by Gachl; 07-08-2009 at 06:20. Reason: New version
    Gachl is offline
    shustas
    SourceMod Donor
    Join Date: May 2007
    Location: London
    Old 06-23-2009 , 12:14   Re: Advanced Voting
    Reply With Quote #2

    I thoutgh we can do this already with sm_vote from base plugins?
    __________________
    shustas is offline
    exvel
    SourceMod Donor
    Join Date: Jun 2006
    Location: Russia
    Old 06-23-2009 , 12:24   Re: Advanced Voting
    Reply With Quote #3

    It quite strange that you execute command from the client. RegAdminCmd will give you a strong protection from hackers if you specified an admin flag in it. Then just use "ServerCommand(...)" that is commented inside of your plugin.
    __________________
    For admins: My plugins

    For developers: Colors library

    Last edited by exvel; 06-23-2009 at 12:28.
    exvel is offline
    Send a message via ICQ to exvel
    Gachl
    BANNED
    Join Date: Feb 2009
    Old 06-23-2009 , 12:24   Re: Advanced Voting
    Reply With Quote #4

    Quote:
    Originally Posted by shustas View Post
    I thoutgh we can do this already with sm_vote from base plugins?
    How? I haven't found it.
    As far as I know we can't.

    Quote:
    Originally Posted by exvel View Post
    It quite strange that you execute command from the client. RegAdminCmd will give you a strong protection from hackers if you specified an admin flag in it. Then just use "erverCommand(...)" that is commented inside of your plugin.
    Yes but you can put many many other commands in the options and my plugin can't check if he's allowed to use these commands. If I say sm_avote can be used by admins who can kick but not ban, they could still use sm_ban because it's run as server command. If I run it as client command it has to be validated first if the client can use this command or not (problems are not hackers, problems are users without the corresponding flags to a specific command).
    Not running it as client command would be insecure as hell (you even could run hostname or sv_password and stuff).

    Last edited by Gachl; 06-23-2009 at 12:27.
    Gachl is offline
    exvel
    SourceMod Donor
    Join Date: Jun 2006
    Location: Russia
    Old 06-23-2009 , 12:31   Re: Advanced Voting
    Reply With Quote #5

    Ok, now I get it.
    __________________
    For admins: My plugins

    For developers: Colors library
    exvel is offline
    Send a message via ICQ to exvel
    Gachl
    BANNED
    Join Date: Feb 2009
    Old 06-25-2009 , 07:05   Re: Advanced Voting
    Reply With Quote #6

    New version.
    Gachl is offline
    Gachl
    BANNED
    Join Date: Feb 2009
    Old 07-08-2009 , 06:20   Re: [ANY] Advanced Voting
    Reply With Quote #7

    New version up.
    Gachl is offline
    MrSaturn
    SourceMod Donor
    Join Date: Jan 2009
    Old 07-12-2009 , 00:57   Re: [ANY] Advanced Voting
    Reply With Quote #8

    how much % does a vote have to be to be successful or does it just pick the one with the most %?

    the original votes packed with sourcemod has a few qualms about whether or not votes are technically successful depending on the % of the vote.
    MrSaturn is offline
    EHG
    Senior Member
    Join Date: May 2009
    Location: 127.0.0.1
    Old 07-12-2009 , 02:39   Re: [ANY] Advanced Voting
    Reply With Quote #9

    Great plugin, exactly what I need. A quick and easy way to make an on the spot vote without set it up before hand.
    Can you add support for Left 4 Dead's voting display?
    EHG is offline
    Sexual Harassment Panda
    Veteran Member
    Join Date: Dec 2008
    Location: San Diego, CA
    Old 07-12-2009 , 03:53   Re: [ANY] Advanced Voting
    Reply With Quote #10

    wow great plugin, will use.
    __________________
    Sexual Harassment Panda is offline
    Reply


    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 09:18.


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