From 6cbddebc423c2927e0aee2b4e8f50fd3f493489e Mon Sep 17 00:00:00 2001 From: ChocoTaco1 Date: Fri, 19 Mar 2021 15:04:12 -0400 Subject: [PATCH] Minimum Participation for Voting --- Classic/scripts/autoexec/VoteMenu.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Classic/scripts/autoexec/VoteMenu.cs b/Classic/scripts/autoexec/VoteMenu.cs index 552b331..3df956a 100644 --- a/Classic/scripts/autoexec/VoteMenu.cs +++ b/Classic/scripts/autoexec/VoteMenu.cs @@ -1415,7 +1415,11 @@ function calcVotes(%typeName, %arg1, %arg2, %arg3, %arg4) } } - Game.evalVote(%typeName, false, %arg1, %arg2, %arg3, %arg4); + if((Game.totalVotesFor + Game.totalVotesAgainst) >= mFloor(ClientGroup.getCount()/2)) + Game.evalVote(%typeName, false, %arg1, %arg2, %arg3, %arg4); + else + messageAll('MsgVoteFailed', '\c2Vote minimum participation not reached. Total votes %1 out of %2 required.',(Game.totalVotesFor + Game.totalVotesAgainst),mFloor(ClientGroup.getCount()/2)); + Game.scheduleVote = ""; Game.scheduleVoteArgs = ""; Game.kickClient = "";