AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Advanced Voting (https://forums.alliedmods.net/showthread.php?t=95411)

Gachl 06-23-2009 12:09

[ANY] Advanced Voting
 
1 Attachment(s)
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.

shustas 06-23-2009 12:14

Re: Advanced Voting
 
I thoutgh we can do this already with sm_vote from base plugins?

exvel 06-23-2009 12:24

Re: Advanced Voting
 
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.

Gachl 06-23-2009 12:24

Re: Advanced Voting
 
Quote:

Originally Posted by shustas (Post 855131)
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 (Post 855136)
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).

exvel 06-23-2009 12:31

Re: Advanced Voting
 
Ok, now I get it.

Gachl 06-25-2009 07:05

Re: Advanced Voting
 
New version.

Gachl 07-08-2009 06:20

Re: [ANY] Advanced Voting
 
New version up.

MrSaturn 07-12-2009 00:57

Re: [ANY] Advanced Voting
 
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.

EHG 07-12-2009 02:39

Re: [ANY] Advanced Voting
 
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?

Sexual Harassment Panda 07-12-2009 03:53

Re: [ANY] Advanced Voting
 
wow great plugin, will use.


All times are GMT -4. The time now is 18:48.

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