29.12.2010, 22:23
hi, i have a function to get the player's highest money, but how to get,after that, the 2nd player with the highest money? and not the first one again. Thanks.
new topid,secondid,topcash,secondcash;
for(new i=0;i<MAX_PLAYERS;i++)
{
if(GetPlayerMoney(i) > topcash)
{
topcash = GetPlayerMoney(i);
topid = i;
}
if(GetPlayerMoney(i) > secondcash && i != topid)
{
secondcash = GetPlayerMoney(i);
secondid = i;
}
}