AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Custom Votes Redux (v1.7 - 4/13/14) (https://forums.alliedmods.net/showthread.php?t=235115)

sipster19 02-25-2014 23:54

Re: Custom Votes Redux (v1.2 - 2/20/14)
 
Quote:

Originally Posted by ReFlexPoison (Post 2103508)
Why not just use the options vote and set "no" to do nothing...?

That doesn't do it for me. If I have a vote and it says, "Turn radar On?" and it's on, the players want it off, that leaves them no way to do so. It needs it work like chundo's plugin.

Expressions:

In addition to parameter replacement, Custom Votes has a handy expression replacement feature, which allows you to insert CVar values. Vote titles, vote commands, trigger notices, option keys and option values can all contain expressions.

Example title: "Turn all talk {!sv_alltalk|onoff}?"

This would parse to "Turn all talk on?" or "Turn all talk off?", depending on the current value of sv_alltalk.

Syntax: {[!]cvar_name[|modifier(s)]}

An initial "!" reverses the value of boolean CVars (useful for toggle votes). Any modifiers after the CVar determine how the variable displays. Current modifiers are "onoff", "yesno", "upper", "lower", and "capitalize." Multiple modifiers can be strung together (i.e. {sv_alltalk|onoff|capitalize}).

ReFlexPoison 02-26-2014 01:00

Re: Custom Votes Redux (v1.2 - 2/20/14)
 
Quote:

Originally Posted by sipster19 (Post 2104379)
That doesn't do it for me. If I have a vote and it says, "Turn radar On?" and it's on, the players want it off, that leaves them no way to do so. It needs it work like chundo's plugin.

Quote:

Originally Posted by sipster19 (Post 2103501)
I would like to see this added:

confirm - Displays a simple "Yes" or "No" vote. If "Yes" wins, the command will be executed (although no result parameter is returned); if "No" wins, nothing is executed.


Quote:

Originally Posted by sipster19 (Post 2104379)
Expressions:

In addition to parameter replacement, Custom Votes has a handy expression replacement feature, which allows you to insert CVar values. Vote titles, vote commands, trigger notices, option keys and option values can all contain expressions.

Example title: "Turn all talk {!sv_alltalk|onoff}?"

This would parse to "Turn all talk on?" or "Turn all talk off?", depending on the current value of sv_alltalk.

Syntax: {[!]cvar_name[|modifier(s)]}

An initial "!" reverses the value of boolean CVars (useful for toggle votes). Any modifiers after the CVar determine how the variable displays. Current modifiers are "onoff", "yesno", "upper", "lower", and "capitalize." Multiple modifiers can be strung together (i.e. {sv_alltalk|onoff|capitalize}).

I'll look into this. You weren't very clear in your request, hence my confusion.

robotortoise 02-26-2014 18:56

Re: Custom Votes Redux (v1.2 - 2/20/14)
 
Quote:

Originally Posted by ReFlexPoison (Post 2104389)
I'll look into this.

:)

Creampuffyness 02-27-2014 18:47

Re: Custom Votes Redux (v1.2 - 2/20/14)
 
Reflex anything about my question a page back? Anyway to set a single player to start votes?

ReFlexPoison 02-27-2014 19:37

Re: Custom Votes Redux (v1.2 - 2/20/14)
 
Quote:

Originally Posted by Creampuffyness (Post 2105219)
Reflex anything about my question a page back? Anyway to set a single player to start votes?

I'll introduce that in the next build.

ReFlexPoison 03-01-2014 14:51

Re: Custom Votes Redux (v1.3 - 3/1/14)
 
Pushed Version 1.3 - 3/1/14
  • Added ability to start votes rather than having player manually choose selections
  • Added On/Off on/off formatting for control variable votes
  • Added Yes/No yes/no formatting for vote casts
  • Added simple votes which don't require vote selections
  • Added chat notifications for when a vote starts, is cast upon, passes, or fails
  • Added {VOTER_STEAMID} and {TARGET_STEAMID} to vote formatting
  • Removed bots from ratio calculations
I updated the configuration file and translations so make sure to fix up your votes with proper formatting. A lot of things have changed, so I can't assure a perfect plugin. Let me know if you have any issues and I'll attempt to resolve the issue asap.

ph 03-01-2014 15:40

Re: Custom Votes Redux (v1.3 - 3/1/14)
 
