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

[L4D1 & L4D2] Votekick - no black screen (Coop & Versus)


Post New Thread Reply   
 
Thread Tools Display Modes
alliedfront
Junior Member
Join Date: Jan 2024
Location: Germany
Old 01-07-2024 , 15:41   Re: [L4D1 & L4D2] Votekick (no black screen)
Reply With Quote #41

Thanks for the update, I guess at least the addition won't hurt either.

This plugin should really be installed by everyone running an L4D1 server to get rid of those annoying guys who destroy games by kicking through exploits one by one and to frustrate these guys instead of the players.

In L4D2 that rejoin exploit was already fixed, but i guess, Valve will never fix it in L4D1:

https://www.youtube.com/watch?v=2oM3i7tOMzg

This exploit was the reason I installed your wonderful VoteKick plugin.

Last edited by alliedfront; 01-07-2024 at 15:42.
alliedfront is offline
alliedfront
Junior Member
Join Date: Jan 2024
Location: Germany
Old 01-09-2024 , 16:26   Re: [L4D1 & L4D2] Votekick (no black screen)
Reply With Quote #42

A friend was kicked in a versus game on my server: there were 3 players on his team, one of them started the votekick against him. There were 4 players on the other team. He was kicked, I joined later and the second player on his former team said he would have voted no, but my friend was kicked. So the vote was on his team was: target: No (automatically, i guess), 2d Player: No, client (starter): Yes. So within his own team, the vote should have failed. But it was successful.

Is it the case that with this plugin players on the opposing team have the right to vote whether a player from the other team is kicked? In the competitive game mode versus with two teams, I think the opponent should have no say in whether a player from the other team is kicked or not. I've always wondered why I'm asked to vote "yes" or or "no" on a vote kick within an opposing team.

If so, is there a switch to limit voting to the team?

Last edited by alliedfront; 01-09-2024 at 16:40.
alliedfront is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 01-09-2024 , 17:01   Re: [L4D1 & L4D2] Votekick (no black screen)
Reply With Quote #43

> Is it the case that with this plugin players on the opposing team have the right to vote whether a player from the other team is kicked?
Yes.

> If so, is there a switch to limit voting to the team?
Sorry, I don't know how. Maybe somebody other willing to fix this.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
alliedfront
Junior Member
Join Date: Jan 2024
Location: Germany
Old 01-09-2024 , 17:14   Re: [L4D1 & L4D2] Votekick (no black screen)
Reply With Quote #44

Quote:
Originally Posted by Dragokas View Post
> Is it the case that with this plugin players on the opposing team have the right to vote whether a player from the other team is kicked?
Yes.

> If so, is there a switch to limit voting to the team?
Sorry, I don't know how. Maybe somebody other willing to fix this.

I guess VoteKick was not intended and developed for games where two teams play against each other. That's a bummer. I look into this, but i guess, my skills are limited.
alliedfront is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 01-09-2024 , 19:20   Re: [L4D1 & L4D2] Votekick (no black screen)
Reply With Quote #45

It is possible to do by replacing "menu.DisplayVoteToAll" with "menu.DisplayVote" and passing the desired array of clients allowed to vote atm. By I'm limited in time to do it myself.
Initially, this plugin is only designed for coop game mode, and never intended for versus.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 01-09-2024 at 19:21.
Dragokas is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 01-10-2024 , 05:59   Re: [L4D1 & L4D2] Votekick (no black screen)
Reply With Quote #46

alliedfront, check if it works.
Attached Files
File Type: zip votekick_v2.zip (27.1 KB, 15 views)
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
alliedfront
Junior Member
Join Date: Jan 2024
Location: Germany
Old 01-11-2024 , 17:53   Re: [L4D1 & L4D2] Votekick (no black screen)
Reply With Quote #47

