SNM Fallbacks and VoteSound updates

This commit is contained in:
ChocoTaco 2019-02-20 17:59:45 -05:00
parent 31e21592e9
commit 86b966c9e8
4 changed files with 39 additions and 14 deletions

View file

@ -1,17 +1,28 @@
//Make a sound every so seconds to make sure everyone votes
//
// Enable or Disable VoteSound
// $Host::EnableVoteSound = 1;
//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.
function VoteSound( %game )
{
if( $VoteSoundInProgress && $Host::EnableVoteSound )
function VoteSound( %game, %typename, %arg1, %arg2, %VoteSoundRandom )
{
if( $VoteSoundInProgress && $Host::EnableVoteSound && $VoteSoundRandom $= %VoteSoundRandom )
{
messageAll('', '\c1Vote in Progress: \c0Press Insert for Yes or Delete for No.~wgui/objective_notification.wav', %display);
schedule(12000, 0, "VoteSound", %game);
if(%typename $= "VoteChangeMission")
messageAll('', '\c1Vote in Progress: \c0To change the mission to %1 (%2). Press Insert for Yes or Delete for No.~wgui/objective_notification.wav', %arg1, %arg2 );
else if(%typename $= "VoteSkipMission")
messageAll('', '\c1Vote in Progress: \c0To skip the mission to %1. Press Insert for Yes or Delete for No.~wgui/objective_notification.wav', $EvoCachedNextMission );
else if(%typename $= "VoteChangeTimeLimit")
messageAll('', '\c1Vote in Progress: \c0To change the time limit to %1. Press Insert for Yes or Delete for No.~wgui/objective_notification.wav', %arg1 );
else if(%typename $= "VoteKickPlayer")
messageAll('', '\c1Vote in Progress: \c0To kick player %1. Press Insert for Yes or Delete for No.~wgui/objective_notification.wav', %arg1.name );
else
messageAll('', '\c1Vote in Progress: \c0Press Insert for Yes or Delete for No.~wgui/objective_notification.wav');
schedule(12000, 0, "VoteSound", %game, %typename, %arg1, %arg2, %VoteSoundRandom);
}
else
return;
}