I have been using, Players Votes Redux

When voting occurs i.e. voteban, - player get's listed at the top of the menu, rather searching the player through the menu. I reverted back to Players Votes Redux due to complaints, as players did not enjoy searching for for the player, scrolling through the menu.


I hope you understand what I mean.

ReFlexPoison 03-01-2014 15:50

Re: Custom Votes Redux (v1.3 - 3/1/14)
 
Quote:

Originally Posted by ph (Post 2106005)
I have been using, Players Votes Redux

When voting occurs i.e. voteban, - player get's listed at the top of the menu, rather searching the player through the menu. I reverted back to Players Votes Redux due to complaints, as players did not enjoy searching for for the player, scrolling through the menu.


I hope you understand what I mean.

If that was your only reason for not using the plugin previously I don't know why you didn't suggest it in the first place. I just reposted the build with that included as I didn't attach the appropriate compiled binary in the zip the first time. Let me know if you have any other problems.

ph 03-01-2014 16:17

Re: Custom Votes Redux (v1.3 - 3/1/14)
 
Thank you.

ph 03-01-2014 17:06

Re: Custom Votes Redux (v1.3 - 3/1/14)
 
Installed on 8 popular servers :) and working nicely.

Feedback

- Once a player is voted, the menu should "automatically close" but it doesn't. It goes to the home/root menu screen displaying option votekick, voteban, votemute.

Can the menu automatically close, once a vote is casted? rather than pressing "9" to exit.

robotortoise 03-01-2014 23:57

Re: Custom Votes Redux (v1.3 - 3/1/14)
 
Quote:

Originally Posted by reflexpoison (Post 2105975)
pushed version 1.3 - 3/1/14
  • added ability to start votes rather than having player manually choose selections
  • added on/off on/off formatting for control variable votes
  • added yes/no yes/no formatting for vote casts
  • added simple votes which don't require vote selections
  • added chat notifications for when a vote starts, is cast upon, passes, or fails
  • added {voter_steamid} and {target_steamid} to vote formatting
  • removed bots from ratio calculations
i updated the configuration file and translations so make sure to fix up your votes with proper formatting. A lot of things have changed, so i can't assure a perfect plugin. Let me know if you have any issues and i'll attempt to resolve the issue asap.

wooooohoooooooooooooooooooooo!

ReFlexPoison 03-02-2014 00:20

Re: Custom Votes Redux (v1.3 - 3/1/14)
 
Quote:

Originally Posted by ph (Post 2106047)
Installed on 8 popular servers :) and working nicely.

Feedback

- Once a player is voted, the menu should "automatically close" but it doesn't. It goes to the home/root menu screen displaying option votekick, voteban, votemute.

Can the menu automatically close, once a vote is casted? rather than pressing "9" to exit.

That makes sense. I'll change that soon.

Creampuffyness 03-02-2014 16:29

Re: Custom Votes Redux (v1.3 - 3/1/14)
 
Quote:

Originally Posted by ReFlexPoison (Post 2105975)
Pushed Version 1.3 - 3/1/14
  • Added ability to start votes rather than having player manually choose selections
  • Added On/Off on/off formatting for control variable votes
  • Added Yes/No yes/no formatting for vote casts
  • Added simple votes which don't require vote selections
  • Added chat notifications for when a vote starts, is cast upon, passes, or fails
  • Added {VOTER_STEAMID} and {TARGET_STEAMID} to vote formatting
  • Removed bots from ratio calculations
I updated the configuration file and translations so make sure to fix up your votes with proper formatting. A lot of things have changed, so I can't assure a perfect plugin. Let me know if you have any issues and I'll attempt to resolve the issue asap.

Reflex,
Which part of the update would allow single selections to start votes? What option would I set in the config?

Thanks

ReFlexPoison 03-02-2014 17:11

Re: Custom Votes Redux (v1.3 - 3/1/14)
 
Quote:

Originally Posted by Creampuffyness (Post 2106478)
Reflex,
Which part of the update would allow single selections to start votes? What option would I set in the config?

Thanks

I didn't make it so it would start a vote after it reaches the required selection, there is no point and the older custom votes plugin didn't work like that. You either a) Start a vote b) Cast a selection

Set "vote" in the configuration to change it to your liking.

Lucky_luck 03-02-2014 17:48

Re: Custom Votes Redux (v1.3 - 3/1/14)
 
