I didn't like that the minigame > win event didn't allow multiple teams to win. So I fixed that.
function MiniGameSO::Win(%this, %mode, %flag, %client)
{
if(isObject(%client) && getMinigameFromObject(%client) != %this)
return;
if(!isSlayerMinigame(%this))
return;
switch(%mode)
{
case 0: //TRIGGERPLAYER
if(isObject(%client))
%this.endRound(%client);
case 1: //TRIGGERTEAM
if(isObject(%client))
{
%team = %client.getTeam();
if(isObject(%team))
%this.endRound(%team);
}
case 2: //CUSTOMPLAYER
%cl = findClientByName(%flag);
if(isObject(%cl))
%this.endRound(%cl);
case 3: //CUSTOMTEAM
%flag = StrReplace(%flag,",","\t");
%count = getFieldCount(%flag);
%team = %this.Teams.getTeamFromName(getField(%flag,0));
for(%x=1;%x<%count;%x++)
%team = %team TAB %this.Teams.getTeamFromName(getField(%flag,%x));
if(isObject(getField(%team,0)))
%this.endRound(%team);
case 4: //CUSTOMSTRING
%this.endRound("CUSTOM" TAB %flag);
case 5: //NONE
%this.endRound();
}
}