Quote:
Originally Posted by Dragokas View Post
It is possible to do by replacing "menu.DisplayVoteToAll" with "menu.DisplayVote" and passing the desired array of clients allowed to vote atm. By I'm limited in time to do it myself.
Initially, this plugin is only designed for coop game mode, and never intended for versus.
Yes, I understand that well. I really like your plugin, even though it wasn't intended for versus, because it is also effective against abuse of exploits in versus games, where emotions are running high, to terrorize other players and to kick them out of the game.

The day before yesterday I was reading the documentation for Sourcemod and, like you, came across this menu.DisplayVote function. It should be possible for both cases (co-op and versus) to fill the array only with players from the corresponding team. Special cases also arise (target in deny-list, then fill array with players of both teams, if it's a versus game). The only thing I still find problematic about menu.DisplayVote is that when there is a tie, a random value is apparently returned, which is probably aimed primarily at mapvote votes: "On a tie, a random item will be returned from a list of the tied items." For the vote kick we would need the function to return, whether there was a tie or not. If that's not possible, perhaps we could get the exact result via SetVoteResultCallback().

Unfortunately I haven't had time to program anything yet, but I have already set up the Linux server in vmware on my Windows PC and installed LinuxGSM L4D on it (like on the live server) in order to first test what I am programming at home.

Last edited by alliedfront; 01-11-2024 at 18:28.
alliedfront is offline
alliedfront
Junior Member
Join Date: Jan 2024
Location: Germany
Old 01-11-2024 , 17:58   Re: [L4D1 & L4D2] Votekick (no black screen)
Reply With Quote #48

Quote:
Originally Posted by Dragokas View Post
alliedfront, check if it works.
Thanks, I'll take a look when I have some time.

Update (26.01.2024): Versus support for "L4D1 & L4D2] Votekick (no black screen)" complete. All features work on Versus (kick/unkick, passvote, veto, blocklist, etc.). I tested it in each scenario for some time to find remaining bugs on L4d 1 and 2 on my local and live server. If I don't find any more bugs, I'll post it here on Monday evening with a summary/description.

Last edited by alliedfront; 01-26-2024 at 04:50.
alliedfront is offline
alliedfront
Junior Member
Join Date: Jan 2024
Location: Germany
Old 01-29-2024 , 12:40   Re: [L4D1 & L4D2] Votekick (no black screen)
Reply With Quote #49

Hi,

1.

My changes for Versus support in version 2.6 are based on the following requirements:

a) Compatibility with existing installations: Co-Op: no changes in terms of configuration variables, functionality and behavior.

b) Minimization of sources of errors: Changes in the code only if necessary for Versus support (exception: minor corrections of existing bugs)

c) Minimization of bugs resulting from the changed code: through extensive testing in L4D 1 and L4D 2, especially for:

- vk, sm_vk, sm_votekick
- sm_veto
- sm_votepass
- kick spectator
- blocklist
- kick-Reason

2.

Changed files, see also the two diffs (version 2.5 to 2.6) for details:

a) sm_votekick.cfg (in cfg directory)
b) l4d_votekick.phrases.txt (in translation directory)
c) l4d_votekick.sp (in scripting directory)


to a) added comfiguration variables:

- As Versus is a highly competitive difficulty, as an experienced Versus player, i believe it is necessary to have the possibility to set a different minimum of players in this gamemode. For the most time i use 3 or lower.

Code:
// Minimum players present in versus games to allow starting vote for kick
// -
// Default: "4"
sm_votekick_minplayers_versus "4"

- After the vote has ended, the detailed results can be displayed, e.g.

"Vote ended. (Yes - No - Unanswered): 2 - 1 - 1"

Code:
// Allow to show mumber of yesVotes - noVotes? (1 - Yes / 0 - No)
// -
// Default: "0"
sm_votekick_show_vote_details "0"
to b)

- Added translation for voting results with colored Yes, No and corresponding numbers.
- Grammatical correction.
- I suggest changing the default "kick_reason" value to a neutral tone: "You have been kicked out of the session" since people are often not kicked for violating rules in both modes co-op and versus.

to c)

- added functions:

