Raised This Month: $51 Target: $400
 12% 

[L4D,L4D2,TF2] BuiltinVotes 0.5.8 (2013-01-29)


Post New Thread Reply   
 
Thread Tools Display Modes
jasonfrog
Senior Member
Join Date: Mar 2008
Old 02-09-2012 , 11:42   Re: [L4D,L4D2,TF2] BuiltinVotes 0.5.1 (2012-01-19)
Reply With Quote #101

To anyone that is using this wonderful extension on their TF2 servers, but has users commenting that the vote panel is too big, isn't transparent or obscures their view, then there is at least one solution.

This HUD resource file removes the background of the panel.

http://www.thehh.co.uk/votehud/votehud.res
Place 'votehud.res' in C:\Program Files\Steam\steamapps\[account name]\team fortress 2\tf\resource\ui\



Auto-installer: http://www.thehh.co.uk/votehud/Transparent_Vote_Hud.exe
jasonfrog is offline
lucasdidur
Senior Member
Join Date: Jan 2011
Location: Brazil
Old 02-16-2012 , 16:12   Re: [L4D,L4D2,TF2] BuiltinVotes 0.5.1 (2012-01-19)
Reply With Quote #102

It's possible to make a DisplayBuiltinVoteFail to have a custon message?

exg:

PHP Code:
DisplayBuiltinVoteFail(vote"Sorry, but NOT :("); 

Like DisplayBuiltinVotePass
PHP Code:
DisplayBuiltinVotePass(vote"Vote Successful"); 

EDIT:
It's possible to make Live votes on Yes/No types?

Like on default TF2 Votes, shows the number of votes, as they are voted.
__________________




Last edited by lucasdidur; 02-16-2012 at 16:18.
lucasdidur is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 02-16-2012 , 16:37   Re: [L4D,L4D2,TF2] BuiltinVotes 0.5.1 (2012-01-19)
Reply With Quote #103

Quote:
Originally Posted by lucasdidur View Post
It's possible to make a DisplayBuiltinVoteFail to have a custon message?

exg:

PHP Code:
DisplayBuiltinVoteFail(vote"Sorry, but NOT :("); 
Like DisplayBuiltinVotePass
PHP Code:
DisplayBuiltinVotePass(vote"Vote Successful"); 
Sadly, no. The failure UserMessage sent out to the end users only takes a code number... and the only valid ones for VoteFailed are 0 (Generic), 3 (No won), and 4 (Not Enough Votes). There are a bunch of other codes, but they're used by CallVoteFailed, which is used when a user tries to call a vote from the menu but it fails.

Quote:
Originally Posted by lucasdidur View Post
EDIT:
It's possible to make Live votes on Yes/No types?

Like on default TF2 Votes, shows the number of votes, as they are voted.
Oh, did Valve fix that?

That was broken when I was writing this extension and would only show 1 for Yes to the person who initially started the vote right before the vote screen vanished.

There's already a programming hook in place for this kind of thing, but it does nothing in the TF2 version. The L4D and L4D2 versions of BuiltinVotes send a vote_changed event.

I'll have to test it out again with my vote event/usermessage sniffer running to see what events/usermessages it sends out to update the votes. I assume it's the vote_changed event, the same event that the L4D and L4D2 versions call.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 02-16-2012 at 16:38.
Powerlord is offline
lucasdidur
Senior Member
Join Date: Jan 2011
Location: Brazil
Old 02-16-2012 , 18:25   Re: [L4D,L4D2,TF2] BuiltinVotes 0.5.1 (2012-01-19)
Reply With Quote #104

Quote:
Originally Posted by Powerlord View Post
Oh, did Valve fix that?

That was broken when I was writing this extension and would only show 1 for Yes to the person who initially started the vote right before the vote screen vanished.

There's already a programming hook in place for this kind of thing, but it does nothing in the TF2 version. The L4D and L4D2 versions of BuiltinVotes send a vote_changed event.

