Return the 3 top scoring
#1

Hello i have this code to loop through and return the highest score but i want to return the 3 top scores for a 1st,2cnd,3rd

Code:
stock GetHighScorePlayer()
{
	new highScore =-1;
	new playerid = INVALID_PLAYER_ID;
	foreach(new i : Player)
	{
		if(PlayerInfo[i][pScore] > highScore)
		{
			playerid = i;
			highScore = PlayerInfo[i][pScore];
		}
	}
	return playerid;
}
Can Anyone help?
Reply


Messages In This Thread
Return the 3 top scoring - by Kontrol - 04.05.2014, 01:10
Re: Return the 3 top scoring - by superrobot48 - 04.05.2014, 03:29
Re: Return the 3 top scoring - by Kontrol - 04.05.2014, 10:25
AW: Return the 3 top scoring - by Nero_3D - 04.05.2014, 10:39
Re: AW: Return the 3 top scoring - by Kontrol - 04.05.2014, 11:26
Re: Return the 3 top scoring - by XK - 04.05.2014, 11:40
Re: Return the 3 top scoring - by Kontrol - 04.05.2014, 12:32
AW: Re: Return the 3 top scoring - by Nero_3D - 04.05.2014, 13:33

Forum Jump:


Users browsing this thread: 1 Guest(s)