Code:
// Versus: count members of issuer team 
int GetRealTeamClientCount(int iTeam)


// The advanced vote handling callback receives detailed results of voting, 
// which will be displayed to the Team the issuer belongs to (versus) or to all (co-op), 
// if "sm_votekick_show_vote_details" is set to "1" ("0": vote results are not shown)
// This handler is et via Menu.VoteResultCallback property (see below). Since this callback is set, 
// MenuAction_VoteEnd will not be called for both menu.DisplayVoteToAll and menu.DisplayVote. 
// The use of Menu.VoteResultCallback was necessary, because on a tie, a random item is returned by menu.VoteDisplay()
// from a list of the tied items (confirmed in my tests: sometimes in case of a tie it returns 0 and player is kicked out, 
// which is of course not acceptable. Behavior may be due to intended use in the case of map voting).

public void Handle_VoteResults(	Menu menu,	// The menu being voted on.
				int num_votes,				// Number of votes tallied in total.
				int num_clients,			// Number of clients who could vote.
				const int[][] client_info,	// Array of clients.  Use VOTEINFO_CLIENT_ defines.
				int num_items,				// Number of unique items that were selected.
				const int[][] item_info )	// Array of items, sorted by count.  Use VOTEINFO_ITEM defines.



// Versus: msg only to members of issuer team

stock void CPrintToChatTeam(const char[] format, any ...)

stock void CPrintHintTextToTeam(const char[] format, any ...)
- added variables (other than through cfg file)

Code:
// Versus: don't allow competing team to unkick a player that was kicked by issuer team ( target could be friends with compüeting team to destroy issuer team or simply an anonymous tk )
// kicked target: stores team id of issuer team 
hMapPlayerTeam
- fixed a bug that was inherited

Code:
// leftover expired entries (negative time) of kicked players are deleted, for reasons of clarity
// (had 3 pages of expired entries after 2 days, which were displayed on each !vk to the client)
- for details regarding logic and other Versus-related changes see also diffs.

3.

As an Versus player since 2009 (there are actually many who have stuck with it to this day) and who has started playing again after a few years of abstinence, it was painful to see exploits being used especially in L4D 1 to destroy matches. This is where "[L4D1 & L4D2] Votekick (no black screen)" comes into play, which effectively prevents this.
Thanks again to “Dragokas” for creating and continually expanding this plugin, as well as addressing key exploits in the game over time. However, since the plugin was written for Co-op, I was happy to do my part in extending the functionality to include full Versus support. Since Versus is also an important game mode in L4D 1/2 and the changes at hand are major in nature, I suggest making this a major release (3.0 instead of 2.6).
Attached Files
File Type: zip votekick_v2.zip (29.9 KB, 8 views)
File Type: sp Get Plugin or Get Source (l4d_votekick.sp - 10 views - 38.3 KB)
File Type: txt diff_l4d_votekick.phrases_2.5_2.6.txt (787 Bytes, 8 views)
File Type: txt diff_l4d_votekick_2.5_2.6.txt (11.1 KB, 7 views)

Last edited by alliedfront; 01-29-2024 at 12:52.
alliedfront is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 01-30-2024 , 02:11   Re: [L4D1 & L4D2] Votekick (no black screen)
Reply With Quote #50

@alliedfront, looks fine. Much thanks!
I just did optimizations. Please, check in production.

1st post is updated. Not tested.

Quote:
3.0 (29-Jan-2024) by alliedfront
- Added full support for versus.
- Fixed unkick list overflowing with old players.
- Fixed invalid target errors.
- Added ConVar "sm_votekick_show_vote_details" - Allow to show mumber of yesVotes - noVotes? (1 - Yes / 0 - No)
- Added ConVar "sm_votekick_minplayers_versus" - Minimum players present in versus games to allow starting vote for kick
- Added details on count of yes/no/abstained vote results.
- Translation file is updated.

3.1 (30-Jan-2024)
- Code optimizations.
- Translation file is updated.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas 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:34.


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