Raised This Month: $18 Target: $400
 4% 

Custom Votes v0.5.6 (1/07)


Post New Thread Reply   
 
Thread Tools Display Modes
Nomarky
SourceMod Donor
Join Date: Sep 2007
Old 06-05-2008 , 16:21   Re: Custom Votes v0.2 (6/5)
Reply With Quote #11

Quote:
Originally Posted by FunTF2Server View Post
i cant figure how to get the votekick and voteban working, oh and votemap
Perhaps try Players Votes: http://forums.alliedmods.net/showthread.php?t=72058
These functions are built in to the plugin
Nomarky is offline
chundo
Senior Member
Join Date: May 2008
Old 06-05-2008 , 19:32   Re: Custom Votes v0.2 (6/5)
Reply With Quote #12

Quote:
Originally Posted by FunTF2Server View Post
thx so much chundo you are our hero.

can anyone make me a sample cfg for votekick and voteban that anyone can call with exactly those keywords?

i already made the voteff and votealltalk which is awesome but i cant figure how to get the votekick and voteban working, oh and votemap
Code:
"Votes"
{
    "ban"
    {
        "title"        "Ban #1 for 30 minutes?"
        "type"         "confirm"
        "trigger"      "voteban"
        "percent"      "75"
        "votes"        "4"
        "approve"      "admins"
        "cmd"          "sm_ban #1 30 voteban"
    }
}
The downsides to this method are:

1) The vote initiator must specify the target in the command (i.e. "voteban chundo"). v0.3 (almost done, hooray for days off) solves this by prompting for missing parameters via menus.

2) When passing a user as a parameter, I don't check for immunity (yet), so a regular user can start a voteban on an admin. This is mitigated in the above example by requiring an admin to approve the vote result. This will also be resolved in v0.3.

Of course, if you have PlayersVotes installed, the above trigger (voteban) will conflict with it.

With v0.3, I'll also include a "stock votes" configuration file, which so far includes:

alltalk
crits
gravity
setnextmap
ban
changelevel
extend
kick
ban
scrambleteams

Last edited by chundo; 06-05-2008 at 19:36.
chundo is offline
FunTF2Server
Veteran Member
Join Date: Apr 2008
Old 06-05-2008 , 21:19   Re: Custom Votes v0.2 (6/5)
Reply With Quote #13

Quote:
Originally Posted by chundo View Post
Code:
"Votes"
{
    "ban"
    {
        "title"        "Ban #1 for 30 minutes?"
        "type"         "confirm"
        "trigger"      "voteban"
        "percent"      "75"
        "votes"        "4"
        "approve"      "admins"
        "cmd"          "sm_ban #1 30 voteban"
    }
}
The downsides to this method are:

1) The vote initiator must specify the target in the command (i.e. "voteban chundo"). v0.3 (almost done, hooray for days off) solves this by prompting for missing parameters via menus.

2) When passing a user as a parameter, I don't check for immunity (yet), so a regular user can start a voteban on an admin. This is mitigated in the above example by requiring an admin to approve the vote result. This will also be resolved in v0.3.

Of course, if you have PlayersVotes installed, the above trigger (voteban) will conflict with it.

With v0.3, I'll also include a "stock votes" configuration file, which so far includes:

alltalk
crits
gravity
setnextmap
ban
changelevel
extend
kick
ban
scrambleteams
sweet you rock kthx bye, ill be looking forwerd to 0.3
__________________
FunTF2Server is offline
chundo
Senior Member
Join Date: May 2008
Old 06-06-2008 , 03:52   Re: Custom Votes v0.3 (6/6)
Reply With Quote #14

Went quicker than I thought - 0.3 is out. With this release I think it pretty much has all the functionality needed to duplicate basevotes and funvotes voting behavior.

Here is a voteban example using 0.3:

Code:
 "Votes"
{
    "ban"
    {
        "title"        "Ban #1 for 30 minutes?"
        "type"         "confirm"
        "trigger"      "voteban"
        "percent"      "75"
        "votes"        "4"
        "approve"      "admins"
        "cmd"          "sm_ban #1 30 voteban"
        "params"
        {
            "1"            "player"
        }
    }
}
Comments and bug reports appreciated!!

Last edited by chundo; 06-10-2008 at 12:10.
chundo is offline
FunTF2Server
Veteran Member
Join Date: Apr 2008
Old 06-06-2008 , 04:22   Re: Custom Votes v0.3 (6/6)
Reply With Quote #15

should i use the .smx attached to post "get plugin", or the one in the .zip which is attached. They are different size.

thx
__________________
FunTF2Server is offline
chundo
Senior Member
Join Date: May 2008
Old 06-06-2008 , 11:42   Re: Custom Votes v0.3 (6/6)
Reply With Quote #16

It's probably because I'm compiling against a slightly different snapshot than the forum server - they're both based on the same source though. They should both work the same, but the best idea is probably always to compile it yourself against the SM version you're using.
chundo is offline
chundo
Senior Member
Join Date: May 2008
Old 06-06-2008 , 16:39   Re: Custom Votes v0.4 (6/6)
Reply With Quote #17