I'll have to test it out again with my vote event/usermessage sniffer running to see what events/usermessages it sends out to update the votes. I assume it's the vote_changed event, the same event that the L4D and L4D2 versions call.
I think so, because on my server, when I start a vote, the vote count appears
__________________



lucasdidur is offline
lucasdidur
Senior Member
Join Date: Jan 2011
Location: Brazil
Old 02-16-2012 , 20:38   Re: [L4D,L4D2,TF2] BuiltinVotes 0.5.1 (2012-01-19)
Reply With Quote #105

Hello, I'm want to make a plugin for votekill.

But how do I add options for Menu Yes/No like Client ID, to use to execute the functions?

I use SetBuiltinVoteArgument() to indicate the target player's vote?
__________________



lucasdidur is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 02-17-2012 , 10:19   Re: [L4D,L4D2,TF2] BuiltinVotes 0.5.1 (2012-01-19)
Reply With Quote #106

Quote:
Originally Posted by lucasdidur View Post
Hello, I'm want to make a plugin for votekill.

But how do I add options for Menu Yes/No like Client ID, to use to execute the functions?

I use SetBuiltinVoteArgument() to indicate the target player's vote?
Right now, custom votes don't really have anywhere to store data, as the argument is the actual vote text. It's something I'll have to address in the next version.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 02-17-2012 at 10:21.
Powerlord is offline
nowakpl
Junior Member
Join Date: Jan 2009
Old 02-17-2012 , 12:07   Re: [L4D,L4D2,TF2] BuiltinVotes 0.5.1 (2012-01-19)
Reply With Quote #107

I'm using UMC3 (http://forums.alliedmods.net/showthread.php?t=134190) together with BuiltinVotes, server will crash if map changes during the vote.
1) start vote,
2) change map during the vote,
3) server crashes.
nowakpl is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 02-17-2012 , 13:44   Re: [L4D,L4D2,TF2] BuiltinVotes 0.5.1 (2012-01-19)
Reply With Quote #108

Quote:
Originally Posted by nowakpl View Post
I'm using UMC3 (http://forums.alliedmods.net/showthread.php?t=134190) together with BuiltinVotes, server will crash if map changes during the vote.
1) start vote,
2) change map during the vote,
3) server crashes.
Is this on Linux or Windows?

I've heard reports of this, but I haven't had a chance to set up a server to test it.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
lucasdidur
Senior Member
Join Date: Jan 2011
Location: Brazil
Old 02-17-2012 , 15:55   Re: [L4D,L4D2,TF2] BuiltinVotes 0.5.1 (2012-01-19)
Reply With Quote #109

Quote:
Originally Posted by nowakpl View Post
I'm using UMC3 (http://forums.alliedmods.net/showthread.php?t=134190) together with BuiltinVotes, server will crash if map changes during the vote.
1) start vote,
2) change map during the vote,
3) server crashes.
Maybe you need to use the last version 3.1 R2

http://code.google.com/p/sourcemod-u...downloads/list
__________________



lucasdidur is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 02-17-2012 , 16:14   Re: [L4D,L4D2,TF2] BuiltinVotes 0.5.1 (2012-01-19)
Reply With Quote #110

Quote:
Originally Posted by lucasdidur View Post
Maybe you need to use the last version 3.1 R2

http://code.google.com/p/sourcemod-u...downloads/list
Well, no, I can think of at least one reason why BuiltinVotes might crash the server if a vote is interrupted by a map change... When a BuiltinVotes handle is closed without the vote finishing, it tries to send a VoteFailed usermessage to all users on the server.

This could potentially cause a race condition and/or the server binary to crash as it tries to send UserMessages to users that aren't really connected at the time.

I may have to remove this automatic action... it was a failsafe to prevent votes from closing a BuiltinVotes handle without calling DisplayVotePass, DisplayVotePass2, or DisplayVoteFail, because users can't vote again until one of those 3 are called, the user disconnects, or the map changes.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 02-17-2012 at 16:14.
Powerlord is offline
Reply



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


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