12.11.2011, 20:48
pawn Код:
new biggest;
for(new i = 0; i < sizeof(VoteOptions); i++)
if(VoteOptions[i] > biggest)
biggest = VoteOptions[i];
if(biggest == VoteOptions[0])
{
//Do smth. when variable 1 is the biggest
}
else if(biggest == VoteOptions[1]
{
//Do smth. when variable 2 is the biggest
}
else if(biggest == VoteOptions[2])
{
//Do smth. when variable 3 is the biggest
}
//etc...