v0.4 is released. Added automatic integration with admin "Voting Commands" menu.

I don't have any other features planned for this plugin, so if you have any suggestions or requests, let me know. And as always, let me know if you run across any bugs.
__________________
chundo is offline
FunTF2Server
Veteran Member
Join Date: Apr 2008
Old 06-09-2008 , 04:35   Re: Custom Votes v0.4 (6/6)
Reply With Quote #18

hmm not working, i get this when i load plugin

L 06/09/2008 - 02:430: [SM] Plugin encountered error 4: Invalid parameter or parameter type
L 06/09/2008 - 02:430: [SM] Native "LogError" reported: Language phrase "Configuration error" not found
L 06/09/2008 - 02:430: [SM] Debug mode is not enabled for "customvotes.smx"
L 06/09/2008 - 02:430: [SM] To enable debug mode, edit plugin_settings.cfg, or type: sm plugins debug 52 on
L 06/09/2008 - 02:430: [customvotes.smx] Errors were encountered while loading configuration. The plugin may not work as expected.
__________________
FunTF2Server is offline
FunTF2Server
Veteran Member
Join Date: Apr 2008
Old 06-09-2008 , 04:36   Re: Custom Votes v0.4 (6/6)
Reply With Quote #19

here my cfg file, it's called tfc.vote.cfg

Code:
"Votes"
{
    "alltalk"
    {
        "title"        "Turn all talk {!sv_alltalk|onoff}?"
        "trigger"    "votealltalk"
        "type"        "confirm"
        "cmd"        "sv_alltalk {!sv_alltalk}"
    }
    "burn"
    {
        "title"        "Set #1 on fire?"
        "type"        "confirm"
        "trigger"    "voteburn"
        "cmd"        "sm_burn #1 20"
        "params"
        {
            "1"            "groupplayer"
        }
    }
    "crits"
    {
        "title"        "Turn crits {!tf_weapon_criticals|onoff}?"
        "trigger"    "votecrits"
        "type"        "confirm"
        "cmd"        "tf_weapon_criticals {!tf_weapon_criticals}"
    }
    "ff"
    {
        "title"        "Turn friendly fire {!mp_friendlyfire|onoff}?"
        "trigger"    "voteff"
        "type"        "confirm"
        "cmd"        "mp_friendlyfire {!mp_friendlyfire}"
    }
    "gravity"
    {
        "title"        "How much gravity should we use?"
        "trigger"    "votegravity"
        "type"        "list"
        "cmd"        "sv_gravity #1"
        "options"
        {
            "200"    "Very Low"
            "400"    "Low"
            "800"    "Normal"
            "1600"    "High"
            "3200"    "Very High"
        }
    }
    "slay"
    {
        "title"        "Slay #1?"
        "type"        "confirm"
        "trigger"    "voteslay"
        "cmd"        "sm_slay #1 20"
        "params"
        {
            "1"            "groupplayer"
        }
    } 
    "ban"
    {
        "title"        "Ban #1 for 30 minutes?"
        "type"        "confirm"
        "trigger"    "voteban"
        "percent"    "75"
        "votes"        "4"
        "approve"    "admins"
        "cmd"        "sm_ban #1 30 voteban"
        "params"
        {
            "1"            "player"
        }
    }
    "changelevel"
    {
        "title"        "Change map to #1?"
        "type"        "confirm"
        "trigger"    "votemap"
        "admin"        "sm_setnextmap"
        "approve"    "admins"
        "cmd"        "changelevel #1"
        "params"
        {
            "1"        "mapcycle"
        }
    }
    "extend"
    {
        "title"        "Extend current map 30 minutes?"
        "trigger"    "voteextend"
        "type"        "confirm"
        "cmd"        "sm_extend 30"
    }
    "kick"
    {
        "title"        "Kick #1?"
        "type"        "confirm"
        "trigger"    "votekick"
        "percent"    "75"
        "votes"        "4"
        "approve"    "admins"
        "cmd"        "sm_kick #1 votekick"
        "params"
        {
            "1"            "player"
        }
    }
    "scrambleteams"
    {
        "title"        "Scramble teams?"
        "trigger"    "votescramble"
        "type"        "confirm"
        "cmd"        "mp_scrambleteams 1"
    }
    "setnextmap"
    {
        "title"        "Set next map to #1?"
        "type"        "confirm"
        "trigger"    "votenextmap"
        "cmd"        "sm_setnextmap #1"
        "params"
        {
            "1"        "mapcycle"
        }
    }
}
__________________
FunTF2Server is offline
chundo
Senior Member
Join Date: May 2008
Old 06-09-2008 , 11:10   Re: Custom Votes v0.4 (6/6)
Reply With Quote #20

Your config file parses fine for me. I've made the parsing errors more descriptive in the attached version, try it and let me know what it says.
Attached Files
File Type: sp Get Plugin or Get Source (customvotes.sp - 785 views - 39.5 KB)
__________________

Last edited by chundo; 06-09-2008 at 11:27.
chundo 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 05:28.


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