mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-11 22:24:33 +00:00
Converted ElseIFs to Case
This commit is contained in:
parent
944a5901b3
commit
91de1c4a17
2 changed files with 85 additions and 90 deletions
|
|
@ -10,22 +10,25 @@ function VoteSound( %game, %typename, %arg1, %arg2, %VoteSoundRandom )
|
|||
{
|
||||
if( $VoteSoundInProgress && $Host::EnableVoteSound && $VoteSoundRandom $= %VoteSoundRandom )
|
||||
{
|
||||
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")
|
||||
switch$(%typename)
|
||||
{
|
||||
if(%arg1 $= "999") %arg1 = "unlimited";
|
||||
messageAll('', '\c1Vote in Progress: \c0To change the time limit to %1. Press Insert for Yes or Delete for No.~wgui/objective_notification.wav', %arg1 );
|
||||
case "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 );
|
||||
|
||||
case "VoteSkipMission":
|
||||
messageAll('', '\c1Vote in Progress: \c0To skip the mission to %1. Press Insert for Yes or Delete for No.~wgui/objective_notification.wav', $EvoCachedNextMission );
|
||||
|
||||
case "VoteChangeTimeLimit":
|
||||
if(%arg1 $= "999") %arg1 = "unlimited";
|
||||
messageAll('', '\c1Vote in Progress: \c0To change the time limit to %1. Press Insert for Yes or Delete for No.~wgui/objective_notification.wav', %arg1 );
|
||||
|
||||
case "VoteKickPlayer":
|
||||
messageAll('', '\c1Vote in Progress: \c0To kick player %1. Press Insert for Yes or Delete for No.~wgui/objective_notification.wav', %arg1.name );
|
||||
|
||||
case "VoteTournamentMode":
|
||||
messageAll('', '\c1Vote in Progress: \c0To change the mission to Tournament Mode (%1). Press Insert for Yes or Delete for No.~wgui/objective_notification.wav', %arg1, %arg2 );
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue