Map Votes loop (More than 2 maps)
#2

I think this will help. If not, reply.
pawn Код:
new highestvar = DerbyMapVotes[0],Hvar=0;

    for(new i = 1; i < sizeof(DerbyMapVotes); i++)
    {
        if(DerbyMapVotes[i] > highestvar)
        {
            highestvar = DerbyMapVotes[i];
            Hvar=0;
        }
        else if(DerbyMapVotes[i] == highestvar)Hvar++;
    }
//if Hvar is 1 or more, that means there is tie/draw in voting
Reply


Messages In This Thread
Map Votes loop (More than 2 maps) - by Mellnik - 11.08.2012, 19:14
Re: Map Votes loop (More than 2 maps) - by Roko_foko - 11.08.2012, 19:20
Re: Map Votes loop (More than 2 maps) - by leonardo1434 - 11.08.2012, 19:26
Re: Map Votes loop (More than 2 maps) - by Roko_foko - 11.08.2012, 19:42
Re: Map Votes loop (More than 2 maps) - by leonardo1434 - 11.08.2012, 19:48
AW: Re: Map Votes loop (More than 2 maps) - by Mellnik - 11.08.2012, 21:22

Forum Jump:


Users browsing this thread: 1 Guest(s)