GetPlayerWithMostScore????
#2

Untested .. returns the player ID with the highest score.

pawn Код:
stock GetPlayerWithMostScore()
{
    new
        sHighestID  =   INVALID_PLAYER_ID,
        sHighest    =   0;
       
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(GetPlayerScore( i ) > sHighest)
        {
            sHighest = GetPlayerScore(i);
            sHighestID = i;
        }
    }
    return sHighestID;
}
Reply


Messages In This Thread
GetPlayerWithMostScore???? - by [MNC]Azz - 03.12.2010, 16:34
Re: GetPlayerWithMostScore???? - by woot - 03.12.2010, 16:56
Re: GetPlayerWithMostScore???? - by [MNC]Azz - 03.12.2010, 17:14
Re: GetPlayerWithMostScore???? - by [MNC]Azz - 03.12.2010, 17:49
Re: GetPlayerWithMostScore???? - by knackworst - 03.12.2010, 21:34

Forum Jump:


Users browsing this thread: 2 Guest(s)