[Tool/Web/Other] [TOOLS] ID Tools (some functions)
#8

Nice, but... Why do you need an array to store each player's score? Try this one, it should be better:
pawn Код:
stock GetPlayerWithHighestScore()
{
    new MaxHighestScore, Player, TempScore;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(!IsPlayerConnected(i)) continue;
        if(IsPlayerNPC(i)) continue;
        TempScore = GetPlayerScore(i);
        if(TempScore > MaxHighestScore)
        {
            MaxHighestScore = TempScore;
            Player = i;
        }
    }
    return Player;
}
Reply


Messages In This Thread
[TOOLS] ID Tools (some functions) - by Kwarde - 10.01.2011, 14:49
Re: [TOOLS] ID Tools (some functions) - by Flyfishes - 10.01.2011, 15:46
Re: [TOOLS] ID Tools (some functions) - by Kwarde - 10.01.2011, 16:25
Re: [TOOLS] ID Tools (some functions) - by Gus_Stone - 10.01.2011, 16:34
Re: [TOOLS] ID Tools (some functions) - by Kwarde - 10.01.2011, 16:51
Re: [TOOLS] ID Tools (some functions) - by sleepysnowflake - 11.01.2011, 16:45
Re: [TOOLS] ID Tools (some functions) - by [MNC]Azz - 11.01.2011, 18:12
Re: [TOOLS] ID Tools (some functions) - by Blantas - 11.01.2011, 18:29
Re: [TOOLS] ID Tools (some functions) - by Kwarde - 11.01.2011, 18:38
Re: [TOOLS] ID Tools (some functions) - by Kwarde - 19.01.2011, 13:41

Forum Jump:


Users browsing this thread: 2 Guest(s)