04.05.2014, 01:10
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
Can Anyone help?
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; }