Support this Updater Plugin ? and can add voteban reason?

Powerlord 03-03-2014 15:13

Re: Custom Votes Redux (v1.3 - 3/1/14)
 
Haven't tried this plugin yet, but looking through the code for it for a possible update to add NativeVotes support for it, I can't help but notice it appears to print every vote cast to chat for certain types of votes.

Shouldn't you just let the SourceMod vote system do this? That's what the sm_vote_progress_chat cvar is for, after all.

Edit: Also, is there any reason you're manually tracking the votes instead of using the advanced vote handler to figure out the percentages?

ReFlexPoison 03-03-2014 16:09

Re: Custom Votes Redux (v1.3 - 3/1/14)
 
Quote:

Originally Posted by Powerlord (Post 2106930)
possible update to add NativeVotes support for it

Probably
Quote:

Originally Posted by Powerlord (Post 2106930)
Shouldn't you just let the SourceMod vote system do this? That's what the sm_vote_progress_chat cvar is for, after all.

I don't believe it was working properly for me when using custom ratios and minimums
Quote:

Originally Posted by Powerlord (Post 2106930)
Edit: Also, is there any reason you're manually tracking the votes instead of using the advanced vote handler to figure out the percentages?

I'll take a look at that.

Powerlord 03-03-2014 16:33

Re: Custom Votes Redux (v1.3 - 3/1/14)
 
Quote:

Originally Posted by ReFlexPoison (Post 2106979)
I don't believe it was working properly for me when using custom ratios and minimums

sm_vote_progress_chat just prints out what player voted for what and nothing more. It also correctly prints if the current vote is a revote or not.

sm_vote_progress_hintbox is the one that prints out the top 3 vote choices and (iirc) what percent of the vote they currently have. Note that those percents are out of votes cast rather than total players, which is item_info[0][VOTEINFO_ITEM_VOTES] / num_votes in the advanced callback.

Incidentally, the advanced callback's num_clients is the number of clients who were in the original vote that are still connected when the vote completes... which gives you two different options for calculating votes in the advanced callbacks.

Incidentally, you may want to translate the Yes and No phrases using MenuAction_DisplayItem... something like

PHP Code:

    else if (action == MenuAction_DisplayItem)
    {
        
decl String:strInfo[16];
        
GetMenuItem(hMenuiParam2strInfosizeof(strInfo));
        
        if (
StrEqual(strInfo"Yes"false) || StrEqual(strInfo"No"false))
        {
            
decl String:strNewInfo[16];
            
Format(strNewInfosize"%T"strInfoiVoter);
            return 
RedrawMenuItem(strNewInfo);
        }
    } 

but be aware you end up needing to put return 0; at the end of the menu handler to avoid a warning.

Oh and that would also require you to pass the MenuAction flags in CreateVote... MENU_ACTIONS_DEFAULT|MenuAction_DisplayItem

ReFlexPoison 03-03-2014 17:13

Re: Custom Votes Redux (v1.3 - 3/1/14)
 
Quote:

Originally Posted by Powerlord (Post 2107001)
sm_vote_progress_chat just prints out what player voted for what and nothing more. It also correctly prints if the current vote is a revote or not.

I messed up my above quotes and responses. The configuration file allows for creating call notifications and by default it is set to "Vote cast for {yes|no}."

Creampuffyness 03-04-2014 23:01

Re: Custom Votes Redux (v1.3 - 3/1/14)
 
Reflex is it working much better thank you. 1 more request. Could it be made to have an option to ignore spectators? It messed up the ratio when there at multiple spectators.

krispx 03-09-2014 06:18

Re: Custom Votes Redux (v1.3 - 3/1/14)
 
Hi, jus i report errors logs :

Code:

L 03/08/2014 - 12:33:02: [SM] Native "GetClientUserId" reported: Client 2 is not connected
L 03/08/2014 - 12:33:02: [SM] Displaying call stack trace for plugin "customvotes-redux.smx":
L 03/08/2014 - 12:33:02: [SM]  [0]  Line 2124, C:\TF2DedicatedServer\tf\addons\sourcemod\scripting\customvotes-redux.sp::FormatTargetString()
L 03/08/2014 - 12:33:02: [SM]  [1]  Line 681, C:\TF2DedicatedServer\tf\addons\sourcemod\scripting\customvotes-redux.sp::VoteHandler_Players()


