VoteSound Goon method

Using Classic Kick function
This commit is contained in:
ChocoTaco1 2020-04-01 16:20:38 -04:00
parent 397aa72a6c
commit 5523d16317
2 changed files with 13 additions and 77 deletions

View file

@ -3,14 +3,12 @@
// Make a sound every so seconds to make sure everyone votes
//
// Enable or Disable VoteSound
// $Host::EnableVoteSound = 1;
//
// %VotesoundRandom must match $VoteSoundRandom to prevent duplicate messages
// $VoteSoundRandom is generated everytime a vote starts and if it doesnt match an ongoing schedule does not play.
// $Host::EnableVoteSoundReminders = 3;
// 3 for three reminder notifications
function VoteSound( %game, %typename, %arg1, %arg2, %VoteSoundRandom )
function VoteSound( %game, %typename, %arg1, %arg2 )
{
if( Game.scheduleVote !$= "" && $Host::EnableVoteSound && $VoteSoundRandom $= %VoteSoundRandom ) //Game.scheduleVote !$= "" is if vote is active
if( Game.scheduleVote !$= "" && $Host::EnableVoteSoundReminders > 0) //Game.scheduleVote !$= "" is if vote is active
{
%votemsg = "Press Insert for Yes or Delete for No.";
@ -56,10 +54,5 @@ function VoteSound( %game, %typename, %arg1, %arg2, %VoteSoundRandom )
messageAll('', '\c1Vote in Progress: \c0To %1. %2~wgui/objective_notification.wav', %arg1, %votemsg );
echo("Vote in Progress: To" SPC %arg1);
}
if(isEventPending($VoteSoundSchedule))
cancel($VoteSoundSchedule);
$VoteSoundSchedule = schedule(12000, 0, "VoteSound", %game, %typename, %arg1, %arg2, %VoteSoundRandom);
}
}