display the place of players

hello fellow unity users, i need to pick your brains…!!!

i have four players, when one of their scores hits 0 i load the gameover screen!

i would like to display what place them come, as the player with the most points left is 1st and so on!

what would be the best way to implement this?

so the four vaules go into the end script as (int) p1, p2, p3, p4

i want to display this as gui so would i use a GUI.lable and assign the array at the top instead of inside a function?

thanks :slight_smile:

int[] intArray = new int[4] { p1, p2, p3, p4 };
Array.Sort(intArray);
Array.Reverse(intArray);
for(int i=0;i<4;i++)
{
    GUI.Label(new Rect(10,10+(30*i),100,25),"TOP "+(i+1).ToString()+":"+intArray[i]));
}