ReFlexPoison 03-13-2014 23:18

Re: Custom Votes Redux (v1.3 - 3/1/14)
 
Quote:

Originally Posted by krispx (Post 2109534)
Hi, jus i report errors logs :

Code:

L 03/08/2014 - 12:33:02: [SM] Native "GetClientUserId" reported: Client 2 is not connected
L 03/08/2014 - 12:33:02: [SM] Displaying call stack trace for plugin "customvotes-redux.smx":
L 03/08/2014 - 12:33:02: [SM]  [0]  Line 2124, C:\TF2DedicatedServer\tf\addons\sourcemod\scripting\customvotes-redux.sp::FormatTargetString()
L 03/08/2014 - 12:33:02: [SM]  [1]  Line 681, C:\TF2DedicatedServer\tf\addons\sourcemod\scripting\customvotes-redux.sp::VoteHandler_Players()


Fixed. Sorry for wait.

Version 1.4 - 3/13/14
  • Fixed invalid client errors
  • Added fix for clients who disconnect before they get voted on

ThatOneGuy 03-17-2014 02:31

Re: Custom Votes Redux (v1.3 - 3/1/14)
 
Quote:

Originally Posted by ReFlexPoison (Post 2111157)
Fixed. Sorry for wait.

Version 1.4 - 3/13/14
  • Fixed invalid client errors
  • Added fix for clients who disconnect before they get voted on

Chat triggers appear to be broken since the new update. As another person said, it would be nice to have a kv line to toggle whether spectators are counted. Additionally, maybe a line to set logging for certain commands? I might just code that all myself, but it would be nice to implement/provide for everyone.

samsah 03-19-2014 08:28

Re: Custom Votes Redux (v1.4 - 3/13/14)
 
Used default config and voteban won't work with Sourcebans, server console says:
"[SourceBans] Usage: sm_ban <#userid|name> <time|0> [reason]"
I added time after {TARGET_ID} and it goes "[SM] No matching client was found."
Also reasons would be nice to have back.

And can you add ability to extend map? Since we have maps with different timelimits "votemaptime" is no go.

Sorry if these are available somehow. I just could not find a way to achieve what Playersvotes did with this plugin :S

ThatOneGuy 03-19-2014 15:38

Re: Custom Votes Redux (v1.4 - 3/13/14)
 
Quote:

Originally Posted by samsah (Post 2113414)
Used default config and voteban won't work with Sourcebans, server console says:
"[SourceBans] Usage: sm_ban <#userid|name> <time|0> [reason]"
I added time after {TARGET_ID} and it goes "[SM] No matching client was found."
Also reasons would be nice to have back.

And can you add ability to extend map? Since we have maps with different timelimits "votemaptime" is no go.

Sorry if these are available somehow. I just could not find a way to achieve what Playersvotes did with this plugin :S

if you have basevotes installed on your server (default SM plugin), it contains a voteban in it that is accessible only to admins...a short fix would be to use this plugins vote feature, but have it execute a voteban on the player.

Here is an example of what you might try


This would not pop up a vote until the vote passes in chat (not mandatory to vote). Then, the vote will pop up, similar to a map vote. By default, basevotes requires 60% to pass a vote. So, while 51% might be required to trigger the votekick, 60% would have to vote yes once it is triggered. (This can be adjusted using the cvars sm_vote_ban and sm_vote_kick, which are .6 by default)

As to your extend map request, you could use >>>THIS<<< plugin to allow admins to extend it, then put in your vote setups a vote for extending the time, and have the server execute this plugins command with the selected time length.

Powerlord 03-19-2014 15:43

Re: Custom Votes Redux (v1.4 - 3/13/14)
 
Quote:

Originally Posted by ThatOneGuy (Post 2113542)
As to your extend map request, you could use >>>THIS<<< plugin to allow admins to extend it, then put in your vote setups a vote for extending the time, and have the server execute this plugins command with the selected time length.

There are entire plugins dedicated to doing map votes and extensions, why wouldn't you just use one of those?

ThatOneGuy 03-19-2014 16:58

Re: Custom Votes Redux (v1.4 - 3/13/14)
 
Quote:

Originally Posted by Powerlord (Post 2113545)
There are entire plugins dedicated to doing map votes and extensions, why wouldn't you just use one of those?

Not sure if youre asking me that or samsah...I am not looking for that feature...I was just pointing out to samsah that there are other plugins that could help him.

