Need help serious!!!!!
#1

Okay, so i need to get the player with the most kills after every round.

For example KillCount[playerid]++; on OnPlayerDeath.
After the round i need to find the one with the most KillCount..
Could u help me? give me an example? Would be nice!
Reply
#2

pawn Код:
stock GetHighestKillCount()
{
    new player = -1;
    for(new i=0; i<GetMaxPlayers(); i++)
    {
        if(IsPlayerConnected(i))
        {
            if(player == -1) player = i;
            if(KillCount[i] > KillCount[player])
            {
                player = i;
            }
        }
    }
    return player;
}
(not tested)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)