A basic way of sorting an array is:
PHP Code:
new array[100], aux
for(new i; i < sizeof array - 1; i++)
{
for(new j = i + 1; j < sizeof array; j++)
{
if(array[i] > array[j])
{
aux = array[i]
array[i] = array[j]
array[j] = aux
}
}
}
To reverse the sorting order, change > to <. Apply that to your votes array.
Ideally you would have an array that contains both the votes and the map name, by using an enum. Then you sort the array by the points and on the first/last slot(depending on how you sort) will be the most voted map name.
__________________