samsah 03-20-2014 05:52

Re: Custom Votes Redux (v1.4 - 3/13/14)
 
ATM I'm completely satisfied with Playersvotes-redux but it will eventually be outdated. I just want this plugin to accomplish the same, even with small things. I don't want use separate plugins if there is possibility to make it with one.
Thanks, ThatOneGuy, but your suggestion still won't give option to choose from multiple reasons.

ThatOneGuy 03-20-2014 08:56

Re: Custom Votes Redux (v1.4 - 3/13/14)
 
Quote:

Originally Posted by samsah (Post 2113769)
Thanks, ThatOneGuy, but your suggestion still won't give option to choose from multiple reasons.

How so?

Wouldnt this give multiple options?

ReFlexPoison 03-21-2014 18:12

Re: Custom Votes Redux (v1.4 - 3/13/14)
 
Quote:

Originally Posted by ThatOneGuy (Post 2113794)
How so?

Wouldnt this give multiple options?

I have yet to introduce multiple options for players and map votes. I tried but it didn't work well...

ThatOneGuy 03-21-2014 22:01

Re: Custom Votes Redux (v1.4 - 3/13/14)
 
Quote:

Originally Posted by ReFlexPoison (Post 2114314)
I have yet to introduce multiple options for players and map votes. I tried but it didn't work well...

Yes, but we were talking about using that second plugin...the command sm_extend_time was from it, and then he could use the option vote from your plugin...but he said he's content with the other plugin he has, so it doesnt really matter.

robotortoise 03-28-2014 20:19

Re: Custom Votes Redux (v1.4 - 3/13/14)
 
Is there a fix coming soon for the chat commands soon?

ReFlexPoison 03-28-2014 20:48

Re: Custom Votes Redux (v1.4 - 3/13/14)
 
Quote:

Originally Posted by robotortoise (Post 2117210)
Is there a fix coming soon for the chat commands soon?

There's nothing wrong with them

robotortoise 03-28-2014 20:59

Re: Custom Votes Redux (v1.4 - 3/13/14)
 
They don't work, though. For instance, typing !poop won't activate the command I have assigned for it.

It worked before the update, though.

ThatOneGuy 03-28-2014 21:58

Re: Custom Votes Redux (v1.4 - 3/13/14)
 
Quote:

Originally Posted by robotortoise (Post 2117226)
They don't work, though. For instance, typing !poop won't activate the command I have assigned for it.

It worked before the update, though.

I can verify that they are not working (as I posted above). Worked before the update, not after.

ReFlexPoison 03-28-2014 22:12

Re: Custom Votes Redux (v1.4 - 3/13/14)
 
I just tested the plugin and it's working fine, again.

PHP Code:

decl String:strText[255];
GetCmdArgString(strTextsizeof(strText));
StripQuotes(strText);

ReplaceString(strTextsizeof(strText), "!""");
ReplaceString(strTextsizeof(strText), "/""");

for(new 
iVote 0iVote g_iVoteCountiVote++)
{
    if(
StrEqual(g_strVoteChatTrigger[iVote], strText))
    {
        
g_iVoteCurrent[iVoter] = iVote;
        switch(
g_iVoteType[iVote])
        {
            case 
VoteType_PlayersMenu_PlayersVote(iVoteiVoter);
            case 
VoteType_MapMenu_MapVote(iVoteiVoter);
            case 
VoteType_ListMenu_ListVote(iVoteiVoter);
            case 
VoteType_SimpleCastSimpleVote(iVoteiVoter);
        }
        break;
    }


Post your config.

robotortoise 03-29-2014 04:52

Re: Custom Votes Redux (v1.4 - 3/13/14)
 
http://breakfastbungalow.biz/robotor...ustomvotes.cfg

bigborther 03-30-2014 04:39

Re: Custom Votes Redux (v1.4 - 3/13/14)
 
Awesome!
I have used it in my server.
btw,i want to translate the plugin into chinese,could you give me an example to show me how to translate it in the correct form?

robotortoise 04-02-2014 21:24

Re: Custom Votes Redux (v1.4 - 3/13/14)
 
Well? What did you think of my script?

robotortoise 04-02-2014 23:05

Re: Custom Votes Redux (v1.4 - 3/13/14)
 
Is it my problem, or the plugin's?


All times are GMT -4. The time now is 21:30.

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